:root {
  /* page: ink on warm paper, one red accent */
  --paper: #F3EFE6;
  --paper-2: #EAE5D8;
  --card: #F8F5EE;
  --ink: #16150F;
  --ink-2: #3B392F;
  --muted: #777268;
  --rule: #D6D0C0;
  --accent: #C6411C;
  --ok: #7BD3A0;
  /* dark blocks */
  --panel: #16150F;
  --panel-2: #201F18;
  --panel-rule: #35332A;
  --panel-text: #ECE7D9;
  --panel-muted: #948F80;
  --serif: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --max: 1180px;
  --gutter: 28px;
  color-scheme: light;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 84px;
  background: var(--paper);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* paper grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.055;
  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='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

::selection { background: var(--accent); color: var(--paper); }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.nav-in {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--serif);
  font-size: 26px;
  letter-spacing: -0.01em;
  line-height: 1;
}
.nav-links { display: flex; gap: 30px; }
.nav-links a {
  font-size: 14.5px;
  color: var(--ink-2);
  text-decoration: none;
  position: relative;
  padding: 6px 0;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s ease;
}
.nav-links a:hover::after { transform: scaleX(1); }

/* ---------- buttons and links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 50px;
  padding: 0 26px;
  background: var(--ink);
  color: var(--paper);
  font-size: 15.5px;
  font-weight: 500;
  text-decoration: none;
  border-radius: 3px;
  transition: background .25s ease, color .25s ease, transform .25s ease;
}
.btn:hover { background: var(--accent); transform: translateY(-1px); }
.btn-sm { height: 38px; padding: 0 16px; font-size: 14px; }
.btn-inv { background: var(--paper); color: var(--ink); }
.btn-inv:hover { background: var(--accent); color: var(--paper); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15.5px;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 3px;
  transition: color .25s ease;
}
.link-arrow span { transition: transform .25s ease; }
.link-arrow:hover { color: var(--accent); }
.link-arrow:hover span { transform: translateX(4px); }

a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- shared type ---------- */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow .dot {
  flex: none;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

h1, h2 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.015em;
}
h1 em, h2 em, h3 em { font-style: italic; color: var(--accent); }

h2 {
  font-size: clamp(2.2rem, 4.3vw, 3.5rem);
  line-height: 1.04;
  max-width: 22ch;
  text-wrap: balance;
}

.col-tag {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding: 84px 0 104px;
  border-bottom: 1px solid var(--rule);
  background-image:
    linear-gradient(to bottom, transparent 0, var(--paper) 96%),
    repeating-linear-gradient(to bottom, transparent 0 35px, color-mix(in srgb, var(--rule) 62%, transparent) 35px 36px);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(3rem, 6.1vw, 5.5rem);
  line-height: 0.97;
  margin-top: 26px;
  text-wrap: balance;
}
.lede {
  margin-top: 28px;
  max-width: 32em;
  font-size: 18.5px;
  line-height: 1.6;
  color: var(--ink-2);
}
.cta-row {
  margin-top: 38px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 28px;
}

/* ---------- episode panel ---------- */
.episode { min-width: 0; }
.ep-panel {
  position: relative;
  background: var(--panel);
  color: var(--panel-text);
  border-radius: 8px;
  box-shadow:
    0 1px 0 rgba(255,255,255,.06) inset,
    0 30px 60px -28px rgba(22,21,15,.55),
    0 12px 22px -14px rgba(22,21,15,.35);
  overflow: hidden;
}
.ep-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 20px;
  border-bottom: 1px solid var(--panel-rule);
  background: var(--panel-2);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.ep-id { text-transform: none; letter-spacing: 0.01em; font-size: 12px; overflow-wrap: anywhere; }
.ep-tag {
  margin-left: auto;
  color: var(--panel-muted);
  border: 1px solid var(--panel-rule);
  border-radius: 99px;
  padding: 2px 9px;
  font-size: 10.5px;
}
.ep-body { padding: 4px 20px 16px; }
.ep-row {
  display: grid;
  grid-template-columns: 98px minmax(0, 1fr);
  gap: 14px;
  padding: 15px 0;
  border-bottom: 1px dashed var(--panel-rule);
}
.ep-row:last-child { border-bottom: 0; }
.ep-label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--panel-muted);
  padding-top: 4px;
}
.ep-quote {
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.25;
}
.ep-meta {
  margin-top: 7px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--panel-muted);
}
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chips span {
  font-family: var(--mono);
  font-size: 11.5px;
  padding: 4px 9px;
  border: 1px solid var(--panel-rule);
  border-radius: 4px;
  background: var(--panel-2);
}
.ep-code {
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}
.ep-code .cmd { display: grid; grid-template-columns: calc(4ch + 8px) minmax(0, 1fr); }
.ep-code .cmd b { font-weight: 400; color: var(--panel-muted); }
.ep-code .cmd b::after { content: " ›"; color: var(--accent); }
.ep-code .out { color: var(--panel-muted); padding-left: calc(4ch + 8px); }
.ep-env { font-family: var(--mono); font-size: 12.5px; line-height: 1.75; overflow-wrap: anywhere; }
.ep-env div { display: grid; grid-template-columns: 5ch minmax(0, 1fr); gap: 8px; }
.ep-env .k { color: var(--panel-muted); }
.ep-checks { font-size: 14.5px; line-height: 1.8; }
.chk i {
  font-style: normal;
  color: var(--ok);
  margin-right: 9px;
  font-family: var(--mono);
}
.ep-reward {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--panel-muted);
}
.ep-reward b {
  font-weight: 500;
  color: var(--accent);
  border: 1.5px solid var(--accent);
  border-radius: 4px;
  padding: 3px 10px;
  letter-spacing: 0.06em;
}
.episode figcaption {
  margin-top: 13px;
  font-size: 13px;
  color: var(--muted);
}

/* episode playback (only when script.js turns it on) */
.is-live [data-step] { opacity: 0; }
.is-live [data-step].on { opacity: 1; transition: opacity .35s ease; }
.is-live .cmd.on { animation: type .55s steps(26, end) both; }
.is-live .ep-reward.on b { animation: pop .32s cubic-bezier(.2, 1.5, .4, 1) both; }
@keyframes pop {
  from { transform: scale(1.5); }
  to { transform: scale(1); }
}
@keyframes type {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

/* ---------- sections ---------- */
.section { padding: 112px 0; }
.section-tint {
  background: var(--paper-2);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.sec-head { margin-bottom: 54px; }
.sec-head h2 { margin-top: 18px; }
.sec-sub {
  margin-top: 22px;
  max-width: 34em;
  font-size: 18px;
  color: var(--ink-2);
}

/* steps */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--ink);
}
.step {
  padding: 26px 30px 6px 0;
  border-right: 1px solid var(--rule);
}
.step + .step { padding-left: 30px; }
.step:last-child { border-right: 0; padding-right: 0; }
.num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--accent);
}
.step h3 {
  margin-top: 46px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 2.1rem;
  line-height: 1.02;
}
.step p {
  margin-top: 14px;
  max-width: 24em;
  font-size: 16px;
  color: var(--ink-2);
}

/* the deal: dark block */
.deal {
  margin-top: 72px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 40px 64px;
  align-items: end;
  padding: 52px 56px;
  background: var(--panel);
  color: var(--panel-text);
  border-radius: 8px;
}
.deal h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.4rem, 4.8vw, 4rem);
  line-height: 1;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.deal p { font-size: 17.5px; color: #C2BDAE; max-width: 24em; }
.deal .btn { margin-top: 24px; }
.deal a:focus-visible { outline-color: var(--paper); }

/* assurances */
.assure {
  margin-top: 64px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 40px;
}
.assure li {
  padding-top: 20px;
  border-top: 1px solid var(--rule);
}
.assure strong {
  display: block;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.6rem;
  line-height: 1.1;
}
.assure span {
  display: block;
  margin-top: 8px;
  font-size: 15.5px;
  color: var(--ink-2);
}

/* what we license */
.license {
  margin-top: 56px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
}
.chips-lg { gap: 8px; }
.chips-lg span {
  font-size: 12.5px;
  padding: 6px 12px;
  color: var(--ink-2);
  background: var(--card);
  border-color: var(--rule);
}

/* compare */
.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--rule);
  border-radius: 8px;
  overflow: hidden;
}
.col { padding: 32px 36px 30px; }
.col-a { color: var(--muted); background: var(--paper); }
.col-b { background: var(--panel); color: var(--panel-text); }
.col-b .col-tag { color: var(--accent); }
.col ul { margin-top: 18px; }
.col li {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2.1vw, 1.65rem);
  line-height: 1.22;
  padding: 15px 0;
  border-top: 1px solid var(--rule);
}
.col-b li { border-color: var(--panel-rule); }
.col-a li {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  text-decoration-color: color-mix(in srgb, var(--muted) 55%, transparent);
}

.lab-foot {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px 40px;
}
.points { display: flex; flex-wrap: wrap; gap: 10px 30px; }
.points li {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-2);
}
.points li::before { content: "✓"; margin-right: 9px; color: var(--accent); }

/* book a call + contact */
.book {
  padding: 124px 0 128px;
  text-align: center;
}
.book .eyebrow { justify-content: center; }
.book h2 { margin: 18px auto 0; max-width: 18ch; font-size: clamp(2.5rem, 5.6vw, 4.6rem); }
.book-grid {
  margin: 52px auto 0;
  max-width: 860px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  text-align: left;
}
.book-card {
  display: flex;
  flex-direction: column;
  min-height: 210px;
  padding: 30px 32px 28px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--card);
  text-decoration: none;
  transition: background .3s ease, color .3s ease, border-color .3s ease, transform .3s ease, box-shadow .3s ease;
}
.book-card strong {
  margin-top: 16px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.8rem, 3vw, 2.3rem);
  line-height: 1.05;
}
.book-go {
  margin-top: auto;
  padding-top: 28px;
  font-size: 15.5px;
  font-weight: 500;
}
.book-go span { display: inline-block; margin-left: 4px; transition: transform .25s ease; }
.book-card:hover {
  background: var(--panel);
  color: var(--panel-text);
  border-color: var(--panel);
  transform: translateY(-3px);
  box-shadow: 0 22px 40px -28px rgba(22,21,15,.6);
}
.book-card:hover .col-tag { color: var(--accent); }
.book-card:hover .book-go span { transform: translateX(4px); }

.contact-note { margin-top: 44px; font-size: 16px; color: var(--muted); }
.mail {
  margin-left: 6px;
  font-family: var(--mono);
  font-size: 15.5px;
  color: var(--ink);
  text-decoration: none;
  padding-bottom: 4px;
  border-bottom: 1px solid currentColor;
  transition: color .25s ease;
}
.mail:hover { color: var(--accent); }

/* footer */
.foot { border-top: 1px solid var(--rule); }
.foot-in {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand-foot { font-size: 22px; }
.foot-note { font-family: var(--mono); font-size: 12px; color: var(--muted); }

/* ---------- reveal on scroll (only when script.js is running) ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1);
}
.js .reveal.in { opacity: 1; transform: none; }
.js .steps .reveal:nth-child(2) { transition-delay: .08s; }
.js .steps .reveal:nth-child(3) { transition-delay: .16s; }

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  .hero { padding: 56px 0 80px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 52px; }
  .deal { grid-template-columns: minmax(0, 1fr); align-items: start; padding: 44px; }
}

@media (max-width: 760px) {
  :root { --gutter: 20px; }
  body { font-size: 16px; }
  .nav-links { display: none; }
  .section { padding: 80px 0; }
  .sec-head { margin-bottom: 38px; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .step, .step + .step { padding: 24px 0 28px; border-right: 0; }
  .step + .step { border-top: 1px solid var(--rule); }
  .step h3 { margin-top: 26px; }
  .deal { margin-top: 48px; padding: 32px 24px 34px; }
  .assure { grid-template-columns: minmax(0, 1fr); gap: 26px; margin-top: 48px; }
  .license { margin-top: 44px; }
  .compare, .book-grid { grid-template-columns: minmax(0, 1fr); }
  .col { padding: 26px 24px 24px; }
  .book { padding: 92px 0 96px; }
  .book-card { min-height: 0; padding: 26px 24px 24px; }
}

@media (max-width: 520px) {
  .ep-row { grid-template-columns: minmax(0, 1fr); gap: 7px; }
  .ep-label { padding-top: 0; }
  .ep-quote { font-size: 19px; }
  .ep-code { font-size: 11.5px; }
  .cta-row { gap: 22px; }
  .lab-foot .btn { width: 100%; }
  .mail { display: inline-block; margin: 10px 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}
