/* Hallmark · macrostructure: Split Hero + Bento · nav: N5 floating pill · footer: Ft5 statement
 * tone: technical-atmospheric · theme: Midnight · anchor hue: violet→cyan (cool)
 * Rewritten UI (2026-06-22): Marquee Hero → asymmetric Split Hero + Bento feature grid.
 * Hallmark · pre-emit critique: P5 H5 E5 S5 R5 V5
 */
@import url("tokens.css");

* { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(60rem 40rem at 82% -8%, oklch(70% 0.19 22 / 0.18), transparent 60%),
    radial-gradient(48rem 36rem at 4% 6%, oklch(66% 0.16 35 / 0.12), transparent 62%);
  background-attachment: fixed;
}
/* fine grain — kills gradient banding in the blooms, adds tactility (tactile-rebellion) */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0.04;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.04;
  overflow-wrap: anywhere;
  min-width: 0;
}

a { color: inherit; }
img, video { max-width: 100%; display: block; }

.wrap { width: min(72rem, 92vw); margin-inline: auto; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--color-ink-mute);
}

/* ---- nav: N5 floating pill ---- */
.nav-shell { position: sticky; top: var(--space-md); z-index: 50; padding-inline: var(--space-md); }
.nav {
  width: min(64rem, 94vw); margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-xs) var(--space-xs) var(--space-xs) var(--space-lg);
  background: oklch(19% 0.03 25 / 0.72);
  backdrop-filter: blur(14px);
  border: var(--rule-hair);
  border-radius: var(--radius-pill);
}
.brand { display: inline-flex; align-items: center; gap: var(--space-sm); font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; font-size: var(--text-lg); }
.brand-mark { display: block; border-radius: 8px; }
.brand span { color: var(--color-accent); }
.nav-right { display: flex; align-items: center; gap: var(--space-sm); }
.nav-link { font-size: var(--text-sm); color: var(--color-ink-2); text-decoration: none; padding: var(--space-xs) var(--space-sm); border-radius: var(--radius-pill); transition: color var(--dur-fast) var(--ease-out); }
.nav-link:hover { color: var(--color-ink); }
/* phones: drop the secondary scroll-anchor links so the pill never clips the Download CTA (gate 36/59) */
@media (max-width: 30rem) { .nav-link { display: none; } }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: var(--space-xs);
  font-family: var(--font-body); font-weight: 600; font-size: var(--text-sm);
  text-decoration: none; cursor: pointer; border: 0;
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-pill);
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-mid) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.btn-primary {
  color: var(--color-accent-ink);
  background: linear-gradient(120deg, var(--color-accent), var(--color-accent-strong));
  box-shadow: 0 8px 30px oklch(70% 0.19 22 / 0.28);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 40px oklch(70% 0.19 22 / 0.4); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost { color: var(--color-ink); background: transparent; border: var(--rule-hair); }
.btn-ghost:hover { background: var(--color-paper-3); }
.btn:focus-visible, .nav-link:focus-visible, .foot-links a:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }

/* ---- hero: asymmetric SPLIT (copy left, product right) ---- */
.hero { display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); gap: var(--space-2xl); align-items: center; padding: var(--space-3xl) 0 var(--space-2xl); }
.hero-copy h1 { font-size: var(--text-display); margin: 0 0 var(--space-lg); max-width: 13ch; }
.hero-copy h1 em { font-style: normal; background: linear-gradient(120deg, var(--color-accent), var(--color-accent-strong)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-copy .lede { font-size: var(--text-lg); color: var(--color-ink-2); max-width: 42ch; margin: 0 0 var(--space-xl); }
.hero .cta-row { justify-content: flex-start; }
.hero-proof { margin: 0; }
@media (max-width: 56rem) {
  .hero { grid-template-columns: minmax(0, 1fr); text-align: center; padding-top: var(--space-xl); gap: var(--space-xl); }
  .hero-copy h1, .hero-copy .lede { max-width: none; margin-inline: auto; }
  .hero .cta-row { justify-content: center; }
}

.cta-row { display: flex; gap: var(--space-sm); flex-wrap: wrap; align-items: center; }
.cta-note { font-size: var(--text-xs); color: var(--color-ink-mute); margin-top: var(--space-md); }

/* ---- proof bar (honest stat strip — real witnessed numbers) ---- */
.proof-strip { padding-top: var(--space-md); padding-bottom: var(--space-2xl); }
.proof-bar {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border: var(--rule-hair); border-radius: var(--radius-lg); overflow: hidden;
  background: oklch(19% 0.03 25 / 0.4); backdrop-filter: blur(6px);
}
.proof-bar .stat { padding: var(--space-lg); border-right: var(--rule-hair); }
.proof-bar .stat:last-child { border-right: 0; }
.proof-bar .v { font-family: var(--font-display); font-weight: 600; font-size: var(--text-2xl); letter-spacing: -0.02em; line-height: 1; }
.proof-bar .v em { font-style: normal; color: var(--color-accent); }
.proof-bar .k { font-family: var(--font-mono); font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.12em; color: var(--color-ink-mute); margin-top: var(--space-sm); }
@media (max-width: 52rem) {
  .proof-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .proof-bar .stat:nth-child(2) { border-right: 0; }
  .proof-bar .stat:nth-child(1), .proof-bar .stat:nth-child(2) { border-bottom: var(--rule-hair); }
}

.frame {
  margin: 0; border: var(--rule-hair); border-radius: var(--radius-lg); overflow: hidden;
  background: var(--color-paper-2);
  /* lit edge: ambient drop + a 1px inner top-highlight = premium "real product" depth */
  box-shadow: 0 30px 80px oklch(8% 0.02 25 / 0.6), inset 0 1px 0 oklch(96% 0.01 25 / 0.08);
}
.frame video, .frame img { width: 100%; height: auto; display: block; }
figcaption { font-size: var(--text-sm); color: var(--color-ink-mute); text-align: center; padding-top: var(--space-md); }

/* ---- generic section ---- */
section { padding-block: var(--space-3xl); }
.sec-head { max-width: 40ch; margin-bottom: var(--space-2xl); }
.sec-head h2 { font-size: var(--text-2xl); margin: var(--space-sm) 0 0; }
.sec-head p { color: var(--color-ink-2); font-size: var(--text-lg); margin: var(--space-sm) 0 0; }

/* split: copy + media side-by-side (used by #library) */
.split { display: grid; grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr); gap: var(--space-2xl); align-items: center; }
.split .sec-head { margin-bottom: 0; }
@media (max-width: 56rem) { .split { grid-template-columns: minmax(0, 1fr); } }

/* ---- steps ---- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr)); gap: var(--space-lg); }
.step { padding: var(--space-lg); border: var(--rule-hair); border-radius: var(--radius-md); background: oklch(19% 0.03 25 / 0.5); }
.step .n { font-family: var(--font-mono); font-size: var(--text-sm); color: var(--color-accent); }
.step h3 { font-size: var(--text-lg); margin: var(--space-sm) 0 var(--space-xs); }
.step p { color: var(--color-ink-2); font-size: var(--text-sm); margin: 0; }

/* ---- under the hood: BENTO (asymmetric tiles, not equal chips) ---- */
.bento { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-md); }
.tile { padding: var(--space-lg); border: var(--rule-hair); border-radius: var(--radius-md); background: oklch(19% 0.03 25 / 0.5); display: flex; flex-direction: column; gap: var(--space-xs); }
.tile .k { font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.08em; color: var(--color-accent); text-transform: uppercase; }
.tile h3 { font-size: var(--text-lg); margin: 0; }
.tile p { color: var(--color-ink-2); font-size: var(--text-sm); margin: 0; }
.tile-lead { grid-column: 1 / -1; background: linear-gradient(150deg, oklch(26% 0.06 22 / 0.55), oklch(19% 0.03 25 / 0.5)); }
.tile-lead h3 { font-size: var(--text-xl); }
.tile-wide { grid-column: 1 / -1; }
@media (max-width: 40rem) { .bento { grid-template-columns: minmax(0, 1fr); } }

/* ---- pricing ---- */
.price-band { border: var(--rule-hair); border-radius: var(--radius-lg); padding: var(--space-2xl); background: oklch(19% 0.03 25 / 0.55); text-align: center; }
.price-band h2 { font-size: var(--text-2xl); margin: 0 0 var(--space-md); }
.price-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(13rem, 100%), 1fr)); gap: var(--space-lg); margin-top: var(--space-xl); text-align: left; }
.price-cols .c { padding: var(--space-lg); border-radius: var(--radius-md); border: var(--rule-hair); }
.price-cols .big { font-family: var(--font-display); font-size: var(--text-2xl); }
.price-cols .c p { color: var(--color-ink-2); font-size: var(--text-sm); }

/* ---- LIQUID GLASS — frosted translucent panels float over the blooms (Apple Liquid Glass, on the web) ---- */
.proof-bar, .step, .tile, .price-band, .price-cols .c {
  position: relative;
  backdrop-filter: blur(18px) saturate(1.5);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  box-shadow: inset 0 1px 0 oklch(96% 0.01 25 / 0.08), 0 10px 34px oklch(8% 0.02 25 / 0.34);
}
.price-cols .c { background: oklch(19% 0.03 25 / 0.4); }
.step, .tile { border-radius: var(--radius-lg); }   /* softer squircle for the glass feel */
/* specular lit-rim — the signature Liquid Glass edge: bright at the light source (top-left),
   faint through the middle, a whisper of accent where it meets the base. A 1px gradient ring. */
.proof-bar::after, .step::after, .tile::after, .price-band::after, .price-cols .c::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(150deg, oklch(99% 0.01 25 / 0.5), oklch(99% 0.01 25 / 0.04) 36%, oklch(99% 0.01 25 / 0.02) 64%, oklch(70% 0.19 22 / 0.16));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude;
}

/* built by aiko */
.built-by { font-size: var(--text-sm); color: var(--color-ink-mute); margin: var(--space-lg) 0 0; }
.built-by a { color: var(--color-accent); text-decoration: none; }
.built-by a:hover { text-decoration: underline; }

/* ---- footer: Ft5 statement ---- */
footer { border-top: var(--rule-hair); padding-block: var(--space-3xl) var(--space-xl); }
.statement { font-family: var(--font-display); font-size: var(--text-2xl); letter-spacing: -0.02em; max-width: 18ch; margin: 0 0 var(--space-2xl); }
.statement em { font-style: normal; color: var(--color-accent); }
.foot-row { display: flex; flex-wrap: wrap; gap: var(--space-lg); justify-content: space-between; align-items: center; color: var(--color-ink-mute); font-size: var(--text-sm); }
.foot-links { display: flex; gap: var(--space-lg); flex-wrap: wrap; }
.foot-links a { text-decoration: none; color: var(--color-ink-2); }
.foot-links a:hover { color: var(--color-ink); }

/* ---- motion (reduced-motion aware) ---- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(16px); animation: rise 0.7s var(--ease-out) forwards; }
  .reveal.d1 { animation-delay: 0.08s; }
  .reveal.d2 { animation-delay: 0.16s; }
  @keyframes rise { to { opacity: 1; transform: none; } }
}
