/* ============================================================================
   Baseline — Landing page
   ----------------------------------------------------------------------------
   The only brand-register surface in the build. It shows the real product UI
   rather than describing it: the phone frames below are live markup built from
   the same components and the same dataset as the app, not screenshots.
   ========================================================================== */

body.landing {
  background:
    radial-gradient(1200px 780px at 76% -14%, oklch(0.28 0.055 113 / .40), transparent 60%),
    radial-gradient(820px 560px at 4% 10%, oklch(0.23 0.025 232 / .34), transparent 64%),
    var(--canvas);
}

/* ── Nav ─────────────────────────────────────────────────────────────── */
.lnav {
  position: sticky; top: 0; z-index: var(--z-sticky);
  border-bottom: 1px solid transparent;
  background: color-mix(in oklab, var(--canvas) 80%, transparent);
  backdrop-filter: blur(14px);
  transition: border-color var(--dur-screen) var(--ease-out);
}
.lnav.is-stuck { border-bottom-color: var(--hairline); }
.lnav__in { display: flex; align-items: center; gap: var(--sp-4); height: 64px; }
.lmark {
  display: inline-flex; align-items: center; gap: var(--sp-3);
  font-weight: 600; letter-spacing: -0.025em; font-size: var(--fs-lg);
  text-decoration: none; color: inherit;
}
.lmark svg { color: var(--brand); }
.lnav__links { display: flex; gap: var(--sp-1); margin-left: var(--sp-6); }
.lnav__links a {
  padding: var(--sp-2) var(--sp-3); border-radius: var(--r-sm);
  font-size: var(--fs-sm); color: var(--ink-3); text-decoration: none;
  transition: color var(--dur-press) var(--ease-out), background-color var(--dur-press) var(--ease-out);
}
.lnav__links a:hover { color: var(--ink); background: var(--surface-2); }
@media (max-width: 900px) { .lnav__links { display: none; } }
@media (max-width: 560px) { .lnav__cta-2 { display: none; } }

/* ── Section rhythm ──────────────────────────────────────────────────── */
.lsec { padding: var(--sp-12) 0; }
@media (max-width: 720px) { .lsec { padding: var(--sp-10) 0; } }
.lsec--tight { padding-block: var(--sp-10); }

.eyebrow {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.02em;
  color: var(--brand);
}
.lh2 {
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  letter-spacing: -0.032em; line-height: 1.1;
  max-width: 20ch; text-wrap: balance;
}
.lp {
  color: var(--ink-2); max-width: 60ch; font-size: var(--fs-md);
  line-height: 1.6; margin-top: var(--sp-4); text-wrap: pretty;
}

/* ── Hero ────────────────────────────────────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--sp-10);
  align-items: center;
  padding-block: var(--sp-11) var(--sp-10);
}
@media (max-width: 1040px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: var(--sp-9); }
  .hero__art { justify-self: center; }
}
.hero h1 {
  font-size: clamp(2.7rem, 6.4vw, 4.5rem);
  line-height: 1.0;
  letter-spacing: -0.042em;
  font-weight: 600;
  text-wrap: balance;
  margin-top: var(--sp-5);
}
.hero__sub {
  font-size: clamp(1.05rem, 1.7vw, 1.28rem);
  color: var(--ink-2); max-width: 44ch; line-height: 1.5;
  margin-top: var(--sp-6);
}
.hero__meta {
  display: flex; flex-wrap: wrap; gap: var(--sp-3) var(--sp-6);
  margin-top: var(--sp-8); font-size: var(--fs-xs); color: var(--ink-3);
}
.hero__meta span { display: inline-flex; align-items: center; gap: var(--sp-2); }

/* The hero phone sizes off viewport HEIGHT, not width — on a short laptop an
   844px frame would run off the fold and read as clipped rather than inviting.
   Height queries, because that is the constraint that actually binds. */
.hero .pf-wrap { --s: 0.78; }
@media (max-height: 900px) { .hero .pf-wrap { --s: 0.70; } }
@media (max-height: 800px) { .hero .pf-wrap { --s: 0.63; } }
@media (max-height: 700px) { .hero .pf-wrap { --s: 0.56; } }
@media (max-width: 1040px) { .hero .pf-wrap { --s: 0.72; } }
@media (max-width: 460px)  { .hero .pf-wrap { --s: 0.60; } }

/* ── Static phone frame (real markup, not a screenshot) ──────────────── */
.pf-wrap {
  width: calc(390px * var(--s, 1));
  height: calc(var(--ph, 844px) * var(--s, 1));
  flex-shrink: 0;
}
.pf {
  position: relative;
  width: 390px;
  /* --ph lets a frame be cropped to the height its content actually needs, so
     a product shot doesn't carry 300px of empty screen below the fold. */
  height: var(--ph, 844px);
  background: #000;
  border-radius: 54px;
  padding: 10px;
  transform: scale(var(--s, 1));
  transform-origin: top left;
  box-shadow: 0 0 0 2px oklch(0.30 0 0), 0 0 0 4px oklch(0.12 0 0),
              0 34px 90px rgba(0, 0, 0, .62);
}
.pf__vp {
  position: relative;
  width: 100%; height: 100%;
  background: var(--canvas);
  border-radius: 44px;
  overflow: hidden;
  display: flex; flex-direction: column;
}
.pf__island {
  position: absolute; top: 11px; left: 50%; transform: translateX(-50%);
  width: 116px; height: 33px; border-radius: 20px; background: #000; z-index: 5;
}
.pf__status {
  position: absolute; top: 0; left: 0; right: 0; height: 54px; z-index: 4;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 26px; font-size: 13px; font-weight: 600;
}
.pf__body { flex: 1; overflow: hidden; padding: 58px var(--sp-5) var(--sp-4); }
.pf__tabs {
  flex-shrink: 0; display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--hairline); padding: var(--sp-3) 0 var(--sp-6);
}
.pf__tab {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 10.5px; font-weight: 500; color: var(--ink-3);
}
.pf__tab.on { color: var(--brand); }
.pf__caption {
  text-align: center; margin-top: var(--sp-4);
  font-size: var(--fs-sm); color: var(--ink-2);
}
.pf__caption b { color: var(--ink); font-weight: 600; display: block; margin-bottom: 2px; }

/* ── Loop: three frames ──────────────────────────────────────────────── */
.loop {
  --ph: 620px;                      /* cropped — no dead space under the content */
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-7); margin-top: var(--sp-9);
  align-items: start; justify-items: center;
}
@media (max-width: 940px) {
  .loop { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: var(--sp-8); }
}
.loop__step {
  display: flex; align-items: center; gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}
.loop__n {
  width: 26px; height: 26px; flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--brand-dim);
  color: var(--brand);
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
}

/* ── The engine section ──────────────────────────────────────────────── */
.engine {
  border: 1px solid var(--hairline);
  border-radius: var(--r-xl);
  background: linear-gradient(155deg, var(--surface-2), var(--surface-1) 58%);
  padding: clamp(var(--sp-6), 4vw, var(--sp-9));
}
.engine__grid {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: var(--sp-9); align-items: center;
}
@media (max-width: 900px) { .engine__grid { grid-template-columns: minmax(0,1fr); gap: var(--sp-7); } }

/* ── Feature grid ────────────────────────────────────────────────────── */
.fgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); gap: var(--sp-4); }
.fcard {
  padding: var(--sp-5);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  background: var(--surface-1);
  text-decoration: none; color: inherit;
  display: flex; flex-direction: column; gap: var(--sp-2);
  transition: border-color var(--dur-press) var(--ease-out),
              background-color var(--dur-press) var(--ease-out),
              transform var(--dur-press) var(--ease-out);
}
.fcard:active { transform: scale(0.99); }
@media (hover: hover) and (pointer: fine) {
  .fcard:hover { border-color: var(--brand-dim); background: var(--surface-2); }
}
.fcard__ico {
  width: 38px; height: 38px; border-radius: var(--r-sm);
  display: grid; place-items: center;
  background: var(--surface-3); color: var(--brand);
  margin-bottom: var(--sp-2);
}
.fcard__t { font-weight: 600; font-size: var(--fs-md); letter-spacing: -0.015em; }
.fcard__d { font-size: var(--fs-sm); color: var(--ink-3); line-height: 1.5; }
.fcard__go { font-size: var(--fs-xs); color: var(--brand); margin-top: auto; padding-top: var(--sp-3); }

/* ── Stat strip ──────────────────────────────────────────────────────── */
.lstats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: var(--sp-6);
  padding: var(--sp-7) 0;
  border-block: 1px solid var(--hairline);
}
.lstat__v {
  font-family: var(--font-mono); font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 500; letter-spacing: -0.03em; font-variant-numeric: tabular-nums;
}
.lstat__l { font-size: var(--fs-xs); color: var(--ink-3); margin-top: var(--sp-2); line-height: 1.45; }

/* ── Trust ───────────────────────────────────────────────────────────── */
.trust { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--sp-5); }
.trust__i { display: flex; gap: var(--sp-3); }
.trust__t { font-weight: 600; font-size: var(--fs-sm); }
.trust__d { font-size: var(--fs-sm); color: var(--ink-3); line-height: 1.5; margin-top: 2px; }

/* ── CTA ─────────────────────────────────────────────────────────────── */
.lcta {
  border: 1px solid var(--brand-dim);
  border-radius: var(--r-xl);
  background: linear-gradient(125deg, color-mix(in oklab, var(--brand) 13%, var(--surface-1)), var(--surface-1) 60%);
  padding: clamp(var(--sp-7), 5vw, var(--sp-10));
  text-align: center;
}

/* ── Reveal ──────────────────────────────────────────────────────────────
   VISIBLE BY DEFAULT. The hidden state (.pre) is applied by JS only once an
   IntersectionObserver is confirmed to exist and has been wired up, and a
   failsafe timer clears it regardless. No JS, a stalled observer, a headless
   render or a zero-height viewport all end with the content on screen —
   which is the whole point of "reveals enhance, they never gate". */
.rv {
  transition: opacity 620ms var(--ease-out), transform 620ms var(--ease-out);
}
.rv.pre { opacity: 0; transform: translateY(14px); }
/* Declared after .pre so it wins at equal specificity. */
.rv.in  { opacity: 1; transform: none; }
.rv.d1 { transition-delay: 70ms; }
.rv.d2 { transition-delay: 140ms; }
.rv.d3 { transition-delay: 210ms; }
@media (prefers-reduced-motion: reduce) {
  .rv, .rv.pre, .rv.in { opacity: 1; transform: none; transition: none; }
}
