/* Landing / blog / legal skin. The reset, shared tokens, body base, and the
   button + url-field primitives live in tokens.css (loaded first). This file
   adds only what's specific to the marketing surfaces: the serif face, the
   hero glow, the full-screen scroll deck, and the legal-page layout. */
:root {
  --glow: rgba(154, 216, 20, 0.05);
  --serif: "Spectral", Georgia, serif;
}

/* grain overlay */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 6;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---- the deck: full-screen snapping panels ---- */
.deck {
  height: 100dvh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.deck::-webkit-scrollbar { display: none; }

.panel {
  position: relative;
  height: 100dvh;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  padding: 2rem 1.75rem;
}
.block { width: 100%; max-width: 40rem; margin-inline: auto; }
.block.wide { max-width: 52rem; }

/* hero panel: glow + content + bottom footer */
.hero {
  background-image: radial-gradient(60rem 40rem at 18% 28%, var(--glow), transparent 70%);
  padding: 0;
}
.hero main {
  flex: 1;
  display: flex;
  align-items: center;
  width: 100%;
  padding: 2rem 1.75rem;
}

/* explanatory panels: vertically centered */
.pane { justify-content: center; }

/* staggered reveal (hero only) */
.r { opacity: 0; transform: translateY(8px); animation: rise 0.7s cubic-bezier(.2,.7,.2,1) forwards; }
.r1 { animation-delay: 0.05s; }
.r2 { animation-delay: 0.18s; }
.r3 { animation-delay: 0.32s; }
.r4 { animation-delay: 0.46s; }
.r5 { animation-delay: 0.60s; }
@keyframes rise { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .r { opacity: 1; transform: none; animation: none; } }

/* wordmark */
.mark { display: flex; align-items: baseline; gap: 0.9rem; margin-bottom: 2.6rem; }
.mark .name { font-family: var(--serif); font-optical-sizing: auto; font-weight: 400; font-size: 1.9rem; letter-spacing: -0.01em; }
.mark .dot { color: var(--accent); }
.mark .tag { font-size: 0.75rem; color: var(--dim); letter-spacing: 0.02em; }

/* headline */
.thesis { font-size: clamp(2.2rem, 8vw, 3.4rem); line-height: 1.04; letter-spacing: -0.02em; margin-bottom: 1.6rem; }
.thesis .head { display: block; font-family: var(--mono); font-weight: 500; color: var(--ink); }
.thesis .turn { display: block; font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--dim); }

.lede { width: 100%; color: var(--dim); font-size: 0.95rem; line-height: 1.65; margin-bottom: 2.8rem; }
.lede b { color: var(--ink); font-weight: 500; }

/* reserve url */
/* reserve form uses the shared .urlfield.lg + .btn-accent primitives (tokens.css) */
.reserve { margin-bottom: 1.5rem; }

/* secondary demo link under the reserve form */
.demo-cta { font-size: 0.82rem; color: var(--dimmer); margin-bottom: 1.5rem; }
.demo-cta a { color: var(--dim); text-decoration: none; border-bottom: 1px solid var(--accent); transition: color 0.2s; }
.demo-cta a:hover { color: var(--ink); }

/* inline chips linking demo artifacts */
.chips { margin-top: 0.9rem; font-size: 0.78rem; color: var(--dimmer); letter-spacing: 0.02em; line-height: 2; }
.chips a { display: inline-block; color: var(--dim); text-decoration: none; border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 0.1rem 0.65rem; margin-left: 0.25rem; transition: color 0.2s, border-color 0.2s; }
.chips a:hover { color: var(--ink); border-color: var(--accent); }

/* meta footer (hero bottom) */
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 1.4rem; font-size: 0.78rem; color: var(--dim); }
.meta .agents { color: var(--dimmer); }
.meta a:not(.btn) { color: var(--dim); text-decoration: none; border-bottom: 1px solid transparent; transition: color 0.2s, border-color 0.2s; }
.meta a:not(.btn):hover { color: var(--ink); border-color: var(--accent); }
.meta .nav-cta { margin-block: -0.3rem; }
.meta .sep { flex: 1; }
.hero-foot { border-top: 1px solid var(--line); padding: 1.25rem 1.75rem; }

/* panel content typography */
.num { font-size: 0.8rem; letter-spacing: 0.02em; color: var(--dim); margin-bottom: 1.3rem; }
.pane h1, .pane h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.9rem, 5.5vw, 2.7rem); line-height: 1.08; letter-spacing: -0.01em; margin-bottom: 1.2rem; }
.pane h1 em, .pane h2 em { font-style: italic; color: var(--dim); }
.pane > .block > p { color: var(--dim); font-size: 1rem; line-height: 1.7; max-width: 38rem; }
.pane p b { color: var(--ink); font-weight: 500; }
.pane .tail { margin-top: 2rem; font-size: 0.78rem; color: var(--dimmer); letter-spacing: 0.02em; }
.closing h2 { margin-bottom: 2rem; }

/* pricing: a slim two-item note on the closing panel */
.pricing { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 2rem; }
.pricing .plan { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.15rem; }
.pricing .plan:first-child { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.pricing .plan.muted { color: var(--dimmer); }
.pricing .col-label { margin-bottom: 0.5rem; }
.pricing .plan-line { color: var(--dim); font-size: 0.88rem; line-height: 1.55; }
.pricing .plan.muted .plan-line { color: var(--dimmer); }
@media (max-width: 540px) { .pricing { grid-template-columns: 1fr; } }

/* two-column split (agent/you, in/out) */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 2.4rem; }
.split > div { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.45rem 1.55rem; }
.col-label { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dimmer); margin-bottom: 0.6rem; }
.split h3 { font-family: var(--serif); font-weight: 400; font-size: 1.4rem; color: var(--ink); margin-bottom: 0.4rem; }
.split p { color: var(--dim); font-size: 0.92rem; line-height: 1.6; }

/* trust trio */
.points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.2rem; margin-top: 2.6rem; }
.points h3 { font-family: var(--serif); font-weight: 400; font-size: 1.2rem; color: var(--ink); margin-bottom: 0.5rem; }
.points p { color: var(--dim); font-size: 0.88rem; line-height: 1.6; }

/* compare list */
.compare { margin-top: 2.2rem; }
.compare .row { display: grid; grid-template-columns: 12rem 1fr; gap: 1.6rem; padding: 0.95rem 0; border-top: 1px solid var(--line); }
.compare .row:last-child { border-bottom: 1px solid var(--line); }
.compare .row b { color: var(--ink); font-weight: 500; }
.compare .row span { color: var(--dim); font-size: 0.92rem; line-height: 1.55; }

/* advance arrow */
.advance {
  position: absolute; right: 1.75rem; bottom: 1.75rem;
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--dim); text-decoration: none; transition: color 0.2s;
}
.hero .advance { bottom: 4.75rem; }
.advance:hover { color: var(--ink); }
.advance .arrow { color: var(--accent); animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(3px); } }
@media (prefers-reduced-motion: reduce) { .advance .arrow { animation: none; } }

/* progress dots */
.dots { position: fixed; right: 1.4rem; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 0.75rem; z-index: 5; }
.dots a { width: 7px; height: 7px; border-radius: 50%; border: 1px solid var(--dimmer); transition: background 0.2s, border-color 0.2s, transform 0.2s; }
.dots a:hover { border-color: var(--dim); }
.dots a.active { background: var(--accent); border-color: var(--accent); transform: scale(1.15); }

/* theme toggle (lightbulb) */
.theme {
  position: fixed; top: 1.5rem; right: 1.5rem; z-index: 7;
  display: grid; place-items: center;
  width: 2.1rem; height: 2.1rem;
  background: none; border: none; padding: 0; cursor: pointer;
  color: var(--dim); transition: color 0.2s;
}
.theme:hover { color: var(--ink); }
.theme svg { width: 18px; height: 18px; display: block; }

@media (max-width: 720px) {
  .split, .points { grid-template-columns: 1fr; gap: 1.6rem; }
  .compare .row { grid-template-columns: 1fr; gap: 0.3rem; }
}
@media (max-width: 540px) {
  .meta .sep { display: none; flex: none; }
  .advance span:not(.arrow) { display: none; }
  .dots { right: 0.8rem; }
}

/* legal pages: long-form, still in the landing visual language */
.legal-page {
  --legal-nav-h: 4rem;
  --legal-shell-pad-y: clamp(3rem, 7vw, 6rem);
  min-height: 100dvh;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--line) 42%, transparent) 1px, transparent 1px) 0 0 / 5rem 5rem,
    radial-gradient(52rem 32rem at 18% 8%, var(--glow), transparent 68%),
    var(--bg);
}
.legal-nav {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 1.4rem;
  min-height: var(--legal-nav-h);
  padding: 0 1.75rem;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
}
.legal-brand {
  font-family: var(--serif);
  font-size: 1.35rem;
  color: var(--ink);
  text-decoration: none;
}
.legal-brand span { color: var(--accent); }
.legal-nav nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1.1rem;
  font-size: 0.75rem;
}
.legal-nav a {
  color: var(--dim);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s;
}
.legal-nav a:hover,
.legal-nav a[aria-current="page"] {
  color: var(--ink);
  border-color: var(--accent);
}
.legal-shell {
  display: grid;
  grid-template-columns: minmax(12rem, 18rem) minmax(0, 46rem);
  gap: clamp(2rem, 7vw, 6rem);
  width: min(76rem, calc(100% - 3.5rem));
  margin: 0 auto;
  padding: var(--legal-shell-pad-y) 0 5rem;
}
.legal-rail {
  position: sticky;
  top: calc(var(--legal-nav-h) + var(--legal-shell-pad-y));
  align-self: start;
  color: var(--dim);
  font-size: 0.86rem;
  line-height: 1.65;
}
.legal-switcher {
  display: grid;
  gap: 0.55rem;
  margin-top: 1.6rem;
}
.legal-switcher a {
  display: flex;
  justify-content: space-between;
  color: var(--dim);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.65rem 0.75rem;
  transition: color .2s, border-color .2s, background .2s;
}
.legal-switcher a::after {
  content: "→";
  color: var(--accent);
}
.legal-switcher a:hover,
.legal-switcher a[aria-current="page"] {
  color: var(--ink);
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}
.legal-doc {
  min-width: 0;
}
.legal-doc h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.15rem, 8vw, 4.2rem);
  line-height: 1;
  letter-spacing: 0;
  margin-bottom: 1.4rem;
}
.legal-summary {
  color: var(--dim);
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.7;
  max-width: 42rem;
  padding-bottom: 2.2rem;
  border-bottom: 1px solid var(--line);
}
.legal-doc section {
  padding: 2rem 0;
  border-bottom: 1px solid var(--line);
}
.legal-doc h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.38rem;
  line-height: 1.2;
  letter-spacing: 0;
  margin-bottom: 0.9rem;
}
.legal-doc p {
  color: var(--dim);
  font-size: 0.94rem;
  line-height: 1.75;
}
.legal-doc p + p { margin-top: 0.85rem; }
.legal-doc .todo {
  color: var(--ink);
  border-left: 2px solid var(--accent);
  padding: 0.75rem 0 0.75rem 1rem;
  background: color-mix(in srgb, var(--accent) 5%, transparent);
}
.legal-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  width: min(76rem, calc(100% - 3.5rem));
  margin: 0 auto;
  padding: 1.3rem 0 2rem;
  border-top: 1px solid var(--line);
  color: var(--dimmer);
  font-size: 0.76rem;
}
.legal-footer span { flex: 1; min-width: 12rem; }
.legal-footer a {
  color: var(--dim);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.legal-footer a:hover {
  color: var(--ink);
  border-color: var(--accent);
}

/* docs page: the legal skin plus code blocks, sub-headings, and tool lists */
.docs-doc h3.docs-sub {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  color: var(--ink);
  margin: 1.6rem 0 0.55rem;
}
.docs-doc code.inline,
.docs-tools code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  padding: 0.08rem 0.35rem;
  border-radius: var(--radius);
  color: var(--ink);
}
.docs-tools {
  list-style: none;
  display: grid;
  gap: 0.55rem;
  margin: 0.4rem 0 0.6rem;
}
.docs-tools li {
  color: var(--dim);
  font-size: 0.92rem;
  line-height: 1.6;
  border-left: 2px solid var(--accent);
  padding: 0.4rem 0 0.4rem 0.85rem;
  background: color-mix(in srgb, var(--accent) 5%, transparent);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.docs-doc .copy {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  overflow: hidden;
  background: color-mix(in srgb, var(--ink) 3%, transparent);
  margin: 0.9rem 0 0.4rem;
}
.docs-doc .copy code {
  flex: 1;
  min-width: 0;
  padding: 0.8rem 1rem;
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--ink);
  overflow-x: auto;
  white-space: nowrap;
}
.docs-doc .copy button {
  flex: none;
  border: 0;
  border-left: 1px solid var(--line);
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.76rem;
  letter-spacing: 0.03em;
  padding: 0 1.15rem;
  cursor: pointer;
  transition: filter 0.2s;
}
.docs-doc .copy button:hover { filter: brightness(1.08); }
.docs-doc h4.docs-sub2 {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.01em;
  color: var(--ink);
  margin: 1.25rem 0 0.35rem;
}
.docs-doc .copy.docs-code { align-items: stretch; }
.docs-doc .copy.docs-code pre {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 0.8rem 1rem;
  font-family: var(--mono);
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--ink);
  overflow-x: auto;
  white-space: pre;
}
.docs-doc .copy.docs-code button { align-self: stretch; }
.legal-rail .legal-switcher[aria-label="On this page"] a::after { content: ""; }
.legal-rail .legal-switcher[aria-label="On this page"] a {
  justify-content: flex-start;
}

@media (max-width: 780px) {
  .legal-nav { align-items: flex-start; }
  .legal-nav nav {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.75rem 1rem;
  }
  .legal-shell {
    grid-template-columns: 1fr;
    gap: 2.2rem;
  }
  .legal-rail {
    position: static;
    border-bottom: 1px solid var(--line);
    padding-bottom: 1.5rem;
  }
  .legal-switcher {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 520px) {
  .legal-nav,
  .legal-shell,
  .legal-footer {
    width: auto;
  }
  .legal-shell,
  .legal-footer {
    margin-inline: 1.25rem;
  }
  .legal-nav {
    padding-inline: 1.25rem;
  }
  .legal-switcher {
    grid-template-columns: 1fr;
  }
}
