/* ============================================================
   PNL Portfolio — Quant Research Desk
   Design system: dark default + light "research report" theme
   ============================================================ */

/* ---------- THEME TOKENS ---------- */
:root,
[data-theme="dark"] {
  --bg:        #0a0b0d;
  --bg-1:      #101216;   /* panels */
  --bg-2:      #15181d;   /* raised */
  --bg-inset:  #07080a;   /* sunken */
  --line:      #1f242b;   /* hairline */
  --line-2:    #2b313a;
  --fg:        #f3f5f7;
  --fg-dim:    #99a1ac;
  --fg-faint:  #5e6671;
  --accent:    #2fd39a;   /* refined emerald */
  --accent-2:  #25b886;
  --accent-ink:#04130d;
  --accent-soft: rgba(47,211,154,0.12);
  --accent-line: rgba(47,211,154,0.30);
  --up:        #2fd39a;
  --down:      #f0696a;
  --spy:       #707b8b;   /* muted slate for benchmark */
  --gold:      #d9b46a;
  --grid:      rgba(255,255,255,0.05);
  --shadow:    0 24px 60px rgba(0,0,0,0.55);
  --card-shadow: 0 1px 0 rgba(255,255,255,0.02);
}

[data-theme="light"] {
  --bg:        #f4f3ee;
  --bg-1:      #ffffff;
  --bg-2:      #fbfbf8;
  --bg-inset:  #f0efe9;
  --line:      #e4e3db;
  --line-2:    #d2d1c7;
  --fg:        #15171b;
  --fg-dim:    #5b626c;
  --fg-faint:  #969ca4;
  --accent:    #0f9e6c;
  --accent-2:  #0c855a;
  --accent-ink:#ffffff;
  --accent-soft: rgba(15,158,108,0.10);
  --accent-line: rgba(15,158,108,0.28);
  --up:        #0f9e6c;
  --down:      #d4504f;
  --spy:       #a7adb6;
  --gold:      #b08a32;
  --grid:      rgba(0,0,0,0.06);
  --shadow:    0 24px 60px rgba(40,40,30,0.12);
  --card-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html, body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  transition: background-color 0.4s ease, color 0.4s ease;
}
body { overflow-x: hidden; }
.mono { font-family: 'IBM Plex Mono', monospace; font-variant-numeric: tabular-nums; }
.disp { font-family: 'Space Grotesk', sans-serif; }
a { color: var(--accent); text-decoration: none; }
img { max-width: 100%; display: block; }
::selection { background: var(--accent-soft); color: var(--fg); }

/* ---------- LAYOUT ---------- */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 28px; }
section { padding: 104px 0; position: relative; }
.divider { border-top: 1px solid var(--line); }

.eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--accent);
  display: inline-flex; align-items: center; gap: 10px;
  margin-bottom: 22px;
}
.eyebrow::before {
  content: ''; width: 22px; height: 1px; background: var(--accent-line);
}
.h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: clamp(30px, 4.4vw, 52px);
  line-height: 1.04; letter-spacing: -0.03em;
  margin-bottom: 20px; max-width: 16ch;
  text-wrap: balance;
}
.h2 .mut { color: var(--fg-dim); }
.lede {
  font-size: clamp(16px, 1.5vw, 18px);
  color: var(--fg-dim); max-width: 60ch; line-height: 1.7;
}

/* ---------- TOP BAR ---------- */
.topbar {
  position: sticky; top: 0; z-index: 80;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 28px;
  height: 64px; display: flex; align-items: center; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 11px; font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 16px; letter-spacing: -0.01em; }
.brand .mark {
  width: 26px; height: 26px; border-radius: 7px;
  background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700; font-family: 'Space Grotesk', sans-serif;
  letter-spacing: -0.04em;
}
.brand b { font-weight: 600; }
.brand .sub { color: var(--fg-dim); font-weight: 400; }
.nav-links { display: flex; gap: 4px; margin-left: 18px; }
.nav-links a {
  color: var(--fg-dim); font-size: 13px; font-weight: 500;
  padding: 8px 12px; border-radius: 7px; transition: color .18s, background .18s;
  letter-spacing: 0.005em;
}
.nav-links a:hover { color: var(--fg); background: var(--bg-1); }
.spacer { flex: 1; }
.live-pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--fg-dim);
  padding: 5px 11px; border: 1px solid var(--line); border-radius: 100px;
  background: var(--bg-1);
}
.live-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent-line); animation: pulse 2s infinite; }
.live-pill b { color: var(--fg); font-weight: 500; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 var(--accent-line); }
  70% { box-shadow: 0 0 0 6px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.theme-toggle {
  width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--bg-1); color: var(--fg-dim); cursor: pointer;
  display: grid; place-items: center; transition: all .18s;
}
.theme-toggle:hover { color: var(--fg); border-color: var(--line-2); }
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .moon { display: none; }
[data-theme="light"] .theme-toggle .moon { display: block; }
[data-theme="light"] .theme-toggle .sun { display: none; }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 11px 18px; border-radius: 9px;
  font-family: 'IBM Plex Sans', sans-serif; font-weight: 600; font-size: 14px; letter-spacing: 0.005em;
  cursor: pointer; transition: all .18s ease; white-space: nowrap; border: 1px solid transparent;
}
.btn svg { width: 15px; height: 15px; stroke: currentColor; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-2); transform: translateY(-1px); box-shadow: 0 10px 26px var(--accent-soft); }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 8px 14px; font-size: 13px; }

/* ---------- HERO ---------- */
.hero { padding: 76px 0 64px; }
.hero-grid { display: grid; grid-template-columns: 1.02fr 0.98fr; gap: 56px; align-items: center; }
.badge {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 6px 13px 6px 11px; border: 1px solid var(--accent-line); border-radius: 100px;
  background: var(--accent-soft); color: var(--accent);
  font-family: 'IBM Plex Mono', monospace; font-size: 11px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 26px;
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.hero h1 {
  font-family: 'Space Grotesk', sans-serif; font-weight: 600;
  font-size: clamp(40px, 5.4vw, 68px); line-height: 1.0; letter-spacing: -0.04em;
  margin-bottom: 22px; text-wrap: balance;
}
.hero h1 .mut { color: var(--fg-dim); }
.hero-sub { font-size: clamp(15px, 1.5vw, 18px); color: var(--fg-dim); max-width: 50ch; line-height: 1.65; margin-bottom: 26px; }
.hero-actions { display: flex; gap: 11px; flex-wrap: wrap; margin-bottom: 28px; }
.trust { display: flex; gap: 20px; flex-wrap: wrap; }
.trust span { display: inline-flex; align-items: center; gap: 8px; font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--fg-dim); letter-spacing: 0.02em; }
.trust span::before { content: ''; width: 14px; height: 14px; border-radius: 50%; background: var(--accent-soft); border: 1px solid var(--accent-line); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232fd39a' stroke-width='3'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E"); background-size: 9px; background-repeat: no-repeat; background-position: center; }

/* ---------- CHART CARD ---------- */
.panel {
  background: var(--bg-1); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--card-shadow); overflow: hidden;
}
.panel-head {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 20px; border-bottom: 1px solid var(--line);
}
.panel-head .title { font-family: 'Space Grotesk', sans-serif; font-weight: 500; font-size: 14px; letter-spacing: -0.01em; }
.panel-head .meta { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--fg-faint); letter-spacing: 0.04em; }
.legend { display: flex; gap: 16px; margin-left: auto; }
.legend span { display: inline-flex; align-items: center; gap: 7px; font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--fg-dim); }
.legend span i { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
.legend .l-strat i { background: var(--accent); }
.legend .l-spy i { background: var(--spy); }
.chart-box { position: relative; padding: 18px 16px 12px; }
.chart-box canvas { display: block; width: 100%; }
.chart-foot {
  display: flex; gap: 0; border-top: 1px solid var(--line);
}
.chart-foot .cell { flex: 1; padding: 14px 20px; border-right: 1px solid var(--line); }
.chart-foot .cell:last-child { border-right: none; }
.chart-foot .k { font-family: 'IBM Plex Mono', monospace; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg-faint); margin-bottom: 6px; }
.chart-foot .v { font-family: 'Space Grotesk', sans-serif; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.chart-foot .v.up { color: var(--accent); }
.chart-foot .v.spy { color: var(--fg-dim); }

/* ---------- METRIC STRIP ---------- */
.metric-strip {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  background: var(--bg-1); margin-top: 40px;
}
.metric-strip .m { padding: 26px 24px; border-right: 1px solid var(--line); position: relative; }
.metric-strip .m:last-child { border-right: none; }
.metric-strip .m .k { font-family: 'IBM Plex Mono', monospace; font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--fg-faint); margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.metric-strip .m .v { font-family: 'Space Grotesk', sans-serif; font-size: clamp(30px, 3.6vw, 46px); font-weight: 600; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.metric-strip .m .v.up { color: var(--accent); }
.metric-strip .m .sub { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--fg-faint); margin-top: 10px; letter-spacing: 0.03em; }
.metric-strip .m .vs { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--fg-dim); margin-top: 6px; }
.metric-strip .m .vs b { color: var(--spy); font-weight: 500; }
.live-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); opacity: 0; transition: opacity .4s; }
.metric-strip.live .live-dot { opacity: 1; animation: pulse 2s infinite; }

/* ---------- STRATEGY ---------- */
.engine-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.engine {
  background: var(--bg-1); border: 1px solid var(--line); border-radius: 14px;
  padding: 30px; transition: border-color .25s, transform .25s;
}
.engine:hover { border-color: var(--line-2); transform: translateY(-2px); }
.engine .tag { font-family: 'IBM Plex Mono', monospace; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); margin-bottom: 18px; display: inline-flex; align-items: center; gap: 8px; }
.engine .tag.opt { color: var(--gold); }
.engine .ico { width: 42px; height: 42px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 18px; }
.engine.gold .ico { background: color-mix(in srgb, var(--gold) 14%, transparent); color: var(--gold); }
.engine .ico svg { width: 21px; height: 21px; }
.engine h3 { font-family: 'Space Grotesk', sans-serif; font-size: 23px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 8px; }
.engine .ehint { color: var(--fg-dim); font-size: 14px; margin-bottom: 20px; }
.engine ul { list-style: none; }
.engine ul li { padding: 9px 0 9px 24px; position: relative; color: var(--fg-dim); font-size: 14px; border-top: 1px solid var(--line); }
.engine ul li:first-child { border-top: none; }
.engine ul li::before { content: ''; position: absolute; left: 2px; top: 16px; width: 8px; height: 8px; border-radius: 2px; background: var(--accent-line); }
.engine.gold ul li::before { background: color-mix(in srgb, var(--gold) 40%, transparent); }
.callout {
  background: var(--bg-1); border: 1px solid var(--line); border-left: 2px solid var(--accent);
  border-radius: 12px; padding: 26px 30px; display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: start;
}
.callout .lbl { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 15px; color: var(--accent); white-space: nowrap; letter-spacing: -0.01em; }
.callout p { color: var(--fg-dim); font-size: 15px; line-height: 1.7; }
.callout p strong { color: var(--fg); font-weight: 600; }

/* ---------- PERFORMANCE ---------- */
.perf-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 36px; }
.perf-main { display: grid; grid-template-columns: 1.5fr 1fr; gap: 18px; align-items: start; }
.perf-left { display: flex; flex-direction: column; gap: 18px; }
.table-panel { background: var(--bg-1); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.ptable { width: 100%; border-collapse: collapse; }
.ptable thead th {
  text-align: right; padding: 13px 18px; font-family: 'IBM Plex Mono', monospace;
  font-size: 10px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--fg-faint); background: var(--bg-2); border-bottom: 1px solid var(--line);
}
.ptable thead th:first-child { text-align: left; }
.ptable tbody td { padding: 12px 18px; border-bottom: 1px solid var(--line); font-family: 'IBM Plex Mono', monospace; font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; }
.ptable tbody tr:last-child td { border-bottom: none; }
.ptable tbody tr:hover { background: var(--bg-2); }
.ptable .name { text-align: left; font-family: 'IBM Plex Sans', sans-serif; font-size: 13px; color: var(--fg); }
.ptable .s-val { color: var(--accent); font-weight: 600; }
.ptable .b-val { color: var(--fg-dim); }
.win-bar { display: inline-block; width: 100%; max-width: 120px; }

/* ---------- HOW IT WORKS ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--bg-1); }
.step { padding: 34px 30px; border-right: 1px solid var(--line); position: relative; }
.step:last-child { border-right: none; }
.step .num { font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--accent); letter-spacing: 0.1em; margin-bottom: 22px; display: flex; align-items: center; gap: 10px; }
.step .num::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.step h4 { font-family: 'Space Grotesk', sans-serif; font-size: 19px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 10px; }
.step p { color: var(--fg-dim); font-size: 14px; line-height: 1.65; }
.note { margin-top: 18px; font-family: 'IBM Plex Mono', monospace; font-size: 12.5px; color: var(--fg-faint); line-height: 1.7; padding: 16px 20px; border: 1px dashed var(--line-2); border-radius: 10px; }

/* ---------- PRICING ---------- */
.price-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.price-card { background: var(--bg-1); border: 1px solid var(--line); border-radius: 16px; padding: 34px; display: flex; flex-direction: column; }
.price-card.feature { border-color: var(--accent-line); box-shadow: 0 0 0 1px var(--accent-line), 0 24px 60px var(--accent-soft); }
.price-lbl { font-family: 'IBM Plex Mono', monospace; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); margin-bottom: 18px; display: flex; justify-content: space-between; align-items: center; }
.price-lbl .chip { background: var(--accent); color: var(--accent-ink); padding: 3px 9px; border-radius: 100px; font-size: 9px; letter-spacing: 0.1em; }
.price-amt { font-family: 'Space Grotesk', sans-serif; font-size: 60px; font-weight: 600; line-height: 1; letter-spacing: -0.04em; }
.price-amt .per { font-family: 'IBM Plex Mono', monospace; font-size: 14px; color: var(--fg-dim); font-weight: 400; letter-spacing: 0; }
.price-note { color: var(--fg-dim); font-size: 13px; margin: 10px 0 24px; }
.price-feats { list-style: none; flex: 1; margin-bottom: 24px; }
.price-feats li { padding: 11px 0 11px 26px; position: relative; color: var(--fg-dim); font-size: 14px; border-top: 1px solid var(--line); }
.price-feats li:first-child { border-top: none; }
.price-feats li::before { content: ''; position: absolute; left: 0; top: 13px; width: 15px; height: 15px; border-radius: 50%; background: var(--accent-soft); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232fd39a' stroke-width='3'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E"); background-size: 9px; background-repeat: no-repeat; background-position: center; }
.price-eg { background: var(--bg-inset); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; margin-bottom: 24px; font-size: 13px; color: var(--fg-dim); line-height: 1.65; }
.price-eg strong { color: var(--fg); }

/* ---------- BOOK ---------- */
.book-grid { display: grid; grid-template-columns: 300px 1fr; gap: 56px; align-items: center; }
.book-cover { position: relative; }
.book-cover img { border-radius: 6px; box-shadow: var(--shadow), 0 0 0 1px var(--line); }
.book-cover::after { content: ''; position: absolute; inset: 0; border-radius: 6px; box-shadow: inset 4px 0 14px rgba(0,0,0,0.25); pointer-events: none; }
.book h3 { font-family: 'Space Grotesk', sans-serif; font-size: clamp(26px, 3.4vw, 38px); font-weight: 600; line-height: 1.12; letter-spacing: -0.025em; margin-bottom: 18px; }
.book > p { color: var(--fg-dim); font-size: 16px; line-height: 1.7; margin-bottom: 24px; max-width: 56ch; }
.book-feats { display: grid; gap: 9px; margin-bottom: 28px; }
.book-feat { padding: 13px 16px; background: var(--bg-1); border: 1px solid var(--line); border-radius: 9px; font-size: 13.5px; color: var(--fg); display: flex; align-items: center; gap: 12px; }
.book-feat::before { content: ''; width: 6px; height: 6px; border-radius: 1px; background: var(--gold); flex-shrink: 0; }

/* ---------- ABOUT ---------- */
.about-grid { display: grid; grid-template-columns: 280px 1fr; gap: 56px; align-items: start; }
.about-photo img { border-radius: 14px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.about-meta { margin-top: 18px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-1); }
.about-meta .row { display: flex; justify-content: space-between; padding: 7px 0; font-family: 'IBM Plex Mono', monospace; font-size: 12px; }
.about-meta .row .k { color: var(--fg-faint); }
.about-meta .row .v { color: var(--fg); }
.about h3 { font-family: 'Space Grotesk', sans-serif; font-size: clamp(28px, 3.6vw, 40px); font-weight: 600; letter-spacing: -0.025em; line-height: 1.05; margin-bottom: 4px; }
.about .role { font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--accent); letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 24px; }
.about p { color: var(--fg-dim); font-size: 15.5px; line-height: 1.78; margin-bottom: 16px; max-width: 62ch; }
.about p em { color: var(--fg); font-style: italic; }

/* ---------- CTA ---------- */
.cta {
  position: relative; overflow: hidden;
  border: 1px solid var(--line); border-radius: 20px;
  padding: 72px 40px; text-align: center; background: var(--bg-1);
}
.cta-bg { position: absolute; inset: 0; opacity: 0.5; pointer-events: none; }
.cta h2 { position: relative; font-family: 'Space Grotesk', sans-serif; font-size: clamp(30px, 4.4vw, 50px); font-weight: 600; line-height: 1.05; letter-spacing: -0.03em; margin-bottom: 14px; }
.cta p { position: relative; color: var(--fg-dim); font-size: 16px; margin-bottom: 30px; max-width: 48ch; margin-left: auto; margin-right: auto; }
.cta-actions { position: relative; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- FOOTER ---------- */
footer { border-top: 1px solid var(--line); padding: 56px 0 36px; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 36px; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.foot-brand .ftag { color: var(--fg-dim); font-size: 13.5px; margin-top: 12px; max-width: 36ch; line-height: 1.6; }
.foot-col h5 { font-family: 'IBM Plex Mono', monospace; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--fg-faint); margin-bottom: 14px; }
.foot-col a { display: block; color: var(--fg-dim); font-size: 14px; padding: 6px 0; transition: color .18s; }
.foot-col a:hover { color: var(--accent); }
.foot-bottom { padding-top: 26px; font-size: 12px; color: var(--fg-faint); line-height: 1.7; max-width: 92ch; }
.foot-bottom a { color: var(--accent); }
.foot-legal { margin-top: 14px; }

/* ---------- REVEAL (visible by default; JS adds .anim-on to enable entrance) ---------- */
.reveal { opacity: 1; }
html.anim-on .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.22,.61,.36,1), transform .7s cubic-bezier(.22,.61,.36,1); }
html.anim-on .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html.anim-on .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 980px) {
  section { padding: 72px 0; }
  .hero-grid { grid-template-columns: 1fr; gap: 38px; }
  .hero { padding: 48px 0; }
  .perf-main { grid-template-columns: 1fr; }
  .engine-grid, .price-grid { grid-template-columns: 1fr; }
  .book-grid, .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .book-cover { max-width: 240px; }
  .about-photo { max-width: 260px; }
  .callout { grid-template-columns: 1fr; gap: 12px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr; }
  .step { border-right: none; border-bottom: 1px solid var(--line); }
  .step:last-child { border-bottom: none; }
}
@media (max-width: 680px) {
  .wrap { padding: 0 18px; }
  .nav-links, .topbar .live-pill { display: none; }
  .metric-strip { grid-template-columns: 1fr 1fr; }
  .metric-strip .m:nth-child(2) { border-right: none; }
  .metric-strip .m:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .chart-foot { flex-wrap: wrap; }
  .chart-foot .cell { flex: 1 1 50%; border-bottom: 1px solid var(--line); }
  .foot-grid { grid-template-columns: 1fr; }
  .hero-actions .btn { flex: 1; justify-content: center; }
}
