/* ============================================================
   Vellumfold - styles.css
   Design language: "Sovereign" — pine black, ivory cream, single
   champagne-gold accent. Fraunces (display) + Archivo (body/UI).
   Tokens live in :root - edit there first.
   ============================================================ */

/* ============ TOKENS (edit these in design mode) ============ */
:root {
  --bg: #0b1914; /* green-black ink */
  --bg-raise: #12261f; /* raised surface */
  --fg: #f5f2eb; /* warm ivory */
  --fg-60: #94a69e;
  --fg-40: rgba(148, 166, 158, 0.62);
  --line: rgba(200, 169, 110, 0.18);
  --accent: #c8a96e; /* the single accent */
  --accent-soft: rgba(200, 169, 110, 0.12);
  --serif: "Fraunces", Georgia, serif;
  --sans: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --pad: clamp(20px, 5vw, 72px);
  --maxw: 1160px;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html,
body {
  background: var(--bg);
} /* no white flash - first rule */
html {
  overflow-x: clip;
  scroll-behavior: smooth;
}
body {
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-variant-numeric: tabular-nums;
}
::selection {
  background: rgba(200, 169, 110, 0.32);
}
:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 3px;
}
a {
  color: inherit;
}

/* grain */
.grain {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 60;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}

/* ============ TYPE SCALE ============ */
h1 {
  font-family: var(--serif);
  font-weight: 420;
  font-size: clamp(38px, 5.8vw, 78px);
  line-height: 1.04;
  letter-spacing: -0.025em;
}
h2 {
  font-family: var(--serif);
  font-weight: 420;
  font-size: clamp(26px, 3.4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.lede {
  font-size: clamp(15px, 1.4vw, 17.5px);
  color: var(--fg-60);
  max-width: 34rem;
  line-height: 1.65;
}
.folio {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-40);
}
.folio b {
  color: var(--accent);
  font-weight: 500;
}

/* ============ HEADER ============ */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px var(--pad);
  background: linear-gradient(
    to bottom,
    rgba(11, 25, 20, 0.94) 30%,
    rgba(11, 25, 20, 0)
  );
}
.brand {
  text-decoration: none;
  display: flex;
  align-items: center;
}
.brand img {
  height: 32px;
  width: auto;
  display: block;
}
nav.links {
  display: flex;
  gap: 30px;
}
nav.links a {
  font-size: 13.5px;
  color: var(--fg-60);
  text-decoration: none;
  position: relative;
  padding: 4px 0;
}
nav.links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 1px;
  width: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
nav.links a:hover {
  color: var(--fg);
}
nav.links a:hover::after {
  transform: scaleX(1);
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--fg);
  color: var(--bg);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 999px;
  transition: background 0.25s var(--ease);
}
.pill:hover {
  background: var(--accent);
  color: #0b1914;
}

/* ============ HERO ============ */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  padding-top: 96px;
}
.hero-main {
  padding: 0 var(--pad) clamp(48px, 8vh, 96px);
  max-width: var(--maxw);
}
.hero h1 {
  max-width: 20ch;
}
.hero h1 .line {
  display: block;
  white-space: nowrap;
}
@media (max-width: 860px) {
  .hero h1 .line {
    display: inline;
    white-space: normal;
  }
}
.lede-gap {
  margin: 26px 0 34px;
}
.cta-row {
  display: flex;
  gap: 22px;
  align-items: center;
  flex-wrap: wrap;
}
.ghost {
  font-size: 13.5px;
  color: var(--fg-60);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 3px;
  transition:
    color 0.25s,
    border-color 0.25s;
}
.ghost:hover {
  color: var(--fg);
  border-color: var(--accent);
}

/* redaction reveal - the signature */
.rx {
  position: relative;
  display: inline-block;
  white-space: nowrap;
}
.rx i {
  font-style: italic;
  color: var(--accent);
}
.rx-bar {
  position: absolute;
  inset: -2% -3%;
  background: var(--fg);
  border-radius: 1px;
  transform: scaleX(1);
  transform-origin: right;
}
html.js .rx-bar {
  animation: lift 0.9s var(--ease) forwards;
  animation-delay: var(--d, 0s);
}
@keyframes lift {
  to {
    transform: scaleX(0);
  }
}
html:not(.js) .rx-bar {
  display: none;
}

/* entrance choreography */
.hero .brand,
header nav.links,
header .pill {
  opacity: 0;
}
html.js .hero .brand {
  animation: rise 0.8s var(--ease) 0.05s forwards;
}
html.js header nav.links {
  animation: rise 0.8s var(--ease) 0.15s forwards;
}
html.js header .pill {
  animation: rise 0.8s var(--ease) 0.25s forwards;
}
html.js .hero h1 {
  opacity: 0;
  animation: rise 0.9s var(--ease) 0.1s forwards;
}
html.js .hero .lede-gap,
html.js .cta-row {
  opacity: 0;
  animation: rise 0.9s var(--ease) 0.45s forwards;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* threat ticker - the quiet strip */
.ticker {
  border-top: 1px solid var(--line);
  overflow: hidden;
  padding: 16px 0;
  position: relative;
}
.ticker-row {
  display: flex;
  gap: 0;
  width: max-content;
  animation: marquee 38s linear infinite;
}
.ticker:hover .ticker-row {
  animation-play-state: paused;
}
.ticker span {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-40);
  padding: 0 26px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 26px;
}
.ticker span::after {
  content: "";
  width: 4px;
  height: 4px;
  background: var(--accent);
  border-radius: 50%;
  opacity: 0.7;
}
@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

/* ============ SECTIONS ============ */
section {
  padding: clamp(96px, 14vh, 170px) var(--pad);
  max-width: calc(var(--maxw) + 2 * var(--pad));
  margin: 0 auto;
}
.sec-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  margin-bottom: clamp(40px, 6vh, 72px);
  flex-wrap: wrap;
}
.sec-head h2 {
  max-width: 22ch;
}
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.8s var(--ease),
    transform 0.8s var(--ease);
}
.reveal.in {
  opacity: 1;
  transform: none;
}
html:not(.js) .reveal {
  opacity: 1;
  transform: none;
}

/* stats - ledger rows, not cards */
.stat-row {
  display: grid;
  grid-template-columns: minmax(190px, 240px) 1fr;
  gap: 20px 48px;
  padding: 30px 0;
  border-top: 1px solid var(--line);
  align-items: baseline;
}
.stat-row:last-of-type {
  border-bottom: 1px solid var(--line);
}
.stat-num {
  font-family: var(--serif);
  font-size: clamp(38px, 4.2vw, 54px);
  font-weight: 380;
  line-height: 0.95;
  color: var(--fg);
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.stat-num sub {
  font-size: 13px;
  font-family: var(--sans);
  color: var(--fg-40);
  letter-spacing: 0.08em;
  vertical-align: baseline;
  margin-left: 10px;
}
.stat-row p {
  color: var(--fg-60);
  font-size: 15px;
  max-width: 44ch;
}
.stat-row p b {
  color: var(--fg);
  font-weight: 500;
}
.record-close {
  margin-top: 44px;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(19px, 2vw, 24px);
  color: var(--fg);
  max-width: 30ch;
}
.record-close span {
  color: var(--accent);
}

/* ============ THE REMOVAL LEDGER (signature demo) ============ */
#removal {
  background: var(--bg-raise);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  max-width: none;
}
#removal .inner {
  max-width: var(--maxw);
  margin: 0 auto;
}
.ledger {
  margin-top: 14px;
}
.lg-row {
  display: grid;
  grid-template-columns: 44px 1fr auto 132px;
  gap: 18px;
  align-items: center;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  position: relative;
}
.lg-row:first-child {
  border-top: none;
}
.lg-idx {
  font-size: 11.5px;
  color: var(--fg-40);
  letter-spacing: 0.1em;
}
.lg-item {
  font-family: var(--serif);
  font-size: clamp(17px, 1.7vw, 21px);
  position: relative;
  width: fit-content;
  padding-right: 8px;
}
.lg-item::after {
  content: "";
  position: absolute;
  left: -2%;
  top: 52%;
  height: 1.5px;
  width: 104%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease);
}
.lg-meta {
  font-size: 12.5px;
  color: var(--fg-40);
  letter-spacing: 0.06em;
  text-align: right;
}
.lg-status {
  justify-self: end;
}
.stamp {
  display: inline-block;
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 5px 11px;
  border-radius: 2px;
  opacity: 0;
  transform: rotate(-5deg) scale(1.25);
  white-space: nowrap;
}
html.js .lg-row.go .lg-item::after {
  transform: scaleX(1);
}
html.js .lg-row.go .stamp {
  opacity: 1;
  transform: rotate(-2deg) scale(1);
  transition:
    opacity 0.45s var(--ease),
    transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
  transition-delay: calc(var(--t) + 0.28s);
}
html.js .lg-row.go .lg-meta {
  color: var(--fg-40);
}
html:not(.js) .stamp {
  opacity: 1;
  transform: rotate(-2deg);
}
.lg-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 26px 0 0;
  flex-wrap: wrap;
  gap: 14px;
}
.lg-count {
  font-family: var(--serif);
  font-size: clamp(20px, 2vw, 26px);
}
.lg-count b {
  font-weight: 420;
  color: var(--accent);
}
.lg-note {
  font-size: 12px;
  color: var(--fg-40);
  max-width: 52ch;
}
.replay {
  background: none;
  border: none;
  color: var(--fg-60);
  font-family: var(--sans);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.replay:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ============ INSTRUMENTS ============ */
.inst {
  border-top: 1px solid var(--line);
  padding: 38px 0;
  display: grid;
  grid-template-columns: 70px 1fr auto;
  gap: 18px 40px;
  align-items: start;
}
.inst:last-of-type {
  border-bottom: 1px solid var(--line);
}
.inst-no {
  font-size: 11.5px;
  color: var(--fg-40);
  letter-spacing: 0.12em;
  padding-top: 6px;
}
.inst h3 {
  font-family: var(--serif);
  font-weight: 430;
  font-size: clamp(21px, 2.2vw, 28px);
  letter-spacing: -0.01em;
}
.inst .for {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin: 10px 0 12px;
}
.inst p {
  color: var(--fg-60);
  font-size: 15px;
  max-width: 52ch;
}
.inst-price {
  text-align: right;
  padding-top: 4px;
}
.inst-price b {
  font-family: var(--serif);
  font-weight: 430;
  font-size: clamp(18px, 1.8vw, 23px);
  display: block;
  white-space: nowrap;
}
.inst-price span {
  font-size: 12px;
  color: var(--fg-40);
  display: block;
  margin-top: 6px;
  letter-spacing: 0.04em;
}
.inst.feature {
  border-left: 1px solid var(--accent);
  margin: 0 calc(var(--pad) * -0.5);
  padding-left: calc(var(--pad) * 0.5 + 18px);
  padding-right: calc(var(--pad) * 0.5);
}
.inst.feature:hover {
  background: rgba(200, 169, 110, 0.05);
}
.inst .flag {
  display: inline-block;
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--accent);
  padding: 4px 10px;
  border-radius: 2px;
  margin-bottom: 12px;
}

/* ============ METHOD ============ */
.steps {
  margin-top: 10px;
}
.step {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px 40px;
  padding: 34px 0;
  border-top: 1px solid var(--line);
}
.step:last-of-type {
  border-bottom: 1px solid var(--line);
}
.step-no {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(26px, 2.6vw, 34px);
  color: var(--accent);
  font-weight: 380;
}
.step b {
  display: block;
  font-family: var(--serif);
  font-weight: 430;
  font-size: 19px;
  margin-bottom: 8px;
}
.step p {
  color: var(--fg-60);
  font-size: 15px;
  max-width: 56ch;
}
.step time {
  font-size: 12px;
  color: var(--fg-40);
  letter-spacing: 0.1em;
  margin-left: 12px;
}

/* ============ RULES ============ */
.rule {
  padding: 26px 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(200px, 300px) 1fr;
  gap: 14px 40px;
}
.rule:last-of-type {
  border-bottom: 1px solid var(--line);
}
.rule h3 {
  font-family: var(--serif);
  font-weight: 430;
  font-size: 19px;
}
.rule p {
  color: var(--fg-60);
  font-size: 15px;
  max-width: 56ch;
}

/* ============ FAQ ============ */
details {
  border-top: 1px solid var(--line);
}
details:last-of-type {
  border-bottom: 1px solid var(--line);
}
summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 24px 0;
  font-family: var(--serif);
  font-size: clamp(17px, 1.8vw, 21px);
}
summary::-webkit-details-marker {
  display: none;
}
summary .plus {
  color: var(--accent);
  font-size: 20px;
  font-weight: 400;
  transition: transform 0.3s var(--ease);
  flex-shrink: 0;
}
details[open] summary .plus {
  transform: rotate(45deg);
}
details p {
  color: var(--fg-60);
  font-size: 15px;
  max-width: 62ch;
  padding: 0 0 26px;
}

/* ============ CONTACT / FOOTER ============ */
#contact {
  padding-bottom: 60px;
}
#contact h2 {
  max-width: 16ch;
}
#contact .cta-row {
  margin-top: 40px;
}
footer {
  border-top: 1px solid var(--line);
  padding: 28px var(--pad);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  max-width: none;
  font-size: 12px;
  color: var(--fg-40);
  letter-spacing: 0.04em;
}
footer .brand img {
  height: 18px;
}

footer .footer-copyright {
  display: flex;
  gap: 12px;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 860px) {
  nav.links {
    display: none;
  }
  .stat-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .lg-row {
    grid-template-columns: 30px 1fr auto;
  }
  .lg-status {
    display: none;
  }
  .inst {
    grid-template-columns: 1fr;
  }
  .inst-price {
    text-align: left;
  }
  .inst.feature {
    margin: 0 -8px;
    padding-left: 16px;
    padding-right: 16px;
  }
  .step,
  .rule {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

/* ============ REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .rx-bar {
    display: none;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001s !important;
    animation-delay: 0s !important;
    transition-duration: 0.001s !important;
  }
  .ticker-row {
    animation: none;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
  .hero .brand,
  header nav.links,
  header .pill,
  .hero h1,
  .hero .lede-gap,
  .cta-row {
    opacity: 1;
  }
}
