/* funhoot.com: one stylesheet for every page. System fonts only, nothing fetched from anywhere else.
   Light and dark follow the device, in the game's own default looks: Glass (light) and Velvet Dusk (dark),
   app/lib/theme/app_theme.dart. Colour pairs are checked for 4.5:1 contrast (research/qa_site/REPORT.md). */

:root {
  color-scheme: light dark;
  --bg: #f5f1f6;
  --bg-top: #eef0f8;
  --bg-bottom: #edf4f2;
  --surface: #ffffff;
  --surface-soft: rgba(255, 255, 255, 0.66);
  --field: #fbfbfd;
  --line: rgba(28, 28, 30, 0.1);
  --field-line: #85858b;
  --text: #1c1c1e;
  --dim: #55555b;
  --link: #0a5fcc;
  --btn-from: #1a6fdd;
  --btn-to: #0a5fcc;
  --on-btn: #ffffff;
  --focus: #0a5fcc;
  --ok: #1b6e34;
  --error: #b3261e;
  --shadow: 0 22px 44px -22px rgba(28, 28, 60, 0.38);
  --glow: rgba(10, 95, 204, 0.3);
  --font: "Avenir Next", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #2c0e3b;
    --bg-top: #1b0a29;
    --bg-bottom: #43123f;
    --surface: #2b1239;
    --surface-soft: rgba(43, 18, 57, 0.7);
    --field: #24102f;
    --line: rgba(255, 241, 244, 0.13);
    --field-line: #9c7f99;
    --text: #fff1f4;
    --dim: #d9c2d6;
    --link: #ffc09a;
    --btn-from: #ffc09a;
    --btn-to: #ff8e5e;
    --on-btn: #2a0d2e;
    --focus: #ffc09a;
    --ok: #9be7b0;
    --error: #ffb4ab;
    --shadow: 0 22px 44px -22px rgba(0, 0, 0, 0.75);
    --glow: rgba(255, 142, 94, 0.32);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 16px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--text);
  background-color: var(--bg);
  background-image: linear-gradient(180deg, var(--bg-top) 0, var(--bg) 520px, var(--bg-bottom) 100%);
}

h1,
h2,
h3 {
  margin: 0 0 0.5em;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.6rem, 1.25rem + 1.5vw, 2.25rem);
  font-weight: 800;
}

h3 {
  font-size: 1.2rem;
  font-weight: 700;
}

p,
ul,
ol {
  margin: 0 0 1em;
}

a {
  color: var(--link);
  text-underline-offset: 0.16em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

img {
  max-width: 100%;
  height: auto;
}

/* The form stays hidden until its script runs; its display: grid would otherwise show it. */
[hidden] {
  display: none !important;
}

.wrap {
  width: min(100% - 40px, 1080px);
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  box-shadow: var(--shadow);
}

.skip:focus {
  top: 12px;
}

/* Header and footer */

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding-block: 16px;
}

.brand {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  text-decoration: none;
}

.site-nav ul {
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--text);
  font-weight: 650;
  text-decoration: none;
}

.site-nav a:hover {
  background: var(--surface-soft);
}

.site-nav a[aria-current="page"] {
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}

.site-footer {
  margin-top: 24px;
  padding-block: 28px 44px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 0.95rem;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  display: inline-block;
  padding-block: 10px;
  color: var(--text);
  font-weight: 650;
}

.site-footer .sep {
  margin-inline: 8px;
}

/* Home: the hero */

.hero {
  display: grid;
  gap: 32px;
  align-items: center;
  padding-block: 16px 48px;
}

.hero-text {
  text-align: center;
}

.title {
  margin: 0;
  font-weight: 800;
}

.title .name {
  display: block;
  font-size: clamp(3rem, 1.9rem + 6vw, 5.4rem);
  letter-spacing: -0.04em;
  line-height: 1;
}

.title .fair {
  display: inline-flex;
  align-items: center;
  gap: 0.28em;
  margin-top: 0.3em;
  font-size: clamp(1.6rem, 1.2rem + 2vw, 2.5rem);
  font-weight: 750;
  letter-spacing: -0.02em;
}

.amp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.2em;
  height: 1.2em;
  border-radius: 0.3em;
  background: linear-gradient(90deg, var(--btn-from), var(--btn-to));
  color: var(--on-btn);
  font-size: 0.8em;
  box-shadow: 0 0 18px var(--glow);
}

.promise {
  margin: 20px auto 28px;
  max-width: 22em;
  font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.45rem);
  font-weight: 650;
  line-height: 1.35;
  text-wrap: balance;
}

.cta {
  margin: 0;
}

.play,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--btn-from), var(--btn-to));
  color: var(--on-btn);
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 14px 30px -12px var(--glow);
}

.play {
  min-height: 62px;
  padding: 14px 38px;
  font-size: 1.35rem;
}

.play::before {
  content: "";
  border-style: solid;
  border-width: 0.42em 0 0.42em 0.7em;
  border-color: transparent transparent transparent currentColor;
}

.play:hover,
.button:hover {
  filter: brightness(1.07);
}

.play-note {
  margin: 14px 0 0;
  color: var(--dim);
  font-size: 0.98rem;
}

.soon {
  display: inline-block;
  margin: 18px 0 0;
  padding: 6px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  font-size: 0.98rem;
  font-weight: 700;
}

.hero-shot {
  display: flex;
  justify-content: center;
  margin: 0;
}

/* Screenshots of the game, framed like a phone's screen */

.phone {
  width: min(66vw, 280px);
  margin: 0;
}

.phone img {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 560px;
  margin: 0 auto;
}

.pair .phone {
  width: 100%;
}

.pair .phone img {
  border-radius: 22px;
}

figcaption {
  margin-top: 10px;
  color: var(--dim);
  font-size: 0.92rem;
  text-align: center;
}

/* Home: sections */

.section {
  padding-block: 48px;
  border-top: 1px solid var(--line);
}

.lead {
  max-width: 38em;
  color: var(--dim);
  font-size: 1.15rem;
}

.split {
  display: grid;
  gap: 32px;
  align-items: center;
}

.steps {
  display: grid;
  gap: 14px;
  margin: 0 0 1em;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-soft);
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(90deg, var(--btn-from), var(--btn-to));
  color: var(--on-btn);
  font-size: 1.3rem;
  font-weight: 800;
}

.steps h3 {
  margin: 2px 0 4px;
}

.steps p {
  margin: 0;
  color: var(--dim);
}

.card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.card > :last-child {
  margin-bottom: 0;
}

.cards {
  display: grid;
  gap: 18px;
}

.cards h2 {
  font-size: clamp(1.45rem, 1.2rem + 1vw, 1.9rem);
}

.facts {
  margin: 0;
  padding-left: 1.15em;
}

.facts li {
  margin-bottom: 0.45em;
}

.note {
  color: var(--dim);
}

/* The games list (one game for now) */

.game-list {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.game-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 16px;
  align-items: center;
}

.game-item img {
  width: 72px;
  height: 72px;
  border-radius: 17px;
}

.game-item h3 {
  margin: 0 0 2px;
}

.game-item p {
  margin: 0;
  color: var(--dim);
}

.game-item .links {
  grid-column: 1 / -1;
  margin: 4px 0 0;
}

.button {
  min-height: 48px;
  padding: 10px 26px;
  font-size: 1.08rem;
}

/* Questions */

.faq details {
  margin-bottom: 10px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-soft);
}

.faq summary {
  position: relative;
  min-height: 48px;
  padding: 14px 32px 14px 0;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2.5px solid currentColor;
  border-bottom: 2.5px solid currentColor;
  transform: translateY(-70%) rotate(45deg);
}

.faq details[open] summary::after {
  transform: translateY(-25%) rotate(-135deg);
}

.faq details > p {
  margin: 0 0 16px;
}

/* Text pages: privacy, help */

.page {
  padding-block: 12px 40px;
}

.page h1 {
  font-size: clamp(2.2rem, 1.7rem + 2.5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.prose {
  max-width: 44rem;
}

.prose h2 {
  margin-top: 1.8em;
  font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.75rem);
}

.prose h3 {
  margin-top: 1.4em;
}

.prose ul {
  padding-left: 1.2em;
}

.prose li {
  margin-bottom: 0.45em;
}

.updated {
  color: var(--dim);
}

.summary {
  margin: 24px 0 8px;
}

.summary h2 {
  margin-top: 0;
}

.summary ul {
  margin: 0;
}

/* The feedback form */

.form {
  display: grid;
  gap: 20px;
  margin: 0 0 24px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
}

.field .optional {
  color: var(--dim);
  font-weight: 600;
}

.hint {
  margin: 6px 0 0;
  color: var(--dim);
  font-size: 0.95rem;
}

.form textarea,
.form input[type="email"] {
  display: block;
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--field-line);
  border-radius: 14px;
  background: var(--field);
  color: var(--text);
  font: inherit;
}

.form textarea {
  min-height: 11em;
  resize: vertical;
}

.form [aria-invalid="true"] {
  border-color: var(--error);
  border-width: 2px;
}

.field-error {
  margin: 6px 0 0;
  color: var(--error);
  font-weight: 650;
}

.field-error:empty {
  display: none;
}

.counter {
  margin: 6px 0 0;
  color: var(--dim);
  font-size: 0.9rem;
  text-align: right;
}

.honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.sends {
  margin: 0;
  color: var(--dim);
  font-size: 0.95rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.button[disabled] {
  cursor: progress;
  opacity: 0.7;
}

.status {
  margin: 0;
  font-weight: 700;
}

.status:empty {
  display: none;
}

.status.ok {
  color: var(--ok);
}

.status.error {
  color: var(--error);
}

/* Wider screens */

@media (min-width: 860px) {
  .hero {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 56px;
    padding-block: 40px 76px;
  }

  .hero-text {
    text-align: left;
  }

  .promise {
    margin-left: 0;
  }

  .split {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 64px;
  }

  .split.flip > :first-child {
    order: 2;
  }

  .cards {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .game-item {
    grid-template-columns: 88px 1fr auto;
    gap: 22px;
  }

  .game-item img {
    width: 88px;
    height: 88px;
    border-radius: 20px;
  }

  .game-item .links {
    grid-column: auto;
    margin: 0;
  }

  .section {
    padding-block: 64px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .play,
  .button,
  .site-nav a {
    transition: filter 0.15s ease, background-color 0.15s ease;
  }

  .faq summary::after {
    transition: transform 0.15s ease;
  }
}
