/* ════════════════════════════════════════════════════════════════════════
   DESIGN TOKENS — Chippex brand language (warm dark + editorial gold)
   ════════════════════════════════════════════════════════════════════════ */
:root {
  /* Surfaces — deeper-to-elevated dark stack */
  --bg-deep:    #0E0C09;
  --bg:         #16140F;
  --bg-card:    #1B1812;
  --bg-elev:    #221E16;
  --bg-tint:    #2A251A;

  /* Ink — warm cream typography */
  --ink:        #ECE0C6;
  --ink-strong: #FAF1D7;
  --ink-muted:  #B0A082;
  --ink-dim:    #7A6E58;
  --ink-faint:  #4E4639;

  /* Gold accents */
  --gold:       #D8B97E;
  --gold-deep:  #B8975B;
  --gold-mute:  #8C6E3B;
  --gold-glow:  rgba(216, 185, 126, 0.18);

  /* Functional */
  --danger:     #C66952;
  --safe:       #87A87C;
  --line:       rgba(216, 185, 126, 0.22);
  --line-soft:  rgba(236, 224, 198, 0.08);
  --shadow-lg:  0 24px 80px rgba(0, 0, 0, 0.5), 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-md:  0 12px 32px rgba(0, 0, 0, 0.35);

  /* Typography */
  --font-serif: "Fraunces", "Times New Roman", serif;
  --font-sans:  "Manrope", system-ui, -apple-system, sans-serif;
  --font-mono:  "JetBrains Mono", ui-monospace, monospace;

  /* Geometry */
  --container:  1240px;
  --gutter:     clamp(20px, 4vw, 48px);
  --radius:     2px;
  --radius-lg:  4px;

  /* Motion */
  --ease:       cubic-bezier(0.22, 1, 0.36, 1);
  --ease-fast:  cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  margin: 0;
  background: var(--bg-deep);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Grain texture overlay for editorial feel */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image:
    url("../extracted/inline-svg.3bafb1a31ef24b69.svg");
  opacity: 0.6;
  mix-blend-mode: overlay;
}

a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }

::selection { background: var(--gold); color: var(--bg); }

/* ════════════════════════════════════════════════════════════════════════
   LAYOUT PRIMITIVES
   ════════════════════════════════════════════════════════════════════════ */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

section { position: relative; z-index: 2; }

/* ════════════════════════════════════════════════════════════════════════
   TYPOGRAPHY
   ════════════════════════════════════════════════════════════════════════ */
.eyebrow {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.eyebrow::before {
  content: "";
  width: 24px; height: 1px;
  background: var(--gold);
  display: inline-block;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink-strong);
  margin: 0;
  font-variation-settings: "opsz" 144, "SOFT" 30, "WONK" 0;
}

h1 {
  font-size: clamp(48px, 8vw, 104px);
  font-variation-settings: "opsz" 144, "SOFT" 50, "WONK" 1;
  font-weight: 400;
}

h2 {
  font-size: clamp(36px, 5vw, 64px);
  font-variation-settings: "opsz" 144, "SOFT" 40;
}

h3 {
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 500;
}

h4 { font-size: 18px; }

.italic { font-style: italic; font-variation-settings: "opsz" 144, "SOFT" 60; }

.serif-quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 300;
  color: var(--ink-muted);
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.35;
  font-variation-settings: "opsz" 144, "SOFT" 70;
}

.mono {
  font-family: var(--font-mono);
  font-weight: 400;
  font-feature-settings: "calt", "ss02";
  letter-spacing: -0.01em;
}

.text-muted { color: var(--ink-muted); }
.text-dim   { color: var(--ink-dim); }
.text-gold  { color: var(--gold); }

.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--gold);
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 100px;
  text-transform: uppercase;
}

/* ════════════════════════════════════════════════════════════════════════
   BUTTONS
   ════════════════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 240ms var(--ease);
  text-transform: none;
  user-select: none;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--gold);
  color: var(--bg-deep);
  border-color: var(--gold);
}
.btn-primary:hover {
  background: var(--ink-strong);
  border-color: var(--ink-strong);
  transform: translateY(-1px);
  box-shadow: 0 10px 30px var(--gold-glow);
}

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-secondary:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-muted);
  padding: 10px 16px;
  font-size: 12px;
}
.btn-ghost:hover { color: var(--gold); }

.btn-link {
  background: none;
  border: none;
  color: var(--gold);
  padding: 0;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 240ms var(--ease);
}
.btn-link:hover { gap: 12px; }
.btn-link::after { content: "→"; font-family: var(--font-mono); }

.btn-block { width: 100%; }

/* ════════════════════════════════════════════════════════════════════════
   NAV — sticky, refined
   ════════════════════════════════════════════════════════════════════════ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(14, 12, 9, 0.85);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-bottom: 1px solid var(--line-soft);
  transition: padding 220ms var(--ease), background 220ms var(--ease);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}
.nav-scrolled .nav-inner { padding: 12px 0; }

.nav-brand {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.nav-logo {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.14em;
  color: var(--gold);
}
.nav-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-dim);
  letter-spacing: 0.08em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-muted);
  padding: 8px 14px;
  border-radius: var(--radius);
  transition: color 220ms var(--ease);
}
.nav-link:hover { color: var(--ink); }

.nav-cta {
  margin-left: 12px;
  padding: 10px 18px;
  font-size: 12px;
}

.nav-burger {
  display: none;
  background: none;
  border: 1px solid var(--line);
  width: 40px; height: 40px;
  border-radius: var(--radius);
  cursor: pointer;
  position: relative;
}
.nav-burger span {
  position: absolute;
  left: 10px; right: 10px; height: 1px;
  background: var(--ink);
  transition: 240ms var(--ease);
}
.nav-burger span:nth-child(1) { top: 14px; }
.nav-burger span:nth-child(2) { top: 19px; }
.nav-burger span:nth-child(3) { top: 24px; }

@media (max-width: 880px) {
  .nav-links { display: none; }
  .nav-burger { display: block; }
}

/* ════════════════════════════════════════════════════════════════════════
   HERO
   ════════════════════════════════════════════════════════════════════════ */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  position: relative;
  background:
    radial-gradient(ellipse 120% 80% at 80% 0%, rgba(216, 185, 126, 0.10), transparent 60%),
    radial-gradient(ellipse 80% 60% at 20% 100%, rgba(216, 185, 126, 0.04), transparent 50%),
    var(--bg-deep);
}

/* Decorative geometric element top-right (hidden on desktop — replaced by book) */
.hero::after, .hero::before { display: none; }

.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 60px;
  align-items: center;
  position: relative;
}

@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
}

.hero-eyebrow { margin-bottom: 32px; opacity: 0; animation: rise 800ms 100ms var(--ease) forwards; }

.hero-title {
  font-size: clamp(40px, 6.5vw, 84px);
  letter-spacing: -0.035em;
  font-variation-settings: "opsz" 144, "SOFT" 50, "WONK" 1;
  margin-bottom: 28px;
  opacity: 0;
  animation: rise 1000ms 200ms var(--ease) forwards;
  line-height: 0.98;
}
.hero-title .accent {
  display: block;
  font-style: italic;
  color: var(--gold);
  font-weight: 300;
  font-variation-settings: "opsz" 144, "SOFT" 80;
}

.hero-sub {
  max-width: 620px;
  font-family: var(--font-serif);
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.45;
  color: var(--ink-muted);
  font-weight: 300;
  font-variation-settings: "opsz" 144, "SOFT" 50;
  margin-bottom: 48px;
  opacity: 0;
  animation: rise 1000ms 350ms var(--ease) forwards;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 80px;
  opacity: 0;
  animation: rise 1000ms 500ms var(--ease) forwards;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  padding-top: 36px;
  border-top: 1px solid var(--line);
  opacity: 0;
  animation: rise 1000ms 650ms var(--ease) forwards;
}
.hero-stat-label {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.hero-stat-value {
  font-family: var(--font-serif);
  font-size: clamp(22px, 2.6vw, 32px);
  font-weight: 400;
  color: var(--ink-strong);
  line-height: 1;
  font-variation-settings: "opsz" 144;
}

@media (max-width: 1180px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .hero-stats { gap: 20px; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ════════════════════════════════════════════════════════════════════════
   SECTION HEADER (shared)
   ════════════════════════════════════════════════════════════════════════ */
.section { padding: 120px 0; position: relative; }
.section-tinted { background: var(--bg); }

.section-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: end;
  margin-bottom: 80px;
}
.section-head-title { max-width: 720px; }
.section-head-title .eyebrow { margin-bottom: 24px; }
.section-head-title h2 { letter-spacing: -0.03em; }

.section-head-meta {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--ink-muted);
  font-size: 17px;
  line-height: 1.5;
  font-weight: 300;
  font-variation-settings: "opsz" 144, "SOFT" 60;
  max-width: 480px;
  justify-self: end;
}

@media (max-width: 780px) {
  .section-head { grid-template-columns: 1fr; gap: 32px; margin-bottom: 56px; }
  .section-head-meta { justify-self: start; }
}

/* ════════════════════════════════════════════════════════════════════════
   WHY US — feature grid
   ════════════════════════════════════════════════════════════════════════ */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line-soft);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.feature {
  background: var(--bg-deep);
  padding: 48px 40px;
  position: relative;
}
.feature-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--gold);
  letter-spacing: 0.1em;
  margin-bottom: 24px;
  display: block;
}
.feature-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 500;
  color: var(--ink-strong);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
  font-variation-settings: "opsz" 144;
}
.feature-body {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-muted);
}

@media (max-width: 900px) {
  .features { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .features { grid-template-columns: 1fr; }
  .feature { padding: 36px 28px; }
}

/* ════════════════════════════════════════════════════════════════════════
   PRODUCT CARDS
   ════════════════════════════════════════════════════════════════════════ */
.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

@media (max-width: 880px) {
  .products-grid { grid-template-columns: 1fr; }
}

.product {
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 320ms var(--ease), transform 320ms var(--ease);
  display: flex;
  flex-direction: column;
}
.product:hover {
  border-color: var(--line);
  transform: translateY(-2px);
}
.product-accent-1 .cover-art { color:#C9694F; }
.product-accent-2 .cover-art { color:#6FAE9F; }
.product-accent-3 .cover-art { color:#8FA877; }
.product-accent-4 .cover-art { color:#A88BC0; }
.product-accent-5 .cover-art { color:#D8B97E; }
.inline-code { background:var(--bg-deep); padding:2px 6px; border-radius:2px; }

/* Product cover — text-based premium cover mimicking the PDFs */
.product-cover {
  aspect-ratio: 4 / 3;
  background: linear-gradient(180deg, #16140F 0%, #100E0A 100%);
  position: relative;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  border-bottom: 1px solid var(--line-soft);
}
.product-cover::before {
  content: "";
  position: absolute;
  top: 24px; right: 28px;
  width: 56px; height: 1px;
  background: var(--gold);
  opacity: 0.6;
}
.product-cover::after {
  content: "";
  position: absolute;
  top: 24px; right: 28px;
  width: 1px; height: 36px;
  background: var(--gold);
  opacity: 0.6;
  transform: translateX(55px);
}
.cover-brand {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--gold);
}
.cover-brand-sub {
  font-family: var(--font-sans);
  font-size: 9px;
  color: var(--ink-dim);
  margin-top: 2px;
  letter-spacing: 0.06em;
}
.cover-edition {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.cover-edition::before {
  content: "";
  display: inline-block;
  width: 18px; height: 1px;
  background: var(--gold);
  vertical-align: middle;
  margin-right: 8px;
}
.cover-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(28px, 3.2vw, 38px);
  line-height: 1;
  color: var(--ink-strong);
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 144, "SOFT" 40, "WONK" 0;
}
.cover-sub {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 300;
  font-size: 14px;
  line-height: 1.35;
  color: var(--ink-muted);
  margin-top: 10px;
  font-variation-settings: "opsz" 144, "SOFT" 70;
}

/* Premium cover emblem — clean engraving instead of uneven glow */
.product-cover > div:not(.cover-art) { position: relative; z-index: 2; }
.cover-art {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  z-index: 0; pointer-events: none;
  color: var(--cover-accent, var(--gold));
}
.cover-art::before {
  content: "";
  position: absolute;
  left: 50%; top: 49%;
  width: min(280px, 42%); aspect-ratio: 1;
  transform: translate(-50%,-50%) rotate(45deg);
  border: 1px solid color-mix(in srgb, currentColor 36%, transparent);
  opacity: .55;
}
.cover-art::after {
  content: "";
  position: absolute;
  left: 50%; top: 49%;
  width: min(360px, 56%); aspect-ratio: 1;
  transform: translate(-50%,-50%);
  border-radius: 50%;
  background:
    linear-gradient(currentColor,currentColor) center/1px 100% no-repeat,
    linear-gradient(90deg,currentColor,currentColor) center/100% 1px no-repeat,
    repeating-radial-gradient(circle, transparent 0 27px, color-mix(in srgb, currentColor 18%, transparent) 28px 29px, transparent 30px 54px);
  opacity: .16;
}
.cover-art svg {
  width: 34%; height: auto;
  opacity: .72;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.42));
  transition: transform 600ms var(--ease), opacity 600ms var(--ease), filter 600ms var(--ease);
}
.product:hover .cover-art svg { transform: scale(1.045) translateY(-3px); opacity: .9; filter: drop-shadow(0 14px 22px rgba(0,0,0,.5)); }

.product-body {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  flex: 1;
}

.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.product-desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-muted);
}

.product-includes {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.product-includes li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13px;
  color: var(--ink);
  line-height: 1.45;
}
.product-includes li::before {
  content: "·";
  color: var(--gold);
  font-weight: 700;
  flex-shrink: 0;
  font-size: 18px;
  line-height: 1;
}

.product-footer {
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.price-block { display: flex; align-items: baseline; gap: 6px; }
.price-currency {
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--ink-strong);
  font-weight: 400;
  font-variation-settings: "opsz" 144;
}
.price-value {
  font-family: var(--font-serif);
  font-size: 42px;
  color: var(--ink-strong);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 144, "SOFT" 40;
}
.price-old {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-dim);
  text-decoration: line-through;
  margin-left: 6px;
}

/* ════════════════════════════════════════════════════════════════════════
   BUNDLE CARD — special big card
   ════════════════════════════════════════════════════════════════════════ */
.bundle {
  margin-top: 48px;
  background:
    radial-gradient(ellipse 90% 70% at 80% 30%, rgba(216, 185, 126, 0.10), transparent 60%),
    linear-gradient(135deg, var(--bg-card) 0%, var(--bg-elev) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 56px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 56px;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.bundle::before {
  content: "★";
  position: absolute;
  top: 28px; right: 32px;
  font-size: 14px;
  color: var(--gold);
  letter-spacing: 6px;
}
.bundle-content .eyebrow { margin-bottom: 20px; }
.bundle-title {
  font-family: var(--font-serif);
  font-size: clamp(36px, 4.5vw, 56px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.03em;
  margin: 0 0 20px;
  color: var(--ink-strong);
  font-variation-settings: "opsz" 144, "SOFT" 40, "WONK" 1;
}
.bundle-title .italic {
  font-style: italic;
  color: var(--gold);
  display: block;
  font-weight: 300;
}
.bundle-desc {
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink-muted);
  margin: 0 0 32px;
  max-width: 480px;
  font-weight: 300;
  font-variation-settings: "opsz" 144, "SOFT" 60;
}

.bundle-pricing {
  background: var(--bg-deep);
  border: 1px solid var(--line);
  padding: 32px;
  border-radius: var(--radius);
}
.bundle-price-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 13px;
  color: var(--ink-muted);
  border-bottom: 1px solid var(--line-soft);
}
.bundle-price-row:last-of-type { border-bottom: none; padding-bottom: 16px; }
.bundle-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  margin-top: 8px;
}
.bundle-total-label {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
}
.bundle-save {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gold);
  color: var(--bg-deep);
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  border-radius: 100px;
  margin-bottom: 12px;
}

@media (max-width: 900px) {
  .bundle { grid-template-columns: 1fr; padding: 40px 28px; gap: 32px; }
  .bundle-pricing { padding: 24px; }
}

/* ════════════════════════════════════════════════════════════════════════
   AFFILIATE
   ════════════════════════════════════════════════════════════════════════ */
.affiliate-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.affiliate-rates {
  background: var(--bg);
  border: 1px solid var(--line-soft);
  padding: 40px;
  border-radius: var(--radius-lg);
}
.affiliate-rate {
  padding: 24px 0;
  border-bottom: 1px solid var(--line-soft);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
}
.affiliate-rate:last-child { border-bottom: none; padding-bottom: 0; }
.affiliate-rate:first-child { padding-top: 0; }

.affiliate-num {
  font-family: var(--font-serif);
  font-size: 54px;
  color: var(--gold);
  line-height: 1;
  font-weight: 400;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 144;
  width: 100px;
}
.affiliate-rate-title {
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--ink-strong);
  font-weight: 500;
  margin: 0 0 4px;
}
.affiliate-rate-desc {
  font-size: 13px;
  color: var(--ink-muted);
  line-height: 1.5;
}
.affiliate-rate-pct {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--ink-dim);
  letter-spacing: 0.05em;
}

.affiliate-side h3 { margin-bottom: 16px; }
.affiliate-list {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.affiliate-list li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
}
.affiliate-list li::before {
  content: "+";
  color: var(--gold);
  font-family: var(--font-mono);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

@media (max-width: 880px) {
  .affiliate-grid { grid-template-columns: 1fr; }
  .affiliate-rates { padding: 28px; }
  .affiliate-num { font-size: 42px; width: 70px; }
}

/* ════════════════════════════════════════════════════════════════════════
   FAQ
   ════════════════════════════════════════════════════════════════════════ */
.faq-list {
  border-top: 1px solid var(--line-soft);
}
.faq-item {
  border-bottom: 1px solid var(--line-soft);
}
.faq-q {
  width: 100%;
  background: none;
  border: none;
  padding: 28px 0;
  font-family: var(--font-serif);
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 500;
  color: var(--ink-strong);
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  transition: color 220ms var(--ease);
  font-variation-settings: "opsz" 144;
  letter-spacing: -0.01em;
}
.faq-q:hover { color: var(--gold); }
.faq-q-icon {
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--gold);
  flex-shrink: 0;
  transition: transform 320ms var(--ease);
}
.faq-item[aria-expanded="true"] .faq-q-icon { transform: rotate(45deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 420ms var(--ease);
}
.faq-item[aria-expanded="true"] .faq-a { max-height: 800px; }
.faq-a-inner {
  padding: 0 0 32px;
  max-width: 720px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-muted);
}
.faq-a-inner p { margin: 0 0 12px; }
.faq-a-inner p:last-child { margin: 0; }

/* ════════════════════════════════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════════════════════════════════ */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--line-soft);
  padding: 80px 0 40px;
  position: relative;
  z-index: 2;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 64px;
}
.footer-brand-title {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 400;
  color: var(--ink-strong);
  margin: 0 0 16px;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 144;
}
.footer-brand-title .italic {
  font-style: italic;
  color: var(--gold);
  font-weight: 300;
}
.footer-brand-text {
  max-width: 360px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-muted);
}

.footer-col h4 {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 20px;
}
.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-col a {
  font-size: 14px;
  color: var(--ink-muted);
  transition: color 220ms var(--ease);
}
.footer-col a:hover { color: var(--gold); }

.footer-base {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 32px;
  border-top: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-dim);
  letter-spacing: 0.04em;
  gap: 24px;
}

@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-base { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ════════════════════════════════════════════════════════════════════════
   MODALS
   ════════════════════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7, 6, 4, 0.7);
  backdrop-filter: blur(10px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 280ms var(--ease), visibility 280ms;
}
.modal-overlay[data-open="true"] {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(20px);
  transition: transform 320ms var(--ease);
  box-shadow: var(--shadow-lg);
}
.modal-overlay[data-open="true"] .modal { transform: translateY(0); }

.modal-wide { max-width: 720px; }

.modal-head {
  padding: 32px 32px 0;
  position: relative;
}
.modal-close {
  position: absolute;
  top: 20px; right: 20px;
  background: none;
  border: none;
  width: 40px; height: 40px;
  border-radius: 50%;
  cursor: pointer;
  color: var(--ink-muted);
  font-size: 28px;
  line-height: 1;
  transition: all 220ms var(--ease);
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  touch-action: manipulation;
}
.modal-close:hover { background: var(--bg-elev); color: var(--gold); transform: rotate(90deg); }

.modal-title {
  font-family: var(--font-serif);
  font-size: clamp(28px, 3.5vw, 36px);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  color: var(--ink-strong);
  font-variation-settings: "opsz" 144;
}
.modal-title .italic { font-style: italic; color: var(--gold); }

.modal-sub {
  font-size: 13px;
  color: var(--ink-muted);
  margin-bottom: 28px;
}

.modal-body {
  padding: 0 32px 32px;
}

.modal-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line-soft);
}
.modal-tab {
  background: none;
  border: none;
  padding: 14px 0;
  margin-right: 32px;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-dim);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 220ms var(--ease);
}
.modal-tab[aria-selected="true"] {
  color: var(--gold);
  border-bottom-color: var(--gold);
}
.modal-tab:hover { color: var(--ink); }

.field-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field-label {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--gold);
  text-transform: uppercase;
}
.field-input {
  background: var(--bg-deep);
  border: 1px solid var(--line);
  padding: 14px 16px;
  border-radius: var(--radius);
  color: var(--ink-strong);
  font-size: 14px;
  font-family: var(--font-sans);
  transition: border-color 220ms var(--ease);
}
.field-input:focus {
  outline: none;
  border-color: var(--gold);
}
.field-input::placeholder { color: var(--ink-dim); }

.field-hint { font-size: 12px; color: var(--ink-dim); margin-top: 4px; }

.modal-foot {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.modal-foot-text {
  text-align: center;
  font-size: 13px;
  color: var(--ink-muted);
}
.modal-foot-text a { color: var(--gold); }
.modal-foot-text a:hover { text-decoration: underline; }

/* ════════════════════════════════════════════════════════════════════════
   ACCOUNT MODAL — wide layout
   ════════════════════════════════════════════════════════════════════════ */
.account-tabs { margin-bottom: 32px; }

.account-section { display: none; }
.account-section[data-active="true"] { display: block; }

.account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--line-soft);
  gap: 16px;
}
.account-row:last-child { border-bottom: none; }
.account-row-label {
  font-size: 12px;
  color: var(--ink-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  flex-shrink: 0;
  min-width: 120px;
}
.account-row-value {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink);
  text-align: right;
  word-break: break-all;
}

.purchases-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.purchase {
  background: var(--bg-deep);
  border: 1px solid var(--line-soft);
  padding: 20px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.purchase-info { flex: 1; min-width: 0; }
.purchase-title {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 500;
  color: var(--ink-strong);
  margin: 0 0 4px;
  font-variation-settings: "opsz" 144;
}
.purchase-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-dim);
  letter-spacing: 0.04em;
}

.empty-state {
  text-align: center;
  padding: 48px 20px;
  border: 1px dashed var(--line-soft);
  border-radius: var(--radius);
}
.empty-state-title {
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--ink-strong);
  margin-bottom: 8px;
}
.empty-state-text {
  font-size: 14px;
  color: var(--ink-muted);
  margin-bottom: 20px;
}

.affiliate-card {
  background: var(--bg-deep);
  border: 1px solid var(--line);
  padding: 28px;
  border-radius: var(--radius);
  margin-bottom: 20px;
}
.affiliate-card-label {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 8px;
}
.affiliate-link-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.affiliate-link-input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--line-soft);
  padding: 12px 14px;
  border-radius: var(--radius);
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
}
.affiliate-link-input:focus { outline: none; border-color: var(--gold); }

.affiliate-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 20px;
}
.aff-stat {
  background: var(--bg-deep);
  padding: 20px;
  text-align: center;
}
.aff-stat-value {
  font-family: var(--font-serif);
  font-size: 28px;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 6px;
  font-variation-settings: "opsz" 144;
}
.aff-stat-label {
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-dim);
  font-weight: 600;
}

/* ════════════════════════════════════════════════════════════════════════
   CHECKOUT MODAL
   ════════════════════════════════════════════════════════════════════════ */
.checkout-product {
  background: var(--bg-deep);
  border: 1px solid var(--line-soft);
  padding: 24px;
  border-radius: var(--radius);
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.checkout-product-name {
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--ink-strong);
  font-weight: 500;
}
.checkout-product-price {
  font-family: var(--font-serif);
  font-size: 28px;
  color: var(--gold);
  font-variation-settings: "opsz" 144;
}

.method-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}
.method-option {
  background: var(--bg-deep);
  border: 1px solid var(--line-soft);
  padding: 20px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 220ms var(--ease);
  text-align: left;
  font-family: inherit;
  color: inherit;
}
.method-option:hover { border-color: var(--line); }
.method-option[aria-selected="true"] {
  border-color: var(--gold);
  background: linear-gradient(180deg, var(--bg-elev) 0%, var(--bg-deep) 100%);
}
.method-title {
  font-family: var(--font-serif);
  font-size: 16px;
  color: var(--ink-strong);
  margin-bottom: 4px;
  font-variation-settings: "opsz" 144;
}
.method-sub {
  font-size: 12px;
  color: var(--ink-muted);
}

.checkout-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  margin-top: 8px;
}
.checkout-total-label {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
}
.checkout-total-value {
  font-family: var(--font-serif);
  font-size: 36px;
  color: var(--ink-strong);
  font-variation-settings: "opsz" 144;
  letter-spacing: -0.02em;
}

/* ════════════════════════════════════════════════════════════════════════
   TOAST notifications
   ════════════════════════════════════════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: 32px; right: 32px;
  background: var(--bg-elev);
  border: 1px solid var(--gold);
  border-left-width: 3px;
  padding: 16px 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  font-size: 14px;
  color: var(--ink-strong);
  z-index: 300;
  transform: translateY(100px);
  opacity: 0;
  transition: all 320ms var(--ease);
  max-width: 360px;
}
.toast[data-show="true"] {
  transform: translateY(0);
  opacity: 1;
}

@media (max-width: 600px) {
  .toast { bottom: 16px; right: 16px; left: 16px; max-width: none; }
}

/* ════════════════════════════════════════════════════════════════════════
   SCROLL REVEAL animations
   ════════════════════════════════════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 800ms var(--ease), transform 800ms var(--ease);
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children animations */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}
.reveal-stagger.in-view > * {
  opacity: 1;
  transform: translateY(0);
}
.reveal-stagger.in-view > *:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger.in-view > *:nth-child(2) { transition-delay: 80ms; }
.reveal-stagger.in-view > *:nth-child(3) { transition-delay: 160ms; }
.reveal-stagger.in-view > *:nth-child(4) { transition-delay: 240ms; }
.reveal-stagger.in-view > *:nth-child(5) { transition-delay: 320ms; }
.reveal-stagger.in-view > *:nth-child(6) { transition-delay: 400ms; }

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal, .reveal-stagger > * { opacity: 1; transform: none; }
}

/* ════════════════════════════════════════════════════════════════════════
   HERO BOOK — animated open book with live code typing
   ════════════════════════════════════════════════════════════════════════ */
.book-stage {
  perspective: 2200px;
  perspective-origin: 50% 30%;
  height: 100%;
  min-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  animation: rise 1200ms 700ms var(--ease) forwards;
}

.book {
  width: 100%;
  max-width: 560px;
  height: 380px;
  transform-style: preserve-3d;
  transform: rotateX(8deg) rotateY(-14deg) rotateZ(0.5deg);
  animation: bookFloat 9s ease-in-out infinite;
  position: relative;
}

@keyframes bookFloat {
  0%, 100% { transform: rotateX(8deg) rotateY(-14deg) rotateZ(0.5deg) translateY(0); }
  50%      { transform: rotateX(6deg) rotateY(-12deg) rotateZ(-0.3deg) translateY(-10px); }
}

.book-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 100%;
  width: 100%;
  background: var(--bg-card);
  border-radius: 3px 8px 8px 3px;
  position: relative;
  box-shadow:
    /* Deep cast shadow */
    0 80px 100px -40px rgba(0, 0, 0, 0.75),
    0 30px 60px -20px rgba(0, 0, 0, 0.5),
    /* Subtle golden glow */
    0 0 60px -10px rgba(216, 185, 126, 0.08),
    /* Inner edge */
    inset 0 0 0 1px rgba(216, 185, 126, 0.12);
}

/* Spine groove down the middle */
.book-inner::before {
  content: "";
  position: absolute;
  left: 50%; top: 4%; bottom: 4%;
  width: 8px;
  background:
    linear-gradient(90deg,
      transparent 0%,
      rgba(0,0,0,0.4) 30%,
      rgba(0,0,0,0.6) 50%,
      rgba(0,0,0,0.4) 70%,
      transparent 100%
    );
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 2;
}

/* Holographic shimmer overlay */
.book-inner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg,
    transparent 30%,
    rgba(216, 185, 126, 0.04) 45%,
    rgba(216, 185, 126, 0.10) 50%,
    rgba(216, 185, 126, 0.04) 55%,
    transparent 70%
  );
  background-size: 200% 200%;
  animation: shimmer 6s ease-in-out infinite;
  pointer-events: none;
  border-radius: inherit;
  mix-blend-mode: screen;
  z-index: 3;
}

@keyframes shimmer {
  0%, 100% { background-position: 0% 50%; opacity: 0.5; }
  50%      { background-position: 100% 50%; opacity: 1; }
}

.book-page {
  padding: 26px 24px;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.book-page-left {
  background:
    radial-gradient(ellipse 90% 60% at 30% 30%, rgba(216, 185, 126, 0.06), transparent 60%),
    linear-gradient(135deg, #1A1711 0%, #100E0A 100%);
  border-right: 1px solid var(--line-soft);
  justify-content: space-between;
  border-radius: 2px 0 0 2px;
}

.book-page-right {
  background: linear-gradient(135deg, #15130E 0%, #0E0C09 100%);
  border-radius: 0 6px 6px 0;
  padding: 18px;
}

/* Corner geometric mark (mirrors PDF cover) */
.book-page-left::before {
  content: "";
  position: absolute;
  top: 18px; right: 18px;
  width: 32px; height: 1px;
  background: var(--gold);
  opacity: 0.7;
}
.book-page-left::after {
  content: "";
  position: absolute;
  top: 18px; right: 18px;
  width: 1px; height: 20px;
  background: var(--gold);
  opacity: 0.7;
  transform: translateX(31px);
}

.book-brand {
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: var(--gold);
  margin-bottom: 2px;
}
.book-brand-sub {
  font-family: var(--font-sans);
  font-size: 8px;
  color: var(--ink-dim);
  letter-spacing: 0.08em;
}

.book-edition {
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 10px;
  position: relative;
}
.book-edition::before {
  content: "";
  display: inline-block;
  width: 16px; height: 1px;
  background: var(--gold);
  vertical-align: middle;
  margin-right: 8px;
}

.book-title {
  font-family: var(--font-serif);
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 500;
  color: var(--ink-strong);
  line-height: 1;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 144, "SOFT" 40;
}
.book-title-italic {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(28px, 3.2vw, 38px);
  color: var(--gold);
  letter-spacing: -0.02em;
  margin-top: 2px;
  font-variation-settings: "opsz" 144, "SOFT" 80;
}
.book-subtitle {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 300;
  font-size: 12px;
  color: var(--ink-muted);
  line-height: 1.35;
  margin-top: 14px;
  font-variation-settings: "opsz" 144, "SOFT" 70;
}

.book-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px 12px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}
.book-meta-item {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--ink-dim);
  letter-spacing: 0.04em;
  line-height: 1.5;
}
.book-meta-item span {
  color: var(--gold);
}

/* Code window on right page */
.code-window {
  background: #08070500;
  border: 1px solid rgba(216, 185, 126, 0.15);
  border-radius: 4px;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.6);
}

.code-window-header {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(216, 185, 126, 0.1);
  background: rgba(0, 0, 0, 0.3);
}

.code-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ink-faint);
}
.code-dot:nth-child(1) { background: rgba(198, 105, 82, 0.6); }
.code-dot:nth-child(2) { background: rgba(216, 185, 126, 0.5); }
.code-dot:nth-child(3) { background: rgba(135, 168, 124, 0.5); }

.code-filename {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--ink-dim);
  letter-spacing: 0.04em;
}

.code-content {
  font-family: var(--font-mono);
  font-size: 9.5px;
  line-height: 1.55;
  color: var(--ink);
  padding: 12px 14px;
  margin: 0;
  flex: 1;
  overflow: hidden;
  position: relative;
  white-space: pre;
  letter-spacing: -0.01em;
}

.code-cursor {
  display: inline-block;
  width: 5px;
  height: 11px;
  background: var(--gold);
  vertical-align: text-top;
  margin-top: 1px;
  animation: cursorBlink 1s steps(2) infinite;
}

@keyframes cursorBlink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.code-keyword  { color: #C66952; }
.code-string   { color: #87A87C; }
.code-comment  { color: var(--ink-faint); font-style: italic; }
.code-function { color: var(--gold); }
.code-type     { color: #B89060; }
.code-number   { color: #87A87C; }

/* Glow accent on book */
.book::after {
  content: "";
  position: absolute;
  inset: -20px;
  background: radial-gradient(ellipse 50% 80% at 100% 50%, rgba(216, 185, 126, 0.10), transparent 60%);
  pointer-events: none;
  z-index: -1;
  filter: blur(40px);
}

@media (max-width: 980px) {
  .book-stage { min-height: 360px; margin-top: 20px; }
  .book { max-width: 460px; height: 320px; transform: rotateX(6deg) rotateY(-10deg); }
  @keyframes bookFloat {
    0%, 100% { transform: rotateX(6deg) rotateY(-10deg) translateY(0); }
    50%      { transform: rotateX(4deg) rotateY(-8deg) translateY(-8px); }
  }
}

@media (max-width: 560px) {
  .book { height: 280px; max-width: 380px; }
  .code-content { font-size: 8px; }
  .book-title { font-size: 20px; }
  .book-title-italic { font-size: 26px; }
}
