:root {
  color-scheme: light;
  --brand-blue: #1863d8;
  --brand-violet: #7946e6;
  --brand-grad: linear-gradient(135deg, #1863d8 0%, #7946e6 100%);
  --ink: #0b1020;
  --ink-soft: #475069;
  --line: #e4e9f2;
  --surface: #ffffff;
  --surface-tint: #f5f8ff;
  --surface-blue: #eef3fe;
  --paper: #ffffff;
  --page-bg: #eef1f6;
  --shadow-sm: 0 1px 2px rgba(11, 16, 32, .04), 0 8px 24px rgba(24, 99, 216, .06);
  --shadow-md: 0 20px 50px rgba(24, 99, 216, .10);
  --radius: 16px;
  --radius-sm: 12px;
  --font-display: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--page-bg);
  overflow-x: clip;
}

body {
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }

a { color: inherit; }

h1, h2, h3 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  line-height: 1.04;
  margin: 0;
}

code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--surface-blue);
  border-radius: 6px;
  padding: 0.08em 0.36em;
  color: #143a8a;
}

/* the content sits on an elevated white sheet, lifted off the tinted page */
.page {
  --page-pad: 36px;
  --page-pad-b: 64px;
  width: min(100%, 1160px);
  margin: 22px auto 52px;
  padding: 0 var(--page-pad) var(--page-pad-b);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(11, 16, 32, .04), 0 30px 70px rgba(11, 16, 32, .07);
}

/* ---------- eyebrow ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.eyebrow-rule {
  width: 30px;
  height: 2px;
  border-radius: 2px;
  background: var(--line-strong, #c9ced8);
}
.eyebrow-light { color: rgba(255, 255, 255, .92); }
.eyebrow-light .eyebrow-rule { background: rgba(255, 255, 255, .85); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 26px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}
.btn-primary {
  color: #fff;
  background: var(--brand-grad);
  box-shadow: 0 12px 30px rgba(24, 99, 216, .28);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 40px rgba(24, 99, 216, .36); }
.btn-ghost {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-on-dark {
  color: var(--brand-blue);
  background: #fff;
  box-shadow: 0 12px 30px rgba(11, 16, 32, .22);
}
.btn-on-dark:hover { transform: translateY(-2px); box-shadow: 0 18px 42px rgba(11, 16, 32, .3); }

/* ---------- topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  width: min(100%, 1160px);
  margin-inline: auto;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brandmark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.02rem;
}
.brandmark-logo { height: 22px; width: auto; display: block; }
.brandmark-sep { color: var(--line); font-weight: 500; }
.brandmark-product { color: var(--ink-soft); font-weight: 600; }
.topnav { display: flex; align-items: center; gap: 22px; font-family: var(--font-display); font-weight: 600; }
.topnav a { text-decoration: none; color: var(--ink-soft); }
.topnav a:hover { color: var(--ink); }
.topnav-cta {
  color: #fff !important;
  background: var(--brand-grad);
  padding: 9px 18px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(24, 99, 216, .26);
}
.topnav-cta:hover { color: #fff; }

/* ---------- hero (graphic first, then copy) ---------- */
.hero { display: block; padding: 60px 0 56px; }
.hero-figure { margin: 44px 0 0; }
.hero-copy { max-width: none; }
.hero h1 {
  font-size: clamp(2.5rem, 5vw, 3.9rem);
  font-weight: 800;
  margin: 0 0 18px;
}
.lede {
  max-width: none;
  margin: 0 0 28px;
  color: var(--ink-soft);
  font-size: 1.16rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 34px 0 0; }

/* ---------- illustration plate (seamless white + editorial chrome) ---------- */
.plate {
  position: relative;
  display: block;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.plate img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: contain; padding: 40px; }
.plate::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--brand-grad);
}
.plate[data-fig]::after {
  content: attr(data-fig);
  position: absolute;
  top: 15px; left: 20px;
  font-family: "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--ink-soft);
  opacity: 0.5;
}
.hero-figure .plate { border: none; background: transparent; box-shadow: none; border-radius: 0; }
.hero-figure .plate::before { display: none; }
.hero-figure .plate img { padding: 0; }
.hero-figure figcaption {
  margin-top: 14px;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* ---------- stats (one elevated bar, divided) ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 16px 0 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(11, 16, 32, .04), 0 22px 50px rgba(11, 16, 32, .10);
  overflow: hidden;
}
.stat {
  padding: 26px 28px;
  border-left: 1px solid var(--line);
}
.stat:first-child { border-left: none; }
.stat-num {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.1rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.05;
}
.stat-label { margin-top: 4px; color: var(--ink-soft); font-size: 0.92rem; }

/* ---------- guides grid ---------- */
.guides { padding: 70px 0 20px; }
.section-head { max-width: 720px; margin-bottom: 38px; }
.section-head h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); font-weight: 800; }

.chip {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  padding: 6px 13px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.guide-list { display: flex; flex-direction: column; }
.guide-row {
  display: grid;
  grid-template-columns: 0.6fr 1.4fr;
  gap: 48px;
  align-items: center;
  padding: 66px 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
}
.guide-row:last-child { border-bottom: 1px solid var(--line); }
.guide-row-text { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.guide-row-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.guide-row-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.7rem, 2.6vw, 2.35rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  transition: color .18s ease;
}
.guide-row-title { text-decoration: none; color: inherit; }
.guide-row-title:hover { text-decoration: underline; text-underline-offset: 3px; }
.guide-row-desc { color: var(--ink-soft); font-size: 1.08rem; max-width: 46ch; }
.guide-row-actions { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-top: 6px; }
.guide-row-link { font-family: var(--font-display); font-weight: 700; color: var(--ink); text-decoration: none; }
.guide-row-link span { display: inline-block; transition: transform .18s ease; }
.guide-row:hover .guide-row-link span { transform: translateX(4px); }
.guide-row-slideshow {
  appearance: none;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: color .18s ease;
}
.guide-row-slideshow span { font-size: 0.72em; }
.guide-row-slideshow:hover { color: var(--ink); }
.guide-row-media {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  transition: transform .25s ease;
}
.guide-row-media img { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; padding: 0; }
.guide-row:hover .guide-row-media { transform: translateY(-4px); }

/* ---------- slideshow (in-place carousel) ---------- */
.slideshow[hidden] { display: none; }
.slideshow {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.slideshow-backdrop { position: absolute; inset: 0; background: rgba(11, 16, 32, .55); backdrop-filter: blur(4px); }
.slideshow-dialog {
  position: relative;
  z-index: 1;
  width: min(96vw, 1500px);
  max-height: calc(100dvh - 28px);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(11, 16, 32, .45);
}
.slideshow-close {
  position: absolute;
  top: 14px; right: 16px;
  z-index: 2;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.slideshow-close:hover { color: var(--ink); border-color: var(--ink-soft); }
.slideshow-stage { display: grid; grid-template-columns: 1.6fr 0.8fr; min-height: 0; flex: 1; }
.slideshow-figure { background: #fff; display: flex; align-items: center; justify-content: center; padding: 28px; }
.slideshow-figure img { width: 100%; max-height: 82vh; object-fit: contain; }
.slideshow-text { background: #f5f6f8; padding: 56px 48px; overflow-y: auto; }
.ss-kicker {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.ss-num { color: var(--ink); }
.slideshow-text h2 { font-size: clamp(1.5rem, 2.4vw, 2.1rem); font-weight: 800; margin: 0 0 14px; }
.ss-caption { margin: 0 0 14px; color: var(--ink); font-size: 1.14rem; line-height: 1.5; }
.ss-why { margin-top: 18px; color: var(--ink-soft); font-size: 1.02rem; }
.slideshow-text .btn { margin-top: 8px; }
.slideshow-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 22px;
  border-top: 1px solid var(--line);
}
.slideshow-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 9px 18px;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
}
.slideshow-btn:hover:not(:disabled) { border-color: var(--ink); }
.slideshow-btn:disabled { opacity: .4; cursor: default; }
.slideshow-count { font-family: var(--font-display); font-weight: 700; color: var(--ink-soft); font-size: 0.92rem; }
body.slideshow-open { overflow: hidden; }
@media (max-width: 720px) {
  .slideshow { padding: 0; }
  .slideshow-dialog { width: 100%; max-height: 100dvh; border-radius: 0; }
  .slideshow-stage { grid-template-columns: 1fr; }
  .slideshow-figure { padding: 18px; }
  .slideshow-figure img { max-height: 38vh; }
  .slideshow-text { padding: 26px 22px; }
}

/* ---------- closing cta band (index) — flush to the sheet bottom ---------- */
.cta-band { margin: 70px 0 calc(-1 * var(--page-pad-b)); }
.cta-band-inner {
  position: relative;
  overflow: hidden;
  margin: 0 calc(-1 * var(--page-pad));
  border-radius: 0;
  padding: 72px var(--page-pad);
  color: #fff;
  background: var(--brand-grad);
}
.cta-band-inner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(900px 320px at 85% -10%, rgba(255,255,255,.18), transparent 60%);
  pointer-events: none;
}
.cta-band-inner h2 { font-size: clamp(2rem, 3.6vw, 2.9rem); font-weight: 800; margin-bottom: 14px; }
.cta-band-inner p { max-width: 560px; margin: 0 0 28px; color: rgba(255,255,255,.92); font-size: 1.1rem; }

/* ---------- reader (single unified column) ---------- */
.reader { width: min(100%, 1120px); }
.crumbs {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 30px 0 8px;
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
}
.crumbs a { text-decoration: none; color: var(--ink); }
.crumbs a:hover { text-decoration: underline; }

.reader-hero { padding: 26px 0 50px; border-bottom: 1px solid var(--line); }
.reader-hero h1 {
  font-size: clamp(2.3rem, 5vw, 3.7rem);
  font-weight: 800;
  margin: 18px 0 0;
}
.reader-intro { max-width: none; margin-top: 22px; }
.reader-intro p { margin: 0 0 14px; color: var(--ink-soft); font-size: 1.18rem; }
.reader-intro p:last-child { margin-bottom: 0; }
.reader-meta {
  margin: 26px 0 0;
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}

/* ---------- chapters (running story — one column, illustration-first) ---------- */
.story-flow { max-width: 100%; padding-top: 16px; }
.chapter { padding: 0 0 86px; scroll-margin-top: 84px; }
.chapter-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 14px; }
.chapter-num {
  flex: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 3.4vw, 2.7rem);
  line-height: 1;
  letter-spacing: -0.01em;
  color: rgba(11, 16, 32, .16);
}
.chapter h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); font-weight: 800; }
.chapter-caption { margin: 0; color: var(--ink); font-size: 1.24rem; line-height: 1.5; }
.chapter-why {
  margin: 22px 0 0;
  padding: 0;
  color: var(--ink-soft);
  font-size: 1.04rem;
}
.why-label {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  opacity: 0.75;
  margin-bottom: 4px;
}
.chapter-body { margin-top: 16px; color: var(--ink-soft); font-size: 1.06rem; }
.chapter-body p { margin: 0 0 14px; }
/* illustrations run frameless — no card, no padding — so the graphic gets all the room */
.chapter-figure { margin: 36px 0 6px; }
.chapter-figure .plate {
  border: none;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  overflow: visible;
}
.chapter-figure .plate::before { display: none; }
.chapter-figure .plate[data-fig]::after { display: none; }
.chapter-figure .plate img { padding: 0; border-radius: 8px; }

/* ---------- article CTA (stands out) ---------- */
.story-cta {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 30px;
  margin: 64px calc(-1 * var(--page-pad)) 0;
  padding: 56px var(--page-pad) 52px;
  border-radius: 0;
  color: #fff;
  background: var(--brand-grad);
}
.story-cta::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(800px 300px at 90% -20%, rgba(255,255,255,.2), transparent 60%);
  pointer-events: none;
}
.story-cta-copy { position: relative; z-index: 1; }
.story-cta-copy h2 { font-size: clamp(1.8rem, 3.2vw, 2.5rem); font-weight: 800; margin-bottom: 14px; }
.story-cta-copy p { margin: 0 0 14px; color: rgba(255,255,255,.92); font-size: 1.08rem; max-width: 64ch; }
.story-cta-copy p:last-of-type { margin-bottom: 26px; }
.story-cta-figure { position: relative; z-index: 1; margin: 0; }
.story-cta-figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #fff;
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 18px 44px rgba(11,16,32,.28);
}

/* ---------- pager ---------- */
.pager-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  padding: 44px 0 10px;
}
.pager {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  text-decoration: none;
  background: var(--surface);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.pager:hover { border-color: var(--ink); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.pager-next { text-align: right; align-items: flex-end; }
.pager-dir { font-family: var(--font-display); font-weight: 700; font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); }
.pager-title { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }

/* ---------- footer ---------- */
.site-footer { background: transparent; margin-top: 8px; }
.footer-inner {
  width: min(100%, 1160px);
  margin-inline: auto;
  padding: 40px 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
}
.footer-brand { display: inline-flex; align-items: center; }
.footer-brand .brandmark-logo { height: 24px; }
.footer-tagline { margin: 0; color: var(--ink-soft); flex: 1; min-width: 220px; }
.footer-nav { display: flex; gap: 22px; font-family: var(--font-display); font-weight: 600; }
.footer-nav a { color: var(--ink-soft); text-decoration: none; }
.footer-nav a:hover { color: var(--ink); }

/* ---------- reveal motion ---------- */
.reveal-on [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal-on [data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero { padding: 40px 0 44px; }
  .hero-figure { margin-top: 32px; }
  .guide-row { grid-template-columns: 1fr; gap: 30px; padding: 50px 0; }
  .guide-row-media { order: -1; }
  .chapter { padding-bottom: 64px; }
  .chapter-figure { margin-top: 34px; }
  .story-cta { padding: 44px 40px; }
}

@media (max-width: 680px) {
  .page { --page-pad: 18px; --page-pad-b: 36px; margin: 0; padding: 0 var(--page-pad) var(--page-pad-b); border-radius: 0; border-left: none; border-right: none; box-shadow: none; }
  .topbar-inner { padding: 12px 18px; }
  .brandmark-product, .brandmark-sep { display: none; }
  .topnav { gap: 14px; }
  .topnav > a:not(.topnav-cta) { display: none; }
  .topnav-cta { padding: 8px 15px; font-size: 0.92rem; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: none; }
  .stat:nth-child(3), .stat:nth-child(4) { border-top: 1px solid var(--line); }
  .stat { padding: 22px 22px; }
  .hero h1 { font-size: clamp(2.2rem, 9vw, 2.9rem); }
  .guide-row { padding: 40px 0; }
  .chapter-caption { font-size: 1.14rem; }
  .story-cta { gap: 26px; padding: 40px var(--page-pad); }
  .story-cta-figure img { padding: 14px; }
  .cta-band-inner { padding: 48px var(--page-pad); }
  .pager-row { grid-template-columns: 1fr; }
  .pager-next { text-align: left; align-items: flex-start; }
}

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