/* Thrive marketing site.
   Colours are the app's own: Theme.kt (primary / surfaces) and AccentPalettes.kt (tonal containers).
   Light by default, dark via prefers-color-scheme, matching the app's system-theme setting. */

@font-face {
  font-family: "Google Sans Flex";
  src: url("/fonts/google-sans-flex.woff2") format("woff2");
  font-weight: 100 1000;
  font-display: swap;
}

:root {
  --bg: #FCF7FE;
  --surface: #F2F1F6;
  --surface-2: #EAE9F1;
  --fg: #1B1A22;
  --muted: #5F5B6B;
  --line: #DCD8E5;
  --primary: #5E35B1;
  --on-primary: #FFFFFF;
  --tonal: #EADDFF;
  --on-tonal: #22005D;
  --navy: #1B1C6B;
  --shadow: rgba(40, 20, 90, .35);

  --green-c: #D7F2DD;  --green-on: #0B3D1A;  --green: #1B873F;
  --teal-c: #CFEFEC;   --teal-on: #053B37;   --teal: #11857C;
  --purple-c: #F1DDFB; --purple-on: #3D1356; --purple: #8E3FB8;
  --amber-c: #FCEBC4;  --amber-on: #4D3500;  --amber: #B8821B;
  --orange-c: #FFE6D2; --orange-on: #5A2600; --orange: #E2691B;
  --indigo-c: #E2E0FF; --indigo-on: #1E1860;

  --font: "Google Sans Flex", "Google Sans", Roboto, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "Cascadia Code", Consolas, monospace;
  --radius-l: 28px;
  --radius-m: 22px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131218;
    --surface: #1F1F23;
    --surface-2: #26262C;
    --fg: #ECE8F2;
    --muted: #A9A3B6;
    --line: #34323C;
    --primary: #D0BCFF;
    --on-primary: #381E72;
    --tonal: #4F378B;
    --on-tonal: #EADDFF;
    --shadow: rgba(0, 0, 0, .6);

    --green-c: #15301E;  --green-on: #B6F2C6;  --green: #5FD986;
    --teal-c: #0F2B29;   --teal-on: #B4ECE7;   --teal: #55D6CC;
    --purple-c: #2C1838; --purple-on: #EFD6FB; --purple: #D79CF2;
    --amber-c: #2E2410;  --amber-on: #F6E4B6;  --amber: #E6BC55;
    --orange-c: #3A2413; --orange-on: #FFDDC2; --orange: #FFB270;
    --indigo-c: #1F1D40; --indigo-on: #DFDCFF;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 8px; }
code { font-family: var(--mono); font-size: .92em; background: var(--surface-2); padding: 2px 8px; border-radius: 8px; }

h1, h2, h3 { margin: 0; line-height: 1.08; text-wrap: balance; font-optical-sizing: auto; }
h1 { font-size: clamp(2.6rem, 6.4vw, 4.6rem); font-weight: 750; letter-spacing: -.015em; }
h2 { font-size: clamp(2rem, 4.2vw, 3rem); font-weight: 720; letter-spacing: -.01em; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0; }

.wrap { width: 100%; max-width: 1140px; margin-inline: auto; padding-inline: 20px; }
main > section { padding-block: 56px; }

.eyebrow {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 10px;
  font-size: .8rem; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}

/* Buttons: the app's filled / tonal pill buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 26px; border-radius: 999px;
  background: var(--primary); color: var(--on-primary);
  font-weight: 650; font-size: 1rem; text-decoration: none;
  transition: transform .2s ease, border-radius .25s ease;
}
.btn:hover { border-radius: 16px; }
.btn:active { transform: scale(.97); }
.btn-tonal { background: var(--tonal); color: var(--on-tonal); }
.btn-small { min-height: 42px; padding: 0 18px; font-size: .92rem; }
.btn-light { background: #FFFFFF; color: var(--navy); }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.nav-inner { max-width: 1140px; margin-inline: auto; padding: 12px 20px; display: flex; align-items: center; gap: 24px; }
.brand img { height: 32px; width: auto; }
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a { color: var(--muted); text-decoration: none; font-weight: 550; font-size: .95rem; }
.nav-links a:hover { color: var(--fg); }
@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-inner .btn { margin-left: auto; }
}

/* Phones */
.phone {
  background: #0E0D12;
  padding: 7px;
  border-radius: 38px;
  box-shadow: 0 30px 60px -30px var(--shadow), 0 0 0 1px color-mix(in srgb, var(--line) 50%, transparent);
  flex: none;
}
.phone img { width: 100%; border-radius: 31px; aspect-ratio: 600 / 1260; object-fit: cover; object-position: top; }

/* Hero */
.hero {
  padding-block: 48px 40px !important;
  background:
    radial-gradient(60% 70% at 88% 12%, var(--indigo-c), transparent 70%),
    radial-gradient(40% 50% at 10% 90%, var(--purple-c), transparent 70%),
    var(--bg);
  overflow: hidden;
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.hero-copy { display: flex; flex-direction: column; gap: 20px; }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 34ch; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 6px; }
.fan { display: flex; justify-content: center; align-items: flex-end; padding-block: 20px; }
.fan .phone { width: 36%; max-width: 230px; }
.fan .phone:nth-child(1) { transform: rotate(-8deg) translate(22%, 8%); }
.fan .phone:nth-child(2) { z-index: 1; width: 40%; max-width: 250px; }
.fan .phone:nth-child(3) { transform: rotate(8deg) translate(-22%, 8%); }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .lede { max-width: 46ch; }
}

/* Launch tiles */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.tile {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 22px 12px; border-radius: var(--radius-l);
  font-weight: 700; font-size: 1.05rem; text-decoration: none;
  transition: border-radius .3s ease, transform .2s ease;
}
.tile:hover { border-radius: 40px; transform: translateY(-2px); }
.tile-icon { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: color-mix(in srgb, currentColor 12%, transparent); }
.tile-icon svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tile.green  { background: var(--green-c);  color: var(--green-on); }
.tile.orange { background: var(--orange-c); color: var(--orange-on); }
.tile.purple { background: var(--purple-c); color: var(--purple-on); }
.tile.amber  { background: var(--amber-c);  color: var(--amber-on); }
@media (max-width: 560px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Feature rows: copy on one side, phones on the other, alternating */
.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.feature.flip .copy { order: 2; }
.copy { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.copy > p { color: var(--muted); max-width: 52ch; font-size: 1.05rem; }
.copy.centered { align-items: center; text-align: center; margin-inline: auto; max-width: 720px; }
.copy.centered > p { max-width: 56ch; }
.points { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.points li { display: flex; gap: 12px; align-items: baseline; }
.points li::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 4px; background: var(--primary); transform: rotate(45deg) translateY(-2px); }
.pair { display: flex; justify-content: center; align-items: flex-start; gap: 20px; }
.pair .phone { width: min(46%, 260px); }
.pair .phone:nth-child(2) { margin-top: 64px; }
.solo { display: flex; justify-content: center; align-items: flex-start; }
.solo .phone { width: min(62%, 290px); }
@media (max-width: 860px) {
  .feature { grid-template-columns: 1fr; gap: 32px; }
  .feature.flip .copy { order: 0; }
}

/* Pro */
.pro-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 999px;
  background: var(--purple-c); color: var(--purple-on);
  font-size: .78rem; font-weight: 700; letter-spacing: .02em; text-transform: none;
  white-space: nowrap;
}
.pro-chip::before { content: "✦"; font-size: .9em; }
.pro-note { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: .98rem; color: var(--muted); }
.pro-band {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px 40px; align-items: center;
  background: var(--purple-c); color: var(--purple-on);
  border-radius: var(--radius-l); padding: 32px 36px !important; margin-block: 24px;
}
.pro-band > div { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.pro-band .pro-chip { background: var(--bg); color: var(--primary); }
.pro-band h2 { font-size: clamp(1.8rem, 3.4vw, 2.4rem); }
.pro-band p { font-size: 1.05rem; max-width: 60ch; }
@media (max-width: 760px) {
  .pro-band { grid-template-columns: 1fr; margin-inline: 20px; width: auto; padding: 26px 22px !important; }
}

/* Games */
.games-section { background: var(--surface); }
.games-inner { display: flex; flex-direction: column; gap: 40px; }
.games { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.game {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px;
  padding: 28px 22px 26px; border-radius: var(--radius-l);
}
.game .phone { width: min(78%, 240px); margin-bottom: 8px; }
.game p { font-size: .96rem; opacity: .85; max-width: 32ch; }
.game.teal   { background: var(--teal-c);   color: var(--teal-on); }
.game.purple { background: var(--purple-c); color: var(--purple-on); }
.game.green  { background: var(--green-c);  color: var(--green-on); }
.more { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.more-label { font-size: .85rem; font-weight: 650; color: var(--muted); }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.chips li { background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 6px 16px; font-size: .92rem; font-weight: 550; }
@media (max-width: 860px) {
  .games { grid-template-columns: 1fr; max-width: 440px; margin-inline: auto; }
}

/* Companion: the one loud section, coloured from the companion's mountain scene */
.scene {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 48px; align-items: center;
  padding: 48px 56px; border-radius: 36px; color: #FFFFFF;
  background:
    radial-gradient(70% 60% at 85% 10%, rgba(255, 214, 160, .55), transparent 70%),
    linear-gradient(170deg, #F4A881 0%, #C98AA8 42%, #6E5E9C 78%, #3E3768 100%);
}
.scene .eyebrow { color: rgba(255, 255, 255, .9); }
.scene .copy > p { color: rgba(255, 255, 255, .92); }
.scene .phone { width: 280px; box-shadow: 0 30px 60px -24px rgba(30, 10, 60, .6); }
.pro-chip.on-scene { background: rgba(255, 255, 255, .22); color: #FFFFFF; }
.scene-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.scene-chips li { background: rgba(255, 255, 255, .2); border-radius: 999px; padding: 5px 14px; font-size: .9rem; font-weight: 600; }
@media (max-width: 860px) {
  .scene { grid-template-columns: 1fr; padding: 32px 24px; justify-items: center; gap: 32px; }
  .scene .phone { width: min(72%, 260px); }
}

/* Trust */
#privacy { display: flex; flex-direction: column; gap: 32px; }
.trust-more { text-align: center; font-weight: 600; }
.trust { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.trust > div { background: var(--surface); border-radius: var(--radius-m); padding: 22px; display: flex; flex-direction: column; gap: 8px; }
.trust p { font-size: .95rem; color: var(--muted); }
@media (max-width: 960px) { .trust { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .trust { grid-template-columns: 1fr; } }

/* Join */
.join {
  background: var(--navy); color: #FFFFFF;
  border-radius: 36px; padding: 48px 56px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 24px 48px; align-items: start;
}
.join-head { display: flex; flex-direction: column; gap: 14px; }
.join-head img { width: 64px; }
.join-head p { color: rgba(255, 255, 255, .8); font-size: 1.05rem; }
.join .btn { grid-column: 2; justify-self: start; }
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.steps li {
  counter-increment: step;
  display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 2px 14px;
  background: rgba(255, 255, 255, .08); border-radius: var(--radius-m); padding: 16px 18px;
}
.steps li::before {
  content: counter(step); grid-row: span 2;
  width: 36px; height: 36px; border-radius: 50%;
  background: #7B5CFF; color: #FFFFFF; display: grid; place-items: center; font-weight: 750;
}
.steps span { color: rgba(255, 255, 255, .78); font-size: .95rem; }
.steps code { background: rgba(255, 255, 255, .14); color: #FFFFFF; user-select: all; }
@media (max-width: 860px) {
  .join { grid-template-columns: 1fr; padding: 32px 22px; }
  .join .btn { grid-column: 1; }
}

/* Footer */
.footer { border-top: 1px solid var(--line); padding-block: 28px 40px; font-size: .88rem; color: var(--muted); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 10px 28px; justify-content: space-between; }
.footer a { color: var(--muted); }

/* Legal pages (privacy.html), generated from docs/ by tools/build_legal.py */
.legal { max-width: 820px; padding-block: 48px 72px; display: flex; flex-direction: column; gap: 28px; }
.legal-head { display: flex; flex-direction: column; gap: 12px; }
.legal-head h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); }
.legal-notice { background: var(--tonal); color: var(--on-tonal); border-radius: var(--radius-m); padding: 14px 18px; margin: 0; }
.legal-notice a { color: inherit; font-weight: 650; }
.legal-toc details { background: var(--surface); border-radius: var(--radius-m); padding: 18px 22px; }
.legal-toc summary { font-weight: 700; cursor: pointer; }
.legal-toc ol { margin: 12px 0 0; padding-left: 1.6em; columns: 2 260px; column-gap: 32px; font-size: .95rem; }
.legal-toc li { break-inside: avoid; padding-block: 3px; }
.legal-toc a { color: var(--fg); text-decoration: none; }
.legal-toc a:hover { color: var(--primary); text-decoration: underline; }
.legal-body { display: flex; flex-direction: column; gap: 14px; overflow-wrap: anywhere; }
.legal-body h2 { font-size: clamp(1.5rem, 3vw, 1.9rem); margin-top: 22px; }
.legal-body h3 { margin-top: 10px; }
.legal-body ul, .legal-body ol { margin: 0; padding-left: 1.3em; display: flex; flex-direction: column; gap: 6px; }
.legal-body hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; width: 100%; }
.legal-body blockquote { margin: 0; padding: 16px 20px; background: var(--tonal); color: var(--on-tonal); border-radius: var(--radius-m); }
.legal-body code { overflow-wrap: anywhere; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-m); }
.legal-body table { border-collapse: collapse; width: 100%; font-size: .94rem; }
.legal-body th, .legal-body td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--line); min-width: 9em; overflow-wrap: normal; }
.legal-body th { background: var(--surface); font-weight: 700; }
.legal-body tr:last-child td { border-bottom: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
