/* =========================================================================
   placy.com — first screen: winners + final (docs/first-screen-redesign.md)
   Tournament result: A (split product) and C (dark immersive) won their
   pairs; `final` synthesizes A's chassis + C's card interior + B's type
   and proof lessons. Switching: html[data-hero="a|c|final"], set by
   js/hero-variants.js; `final` is the no-JS default.
   ========================================================================= */

/* -------------------------------------------------------------------------
   Variant gating
   ------------------------------------------------------------------------- */
.hv { display: none; }
html:not([data-hero]) .hv--final,
html[data-hero="final"] .hv--final,
html[data-hero="a"] .hv--a,
html[data-hero="c"] .hv--c { display: block; }

/* shared below-fold blocks that only some variants keep (e.g. the full
   pipeline on how-it-works) */
[data-hv] { display: none; }
html:not([data-hero]) [data-hv~="final"],
html[data-hero="final"] [data-hv~="final"],
html[data-hero="a"] [data-hv~="a"],
html[data-hero="c"] [data-hv~="c"] { display: block; }

/* -------------------------------------------------------------------------
   Header — base = the winning dual-door nav (A's chassis, B's underline)
   64px bar, links grouped left by the brand, both audience doors right.
   ------------------------------------------------------------------------- */
.site-header,
.site-header__inner { height: 64px; }
.brand { position: relative; }
.brand img { height: 21px; }
.brand .brand__white { display: none; }

.site-nav__links { display: flex; align-items: center; gap: var(--s-6); }
.site-nav__ctas { display: flex; align-items: center; gap: var(--s-2); }
.site-nav a[aria-current="page"]:not(.placy-btn) {
  border-bottom: 2px solid var(--fg1);
  padding-bottom: 2px;
}

@media (min-width: 841px) {
  .site-nav { flex: 1; justify-content: space-between; margin-left: clamp(24px, 3vw, 48px); }
}
@media (max-width: 840px) {
  .site-nav { top: 64px; }
  .site-nav__links { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav__ctas { flex-direction: column; align-items: stretch; gap: var(--s-2); margin-top: var(--s-4); }
  .site-nav__ctas .placy-btn { margin-top: 0; }
}

/* =========================================================================
   Shared split-hero primitives (used by A and final)
   ========================================================================= */
.hv--a.hero,
.hv--final.hero { padding: clamp(20px, 4vh, 44px) 0 clamp(20px, 3.5vh, 40px); }
.hva-grid {
  display: grid;
  grid-template-columns: 3fr 2.2fr;
  gap: clamp(32px, 4.5vw, 64px);
  align-items: center;
}
/* let columns shrink below content min-width so pre/nowrap content
   scrolls inside its panel instead of widening the page */
.hva-grid > *,
.hvc-grid > * { min-width: 0; }
.hva-h1 {
  font-size: clamp(40px, 5.2vw, 74px);
  font-weight: var(--fw-heavy);
  line-height: 1.03;
  letter-spacing: -0.03em;
  margin: 0 0 var(--s-5);
}
.hva-h1 .line-grey { color: var(--fg2-strong); display: block; }
.hva-h1--long { font-size: clamp(34px, 3.9vw, 56px); }
.hva-sub {
  max-width: 52ch;
  font-size: 18px;
  line-height: var(--lh-body);
  margin-bottom: var(--s-5);
}
.hva-note { margin-top: var(--s-3); font-size: 13px; color: var(--fg2-strong); }

/* final H1 scale — B's drama where the headline is short */
.hvf-h1 { font-size: clamp(44px, 5.6vw, 84px); }
.hvf-h1--med { font-size: clamp(38px, 4.6vw, 64px); }
.hvf-h1--long { font-size: clamp(34px, 3.9vw, 56px); }

/* proof rail on the fold line — numbers first, source in the rail */
.hva-proof {
  list-style: none;
  margin: clamp(24px, 4vh, 44px) 0 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--border);
  display: flex;
  gap: clamp(20px, 3vw, 48px);
}
.hva-proof b {
  display: block;
  font-size: 22px;
  font-weight: var(--fw-heavy);
  letter-spacing: var(--tracking-tight);
  font-variant-numeric: tabular-nums;
}
.hva-proof span {
  display: block;
  margin-top: 2px;
  font-size: var(--fs-label);
  color: var(--fg2-strong);
  max-width: 170px;
  line-height: 1.35;
}
.hva-proof .hva-proof__src {
  margin-left: auto;
  align-self: flex-end;
  font-size: var(--fs-footnote);
  color: var(--fg2-strong);
  max-width: none;
}

/* dark evidence card, right column */
.hva-card {
  margin: 0;
  position: relative;
  background: var(--placy-dark-bg);
  color: var(--placy-white);
  border-radius: 22px;
  padding: clamp(20px, 2.2vw, 28px);
  overflow: hidden;
}
.hva-card .placy-glow { top: -45%; right: -35%; --glow-size: 460px; --glow-tint: rgba(239, 169, 67, 0.16); }
.hva-card > :not(.placy-glow) { position: relative; }
.hva-card figcaption { margin-top: var(--s-4); font-size: var(--fs-footnote); color: var(--placy-light-grey); }
/* final: C's panel interior — more air */
.hva-card--roomy { padding: clamp(24px, 2.6vw, 34px); border-radius: 24px; }

@media (max-width: 1080px) {
  .hva-grid { grid-template-columns: 1fr; }
  .hva-proof { flex-wrap: wrap; }
  .hva-proof .hva-proof__src { margin-left: 0; }
}

/* mobile: eyebrow wraps cleanly, proof rail compresses to inline facts */
@media (max-width: 720px) {
  .hv .hero-eyebrow { align-items: flex-start; font-size: 11px; }
  .hv .hero-eyebrow .status-dot { margin-top: 4px; }
  .hva-proof { display: block; margin-top: var(--s-5); padding-top: 14px; }
  .hva-proof li { margin-bottom: var(--s-2); }
  .hva-proof b { display: inline; font-size: 15px; }
  .hva-proof b::after { content: " — "; font-weight: var(--fw-regular); color: var(--fg2-strong); }
  .hva-proof span { display: inline; max-width: none; }
  .hva-proof li.hva-proof__src { display: block; margin: var(--s-3) 0 0; }
  .hva-proof .hva-proof__src::after { content: none; }
}

/* =========================================================================
   C — DARK IMMERSIVE (winner 2)
   Transparent nav over a full-height ink stage, white logo, single accent.
   ========================================================================= */
html[data-hero="c"] .site-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-bottom-color: transparent;
}
html[data-hero="c"] .brand .brand__black { display: none; }
html[data-hero="c"] .brand .brand__white { display: block; }
html[data-hero="c"] .site-nav a:not(.placy-btn) { color: var(--placy-white); }
html[data-hero="c"] .site-nav a[aria-current="page"]:not(.placy-btn) { border-bottom-color: var(--placy-white); }
html[data-hero="c"] .nav-toggle span { background: var(--placy-white); }
html[data-hero="c"] .site-nav__cta2 { display: none; }
html[data-hero="c"] .site-nav .placy-btn--primary {
  background: var(--placy-white);
  color: var(--placy-black);
}
html[data-hero="c"] .site-nav .placy-btn--primary:hover { background: var(--placy-warm-grey); }
@media (max-width: 840px) {
  html[data-hero="c"] .site-nav {
    background: var(--placy-dark-bg);
    border-bottom-color: rgba(255, 255, 255, 0.14);
  }
  html[data-hero="c"] .site-nav a:not(.placy-btn) { border-bottom-color: rgba(255, 255, 255, 0.12); }
}

.hv--c {
  background: var(--placy-dark-bg);
  color: var(--placy-white);
  position: relative;
  overflow: hidden;
}
.hvc-stage {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 120px 0 96px;
}
.hv--c .placy-glow { top: -30%; right: -18%; --glow-size: 780px; --glow-tint: rgba(239, 169, 67, 0.17); }
.hvc-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(40px, 5vw, 80px);
  align-items: center;
  width: 100%;
}
.hv--c .hero-eyebrow { color: var(--placy-light-grey); }
.hvc-h1 {
  font-size: clamp(40px, 5.4vw, 80px);
  font-weight: var(--fw-heavy);
  line-height: 1.03;
  letter-spacing: -0.03em;
  margin: 0 0 var(--s-5);
}
.hvc-h1 .line-grey { color: var(--placy-light-grey); display: block; }
.hvc-h1--long { font-size: clamp(34px, 4vw, 58px); }
.hvc-sub {
  max-width: 50ch;
  font-size: 17px;
  line-height: var(--lh-body);
  color: var(--placy-light-grey);
  margin-bottom: var(--s-6);
}
.hvc-note { margin-top: var(--s-3); font-size: 13px; color: var(--placy-light-grey); opacity: 0.8; }

.hvc-panel {
  margin: 0;
  position: relative;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 22px;
  padding: clamp(18px, 2vw, 26px);
}
.hvc-panel figcaption { margin-top: var(--s-4); font-size: var(--fs-footnote); color: var(--placy-light-grey); }

.hvc-cue {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-label);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--placy-light-grey);
  text-decoration: none;
}
.hvc-cue i { font-size: 14px; line-height: 1; }
.hvc-cue:hover { color: var(--placy-white); }

@media (max-width: 1080px) {
  .hvc-grid { grid-template-columns: 1fr; }
  .hvc-stage { min-height: 0; padding: 110px 0 80px; }
  .hvc-cue { display: none; }
}

/* =========================================================================
   Compact product-evidence components (A / C / final cards)
   ========================================================================= */
.hv .chat--compact { gap: var(--s-3); }
.hv .chat--compact .chat__user,
.hv .chat--compact .chat__assistant { font-size: 13px; padding: 10px 14px; line-height: 1.45; }
.hv .chat--compact .chat__system { font-size: 11px; }
.hv .listing-card--compact { padding: var(--s-3) var(--s-4); font-size: var(--fs-label); }
.hv .listing-card--compact .listing-card__title { font-size: 13px; }
.hv .listing-card--compact .placy-btn--ghost { height: 26px; padding: 0 10px; font-size: 11px; }
.hv .listing-stack--compact { margin-top: var(--s-3); display: flex; flex-direction: column; gap: var(--s-2); }
.hv .lead-strip--compact { padding: 7px 10px; font-size: 11px; }

/* terminal / MCP snippet (platforms) */
.hv-snippet-head {
  font-family: var(--font-mono);
  font-size: var(--fs-footnote);
  letter-spacing: 0.02em;
  color: var(--placy-light-grey);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: var(--s-3);
}
.hv-snippet {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.55;
  white-space: pre;
  overflow-x: auto;
  color: var(--placy-white);
}
.hv-snippet .k { color: var(--placy-light-grey); }
.hv-snippet .a { color: var(--placy-ginger); }

/* mini pipeline (how-it-works) */
.hv-flow { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.hv-flow > li {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--r-lg);
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.4;
}
.hv-flow > li b { display: block; font-weight: var(--fw-bold); }
.hv-flow > li span { color: var(--placy-light-grey); font-size: var(--fs-label); }
.hv-flow > li + li { margin-top: 26px; position: relative; }
.hv-flow > li + li::before {
  content: "";
  position: absolute;
  top: -27px;
  left: 50%;
  width: 1px;
  height: 26px;
  background: rgba(255, 255, 255, 0.22);
}
.hv-flow-return {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin-top: var(--s-4);
  font-family: var(--font-mono);
  font-size: var(--fs-footnote);
  letter-spacing: 0.02em;
  color: var(--placy-ginger);
}
.hv-flow-return::before {
  content: "";
  flex: none;
  border-right: 6px solid var(--placy-ginger);
  border-top: 3px solid transparent;
  border-bottom: 3px solid transparent;
}
.hv-flow-return .line { flex: 1; height: 1px; background: rgba(239, 169, 67, 0.5); }

/* mini 2x2 matrix (why-placy) */
.hv-matrix {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-2);
}
.hv-matrix > div {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--r-lg);
  padding: 12px 14px;
  min-height: 88px;
  font-size: var(--fs-label);
  line-height: 1.4;
  color: var(--placy-light-grey);
}
.hv-matrix b { display: block; color: var(--placy-white); font-size: 13px; margin-bottom: 2px; }
.hv-matrix .cell--placy { border-color: var(--placy-ginger); }
.hv-matrix .cell--placy b { color: var(--placy-ginger); font-size: 15px; }
.hv-matrix .cell--empty { border-style: dashed; opacity: 0.6; }
.hv-matrix__axes {
  grid-column: 1 / -1;
  border: none !important;
  min-height: 0 !important;
  padding: 0 !important;
  font-family: var(--font-mono);
  font-size: var(--fs-footnote);
  color: var(--placy-light-grey);
}

/* =========================================================================
   Variant toggle (review tool) — bottom right pill
   ========================================================================= */
.hvt {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 95;
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--placy-white);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  padding: 5px;
  box-shadow: var(--shadow-lg);
}
.hvt__label {
  font-size: var(--fs-footnote);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg2-strong);
  padding: 0 8px 0 10px;
  user-select: none;
}
.hvt button {
  font-family: var(--font-sans);
  font-size: var(--fs-label);
  font-weight: var(--fw-semibold);
  height: 30px;
  padding: 0 12px;
  border: none;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--fg2-strong);
  cursor: pointer;
  transition: background var(--dur) var(--ease-out), color var(--dur) var(--ease-out);
}
.hvt button:hover { background: var(--bg-card); color: var(--fg1); }
.hvt button[aria-pressed="true"] { background: var(--placy-black); color: var(--placy-white); }
.hvt button:focus-visible { outline: 2px solid var(--fg1); outline-offset: 2px; }
@media (max-width: 720px) {
  .hvt { right: 10px; bottom: 10px; }
  .hvt__label { display: none; }
}
