@font-face { font-family: "Cormorant Garamond"; font-weight: 300; font-display: swap; src: url("assets/fonts/CormorantGaramond-300.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 400; font-display: swap; src: url("assets/fonts/CormorantGaramond-400.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 500; font-display: swap; src: url("assets/fonts/CormorantGaramond-500.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 400; font-style: italic; font-display: swap; src: url("assets/fonts/CormorantGaramond-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Saira"; font-weight: 300 700; font-display: swap; src: url("assets/fonts/Saira-var.woff2") format("woff2"); }

:root {
  --paper: #edefee;
  --sheet: #ffffff;
  --ink: #000000;
  --graphite: #3b3f43;
  --steel: #7d848c;
  --rule: #cbd0d3;
  --night: #000000;
  --night-text: #e6e9eb;
  --night-dim: #9aa1a8;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Saira", "Segoe UI", system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --measure: 62ch;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 17px; line-height: 1.6; font-weight: 400;
  font-feature-settings: "tnum" 1, "lnum" 1;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.night :focus-visible { outline-color: var(--night-text); }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); }
.prose { max-width: var(--measure); }
.prose p { margin: 0 0 1em; }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid transparent; }
.top.scrolled { border-bottom-color: var(--rule); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.wordmark { font-family: var(--serif); font-weight: 500; font-size: 26px; letter-spacing: 0.01em; text-decoration: none; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: 500 16px/1 var(--sans); text-decoration: none; cursor: pointer;
  padding: 15px 22px; border-radius: 2px; border: 1px solid var(--ink);
  background: var(--ink); color: var(--sheet); transition: background .15s, color .15s;
}
.btn:hover { background: var(--graphite); border-color: var(--graphite); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--sheet); }
.btn.small { padding: 10px 16px; font-size: 15px; }
.night .btn { background: var(--night-text); color: var(--ink); border-color: var(--night-text); }
.night .btn:hover { background: #fff; }

/* ---------- hero ---------- */
.hero { padding: clamp(40px, 7vw, 96px) 0 clamp(56px, 8vw, 112px); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 0 clamp(32px, 5vw, 72px); align-items: end; }
.hero .sheet { grid-column: 1 / -1; margin-top: clamp(40px, 5vw, 64px); min-width: 0; }
.hero-side { padding-bottom: 10px; }
.hero h1 {
  font-family: var(--serif); font-weight: 300; margin: 0 0 24px;
  font-size: clamp(50px, 7.4vw, 112px); line-height: 0.95; letter-spacing: -0.02em;
}
.lead { font-size: clamp(18px, 1.6vw, 20px); color: var(--graphite); margin: 0 0 32px; max-width: 34em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }
.byline { font-size: 15px; color: var(--steel); margin: 0; }

/* the ledger */
.sheet {
  background: var(--sheet); border: 1px solid var(--rule);
  box-shadow: 0 1px 0 var(--rule), 0 30px 60px -30px rgba(0, 0, 0, 0.25);
  padding: 26px 0 20px; margin: 8px 0 0;
}
.sheet-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px; padding: 0 24px 16px; }
.sheet-title { font-family: var(--serif); font-size: 24px; font-weight: 500; margin: 0; }
.sheet-unit { font-size: 13px; color: var(--steel); white-space: nowrap; }
.ledger-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.ledger { border-collapse: collapse; width: 100%; min-width: 820px; font-size: 14px; }
.ledger th, .ledger td { padding: 9px 10px; text-align: right; white-space: nowrap; }
.ledger thead th { font-weight: 500; color: var(--steel); border-bottom: 1px solid var(--ink); }
.ledger tbody th { text-align: left; font-weight: 500; position: sticky; left: 0; background: var(--sheet); padding-left: 24px; min-width: 120px; }
.ledger td:last-child, .ledger th:last-child { padding-right: 24px; }
.ledger tbody tr + tr td, .ledger tbody tr + tr th { border-top: 1px solid #e7eaeb; }
.ledger tr.closing th, .ledger tr.closing td { font-weight: 600; border-top: 1px solid var(--ink); }
.ledger td.neg { color: var(--ink); }
.ledger tr.closing td.neg { background: repeating-linear-gradient(135deg, #f3f4f4 0 6px, #e9ebec 6px 7px); }
.ledger td.wk8 { box-shadow: inset 2px 0 0 var(--ink); }
.sheet-foot { display: flex; gap: 14px; align-items: flex-start; padding: 18px 24px 0; }
.flag { flex: none; width: 10px; height: 10px; margin-top: 7px; background: var(--ink); }
.sheet-foot p { margin: 0; font-size: 15px; color: var(--graphite); max-width: 52ch; }
.sheet-foot strong { color: var(--ink); font-weight: 600; }

/* ledger build: one orchestrated moment on load */
@media (prefers-reduced-motion: no-preference) {
  .js .ledger td, .js .ledger thead th:not(:first-child) { opacity: 0; animation: post .35s ease-out forwards; animation-delay: calc(var(--w) * 110ms + 250ms); }
  .js .sheet-foot { opacity: 0; transform: translateY(6px); animation: settle .5s ease-out forwards; animation-delay: 1.9s; }
  .js .ledger td.wk8 { animation-name: post, mark; animation-duration: .35s, .6s; animation-delay: calc(var(--w) * 110ms + 250ms), 1.75s; }
}
@keyframes post { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
@keyframes settle { to { opacity: 1; transform: none; } }
@keyframes mark { 0% { box-shadow: inset 2px 0 0 transparent; } 100% { box-shadow: inset 2px 0 0 var(--ink); } }

/* ---------- sections ---------- */
section.block { padding: clamp(64px, 9vw, 128px) 0; }
section.block + section.block:not(.night) { border-top: 1px solid var(--rule); }
.night { background: var(--night); color: var(--night-text); }
.night .muted, .night p { color: var(--night-dim); }
h2 {
  font-family: var(--serif); font-weight: 300; margin: 0 0 20px;
  font-size: clamp(38px, 4.6vw, 64px); line-height: 1.02; letter-spacing: -0.01em;
}
.night h2 { color: #fff; }
h3 { font-family: var(--sans); font-weight: 600; font-size: 18px; margin: 0 0 8px; }
.intro { font-size: 19px; color: var(--graphite); max-width: var(--measure); margin: 0 0 48px; }
.night .intro { color: var(--night-dim); }

/* comparison */
.compare-scroll { overflow-x: auto; }
table.compare { border-collapse: collapse; width: 100%; min-width: 720px; }
.compare th, .compare td { text-align: left; vertical-align: top; padding: 18px 20px 18px 0; border-bottom: 1px solid var(--rule); }
.compare thead th { font-family: var(--serif); font-weight: 500; font-size: 24px; line-height: 1.15; border-bottom: 1px solid var(--ink); padding-bottom: 16px; }
.compare tbody th { font-weight: 500; width: 22%; color: var(--graphite); font-size: 15px; }
.compare td { width: 26%; }
.compare .ours { background: var(--sheet); padding-left: 20px; }
.compare thead .ours { background: var(--ink); color: var(--sheet); padding-left: 20px; padding-top: 16px; }

/* modules */
ol.modules { list-style: none; margin: 0; padding: 0; columns: 2 340px; column-gap: 56px; counter-reset: m -1; }
ol.modules li { break-inside: avoid; display: grid; grid-template-columns: 48px 1fr; padding: 16px 0; border-top: 1px solid var(--rule); counter-increment: m; }
ol.modules li::before { content: counter(m); font-family: var(--serif); font-size: 28px; line-height: 1; color: var(--steel); }
ol.modules li.star::before { content: "+"; }
ol.modules strong { display: block; font-weight: 600; }
ol.modules span { color: var(--graphite); font-size: 15.5px; }

/* system band */
.shots { display: grid; grid-template-columns: 1.35fr 1fr; gap: 20px; margin: 48px 0 56px; }
.shots figure { margin: 0; }
.shots img { border: 1px solid #2a2d30; width: 100%; height: auto; }
.shots .stack { display: grid; gap: 20px; align-content: start; }
.shots figcaption { font-size: 14px; color: var(--night-dim); margin-top: 10px; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid #2a2d30; }
.fact { padding: 28px 28px 28px 0; border-bottom: 1px solid #2a2d30; }
.fact b { display: block; font-family: var(--serif); font-weight: 300; font-size: 56px; line-height: 1; color: #fff; margin-bottom: 10px; }
.fact p { margin: 0; font-size: 15.5px; }
.system-note { margin-top: 36px; max-width: var(--measure); }

/* line between allowed and licensed */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 64px); }
.split ul { list-style: none; margin: 0; padding: 0; }
.split li { padding: 12px 0; border-top: 1px solid var(--rule); }
.split .col-title { font-family: var(--serif); font-size: 28px; font-weight: 500; margin: 0 0 14px; }
.split .licensed li { color: var(--graphite); }
.fine { font-size: 14px; color: var(--steel); margin-top: 28px; max-width: var(--measure); }

/* pricing */
.prices { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 980px; }
.price { background: var(--sheet); border: 1px solid var(--rule); padding: 32px; }
.price.primary { border-color: var(--ink); box-shadow: 6px 6px 0 var(--ink); }
.price .amount { font-family: var(--serif); font-weight: 300; font-size: 64px; line-height: 1; margin: 12px 0 18px; }
.price .amount small { font-family: var(--sans); font-size: 16px; color: var(--steel); margin-left: 6px; }
.price ul { margin: 0 0 24px; padding-left: 18px; color: var(--graphite); }
.price li { margin-bottom: 6px; }
.price-note { margin-top: 24px; color: var(--graphite); max-width: var(--measure); }

/* fit */
.fit { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 64px); }
.fit ul { margin: 0; padding-left: 20px; }
.fit li { margin-bottom: 10px; }

/* faq */
.faq { max-width: 860px; }
.faq details { border-top: 1px solid var(--rule); }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 40px 20px 0; position: relative; font-weight: 500; font-size: 18px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 12px; height: 12px; border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq .answer { padding: 0 0 22px; color: var(--graphite); max-width: var(--measure); }
.faq .answer p { margin: 0 0 .8em; }

/* apply */
.apply .wrap { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.form-box { background: var(--sheet); color: var(--ink); min-height: 420px; padding: 8px; }
.form-box iframe { width: 100%; border: 0; min-height: 900px; }
.form-pending { padding: 32px; }
.form-pending p { color: var(--graphite); }
.steps { list-style: none; padding: 0; margin: 28px 0 0; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 36px 1fr; padding: 14px 0; border-top: 1px solid #2a2d30; }
.steps li::before { content: counter(s); font-family: var(--serif); font-size: 26px; line-height: 1; color: #fff; }

/* footer */
footer { padding: 56px 0 72px; font-size: 14px; color: var(--graphite); }
footer .cols { display: grid; grid-template-columns: 1fr 2fr; gap: 40px; }
footer .wordmark { font-size: 22px; display: inline-block; margin-bottom: 8px; }
footer p { margin: 0 0 12px; max-width: 80ch; }
footer h4 { font-size: 14px; font-weight: 600; margin: 0 0 6px; color: var(--ink); }

/* ---------- responsive ---------- */
@media (max-width: 1120px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { max-width: 13ch; }
  .lead { max-width: 40em; }
}
@media (max-width: 960px) {
  .apply .wrap { grid-template-columns: minmax(0, 1fr); }
  .shots { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  body { font-size: 16px; }
  .split, .fit, .prices, footer .cols { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
  .fact b { font-size: 46px; }
  .price { padding: 24px; }
  .price.primary { box-shadow: 4px 4px 0 var(--ink); }
  .sheet-head { padding: 0 16px 14px; }
  .ledger tbody th { padding-left: 16px; }
  .sheet-foot { padding: 16px 16px 0; }
  .top .btn.small { padding: 9px 14px; }
}

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
section[id], main[id] { scroll-margin-top: 72px; }
