/* BIYO Live — the public site.
 *
 * The palette is the app's own Neon Stage theme, read from
 * mobile-app/src/theme/ThemeContext.tsx rather than picked by eye, so the site
 * and the app are the same product to look at. Red stays reserved for LIVE and
 * destructive actions, exactly as in the app.
 *
 * No build step and no framework: these files go to S3 as they are. The only
 * network dependency is the webfont, and the page is readable before it
 * arrives (font-display: swap, with a system stack behind it).
 *
 * STRUCTURE
 *   1. tokens          6. hero
 *   2. base            7. phone mockup
 *   3. layout          8. bento + sections
 *   4. header          9. doc pages (privacy / terms / support)
 *   5. buttons        10. footer, motion, responsive
 */

/* ── 1. tokens ────────────────────────────────────────────────────────────── */

:root {
  /* Neon Stage, from the app */
  --bg: #000B1C;
  --deep: #010712;
  --surface: #012B52;
  --text: #FBFDFD;
  --ice: #D5E8F2;
  --soft: #C3CED8;
  --muted: #8DA5BD;
  --accent: #2ED7FA;
  --accent-soft: #96E6F9;
  --coin: #F2B63B;
  --live: #FF3B4E;

  /* derived surfaces — one place to retune the glass */
  --glass: rgba(4, 28, 56, 0.44);
  --glass-strong: rgba(4, 28, 56, 0.72);
  --hairline: rgba(150, 230, 249, 0.16);
  --hairline-bright: rgba(150, 230, 249, 0.34);

  --maxw: 1140px;
  --radius: 20px;
  --radius-sm: 14px;

  --font: "Plus Jakarta Sans", "Segoe UI", Roboto, system-ui, -apple-system, sans-serif;
}

/* ── 2. base ──────────────────────────────────────────────────────────────── */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* The ambient stage glow behind everything. Two fixed radial washes rather
   than an image: no bytes, no layout cost, and it survives any scroll height. */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(900px 620px at 12% -6%, rgba(46, 215, 250, 0.13), transparent 62%),
    radial-gradient(760px 560px at 92% 12%, rgba(46, 215, 250, 0.07), transparent 64%),
    radial-gradient(700px 500px at 50% 104%, rgba(46, 215, 250, 0.06), transparent 60%);
}

/* `height: auto` is not optional here. Every <img> carries width/height
   attributes so the browser can reserve space before the picture arrives (no
   layout shift) -- but a CSS `width: 100%` without `height: auto` makes the
   browser honour that height ATTRIBUTE literally, and a 920x1991 screenshot
   renders 1991px tall inside a 290px-wide frame. */
img { max-width: 100%; display: block; height: auto; }
a { color: var(--accent); }

h1, h2, h3 { line-height: 1.12; letter-spacing: -0.022em; margin: 0; }
p { margin: 0 0 16px; color: var(--ice); }
strong { color: var(--text); font-weight: 700; }

/* ── 3. layout ────────────────────────────────────────────────────────────── */

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }

section { position: relative; }
.section { padding: 96px 0; }
.section-head { max-width: 640px; margin: 0 0 44px; }
.section-head h2 { font-size: clamp(30px, 4.4vw, 44px); font-weight: 800; margin: 0 0 14px; }
.section-head p { font-size: 18px; color: var(--soft); margin: 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--accent);
  margin: 0 0 18px;
}
.eyebrow::before {
  content: ""; width: 22px; height: 1px; background: var(--accent); opacity: 0.6;
}

/* ── 4. header ────────────────────────────────────────────────────────────── */

header.site {
  position: sticky; top: 0; z-index: 40;
  background: rgba(0, 8, 20, 0.7);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--hairline);
}
header.site .wrap { display: flex; align-items: center; gap: 28px; min-height: 68px; }

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 19px; letter-spacing: -0.02em;
  color: var(--text); text-decoration: none; white-space: nowrap;
}
/* The mark: a ring with a lit core, the same "live pulse" idea as the hero
   artwork, drawn rather than downloaded. */
.brand .mark {
  width: 26px; height: 26px; border-radius: 50%;
  border: 1.5px solid rgba(46, 215, 250, 0.45);
  display: grid; place-items: center;
  box-shadow: 0 0 18px rgba(46, 215, 250, 0.35), inset 0 0 12px rgba(46, 215, 250, 0.2);
}
.brand .mark::after {
  content: ""; width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 10px var(--accent);
}

nav.site { margin-left: auto; display: flex; align-items: center; gap: 30px; }
nav.site a {
  color: var(--soft); text-decoration: none; font-size: 15px; font-weight: 500;
  position: relative; padding: 4px 0; transition: color 0.18s ease;
}
nav.site a:hover { color: var(--text); }
nav.site a[aria-current="page"] { color: var(--accent); }
nav.site a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 1.5px; background: var(--accent); border-radius: 2px;
}

/* ── 5. buttons ───────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 14px 26px; border-radius: 13px;
  font-weight: 700; font-size: 15.5px; font-family: inherit;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.22s ease, background 0.18s ease, border-color 0.18s ease;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, #5CE4FF 0%, var(--accent) 52%, #11A8CC 100%);
  color: #00151F;
  box-shadow: 0 8px 30px -8px rgba(46, 215, 250, 0.6);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 38px -8px rgba(46, 215, 250, 0.7); }
.btn-ghost {
  border-color: var(--hairline-bright); color: var(--ice); background: rgba(4, 28, 56, 0.4);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn-sm { padding: 10px 18px; font-size: 14.5px; border-radius: 11px; }

/* ── 6. hero ──────────────────────────────────────────────────────────────── */

.hero { position: relative; padding: 76px 0 40px; overflow: hidden; }
.hero-art {
  position: absolute; top: -140px; right: -14%;
  width: 1180px; max-width: 128%; opacity: 0.62;
  pointer-events: none; z-index: -1;
  mask-image: radial-gradient(closest-side, #000 48%, transparent 86%);
  -webkit-mask-image: radial-gradient(closest-side, #000 48%, transparent 86%);
}

.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 56px; align-items: center;
}

.hero h1 {
  font-size: clamp(42px, 6.4vw, 70px); font-weight: 800; margin: 0 0 22px;
}
/* The one gradient-filled line. Used once, on the line that carries the
   promise — a page where everything glows has no emphasis left to give. */
.grad {
  background: linear-gradient(104deg, #FFFFFF 2%, var(--accent-soft) 38%, var(--accent) 78%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero .lede {
  font-size: clamp(17px, 2.1vw, 20px); color: var(--soft);
  margin: 0 0 34px; max-width: 30em;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero-note { color: var(--muted); font-size: 14px; margin: 20px 0 0; }

/* the verifiable numbers strip */
.stats { display: flex; gap: 40px; flex-wrap: wrap; margin: 46px 0 0; }
.stat .n {
  font-size: 30px; font-weight: 800; letter-spacing: -0.03em;
  color: var(--text); line-height: 1;
}
.stat .l {
  font-size: 13px; color: var(--muted); margin-top: 7px;
  text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600;
}

/* ── 7. the real app screens ──────────────────────────────────────────────── */
/* These are the actual BIYO screens -- the from-scratch Neon Stage design,
 * rendered from the design file -- not an impression of them drawn in CSS.
 * The frame around them is the only invented part. */

.phone-wrap { display: grid; place-items: center; perspective: 1500px; }
.phone {
  width: 310px; max-width: 100%;
  border-radius: 44px; padding: 10px;
  background: linear-gradient(160deg, #22435F 0%, #04111F 44%, #16304A 100%);
  box-shadow:
    0 54px 96px -32px rgba(0, 0, 0, 0.92),
    0 0 0 1px rgba(150, 230, 249, 0.16),
    0 0 80px -16px rgba(46, 215, 250, 0.32);
  transform: rotateY(-12deg) rotateX(4deg) rotateZ(1deg);
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.phone:hover { transform: rotateY(-4deg) rotateX(1deg); }
.phone img { width: 100%; border-radius: 35px; display: block; }

/* the showcase row */
.screens {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px;
  align-items: start;
}
.screen { text-align: center; }
.screen .shot {
  border-radius: 28px; padding: 7px; margin-bottom: 16px;
  background: linear-gradient(158deg, #1E3B55 0%, #040F1C 46%, #13293F 100%);
  box-shadow:
    0 30px 60px -26px rgba(0, 0, 0, 0.9),
    0 0 0 1px rgba(150, 230, 249, 0.13);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease;
}
.screen:hover .shot {
  transform: translateY(-8px);
  box-shadow:
    0 42px 70px -26px rgba(0, 0, 0, 0.95),
    0 0 0 1px rgba(150, 230, 249, 0.3),
    0 0 50px -16px rgba(46, 215, 250, 0.4);
}
.screen .shot img { width: 100%; border-radius: 22px; display: block; }
.screen h3 { font-size: 16.5px; font-weight: 700; margin: 0 0 5px; }
.screen p { font-size: 14px; color: var(--muted); margin: 0; }

/* ── 8. bento + sections ──────────────────────────────────────────────────── */

.bento {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px;
}
.tile {
  grid-column: span 2;
  border: 1px solid var(--hairline); border-radius: var(--radius);
  background: var(--glass); backdrop-filter: blur(8px);
  padding: 28px; position: relative; overflow: hidden;
  transition: border-color 0.22s ease, transform 0.22s ease, background 0.22s ease;
}
.tile:hover {
  border-color: var(--hairline-bright); transform: translateY(-3px);
  background: var(--glass-strong);
}
/* a soft corner light, so a grid of cards is not a grid of rectangles */
.tile::after {
  content: ""; position: absolute; width: 190px; height: 190px;
  top: -95px; right: -70px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(46, 215, 250, 0.17), transparent);
  pointer-events: none;
}
.tile.wide { grid-column: span 3; }
.tile.lead { grid-column: span 4; }
.tile h3 { font-size: 20px; font-weight: 700; margin: 0 0 9px; }
.tile p { color: var(--soft); font-size: 15.5px; margin: 0; }
.tile .ico {
  width: 42px; height: 42px; border-radius: 12px; margin-bottom: 18px;
  display: grid; place-items: center;
  background: rgba(46, 215, 250, 0.1);
  border: 1px solid rgba(46, 215, 250, 0.22);
  color: var(--accent);
}
.tile .ico svg { width: 21px; height: 21px; }

/* numbered steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: s; }
.step { padding: 26px 0 0; border-top: 2px solid rgba(46, 215, 250, 0.26); }
.step::before {
  counter-increment: s; content: "0" counter(s);
  display: block; font-size: 13px; font-weight: 800; color: var(--accent);
  letter-spacing: 0.1em; margin-bottom: 11px;
}
.step h3 { font-size: 19px; font-weight: 700; margin: 0 0 8px; }
.step p { color: var(--soft); font-size: 15.5px; margin: 0; }

/* the closing call to action */
.cta-band {
  border: 1px solid var(--hairline-bright); border-radius: 28px;
  padding: 60px 44px; text-align: center; position: relative; overflow: hidden;
  background:
    radial-gradient(600px 300px at 50% 0%, rgba(46, 215, 250, 0.17), transparent 70%),
    var(--glass);
}
.cta-band h2 { font-size: clamp(28px, 4.2vw, 42px); font-weight: 800; margin: 0 0 14px; }
.cta-band p { color: var(--soft); font-size: 18px; max-width: 30em; margin: 0 auto 28px; }
.cta-band .hero-cta { justify-content: center; }

/* ── 9. document pages ────────────────────────────────────────────────────── */

.doc { padding: 62px 0 90px; }
.doc h1 { font-size: clamp(34px, 5vw, 48px); font-weight: 800; margin: 0 0 14px; }
.doc h2 {
  font-size: clamp(21px, 2.8vw, 27px); font-weight: 700;
  margin: 52px 0 16px; padding-top: 22px;
  border-top: 1px solid var(--hairline);
}
.doc h3 { font-size: 18px; font-weight: 700; margin: 32px 0 9px; color: var(--accent-soft); }
.doc ul, .doc ol { color: var(--ice); padding-left: 22px; margin: 0 0 20px; }
.doc li { margin: 0 0 10px; }
.doc .meta { color: var(--muted); font-size: 15px; margin: 0 0 34px; }
.doc .lede { font-size: 19px; color: var(--soft); margin: 0 0 30px; }

.callout {
  border: 1px solid var(--hairline); border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm); padding: 20px 22px;
  background: var(--glass); margin: 0 0 24px;
}
.callout p:last-child { margin-bottom: 0; }

/* Anything the owner still has to supply. Loud on purpose: a published policy
   with a bracket left in it is worse than no policy. */
.todo {
  background: rgba(242, 182, 59, 0.15);
  border: 1px dashed var(--coin); color: var(--coin);
  padding: 1px 7px; border-radius: 6px; font-weight: 700;
  font-size: 0.94em; white-space: normal;
}

table.data {
  width: 100%; border-collapse: collapse; margin: 0 0 26px; font-size: 15.5px;
  display: block; overflow-x: auto;
}
table.data th, table.data td {
  border: 1px solid var(--hairline); padding: 13px 15px;
  text-align: left; vertical-align: top;
}
table.data th {
  background: rgba(1, 43, 82, 0.6); color: var(--text); font-weight: 700;
  white-space: nowrap;
}
table.data td { color: var(--ice); }

/* ── 10. footer, motion, responsive ───────────────────────────────────────── */

footer.site {
  border-top: 1px solid var(--hairline); padding: 56px 0 44px;
  background: rgba(1, 7, 18, 0.5);
}
.foot-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px;
  margin-bottom: 42px;
}
.foot-grid .brand { margin-bottom: 14px; }
.foot-about { color: var(--muted); font-size: 15px; max-width: 32ch; margin: 0; }
.foot-col h4 {
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 15px;
}
.foot-col a {
  display: block; color: var(--soft); text-decoration: none;
  font-size: 15px; margin-bottom: 11px; transition: color 0.16s ease;
}
.foot-col a:hover { color: var(--accent); }
.foot-base {
  border-top: 1px solid var(--hairline); padding-top: 24px;
  display: flex; gap: 16px; flex-wrap: wrap; align-items: center;
  color: var(--muted); font-size: 14.5px;
}
.foot-base p { margin: 0; color: var(--muted); }

/* Reveal on scroll.
 *
 * THE HIDING IS GATED ON `.js`, which the script adds to <html> as its first
 * act. So the only way an element can be hidden is if the script that reveals
 * it is already running. A blocked, failed or slow script leaves every word on
 * the page visible -- which matters more here than anywhere, because two of
 * these pages are a privacy policy and a deletion notice that a Play reviewer
 * has to be able to read. */
.js .reveal { opacity: 0; transform: translateY(18px); }
.js .reveal.in {
  opacity: 1; transform: none;
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero { padding-top: 56px; }
  .hero-art { right: -40%; opacity: 0.45; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .tile, .tile.wide, .tile.lead { grid-column: span 1; }
  .screens { grid-template-columns: repeat(2, 1fr); gap: 26px; }
  .steps { grid-template-columns: 1fr; gap: 10px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .section { padding: 68px 0; }
  .wrap { padding: 0 18px; }
  nav.site { gap: 16px; }
  nav.site a { font-size: 14px; }
  .nav-hide { display: none; }
  .bento { grid-template-columns: 1fr; }
  .screens { grid-template-columns: 1fr; max-width: 300px; margin: 0 auto; }
  .stats { gap: 26px; }
  .stat .n { font-size: 25px; }
  .cta-band { padding: 44px 24px; border-radius: 22px; }
  .foot-grid { grid-template-columns: 1fr; gap: 30px; }
  .hero-cta .btn { width: 100%; }
}
