/* Still Nine landing page. Forest and gold, the store posters' look (D-033); colours from src/styles/tokens.css. */

@font-face {
  font-family: 'Fraunces';
  src: url('/fonts/fraunces-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Fraunces';
  src: url('/fonts/fraunces-italic.woff2') format('woff2');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Atkinson';
  src: url('/fonts/atkinson-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Atkinson';
  src: url('/fonts/atkinson-700.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

:root {
  --forest: #13302a;
  --forest-deep: #0b201c;
  --gold: #d9b26a;
  --gold-soft: #fbe7b4;
  --paper: #f4eddf;
  --paper-glow: #fffaf0;
  --ink: #13302a;
  --ink-soft: #3f4b44;
  --accent: #855409;
  --line: #d4cab6;
  --card: #fffdf8;
  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --ui: 'Atkinson', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --wrap: min(1120px, 100% - 48px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0e1424;
    --paper-glow: #161e33;
    --ink: #f1e9d8;
    --ink-soft: #c3bba9;
    --accent: #e3bd72;
    --line: #2a3350;
    --card: #141b2e;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.125rem/1.6 var(--ui);
  -webkit-font-smoothing: antialiased;
}

img,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

h1,
h2 {
  font-family: var(--display);
  font-weight: 700;
  font-variation-settings: 'opsz' 144, 'WONK' 0;
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}

h1 em,
h2 em {
  font-weight: 500;
  font-style: italic;
  color: var(--accent);
}

.wrap {
  width: var(--wrap);
  margin-inline: auto;
}

.eyebrow {
  margin: 0 0 14px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--gold-soft);
  color: var(--forest);
  font-weight: 700;
}
.skip:focus {
  top: 16px;
}

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

/* ---------- Hero ---------- */

.hero,
.end {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(60rem 36rem at 75% 20%, rgb(217 178 106 / 0.16), transparent 70%),
    radial-gradient(50rem 40rem at 0% 100%, rgb(0 0 0 / 0.35), transparent 70%), var(--forest);
  color: #f6efdf;
}

/* A faint Sudoku grid: thin lines every cell, stronger every third. */
.hero-grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.5;
  background-image:
    linear-gradient(rgb(217 178 106 / 0.16) 2px, transparent 2px),
    linear-gradient(90deg, rgb(217 178 106 / 0.16) 2px, transparent 2px),
    linear-gradient(rgb(217 178 106 / 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgb(217 178 106 / 0.07) 1px, transparent 1px);
  background-size:
    216px 216px,
    216px 216px,
    72px 72px,
    72px 72px;
  background-position: center;
  mask-image: radial-gradient(ellipse at 70% 40%, #000 10%, transparent 75%);
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 700;
}
.brand img {
  border-radius: 9px;
}

.top-play {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gold-soft);
  text-decoration: none;
  padding: 10px 16px;
  border: 1px solid rgb(251 231 180 / 0.35);
  border-radius: 999px;
  transition: background 0.2s ease;
}
.top-play:hover {
  background: rgb(251 231 180 / 0.1);
}

.hero-body {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 56px;
  padding: 40px 0 96px;
}

.hero .eyebrow,
.end .eyebrow {
  color: var(--gold);
}

.hero h1 {
  font-size: clamp(2.9rem, 6.4vw, 5.4rem);
  color: #f6efdf;
}
.hero h1 em,
.end h2 em {
  color: var(--gold);
}

.lede {
  max-width: 34rem;
  margin: 26px 0 34px;
  font-size: clamp(1.15rem, 1.8vw, 1.3rem);
  color: rgb(246 239 223 / 0.86);
}

.ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 28px;
}
.ctas.center {
  justify-content: center;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

/* The official badges, unaltered. Google's PNG carries its own clear space (its artwork is 168 of
   250 px tall), so at 83 px with a -14 px margin it matches Apple's 56 px badge. */
.badge {
  display: inline-flex;
  border-radius: 10px;
  transition: transform 0.18s ease;
}
.badge:hover {
  transform: translateY(-2px);
}
.badge-apple {
  height: 56px;
  width: auto;
}
.badge-play {
  height: 83px;
  width: auto;
  margin: -14px;
}

.play-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 24px;
  border-radius: 14px;
  background: var(--gold-soft);
  color: var(--forest);
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  box-shadow: 0 10px 30px -12px rgb(0 0 0 / 0.5);
  transition:
    transform 0.18s ease,
    background 0.18s ease;
}
.play-btn:hover {
  transform: translateY(-2px);
  background: #fff1c9;
}
.play-btn span {
  transition: transform 0.18s ease;
}
.play-btn:hover span {
  transform: translateX(3px);
}

.small {
  margin: 26px 0 0;
  font-size: 0.95rem;
  color: rgb(246 239 223 / 0.7);
}

.hero-device {
  position: relative;
  justify-self: center;
}

.phone {
  position: relative;
  z-index: 1;
  width: min(330px, 74vw);
  padding: 11px;
  border-radius: 54px;
  background: linear-gradient(150deg, #2b3d37, #0a1613 60%);
  box-shadow:
    0 0 0 1px rgb(255 255 255 / 0.08) inset,
    0 50px 90px -30px rgb(0 0 0 / 0.75),
    0 30px 60px -40px rgb(217 178 106 / 0.45);
  transform: rotate(2.5deg);
}
.phone-screen {
  width: 100%;
  aspect-ratio: 440 / 956;
  object-fit: cover;
  border-radius: 44px;
  background: #f4eddf;
}

.halo {
  position: absolute;
  inset: 8% -20% 0;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(217 178 106 / 0.35), transparent);
  filter: blur(30px);
}

/* ---------- Story ---------- */

.story {
  padding: 110px 0 40px;
  text-align: center;
}
.story blockquote {
  max-width: 50rem;
  margin: 0 auto;
}
.story p {
  margin: 0;
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-variation-settings: 'opsz' 72, 'WONK' 0;
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  line-height: 1.3;
  text-wrap: balance;
}
.story footer {
  margin-top: 22px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.story footer::before {
  content: '';
  display: block;
  width: 48px;
  height: 2px;
  margin: 0 auto 18px;
  background: var(--accent);
  opacity: 0.6;
}

/* ---------- About (the plain answer to "what is Still Nine?") ---------- */

.about {
  max-width: 46rem;
  padding: 20px 0 30px;
  text-align: center;
}
.about h2 {
  font-size: 0.85rem;
  font-family: var(--ui);
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}
.about p {
  margin: 16px 0 0;
  color: var(--ink-soft);
  font-size: 1.15rem;
}

/* ---------- Features ---------- */

.feature {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  align-items: center;
  gap: clamp(32px, 7vw, 110px);
  padding: 80px 0;
}
.feature.flip .shot {
  order: 2;
}

.feature h2,
.promises h2,
.devices h2 {
  font-size: clamp(2.1rem, 4.2vw, 3.4rem);
}

.feature-copy p:not(.eyebrow),
.devices p {
  max-width: 32rem;
  margin: 22px 0 0;
  color: var(--ink-soft);
  font-size: 1.2rem;
}

.shot {
  margin: 0;
  justify-self: center;
  width: min(320px, 78vw);
  padding: 9px;
  border-radius: 46px;
  background: var(--card);
  box-shadow:
    0 0 0 1px var(--line),
    0 40px 70px -40px rgb(19 48 42 / 0.55);
}
.shot img {
  border-radius: 38px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
}
.steps li {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 16px 14px 14px;
  border-radius: 16px;
  background: var(--card);
  box-shadow: 0 0 0 1px var(--line);
  font-weight: 700;
}
.steps li:last-child {
  background: var(--forest);
  color: var(--gold-soft);
  box-shadow: none;
}
.steps span {
  font-family: var(--display);
  font-size: 1.6rem;
  line-height: 1;
  margin-bottom: 8px;
  color: var(--accent);
}
.steps li:last-child span {
  color: var(--gold);
}
.steps small {
  font-weight: 400;
  font-size: 0.85rem;
  opacity: 0.75;
}

/* ---------- Night ---------- */

.night {
  margin: 40px 0;
  background:
    radial-gradient(50rem 30rem at 20% 50%, rgb(217 178 106 / 0.12), transparent 70%), #0e1424;
  color: #f1e9d8;
}
.night .eyebrow,
.night h2 em {
  color: #e3bd72;
}
.night .feature-copy p:not(.eyebrow) {
  color: #c3bba9;
}
.night .shot {
  background: #161e33;
  box-shadow:
    0 0 0 1px #2a3350,
    0 40px 80px -40px rgb(0 0 0 / 0.8);
}

/* ---------- Promises ---------- */

.promises {
  padding: 90px 0;
  text-align: center;
}
.promises ul {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 50px 0 0;
  padding: 0;
  list-style: none;
  text-align: left;
}
.promises li {
  padding: 26px 26px 24px;
  border-radius: 20px;
  background: var(--card);
  box-shadow: 0 0 0 1px var(--line);
  color: var(--ink-soft);
}
.promises strong {
  display: block;
  margin-bottom: 6px;
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
}
/* Each promise sits in a Sudoku cell with a pen digit, like an answer on the board. */
.promises .cell {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 18px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  font-family: var(--display);
  font-size: 1.55rem;
  font-weight: 600;
  font-variation-settings: 'opsz' 48, 'WONK' 0;
  color: var(--accent);
}

/* ---------- Devices ---------- */

.devices {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: clamp(32px, 6vw, 90px);
  padding: 40px 0 120px;
}
.devices figure {
  margin: 0;
  padding: 14px;
  border-radius: 34px;
  background: var(--card);
  box-shadow:
    0 0 0 1px var(--line),
    0 50px 90px -50px rgb(19 48 42 / 0.6);
  transform: rotate(-1.5deg);
}
.devices img {
  border-radius: 22px;
}

/* ---------- FAQ ---------- */

.faq {
  max-width: 50rem;
  padding: 0 0 120px;
}
.faq h2 {
  font-size: clamp(2.1rem, 4.2vw, 3.4rem);
  text-align: center;
}
.faq-list {
  margin-top: 44px;
  border-top: 1px solid var(--line);
}
.faq details {
  border-bottom: 1px solid var(--line);
}
.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 4px;
  cursor: pointer;
  list-style: none;
  font-family: var(--display);
  font-variation-settings: 'opsz' 36, 'WONK' 0;
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.3;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: '+';
  flex: none;
  font-family: var(--ui);
  font-weight: 400;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--accent);
  transition: transform 0.2s ease;
}
.faq details[open] summary::after {
  transform: rotate(45deg);
}
.faq details p {
  margin: -6px 4px 24px;
  max-width: 42rem;
  color: var(--ink-soft);
}
.faq a {
  color: var(--accent);
}

/* ---------- End ---------- */

.end-body {
  display: grid;
  justify-items: center;
  gap: 28px;
  padding: 110px 0 48px;
  text-align: center;
}
.end-body > img {
  border-radius: 14px;
  box-shadow: 0 20px 40px -20px rgb(0 0 0 / 0.6);
}
.end h2 {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  color: #f6efdf;
}
.legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 28px;
  margin-top: 60px;
  font-size: 0.95rem;
}
.legal a {
  color: rgb(246 239 223 / 0.75);
  text-underline-offset: 4px;
}
.legal a:hover {
  color: var(--gold-soft);
}

/* ---------- Use-case pages (/sudoku-for-seniors/, /sudoku-hints/) ---------- */

.page-hero .hero-body {
  grid-template-columns: minmax(0, 52rem);
  padding: 24px 0 88px;
}
.page-hero h1 {
  font-size: clamp(2.6rem, 5.6vw, 4.6rem);
}
.page-hero .lede {
  max-width: 44rem;
}
.crumbs {
  margin: 0 0 22px;
  font-size: 0.95rem;
  color: rgb(246 239 223 / 0.7);
}
.crumbs a {
  color: var(--gold-soft);
  text-underline-offset: 4px;
}
.section-lede {
  max-width: 40rem;
  margin: 20px auto 0;
  color: var(--ink-soft);
  font-size: 1.15rem;
}
.promises .level {
  display: block;
  margin-top: 12px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.setup,
.example {
  max-width: 34rem;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  color: var(--ink-soft);
  text-align: left;
}
.setup li,
.example li {
  position: relative;
  padding: 0 0 18px 52px;
  counter-increment: step;
}
.setup li::before,
.example li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -2px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 2px solid var(--ink);
  border-radius: 7px;
  font-family: var(--display);
  font-weight: 600;
  color: var(--accent);
}
.setup strong,
.example b {
  color: var(--ink);
}
.example b {
  display: block;
  font-family: var(--display);
  font-size: 1.2rem;
}
.feature-copy a {
  color: var(--accent);
}
.honest {
  padding: 40px 0 100px;
}
.honest p {
  text-align: left;
}

/* ---------- Narrow screens ---------- */

@media (max-width: 860px) {
  .hero-body,
  .feature,
  .devices {
    grid-template-columns: 1fr;
  }
  .hero-body {
    gap: 56px;
    padding: 16px 0 72px;
    text-align: center;
  }
  .lede {
    margin-inline: auto;
  }
  .ctas,
  .badges {
    justify-content: center;
  }
  .feature {
    padding: 56px 0;
    text-align: center;
  }
  .feature .shot,
  .feature.flip .shot {
    order: 0;
  }
  .feature-copy p:not(.eyebrow),
  .devices p,
  .setup,
  .example {
    margin-inline: auto;
  }
  .devices {
    text-align: center;
    padding-bottom: 90px;
  }
  .promises ul {
    grid-template-columns: 1fr 1fr;
  }
  .story {
    padding-top: 80px;
  }
}

@media (max-width: 560px) {
  .top-play {
    display: none;
  }
  .steps {
    grid-template-columns: 1fr 1fr;
  }
  .promises ul {
    grid-template-columns: 1fr;
  }
  .phone {
    transform: none;
  }
  .badge-apple {
    height: 48px;
  }
  .badge-play {
    height: 71px;
    margin: -12px;
  }
  .badges {
    gap: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .badge,
  .play-btn,
  .play-btn span,
  .top-play {
    transition: none;
  }
}
