/* ============================================================
   CORVAUX — The Access Codes
   Design system & page styles
   ------------------------------------------------------------
   Palette is derived from the brand assets:
   paper cream sampled from the mark plate (#F7F7ED family),
   warm ink from the silhouette, gold from the glossy keyhole.
   Light bands  = "the daylight explanation"
   Dark bands   = "inside the room"
   ============================================================ */

:root {
  /* color */
  --cream:        #F7F5EC;
  --cream-deep:   #EFEBDE;
  --cream-edge:   #E6E1D0;
  --ink:          #14120E;
  --ink-soft:     #3A362D;
  --ink-mute:     #6B6555;
  --vault:        #100F0C;
  --vault-raise:  #181610;
  --vault-edge:   #2A2720;
  --bone:         #F3EFE2;            /* text on dark */
  --bone-mute:    #A89F8C;
  --gold:         #C9A341;
  --gold-bright:  #E8C56A;
  --gold-dim:     #7A6222;   /* darkened for AA contrast on cream */
  --rule:         rgba(20, 18, 14, .16);
  --rule-dark:    rgba(243, 239, 226, .14);

  /* type */
  --f-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --f-body:    "Inter", -apple-system, "Segoe UI", system-ui, sans-serif;
  --f-mono:    "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* rhythm */
  --w-page: 1120px;
  --w-prose: 660px;
  --pad-x: clamp(20px, 5vw, 48px);
  --band-y: clamp(72px, 11vw, 132px);
}

/* ---------- reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
figure { margin: 0; }
.hero-plate img, .offer-plate img { width: 100%; height: auto; }
a { color: inherit; }
::selection { background: var(--gold); color: var(--ink); }

[id] { scroll-margin-top: 84px; }

.skip {
  position: absolute; left: 16px; top: -64px; z-index: 100;
  background: var(--ink); color: var(--bone);
  font-family: var(--f-mono); font-size: .78rem;
  letter-spacing: .1em; text-transform: uppercase;
  padding: 12px 18px; text-decoration: none;
  transition: top .2s ease;
}
.skip:focus-visible { top: 12px; }

/* ---------- type roles ---------- */
.eyebrow {
  font-family: var(--f-mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin: 0 0 18px;
}
.band--dark .eyebrow { color: var(--gold); }

h1, h2, h3 { font-family: var(--f-display); font-weight: 540; margin: 0; }

.display {
  font-size: clamp(2.5rem, 5.6vw, 4.35rem);
  line-height: 1.06;
  letter-spacing: -0.015em;
  font-variation-settings: "opsz" 60;
}
.h2 {
  font-size: clamp(1.85rem, 3.4vw, 2.8rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin-bottom: 26px;
  font-variation-settings: "opsz" 40;
}
.h3 {
  font-size: 1.3rem;
  line-height: 1.3;
  font-weight: 560;
}
.lede {
  font-size: clamp(1.1rem, 1.7vw, 1.3rem);
  line-height: 1.6;
  color: var(--ink-soft);
}
.band--dark .lede { color: var(--bone-mute); }

.prose { max-width: var(--w-prose); }
.prose p { margin: 0 0 1.2em; }
.prose p:last-child { margin-bottom: 0; }
.prose strong { font-weight: 620; }
.prose em { font-family: var(--f-display); font-style: italic; }

.mono-note {
  font-family: var(--f-mono);
  font-size: .78rem;
  letter-spacing: .04em;
  color: var(--ink-mute);
}
.band--dark .mono-note { color: var(--bone-mute); }

/* boxed italic pull line — the emphasis register */
.pull {
  display: inline-block;
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 480;
  font-size: clamp(1.3rem, 2.4vw, 1.8rem);
  line-height: 1.35;
  padding: .55em .9em;
  border: 1px solid var(--ink);
  margin: 1.6em 0;
}
.band--dark .pull { border-color: var(--bone); color: var(--bone); }

/* ---------- layout ---------- */
.wrap { max-width: var(--w-page); margin: 0 auto; padding: 0 var(--pad-x); }
.band { padding: var(--band-y) 0; }
.band--dark { background: var(--vault); color: var(--bone); }
.band--dark + .band--dark { padding-top: 0; }
.band--rule-top { border-top: 1px solid var(--rule); }
.band--dark.band--rule-top { border-top: 1px solid var(--rule-dark); }

.center { text-align: center; }
.center .prose, .center .pull { margin-left: auto; margin-right: auto; }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--cream) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, box-shadow .3s ease;
}
.site-head.scrolled {
  border-bottom-color: var(--rule);
  box-shadow: 0 1px 0 rgba(20,18,14,.03);
}
.site-head .wrap {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 14px; padding-bottom: 14px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { height: 34px; width: auto; }
.brand .word {
  font-family: var(--f-mono);
  font-size: .82rem; font-weight: 600;
  letter-spacing: .34em; text-transform: uppercase;
  transform: translateY(1px);
}
.head-cta { display: flex; align-items: center; gap: 18px; }
.head-link {
  font-family: var(--f-mono); font-size: .74rem;
  letter-spacing: .12em; text-transform: uppercase;
  text-decoration: none; color: var(--ink-mute);
}
.head-link:hover { color: var(--ink); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-mono);
  font-size: .82rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  text-decoration: none;
  padding: 16px 26px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .25s ease, color .25s ease, border-color .25s ease, transform .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn .key { width: 11px; height: 16px; flex: 0 0 auto; transition: filter .25s ease; }

.btn--gold { background: var(--gold); color: var(--ink); }
.btn--gold:hover { background: var(--gold-bright); }
.btn--gold .key { fill: var(--ink); }

.btn--ink { background: var(--ink); color: var(--bone); }
.btn--ink:hover { background: #000; }
.btn--ink .key { fill: var(--gold); }
.btn--ink:hover .key { fill: var(--gold-bright); filter: drop-shadow(0 0 5px rgba(232,197,106,.85)); }

.btn--ghost { background: transparent; color: var(--bone-mute); border-color: var(--vault-edge); }
.btn--ghost:hover { color: var(--bone); border-color: var(--bone-mute); }
.btn--ghost .key { fill: currentColor; }

.btn--small { padding: 11px 18px; font-size: .72rem; }

.cta-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.center .cta-stack { align-items: center; }
.cta-micro {
  font-family: var(--f-mono); font-size: .72rem;
  letter-spacing: .08em; color: var(--ink-mute);
}
.band--dark .cta-micro { color: var(--bone-mute); }
.cta-alt {
  font-size: .95rem; color: var(--ink-mute);
}
.cta-alt a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.band--dark .cta-alt a { color: var(--bone); }

/* ---------- hero ---------- */
.hero { padding-top: clamp(56px, 8vw, 96px); padding-bottom: var(--band-y); }
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.hero .display { margin: 18px 0 22px; }
.hero .lede { max-width: 34em; margin-bottom: 34px; }
.hero-plate { position: relative; }
.hero-plate img {
  width: 100%;
  border: 1px solid var(--cream-edge);
  box-shadow: 0 24px 60px -28px rgba(20,18,14,.35);
}
.hero-plate figcaption {
  margin-top: 12px;
  font-family: var(--f-mono); font-size: .7rem;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-mute); text-align: right;
}

/* ---------- scene (dark narrative) ---------- */
.scene .prose p { font-size: 1.125rem; }
.scene .prose p.kicker-line {
  font-family: var(--f-display); font-weight: 540;
  font-size: clamp(1.35rem, 2.5vw, 1.9rem);
  line-height: 1.3; color: var(--bone);
  margin-top: 1.6em;
}

/* ---------- two-column compare table ---------- */
.compare {
  display: grid; grid-template-columns: 1fr 1fr;
  border: 1px solid var(--rule);
  margin-top: 44px;
}
.compare > div { padding: clamp(22px, 3vw, 38px); }
.compare .col-old { background: var(--cream-deep); }
.compare .col-new { background: var(--ink); color: var(--bone); }
.compare h3 {
  font-family: var(--f-mono); font-size: .74rem; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase;
  margin: 0 0 20px;
}
.compare .col-old h3 { color: var(--ink-mute); }
.compare .col-new h3 { color: var(--gold); }
.compare ul { list-style: none; margin: 0; padding: 0; }
.compare li {
  padding: 13px 0; font-size: .98rem; line-height: 1.55;
  border-top: 1px solid var(--rule);
}
.compare .col-new li { border-top-color: var(--rule-dark); }
.compare li:first-child { border-top: 0; }
.compare .code-ref {
  font-family: var(--f-mono); font-size: .7rem;
  letter-spacing: .08em; color: var(--gold);
  white-space: nowrap; margin-left: 8px;
}

/* ---------- manifest (parts) ---------- */
.parts { border-top: 1px solid var(--rule-dark); margin-top: 48px; }
.part {
  display: grid;
  grid-template-columns: 64px 150px 1fr;
  gap: clamp(16px, 3vw, 40px);
  padding: 30px 0;
  border-bottom: 1px solid var(--rule-dark);
  align-items: baseline;
}
.part .num {
  font-family: var(--f-display); font-size: 1.7rem; font-weight: 500;
  color: var(--gold);
}
.part .range {
  font-family: var(--f-mono); font-size: .72rem;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--bone-mute);
}
.part .h3 { color: var(--bone); margin-bottom: 8px; }
.part p { margin: 0; color: var(--bone-mute); font-size: .98rem; }

/* ---------- vault card (free code) — signature element ---------- */
.vault-card {
  position: relative;
  background: var(--vault-raise);
  border: 1px solid var(--gold-dim);
  max-width: 760px;
  margin: 52px auto 0;
  box-shadow: 0 0 0 1px rgba(0,0,0,.4), 0 30px 80px -40px rgba(0,0,0,.9);
}
.vault-card .card-head {
  display: flex; flex-wrap: wrap; gap: 10px 26px;
  align-items: center; justify-content: space-between;
  padding: 18px 28px;
  border-bottom: 1px solid var(--vault-edge);
  font-family: var(--f-mono); font-size: .7rem;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--bone-mute);
}
.vault-card .card-head .status { color: var(--gold-bright); }
.vault-card .card-head .status::before {
  content: ""; display: inline-block;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold-bright);
  box-shadow: 0 0 8px var(--gold-bright);
  margin-right: 9px; transform: translateY(-1px);
}
.vault-card .card-body { padding: clamp(26px, 4vw, 44px) clamp(24px, 4vw, 48px); }
.vault-card .code-title {
  font-family: var(--f-display); font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 540; color: var(--bone);
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 26px;
}
.vault-card .code-title .keyglow {
  width: 18px; height: 26px; fill: var(--gold-bright);
  filter: drop-shadow(0 0 7px rgba(232,197,106,.8));
  flex: 0 0 auto;
}
.vault-card dl { margin: 0; }
.vault-card dt {
  font-family: var(--f-mono); font-size: .7rem; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold); margin: 22px 0 8px;
}
.vault-card dt:first-child { margin-top: 0; }
.vault-card dd { margin: 0; color: var(--bone); }
.vault-card dd em { font-family: var(--f-display); }
.vault-card .card-foot {
  display: flex; flex-wrap: wrap; gap: 16px;
  align-items: center; justify-content: space-between;
  padding: 20px 28px;
  border-top: 1px solid var(--vault-edge);
}
.vault-card .tally {
  font-family: var(--f-mono); font-size: .76rem;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--bone-mute);
}
.vault-card.flash { animation: cardflash 1.2s ease; }
@keyframes cardflash {
  0% { box-shadow: 0 0 0 1px var(--gold-bright), 0 0 50px -6px rgba(232,197,106,.5); }
  100% { box-shadow: 0 0 0 1px rgba(0,0,0,.4), 0 30px 80px -40px rgba(0,0,0,.9); }
}

/* ---------- keyhole list ---------- */
.keylist { list-style: none; margin: 26px 0 0; padding: 0; }
.keylist li {
  position: relative;
  padding: 12px 0 12px 34px;
  border-top: 1px solid var(--rule);
}
.band--dark .keylist li { border-top-color: var(--rule-dark); }
.keylist li:first-child { border-top: 0; }
.keylist li::before {
  content: "";
  position: absolute; left: 4px; top: 17px;
  width: 12px; height: 17px;
  background: var(--gold);
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 28"><path d="M10 1.5a6.5 6.5 0 0 1 2.8 12.4L15 26.5H5l2.2-12.6A6.5 6.5 0 0 1 10 1.5Z"/></svg>') center/contain no-repeat;
          mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 28"><path d="M10 1.5a6.5 6.5 0 0 1 2.8 12.4L15 26.5H5l2.2-12.6A6.5 6.5 0 0 1 10 1.5Z"/></svg>') center/contain no-repeat;
}

/* ---------- fit (for / not for) ---------- */
.fit-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 4vw, 56px);
  margin-top: 40px;
}
.fit-grid h3 {
  font-family: var(--f-mono); font-size: .74rem; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase; margin: 0 0 6px;
}
.fit-grid .yes h3 { color: var(--gold-dim); }
.fit-grid .no h3 { color: var(--ink-mute); }
.fit-grid .no .keylist li::before { background: var(--ink-mute); }
.candor {
  margin-top: 48px;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid var(--rule);
  background: var(--cream-deep);
  font-size: 1.05rem;
}

/* ---------- ladder ---------- */
.ladder { margin-top: 48px; border-top: 1px solid var(--rule); }
.rung {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: clamp(16px, 3vw, 40px);
  align-items: baseline;
  padding: 32px 0;
  border-bottom: 1px solid var(--rule);
}
.rung .step {
  font-family: var(--f-mono); font-size: .72rem;
  letter-spacing: .2em; text-transform: uppercase; color: var(--ink-mute);
}
.rung .h3 { margin-bottom: 8px; }
.rung p { margin: 0; color: var(--ink-soft); font-size: .98rem; max-width: 46em; }
.rung .price {
  font-family: var(--f-mono); font-size: .82rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; white-space: nowrap;
}
.rung.here { background: linear-gradient(90deg, rgba(201,163,65,.10), transparent 65%); }
.rung.here .step { color: var(--gold-dim); }
.you-are-here {
  display: inline-block; margin-left: 12px;
  font-family: var(--f-mono); font-size: .62rem; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink); background: var(--gold);
  padding: 3px 8px; transform: translateY(-2px);
}
.rung.locked .h3, .rung.locked .price { color: var(--ink-mute); }

/* ---------- offer ---------- */
.offer .wrap {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(36px, 5vw, 80px);
  align-items: start;
}
.price-line {
  font-family: var(--f-display);
  font-size: clamp(2.2rem, 4.6vw, 3.6rem);
  font-weight: 540; line-height: 1.08; color: var(--bone);
  margin: 0 0 14px;
}
.offer-plate img {
  width: 100%;
  border: 1px solid var(--vault-edge);
  box-shadow: 0 30px 70px -36px rgba(0,0,0,.9);
}
.offer-plate figcaption {
  margin-top: 12px; text-align: right;
  font-family: var(--f-mono); font-size: .68rem;
  letter-spacing: .18em; text-transform: uppercase; color: var(--bone-mute);
}
.guarantee {
  margin: 40px 0;
  border: 1px solid var(--gold-dim);
  padding: clamp(22px, 3vw, 32px);
}
.guarantee h3 {
  font-family: var(--f-mono); font-size: .74rem; font-weight: 600;
  letter-spacing: .24em; text-transform: uppercase;
  color: var(--gold); margin: 0 0 12px;
  display: flex; align-items: center; gap: 10px;
}
.guarantee h3 .key { width: 11px; height: 16px; fill: var(--gold); }
.guarantee p { margin: 0; color: var(--bone); font-size: 1rem; }
.edition-note { color: var(--bone-mute); font-size: .98rem; margin-top: 28px; }
.checkout-pending {
  display: none;
  margin-top: 10px;
  font-family: var(--f-mono); font-size: .68rem;
  letter-spacing: .08em; color: var(--gold-dim);
}
.checkout-pending.show { display: block; }

/* ---------- FAQ ---------- */
.faq { max-width: 780px; margin: 44px auto 0; border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 22px 4px;
  font-family: var(--f-display); font-size: 1.18rem; font-weight: 540;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .twist {
  font-family: var(--f-mono); font-size: 1rem; color: var(--gold-dim);
  transition: transform .25s ease; flex: 0 0 auto;
}
.faq details[open] .twist { transform: rotate(45deg); }
.faq .answer { padding: 0 4px 26px; color: var(--ink-soft); max-width: 62ch; }
.faq .answer p { margin: 0 0 1em; }
.faq .answer p:last-child { margin-bottom: 0; }

/* ---------- binary close ---------- */
.close-band { position: relative; overflow: hidden; }
.close-band .wing-ghost {
  position: absolute; right: -120px; bottom: -80px;
  width: clamp(360px, 42vw, 640px); opacity: .07;
  pointer-events: none; user-select: none;
}
.two-roads {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1px; background: var(--vault-edge);
  border: 1px solid var(--vault-edge);
  margin-top: 48px;
  position: relative; z-index: 1;
}
.road {
  background: var(--vault);
  padding: clamp(30px, 4vw, 52px);
  display: flex; flex-direction: column; gap: 16px;
  align-items: flex-start;
}
.road.right { background: var(--vault-raise); }
.road .h3 { color: var(--bone); }
.road p { margin: 0; color: var(--bone-mute); font-size: .98rem; flex: 1; }
.ps-block {
  max-width: 660px; margin: 64px auto 0;
  position: relative; z-index: 1;
}
.ps-block p { margin: 0 0 1.1em; color: var(--bone-mute); }
.ps-block p strong { color: var(--bone); font-weight: 620; font-family: var(--f-mono); font-size: .82rem; letter-spacing: .14em; }

/* ---------- footer ---------- */
.site-foot {
  background: #0B0A08; color: var(--bone-mute);
  padding: 64px 0 48px;
  border-top: 1px solid var(--vault-edge);
}
.site-foot .top {
  display: flex; flex-wrap: wrap; gap: 24px;
  align-items: center; justify-content: space-between;
  padding-bottom: 36px; margin-bottom: 36px;
  border-bottom: 1px solid var(--rule-dark);
}
.site-foot .brand img { height: 30px; }
.site-foot .tagline { font-family: var(--f-display); font-style: italic; font-size: 1.05rem; }
.legal { font-size: .82rem; line-height: 1.7; max-width: 70ch; }
.foot-links { margin-top: 22px; font-family: var(--f-mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; }
.foot-links a { color: var(--bone-mute); text-decoration: none; margin-right: 26px; }
.foot-links a:hover { color: var(--bone); }

/* ---------- reveal motion ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .vault-card.flash { animation: none; }
  .btn, .faq summary .twist { transition: none; }
}

/* ---------- focus ---------- */
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* ---------- responsive ---------- */
@media (max-width: 940px) {
  .hero .wrap, .offer .wrap { grid-template-columns: 1fr; }
  .hero-plate { max-width: 440px; margin-inline: auto; }
  .offer-plate { max-width: 440px; order: -1; margin-inline: auto; }
  .part { grid-template-columns: 48px 1fr; }
  .part .range { grid-column: 2; order: 3; margin-top: 6px; }
  .rung { grid-template-columns: 72px 1fr; }
  .rung .price { grid-column: 2; }
}
@media (max-width: 680px) {
  .compare, .fit-grid, .two-roads { grid-template-columns: 1fr; }
  .brand .word { letter-spacing: .22em; }
  .head-link { display: none; }
  .vault-card .card-head { gap: 6px 16px; }
}
