/*
 * v4.css — the website v4 layer, "Field notes" (docs/design/website-v4.md §3, §5; #217).
 * It EXTENDS the Hven 2.0 marketing tokens (tokens.css): every colour here is an alias of a base
 * token or a mix of two, never a value of its own. Marketing pages are light only (#203).
 *
 * The system, in one place:
 *   type     Fraunces 400 for display, set tight (size and spacing carry it, never weight);
 *            Inter for everything else. Scale (px, at 1280): 72 / 48 / 26 / 20 / 17 / 14 / 13.
 *   rhythm   sections clamp(104–184px) apart; a 1200px container with 32px gutters (16px ≤ 600px).
 *   lines    hairlines (1px --v4-line) separate; an ink rule (1px --v4-ink) opens a list.
 *   boxes    only product views are framed (the board 20px, panes 16px); nothing else has a box
 *            or a shadow.
 *   amber    the one action and "Named you", nothing else (a link's hover is ink, not amber).
 *
 * Motion (#203): every element's final state is the default. Only `.v4-motion` selectors set a
 * pre-reveal state, and only landing-v4.js adds that class (never with reduced motion, never
 * without IntersectionObserver). Opacity and transform only; at most 12px; at most 450ms; once.
 */

:root {
  --v4-page:      var(--bg-base);
  --v4-paper:     var(--bg-card);
  --v4-paper-2:   var(--bg-card-hover);
  --v4-ink:       var(--text-primary);
  --v4-ink-2:     var(--text-secondary);
  --v4-ink-3:     var(--text-tertiary);
  --v4-line:      var(--border-subtle);
  --v4-line-2:    var(--border-strong);
  --v4-amber:     var(--accent-primary);
  --v4-amber-hover: var(--accent-hover);
  --v4-amber-ink: var(--accent-primary-text);
  --v4-amber-tint: var(--accent-tint);
  --v4-on-amber:  var(--text-on-accent);
  --v4-slab:      var(--sidebar);
  --v4-slab-2:    var(--sidebar-active);
  --v4-on-slab:   var(--text-on-dark);
  --v4-on-slab-2: var(--border-strong);
  --v4-on-slab-3: var(--text-on-dark-muted);

  --v4-wrap: 1200px;
  --v4-gut: 32px;
  --v4-sec: clamp(104px, 13vw, 184px);
  --v4-measure: 46ch;
  --v4-shadow: 0 36px 80px -48px color-mix(in srgb, var(--text-primary) 50%, transparent);
  --v4-ease: cubic-bezier(.2, .7, .2, 1);
}
@media (max-width: 600px) { :root { --v4-gut: 16px; } }

.v4 * { box-sizing: border-box; }
.v4 { margin: 0; background: var(--v4-page); color: var(--v4-ink); font: 400 17px/1.62 var(--font-sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; -webkit-text-size-adjust: 100%; text-rendering: optimizeLegibility; }
:where(.v4 a) { color: inherit; }   /* zero weight, so any class sets its own text colour */
.v4 :focus-visible { outline: 2px solid var(--v4-ink); outline-offset: 3px; border-radius: 6px; }
/* On the slab an ink ring is invisible (about 1.05:1): the ring takes the slab's own text colour (W4B1 review). */
.v4-close :focus-visible, .v4-foot :focus-visible { outline-color: var(--v4-on-slab); }
.v4-wrap { max-width: var(--v4-wrap); margin: 0 auto; padding-inline: var(--v4-gut); }
.v4-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ── Type ───────────────────────────────────────────────────────────────────────────────────── */
.v4 h1, .v4 h2, .v4-display { font-family: var(--font-display); font-weight: 400; margin: 0; color: var(--v4-ink); text-wrap: balance; font-variation-settings: "opsz" 72; }
.v4 h1 { font-size: clamp(40px, 5.6vw, 72px); line-height: 1.02; letter-spacing: -0.018em; max-width: 12ch; }
.v4 h2 { font-size: clamp(32px, 3.8vw, 48px); line-height: 1.08; letter-spacing: -0.02em; max-width: 16ch; }
.v4 h3 { font: 600 17px/1.35 var(--font-sans); margin: 0; letter-spacing: -0.005em; }
:where(.v4) p { margin: 0; }   /* zero weight, so a class's own margin wins without !important */
.v4-lede { font-size: clamp(18px, 1.5vw, 20px); line-height: 1.58; color: var(--v4-ink-2); max-width: 44ch; margin-top: 26px; }
.v4-body { font-size: clamp(17px, 1.3vw, 18.5px); color: var(--v4-ink-2); max-width: var(--v4-measure); }
.v4-small { font-size: 14px; line-height: 1.5; color: var(--v4-ink-3); }
.v4-small b, .v4-note b { color: var(--v4-ink-2); font-weight: 600; }
.v4-note { margin-top: 14px; font-size: 14px; line-height: 1.5; color: var(--v4-ink-3); }

/* ── Header ─────────────────────────────────────────────────────────────────────────────────── */
.v4-top { display: flex; align-items: center; gap: 28px; height: 76px; }
.v4-mark { font: 400 27px/1 var(--font-display); letter-spacing: -0.02em; text-decoration: none; font-variation-settings: "opsz" 72; }
.v4-nav { display: flex; align-items: center; gap: 26px; margin-left: auto; font-size: 15px; color: var(--v4-ink-2); }
.v4-nav a { text-decoration: none; white-space: nowrap; }
.v4-nav a:not(.v4-btn):hover { color: var(--v4-ink); }
@media (max-width: 760px) { .v4-nav .v4-hide-sm { display: none; } .v4-top { gap: 16px; } .v4-nav { gap: 16px; } }

/* ── Actions: amber only on the action itself; everything else is an underlined link ────────── */
.v4-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border-radius: 999px; border: 1px solid transparent; font: 600 16px/1.2 var(--font-sans); text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color .15s; }
.v4-btn-primary { background: var(--v4-amber); color: var(--v4-on-amber); }
.v4-btn-primary:hover { background: var(--v4-amber-hover); }
.v4-btn-sm { min-height: 40px; padding: 0 18px; font-size: 15px; }
.v4-link { font-weight: 600; text-decoration: none; color: var(--v4-ink); border-bottom: 1.5px solid var(--v4-ink); padding-bottom: 2px; }
.v4-link:hover { border-bottom-color: var(--v4-ink-3); }
.v4-ctas { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 26px; margin-top: 34px; }

/* ── Sections ───────────────────────────────────────────────────────────────────────────────── */
.v4-sec { padding-top: var(--v4-sec); }
.v4-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 64px; align-items: end; }
.v4-head .v4-body { margin: 0; }
@media (max-width: 820px) { .v4-head { grid-template-columns: 1fr; } }

/* ── Hero: the words on the left, the answer board on the right ─────────────────────────────── */
.v4-hero { padding-top: clamp(48px, 7vw, 96px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(40px, 6vw, 88px); align-items: center; }
.v4-hero .v4-free { margin-top: 14px; }
@media (max-width: 1040px) { .v4-hero { grid-template-columns: 1fr; } }

/* The board: one question, what each AI tool answered. The page's one bold object. */
.v4-board { background: var(--v4-paper); border: 1px solid var(--v4-line-2); border-radius: 20px; box-shadow: var(--v4-shadow); overflow: hidden; }
.v4-board-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 22px; border-bottom: 1px solid var(--v4-line); font-size: 13px; color: var(--v4-ink-3); background: var(--v4-paper-2); }
.v4-board-top b { color: var(--v4-ink-2); font-weight: 600; }
.v4-ex { border: 1px dashed var(--v4-line-2); border-radius: 999px; padding: 2px 10px; color: var(--v4-ink-2); white-space: nowrap; }
.v4-q { padding: 22px 22px 18px; font: 400 clamp(21px, 2.1vw, 26px)/1.28 var(--font-display); letter-spacing: -0.01em; border-bottom: 1px solid var(--v4-line); font-variation-settings: "opsz" 72; }
.v4-ans { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; grid-template-areas: "t a m"; gap: 4px 16px; padding: 15px 22px; border-bottom: 1px solid var(--v4-line); align-items: baseline; font-size: 14.5px; }
.v4-ans:last-child { border-bottom: 0; }
.v4-ans .v4-tool { grid-area: t; font-weight: 600; }
.v4-ans .v4-said { grid-area: a; color: var(--v4-ink-2); text-wrap: pretty; }
.v4-ans .v4-mk { grid-area: m; justify-self: end; }
@media (max-width: 520px) {
  .v4-ans { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "t m" "a a"; padding: 14px 16px; }
  .v4-q { padding: 18px 16px 14px; }
  .v4-board-top { padding: 12px 16px; }
}
.v4-mk { font-size: 13px; font-weight: 600; white-space: nowrap; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--v4-line-2); color: var(--v4-ink-2); }
.v4-mk-you { background: var(--v4-amber-tint); border-color: color-mix(in srgb, var(--v4-amber) 55%, transparent); color: var(--v4-amber-ink); }
.v4-mk-none { border-style: dashed; color: var(--v4-ink-3); }

/* ── Ruled lists: an ink rule opens them, hairlines divide them ─────────────────────────────── */
.v4-cols { margin: 48px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); border-top: 1px solid var(--v4-ink); }
.v4-cols > li { padding: 22px 24px 0 0; }
.v4-cols > li + li { padding-left: 24px; border-left: 1px solid var(--v4-line); }
.v4-cols p { margin-top: 8px; color: var(--v4-ink-2); font-size: 15.5px; max-width: 36ch; }
.v4-step-n { display: block; font: 400 28px/1 var(--font-display); color: var(--v4-ink-3); margin-bottom: 16px; font-variant-numeric: lining-nums; font-variation-settings: "opsz" 72; }
@media (max-width: 960px) {
  .v4-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v4-cols > li:nth-child(odd) { padding-left: 0; border-left: 0; }
  .v4-cols > li:nth-child(n+3) { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--v4-line); }
}
@media (max-width: 560px) {
  .v4-cols { grid-template-columns: 1fr; }
  /* :nth-child(n) matches every item at the ≤960 rule's weight, so one rhythm wins here (W4B1 review). */
  .v4-cols > li:nth-child(n) { padding: 20px 0; border-left: 0; margin: 0; }
  .v4-cols > li:nth-child(n+2) { border-top: 1px solid var(--v4-line); }
}

/* Plan facts, from the server (#203). */
.v4-plans { margin: 40px 0 0; border-top: 1px solid var(--v4-ink); }
.v4-plan { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 4px 32px; padding: 18px 0; border-bottom: 1px solid var(--v4-line); }
.v4-plan dt { font-weight: 600; grid-row: span 2; }
.v4-plan dd { margin: 0; color: var(--v4-ink-2); }
.v4-plan .v4-plan-caps { font-size: 14.5px; color: var(--v4-ink-3); }
@media (max-width: 680px) { .v4-plan { grid-template-columns: 1fr; } .v4-plan dt { grid-row: auto; } }
.v4-plans-note { margin-top: 32px; max-width: 60ch; color: var(--v4-ink-2); }
.v4-plans-note a { font-weight: 600; }

/* Questions: a two-column split, the list opened by an ink rule. */
.v4-faq { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 48px; }
.v4-faq-list { border-top: 1px solid var(--v4-ink); }
.v4-faq details { border-bottom: 1px solid var(--v4-line); }
.v4-faq summary { list-style: none; cursor: pointer; padding: 20px 40px 20px 0; font-weight: 600; position: relative; }
.v4-faq summary::-webkit-details-marker { display: none; }
.v4-faq summary::after { content: "+"; position: absolute; right: 4px; top: 16px; font: 400 24px/1 var(--font-sans); color: var(--v4-ink-3); }
.v4-faq details[open] summary::after { content: "\2212"; }
.v4-faq details p { margin: 0 0 20px; color: var(--v4-ink-2); max-width: 60ch; }
@media (max-width: 820px) { .v4-faq { grid-template-columns: 1fr; gap: 24px; } }

/* ── The slab: closing band and footer ──────────────────────────────────────────────────────── */
.v4-close { margin-top: var(--v4-sec); background: var(--v4-slab); color: var(--v4-on-slab); }
.v4-close .v4-wrap { padding-top: clamp(88px, 11vw, 140px); padding-bottom: clamp(72px, 9vw, 112px); }
.v4-close h2 { font-size: clamp(36px, 5.4vw, 68px); line-height: 1.02; letter-spacing: -0.028em; color: var(--v4-on-slab); }
.v4-close .v4-ctas { margin-top: 36px; }
.v4-close .v4-free { color: var(--v4-on-slab-2); font-size: 15px; }
/* The site footer (W5B5): one footer for every marketing page, written by scripts/stamp-footer.js. On the homepage
   it continues the closing slab; on a page with no closing band it opens its own, a section's rhythm below. */
.v4-foot { background: var(--v4-slab); color: var(--v4-on-slab-2); font-size: 14px; margin-top: var(--v4-sec); }
.v4-close + .v4-foot { margin-top: 0; }
/* A page's own bare `p` or `li` rule (cookie, bot) must not reach the footer: its text keeps the slab's colours. */
.v4-foot p, .v4-foot li { color: inherit; font-size: inherit; margin: 0; }
.v4-foot a { text-decoration: none; color: var(--v4-on-slab); }
.v4-foot a:hover { text-decoration: underline; text-underline-offset: 3px; }
.v5-foot .v4-wrap { padding-top: clamp(48px, 6vw, 72px); padding-bottom: 40px; }
/* The rule sits on the column (the header's edges), not on the padded wrap (W5B5 review 1, L-2). */
.v4-close + .v5-foot .v4-wrap { position: relative; }
.v4-close + .v5-foot .v4-wrap::before { content: ''; position: absolute; top: 0; left: var(--v4-gut); right: var(--v4-gut); border-top: 1px solid var(--v4-slab-2); }
.v5-foot-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 40px 64px; padding-bottom: 48px; border-bottom: 1px solid var(--v4-slab-2); }
.v5-foot-brand .v4-mark { color: var(--v4-on-slab); font-size: 32px; }
.v5-foot-brand p { margin-top: 14px; max-width: 32ch; font-size: 15px; line-height: 1.55; }
.v5-foot-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.v5-foot .v5-foot-h { margin: 0 0 14px; font: 600 14px/1.3 var(--font-sans); color: var(--v4-on-slab-2); }
.v5-foot-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.v5-foot-nav a { font-size: 15px; }
.v5-foot-base { padding-top: 24px; display: flex; flex-wrap: wrap; gap: 8px 32px; justify-content: space-between; line-height: 1.55; }
.v5-foot-base > * { max-width: 72ch; }
.v5-foot-base p { margin: 0; }
.v5-foot-base p a { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 820px) { .v5-foot-top { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .v5-foot-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 24px; } }

/* ── Motion (#203): pre-reveal state ONLY under .v4-motion ─────────────────────────────────── */
/* The class goes on in <head>, before first paint, so the rows never show and then vanish (W4B1
   review): same guards as landing-v4.js, and if the motion script has not taken over within
   3 seconds the class comes off again and everything shows. */
/* The one moment: the four answers arrive one by one, as a check returns them; each mark 200ms
   after its row. The board itself, its header and its "Example data" label never move. */
.v4-motion [data-hero-row] { opacity: 0; transform: translateY(8px); transition: opacity 360ms var(--v4-ease), transform 360ms var(--v4-ease); }
.v4-motion [data-hero-row] .v4-mk { opacity: 0; transition: opacity 240ms var(--v4-ease) 200ms; }
.v4-motion [data-reveal="fade"] { opacity: 0; transition: opacity 240ms var(--v4-ease); }
.v4-motion .is-in, .v4-motion .is-in .v4-mk { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .v4-motion [data-hero-row], .v4-motion [data-hero-row] .v4-mk, .v4-motion [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
}
@media print {
  .v4-motion [data-hero-row], .v4-motion [data-hero-row] .v4-mk, .v4-motion [data-reveal] { opacity: 1 !important; transform: none !important; }
}
