/* ==========================================================================
   sneck - public landing page
   --------------------------------------------------------------------------
   Scoped under .landing; reuses the design tokens and button/kbd
   primitives from app.css (always loaded by the root layout). Own
   full-viewport chrome: nav, hero + two proof points, a real board
   shot, the feature strip, the closing CTA, footer. No app shell,
   no JS - the data-motion reveals ride reactive.css keyframes.

   v2 (landing rebuild): the page sells the real product - the
   query-pinned speed ruler and the dogfooded MCP server lead, the
   differentiators strip as anchored scannable rows, real screenshots
   as self-hosted assets (AssetVsn.url cache-busting). Tokens,
   elevation, radii, motion and type stay on the app.css vocabulary
   (each with its contract fallback), cards on the RAISED tier.

   THE LANDING IS BRAND, DARK BY DESIGN. The app's light theme
   (html[data-theme="light"], a localStorage user choice) stops at the
   door: the block below re-pins every COLOR token the landing
   consumes back to the dark values, so the storefront reads the same
   for every visitor. The app is the product; this page is the poster.
   ========================================================================== */

/* The poster pins dark on itself - and the page body behind it must
   not leak light around the edges (E2E pass #2, N6): the landing
   block is viewport-wide but the BODY paints the overscroll + any
   1px rounding gap, so pin the bed tokens there too while it hosts
   the landing. */
body:has(.landing) {
  --bg-0: #0b0d10;
  --bg-1: #0b0d10;
  background: var(--bg-0);
}

.landing {
  /* -- pinned dark tokens (mirrors :root in app.css) ------------------------- */
  --bg-0: #0b0d10;
  --bg-1: #101318;
  --bg-2: #151a21;
  --bg-3: #1c222c;
  --border: #232936;
  --border-strong: #313a4a;
  --text: #e9edf3;
  --text-2: #b9c2ce;
  --muted: #8791a1;
  --faint: #5e6877;
  --accent: #3fdd9a;
  --accent-bright: #66e9b3;
  --accent-dim: #2a6b52;
  --accent-ink: #06231a;
  --accent-soft: rgba(63, 221, 154, 0.09);
  --primary-disabled-bg: #1d3a2f;
  --primary-disabled-text: #6d8a7d;
  --success: #3fdd9a;
  --warning: #e3b341;
  --danger: #e5534b;
  --info: #6cb6ff;
  --status-backlog: #d9c08a;
  --status-todo: #8b95a5;
  --status-in_progress: #6cb6ff;
  --status-done: #3fdd9a;
  --status-canceled: #e5534b;
  --lift: white;
  --focus-halo: rgba(63, 221, 154, 0.18);
  --scrollbar-thumb: #2b3444;
  --scrollbar-thumb-hover: #39445a;
  --popover-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  --wash-2: rgba(255, 255, 255, 0.02);
  --wash-3: rgba(255, 255, 255, 0.03);
  --wash-4: rgba(255, 255, 255, 0.04);
  --wash-5: rgba(255, 255, 255, 0.05);
  --wash-6: rgba(255, 255, 255, 0.06);
  --hero-glow: rgba(63, 221, 154, 0.045);
  --hero-glow-strong: rgba(63, 221, 154, 0.07);
  --scrim: rgba(5, 8, 10, 0.55);
  --scrim-strong: rgba(6, 8, 11, 0.55);
  --bar-panel: rgba(21, 26, 33, 0.82);
  --danger-wash: rgba(229, 83, 75, 0.1);
  --danger-wash-strong: rgba(229, 83, 75, 0.12);
  --danger-border: rgba(229, 83, 75, 0.4);
  --danger-border-soft: rgba(229, 83, 75, 0.35);
  --danger-text: #f2a6a9;
  --danger-text-dim: #f2938d;
  --danger-text-soft: #e39aa7;
  --warning-wash: rgba(227, 179, 65, 0.1);
  --warning-border: rgba(227, 179, 65, 0.35);
  --merged: #d6a4f2;
  --merged-border: rgba(214, 164, 242, 0.4);
  --avatar-ring: rgba(255, 255, 255, 0.14);
  --avatar-ring-soft: rgba(255, 255, 255, 0.12);
  --avatar-ink: #06231a;
  --shadow-soft: 0 6px 18px rgb(0 0 0 / 22%);
  --shadow-soft-2: 0 10px 30px rgb(0 0 0 / 25%);
  --shadow-soft-3: 0 12px 32px rgba(0, 0, 0, 0.35);
  --todo-wash: rgba(139, 149, 165, 0.12);
  --todo-border: #38404c;
  --sheet-shadow: 0 -14px 44px rgba(3, 6, 10, 0.55);
  --shadow-soft-4: 0 14px 40px rgb(0 0 0 / 35%);
  --chip-ink: color-mix(in srgb, var(--chip, var(--muted)) 78%, var(--lift));
  /* The v2 elevation ladder (matches :root in app.css - M1's landing;
  the pin exists so the light theme can't re-point the poster) */
  --shadow-1: 0 1px 2px rgb(0 0 0 / 0.28);
  --shadow-2: 0 4px 12px rgb(0 0 0 / 0.34);
  --shadow-3: 0 12px 32px rgb(0 0 0 / 0.44);
  color-scheme: dark;
  /* -- /pinned tokens --------------------------------------------------------- */

  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1200px 540px at 50% -140px, var(--hero-glow-strong), transparent 65%),
    var(--bg-0);
}

/* -- nav ------------------------------------------------------------------------ */

.landing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: min(1080px, calc(100% - 48px));
  margin: 0 auto;
  padding: 22px 0;
}

.landing-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

/* The brand-mark recipe from app.css, landing-sized */
.landing-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-dim);
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
}

.landing-word {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-transform: lowercase;
}

/* The middle doors - docs/support are plain hrefs by design (their
   routes ship with the docs lane); pricing rides the router. */
.landing-nav-links {
  display: flex;
  align-items: center;
  gap: var(--sp-2, 8px);
}

.landing-nav-link {
  padding: 6px 10px;
  color: var(--text-2);
  font-size: var(--size-base, 13.5px);
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--r-sm, 6px);
  transition: color var(--dur-fast, 120ms) var(--ease, ease),
    background-color var(--dur-fast, 120ms) var(--ease, ease);
}

.landing-nav-link:hover {
  color: var(--text);
  background: var(--wash-4);
}

.landing-nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Buttons are the app.css .btn/.btn-primary/.btn-ghost recipes, sized
   up for landing prominence. */
.landing .btn {
  height: 36px;
  padding: 0 16px;
  font-size: var(--size-base, 13.5px);
  border-radius: var(--r-sm, 6px);
  transition-duration: var(--dur-fast, 120ms);
  transition-timing-function: var(--ease, ease);
}

.landing .landing-btn-lg {
  height: 42px;
  padding: 0 22px;
  font-size: var(--size-md, 15px);
}

/* -- hero + the two proof points ---------------------------------------------------- */

.landing-main {
  flex: 1;
  width: min(1080px, calc(100% - 48px));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.landing-hero {
  text-align: center;
  padding: clamp(48px, 9vh, 104px) 0 clamp(36px, 6vh, 64px);
}

.landing-headline {
  margin: 0 0 20px;
  font-size: clamp(38px, 6.4vw, 64px);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

/* The sub sits one step down the scale (--text-md), secondary ink - the
   hero reads headline-first (v2 rule 5: one size per role). */
.landing-sub {
  margin: 0 auto;
  max-width: 620px;
  font-size: var(--size-md, 15px);
  line-height: 1.6;
  color: var(--text-2);
}

/* The two proofs: raised cards under the positioning - the honest
   speed ruler on one side, the dogfooded MCP line on the other. */
.landing-proofs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-3, 12px);
  max-width: 760px;
  margin: var(--sp-7, 32px) auto var(--sp-7, 32px);
  text-align: left;
}

.landing-proof {
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md, 10px);
  padding: var(--sp-5, 20px);
  box-shadow: var(--shadow-1);
}

.landing-proof-title {
  margin: 0 0 var(--sp-2, 8px);
  display: flex;
  align-items: center;
  gap: var(--sp-2, 8px);
  font-size: var(--size-md, 15px);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

/* A quiet accent tick marks each proof as evidence, not ad copy. */
.landing-proof-title::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.landing-proof p {
  margin: 0;
  color: var(--muted);
  font-size: var(--size-base, 13.5px);
  line-height: 1.6;
}

.landing-ctas {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--sp-3, 12px);
  flex-wrap: wrap;
}

/* -- the product shot ---------------------------------------------------------------- */

.landing-shot {
  padding-bottom: clamp(48px, 8vh, 88px);
}

/* The frame: a whisper of browser chrome (three token-colored dots)
   around a real screenshot - the page sells the product, so the
   product poses. */
.landing-frame {
  margin: 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg, 14px);
  background: var(--bg-1);
  box-shadow: var(--shadow-3);
  overflow: hidden;
}

.landing-frame-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 var(--sp-3, 12px);
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
}

.landing-frame-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--border-strong);
}

.landing-frame-dot:nth-child(1) {
  background: var(--danger);
}

.landing-frame-dot:nth-child(2) {
  background: var(--warning);
}

.landing-frame-dot:nth-child(3) {
  background: var(--success);
}

.landing-frame-img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--bg-0);
}

.landing-shot-caption {
  margin: var(--sp-3, 12px) 0 0;
  text-align: center;
  color: var(--faint);
  font-size: var(--size-sm, 12.5px);
}

/* -- the feature strip ----------------------------------------------------------------- */

.landing-features {
  padding-top: clamp(40px, 7vh, 72px);
  border-top: 1px solid var(--border);
}

.landing-section-title {
  margin: 0 0 var(--sp-2, 8px);
  text-align: center;
  font-size: clamp(24px, 3.4vw, 32px);
  font-weight: 600;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.landing-section-sub {
  margin: 0 auto var(--sp-6, 24px);
  max-width: 560px;
  text-align: center;
  color: var(--muted);
  font-size: var(--size-base, 13.5px);
  line-height: 1.6;
}

/* The index: anchor chips so every differentiator is one jump - and
   no link on this page dead-ends. */
.landing-toc {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-2, 8px);
  margin: 0 auto var(--sp-6, 24px);
  max-width: 720px;
}

.landing-toc a {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-2);
  font-size: var(--size-sm, 12.5px);
  font-weight: 500;
  text-decoration: none;
  transition: color var(--dur-fast, 120ms) var(--ease, ease),
    border-color var(--dur-fast, 120ms) var(--ease, ease);
}

.landing-toc a:hover {
  color: var(--accent-bright);
  border-color: var(--accent-dim);
}

/* The rows: title column left, copy right - scannable top to bottom,
   anchored for sharing. */
.landing-feature {
  display: grid;
  grid-template-columns: minmax(160px, 230px) minmax(0, 1fr);
  gap: var(--sp-4, 16px) var(--sp-6, 24px);
  padding: var(--sp-6, 24px) 0;
  border-top: 1px solid var(--border);
  scroll-margin-top: var(--sp-6, 24px);
}

.landing-feature-title {
  margin: 0;
  font-size: var(--size-md, 15px);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

.landing-feature-body {
  max-width: 640px;
}

.landing-feature-body p {
  margin: 0;
  color: var(--muted);
  font-size: var(--size-base, 13.5px);
  line-height: 1.65;
}

/* A ref the way the product writes one: mono chip, its own ink. */
.landing-ref {
  padding: 1px 6px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm, 6px);
  background: var(--wash-4);
  color: var(--accent-bright);
  font-family: var(--font-mono);
  font-size: 0.92em;
  white-space: nowrap;
}

/* The composer's shot rides inside its row, inset under the copy. */
.landing-frame-inset {
  margin-top: var(--sp-5, 20px);
  max-width: 640px;
}

/* -- the closing CTA -------------------------------------------------------------------- */

.landing-close {
  text-align: center;
  margin-top: clamp(40px, 7vh, 72px);
  padding: clamp(48px, 9vh, 96px) 0;
  border-top: 1px solid var(--border);
  background: radial-gradient(720px 300px at 50% 100%, var(--hero-glow), transparent 70%);
}

.landing-close-title {
  margin: 0 0 var(--sp-2, 8px);
  font-size: clamp(24px, 3.4vw, 32px);
  font-weight: 600;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.landing-close-sub {
  margin: 0 0 var(--sp-6, 24px);
  color: var(--muted);
  font-size: var(--size-base, 13.5px);
}

/* -- footer ------------------------------------------------------------------------- */

.landing-footer {
  width: min(1080px, calc(100% - 48px));
  margin: 0 auto;
  padding: var(--sp-5, 20px) 0 var(--sp-7, 32px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4, 16px);
  flex-wrap: wrap;
}

.landing-footer-line {
  margin: 0;
  color: var(--muted);
  font-size: var(--size-sm, 12.5px);
}

.landing-footer-note {
  margin: var(--sp-1, 4px) 0 0;
  color: var(--faint);
  font-size: var(--size-xs, 11px);
  font-style: italic;
}

.landing-footer-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-4, 16px);
}

.landing-footer-links a {
  color: var(--muted);
  font-size: var(--size-sm, 12.5px);
  font-weight: 500;
  text-decoration: none;
  transition: color var(--dur-fast, 120ms) var(--ease, ease);
}

.landing-footer-links a:hover {
  color: var(--accent);
}

/* -- focus (§3 rule 2: one ring, keyboard-only) --------------------------------- */

.landing .btn:focus-visible,
.landing-brand:focus-visible,
.landing-nav-link:focus-visible,
.landing-toc a:focus-visible,
.landing-footer-links a:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring, 0 0 0 2px var(--bg-0), 0 0 0 4px var(--accent));
}

@media (prefers-reduced-motion: reduce) {
  .landing .btn,
  .landing-nav-link,
  .landing-toc a,
  .landing-footer-links a {
    transition-duration: 0.01ms;
  }
}

/* -- responsive ------------------------------------------------------------------------ */

@media (max-width: 860px) {
  .landing-proofs {
    grid-template-columns: 1fr;
  }

  .landing-feature {
    grid-template-columns: 1fr;
    gap: var(--sp-2, 8px);
  }
}

@media (max-width: 640px) {
  .landing-nav,
  .landing-main,
  .landing-footer {
    width: calc(100% - 32px);
  }

  .landing-nav {
    padding: 16px 0;
  }

  /* The middle doors fold away - the footer carries every door on
     every width, so nothing becomes unreachable. */
  .landing-nav-links {
    display: none;
  }

  .landing-hero {
    padding-top: 48px;
  }

  .landing-headline {
    font-size: clamp(32px, 9vw, 40px);
  }

  .landing-sub {
    font-size: var(--size-base, 13.5px);
  }

  /* Hero stacks: full-width CTAs, primary first */
  .landing-ctas {
    flex-direction: column;
    align-items: stretch;
  }

  .landing .landing-btn-lg {
    width: 100%;
  }
}
