/* ============================================================
   Chronicle — chronicle.tanujrajput.com
   Built on the Ditto style reference (sunlit, organic, serif-led)
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  /* Colors */
  --color-deep-ink: #130e30;
  --color-hi-yellow: #ffe228;
  --color-moss-green: #59e25d;
  --color-fuchsia: #e261e5;
  --color-slate: #5f5c6e;
  --color-canvas: #f9fbf2;
  --color-soft-meadow: #eff2e5;
  --color-charcoal: #222222;
  --color-onyx: #000000;

  /* Typography — families */
  --font-hedvig-letters-serif: 'Hedvig Letters Serif', ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  --font-inter: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  /* Typography — scale */
  --text-caption: 10px;      --leading-caption: 1.2;      --tracking-caption: -0.2px;
  --text-body-sm: 14px;      --leading-body-sm: 1.5;      --tracking-body-sm: -0.14px;
  --text-body: 16px;         --leading-body: 1.5;         --tracking-body: -0.16px;
  --text-subheading: 18px;   --leading-subheading: 1.5;   --tracking-subheading: -0.18px;
  --text-heading-sm: 22px;   --leading-heading-sm: 1.25;  --tracking-heading-sm: -0.22px;
  --text-heading: 32px;      --leading-heading: 1.15;     --tracking-heading: -0.32px;
  --text-heading-lg: 48px;   --leading-heading-lg: 1.1;   --tracking-heading-lg: -0.48px;
  --text-display: 64px;      --leading-display: 1;        --tracking-display: -0.64px;

  /* Weights */
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /* Spacing */
  --spacing-8: 8px;   --spacing-16: 16px; --spacing-24: 24px; --spacing-32: 32px;
  --spacing-48: 48px; --spacing-64: 64px; --spacing-96: 96px;

  /* Layout */
  --page-max-width: 1200px;
  --page-gutter: 24px;

  /* Radius */
  --radius-cards: 24px;
  --radius-full: 1440px;

  /* Surfaces */
  --surface-canvas: #f9fbf2;
  --surface-soft-meadow: #eff2e5;
  --surface-hi-yellow-accent: #ffe228;
  --surface-deep-ink: #130e30;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--surface-canvas);
  color: var(--color-deep-ink);
  font-family: var(--font-inter);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  letter-spacing: var(--tracking-body);
  font-feature-settings: "ss01" on, "cv11" on;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-hedvig-letters-serif);
  font-weight: var(--font-weight-bold);
  color: var(--color-deep-ink);
  letter-spacing: -0.01em;
  margin: 0;
}
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--color-deep-ink);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--color-hi-yellow); color: var(--color-deep-ink); }

/* ---------- Primitives ---------- */
.wrap {
  width: 100%;
  max-width: var(--page-max-width);
  margin-inline: auto;
  padding-inline: var(--page-gutter);
}

.eyebrow {
  font-family: var(--font-inter);
  font-size: 11px;
  font-weight: var(--font-weight-medium);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-slate);
  margin: 0;
}
.eyebrow--ink { color: var(--color-deep-ink); }

.lead {
  font-size: var(--text-subheading);
  line-height: 1.55;
  letter-spacing: var(--tracking-subheading);
  color: var(--color-slate);
  max-width: 62ch;
}

.section {
  padding-block: clamp(56px, 9vw, 96px);
  position: relative;
}
.section--meadow { background: var(--surface-soft-meadow); }
.section--ink { background: var(--surface-deep-ink); color: var(--color-canvas); }
.section--ink h2, .section--ink h3 { color: var(--color-canvas); }

.section-head { max-width: 720px; margin-bottom: var(--spacing-48); }
.section-head h2 {
  font-size: clamp(30px, 4.4vw, var(--text-heading-lg));
  line-height: 1.08;
  margin-top: 14px;
}
.section-head .lead { margin-top: 18px; }

.rule { height: 1px; background: rgba(19, 14, 48, 0.1); border: 0; margin: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-inter);
  font-size: var(--text-body);
  font-weight: var(--font-weight-medium);
  letter-spacing: -0.01em;
  border-radius: var(--radius-full);
  padding: 12px 24px;
  white-space: nowrap;
  transition: transform 180ms cubic-bezier(.2,.7,.3,1), background-color 180ms ease, color 180ms ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary { background: var(--color-hi-yellow); color: var(--color-deep-ink); }
.btn--primary:hover { background: #ffea63; }

.btn--dark { background: var(--color-deep-ink); color: #ffffff; padding: 12px 22px; }
.btn--dark:hover { background: #241d4d; }

.btn--ghost {
  background: transparent;
  color: var(--color-deep-ink);
  border: 1px solid rgba(19, 14, 48, 0.18);
}
.btn--ghost:hover { background: rgba(19, 14, 48, 0.05); }

.btn--sm { font-size: var(--text-body-sm); padding: 9px 18px; }

.btn .arw { transition: transform 200ms cubic-bezier(.2,.7,.3,1); }
.btn:hover .arw { transform: translateX(3px); }

/* ---------- Tags ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: var(--radius-full);
  padding: 6px 14px;
  font-size: 12px;
  font-weight: var(--font-weight-medium);
  letter-spacing: 0.02em;
  background: rgba(19, 14, 48, 0.06);
  color: var(--color-deep-ink);
}
.tag--yellow { background: var(--color-hi-yellow); color: var(--color-deep-ink); }
.tag--outline { background: transparent; border: 1px solid rgba(19, 14, 48, 0.16); color: var(--color-slate); }
.tag .dot { width: 6px; height: 6px; border-radius: var(--radius-full); background: currentColor; opacity: .55; }

/* ============================================================
   Nav
   ============================================================ */
.nav-shell {
  position: sticky;
  top: 0;
  z-index: 60;
  padding-block: 14px;
  background: linear-gradient(to bottom, var(--surface-canvas) 62%, transparent);
  transition: padding 220ms ease;
}
.nav {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface-soft-meadow);
  border-radius: var(--radius-full);
  padding: 10px 10px 10px 22px;
  transition: box-shadow 240ms ease, background-color 240ms ease;
}
.nav-shell.is-stuck .nav {
  box-shadow: 0 1px 0 rgba(19,14,48,.08), 0 10px 30px -18px rgba(19,14,48,.4);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-hedvig-letters-serif);
  font-weight: var(--font-weight-bold);
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--color-onyx);
}
.logo .mark { width: 25px; height: 25px; flex: none; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-inline: auto;
}
.nav-links a {
  font-size: 15px;
  font-weight: var(--font-weight-medium);
  color: var(--color-deep-ink);
  padding: 8px 14px;
  border-radius: var(--radius-full);
  transition: background-color 160ms ease;
}
.nav-links a:hover { background: rgba(19, 14, 48, 0.06); }

.nav-cta { display: flex; align-items: center; gap: 8px; }

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  border-radius: var(--radius-full);
  background: var(--color-deep-ink);
  color: #fff;
  align-items: center;
  justify-content: center;
}

/* ============================================================
   Hero
   ============================================================ */
.hero { position: relative; padding-block: clamp(40px, 6vw, 72px) clamp(56px, 8vw, 96px); overflow: hidden; }

.blobs {
  position: absolute;
  inset: -14% -4% auto 0;
  height: 118%;
  opacity: .9;
  z-index: 0;
  pointer-events: none;
}
.blobs svg { width: 100%; height: 100%; }
.blobs .blob { transform-box: fill-box; transform-origin: center; }
@media (prefers-reduced-motion: no-preference) {
  .blobs .blob { animation: drift 26s ease-in-out infinite; }
  .blobs .blob:nth-child(2) { animation-duration: 32s; animation-delay: -6s; }
  .blobs .blob:nth-child(3) { animation-duration: 29s; animation-delay: -12s; }
  .blobs .blob:nth-child(4) { animation-duration: 35s; animation-delay: -3s; }
}
@keyframes drift {
  0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); }
  33%      { transform: translate(14px, -18px) rotate(4deg) scale(1.04); }
  66%      { transform: translate(-12px, 12px) rotate(-3deg) scale(.97); }
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.hero-copy h1 {
  font-size: clamp(34px, 4.2vw, 54px);
  line-height: 1.06;
  text-wrap: balance;
  margin-top: 18px;
}
.hero-copy h1 .muted { color: var(--color-slate); font-weight: var(--font-weight-regular); }
.hero-copy .lead { margin-top: 22px; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 30px;
}

/* Install capsule — echoes the email-input pattern */
.capsule {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  border: 1px solid var(--color-onyx);
  border-radius: var(--radius-full);
  padding: 6px 6px 6px 20px;
  max-width: 100%;
}
.capsule code {
  min-width: 0;
  flex: 1 1 auto;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: -0.01em;
  color: var(--color-deep-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.capsule .prompt { color: var(--color-slate); user-select: none; flex: none; }
.capsule .copy { flex: none; }

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-top: 26px;
  font-size: var(--text-body-sm);
  color: var(--color-slate);
}
.hero-proof li { display: inline-flex; align-items: center; gap: 8px; }
@media (max-width: 620px) { .hero-proof { flex-direction: column; gap: 8px; } }
.hero-proof .tick { color: var(--color-deep-ink); flex: none; }

/* Nothing may push the page wider than the viewport. */
.hero-grid > *, .story > *, .cards > *, .ideas > *, .steps > *,
.statband .grid > *, .footer-grid > *, .hooks > * { min-width: 0; }
.terminal, .table-wrap, .codeblock, .brief-sample, .tabpanel { max-width: 100%; }

/* ---------- Terminal ---------- */
.terminal {
  background: var(--surface-deep-ink);
  border-radius: var(--radius-cards);
  overflow: hidden;
  color: #e9e7f4;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.72;
  letter-spacing: -0.01em;
}
.hero-visual .terminal { box-shadow: 0 40px 80px -50px rgba(19, 14, 48, .75); }

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.05);
}
.terminal-bar .lights { display: flex; gap: 6px; }
.terminal-bar .lights i { width: 9px; height: 9px; border-radius: var(--radius-full); background: rgba(255,255,255,.2); }
.terminal-bar .title {
  font-family: var(--font-inter);
  font-size: 11px;
  font-weight: var(--font-weight-medium);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(233, 231, 244, .5);
  margin-inline: auto;
}
.terminal-body { padding: 20px 22px 24px; overflow-x: auto; }
.terminal-body pre { margin: 0; font: inherit; white-space: pre; }

.t-prompt { color: rgba(233,231,244,.42); }
.t-cmd    { color: var(--color-hi-yellow); }
.t-dim    { color: rgba(233,231,244,.45); }
.t-key    { color: #ffffff; font-weight: 500; }
.t-hi     { background: rgba(255, 226, 40, .22); color: var(--color-hi-yellow); border-radius: 3px; padding: 0 3px; }
.t-rule   { color: rgba(233,231,244,.18); }

.caret {
  display: inline-block;
  width: 8px; height: 15px;
  background: var(--color-hi-yellow);
  vertical-align: -2px;
  margin-left: 2px;
}
@media (prefers-reduced-motion: no-preference) {
  .caret { animation: blink 1.05s steps(2, start) infinite; }
}
@keyframes blink { to { visibility: hidden; } }

/* ============================================================
   Stat band
   ============================================================ */
.statband { background: var(--surface-soft-meadow); padding-block: clamp(36px, 5vw, 56px); }
.statband .grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}
.stat .n {
  font-family: var(--font-hedvig-letters-serif);
  font-weight: var(--font-weight-bold);
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1;
  letter-spacing: -0.02em;
  display: block;
}
.stat .l {
  display: block;
  margin-top: 10px;
  font-size: var(--text-body-sm);
  color: var(--color-slate);
  max-width: 24ch;
}

/* ============================================================
   The 221 — feature story
   ============================================================ */
.story {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.story--flip .story-copy { order: 2; }
.story-copy h2 {
  font-size: clamp(28px, 3.8vw, 42px);
  line-height: 1.1;
  margin-top: 14px;
}
.story-copy .lead { margin-top: 18px; }
.story-copy .btn { margin-top: 26px; }

.pullquote {
  margin-top: 26px;
  padding-left: 20px;
  border-left: 3px solid var(--color-hi-yellow);
  font-family: var(--font-hedvig-letters-serif);
  font-size: var(--text-heading-sm);
  line-height: 1.35;
  color: var(--color-deep-ink);
}

.story--wide { grid-template-columns: minmax(0, .68fr) minmax(0, 1.32fr); }
@media (max-width: 1000px) { .story--wide { grid-template-columns: 1fr; } }

/* ============================================================
   Feature tabs
   ============================================================ */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}
.tab {
  border-radius: var(--radius-full);
  padding: 9px 18px;
  font-size: var(--text-body-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-slate);
  background: transparent;
  border: 1px solid rgba(19, 14, 48, 0.14);
  transition: all 180ms ease;
}
.tab:hover { color: var(--color-deep-ink); border-color: rgba(19,14,48,.3); }
.tab[aria-selected="true"] {
  background: var(--color-deep-ink);
  border-color: var(--color-deep-ink);
  color: #ffffff;
}

.tabpanel[hidden] { display: none; }
.tabpanel { animation: fadeUp 320ms cubic-bezier(.2,.7,.3,1); }
@media (prefers-reduced-motion: reduce) { .tabpanel { animation: none; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.tab-note {
  margin-top: 18px;
  font-size: var(--text-body-sm);
  color: var(--color-slate);
  max-width: 70ch;
}

/* ============================================================
   Cards
   ============================================================ */
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.cards--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card {
  background: var(--surface-soft-meadow);
  border-radius: var(--radius-cards);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.section--meadow .card { background: var(--surface-canvas); }
.card .idx {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-slate);
  letter-spacing: 0.06em;
}
.card .ic {
  width: 40px; height: 40px;
  border-radius: var(--radius-full);
  background: var(--color-deep-ink);
  color: var(--color-hi-yellow);
  display: grid;
  place-items: center;
  margin-bottom: 6px;
}
.card h3 { font-size: var(--text-heading-sm); line-height: var(--leading-heading-sm); }
.card p { font-size: var(--text-body); color: var(--color-slate); }
.card code {
  font-family: var(--font-mono);
  font-size: 13px;
  background: rgba(19, 14, 48, .07);
  border-radius: 6px;
  padding: 2px 6px;
  color: var(--color-deep-ink);
}

/* Idea cards — numbered, larger */
.ideas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.idea {
  background: var(--surface-canvas);
  border-radius: var(--radius-cards);
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.section:not(.section--meadow) .idea { background: var(--surface-soft-meadow); }
.idea .num {
  width: 40px; height: 40px;
  border-radius: var(--radius-full);
  background: var(--color-hi-yellow);
  color: var(--color-deep-ink);
  display: grid;
  place-items: center;
  font-family: var(--font-hedvig-letters-serif);
  font-weight: var(--font-weight-bold);
  font-size: 18px;
}
.idea h3 { font-size: var(--text-heading-sm); line-height: var(--leading-heading-sm); }
.idea p { color: var(--color-slate); }
.idea .fact {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(19,14,48,.1);
  font-size: var(--text-body-sm);
  color: var(--color-deep-ink);
}
.idea .fact strong { font-weight: var(--font-weight-semibold); }

/* ============================================================
   Tables
   ============================================================ */
.table-wrap { overflow-x: auto; border-radius: var(--radius-cards); }
table.t {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-body-sm);
  min-width: 560px;
  background: var(--surface-soft-meadow);
  border-radius: var(--radius-cards);
  overflow: hidden;
}
.section--meadow table.t { background: var(--surface-canvas); }
table.t th, table.t td {
  text-align: left;
  padding: 16px 22px;
  vertical-align: top;
}
table.t thead th {
  font-size: 11px;
  font-weight: var(--font-weight-medium);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-slate);
  border-bottom: 1px solid rgba(19,14,48,.12);
}
table.t tbody tr + tr td { border-top: 1px solid rgba(19,14,48,.08); }
table.t td:first-child { font-weight: var(--font-weight-medium); color: var(--color-deep-ink); white-space: nowrap; }
table.t td.wrap-ok { white-space: normal; }
table.t td { color: var(--color-slate); }
table.t code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  background: rgba(19,14,48,.07);
  border-radius: 5px;
  padding: 2px 6px;
  color: var(--color-deep-ink);
}
table.t .yes { color: var(--color-deep-ink); font-weight: var(--font-weight-medium); }

/* Comparison table gets a highlighted column */
table.cmp th:nth-child(2), table.cmp td:nth-child(2) {
  background: rgba(255, 226, 40, .18);
}
table.cmp thead th:nth-child(2) { color: var(--color-deep-ink); }

/* ============================================================
   Commands list
   ============================================================ */
.cmdgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 48px;
}
.cmd {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 20px;
  padding: 14px 0;
  border-top: 1px solid rgba(19,14,48,.09);
  align-items: baseline;
}
.cmd code {
  font-family: var(--font-mono);
  font-size: 13px;
  overflow-wrap: anywhere;
  color: var(--color-deep-ink);
  font-weight: 500;
}
.cmd span { font-size: var(--text-body-sm); color: var(--color-slate); }

/* ============================================================
   Ambient / hooks timeline
   ============================================================ */
.hooks { display: grid; gap: 16px; }
.hook {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 24px;
  background: rgba(249, 251, 242, .06);
  border-radius: var(--radius-cards);
  padding: 26px 30px;
}
.hook .when {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.hook .when code {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--color-hi-yellow);
}
.hook .when em {
  font-style: normal;
  font-size: 12px;
  color: rgba(249,251,242,.5);
}
.hook p { color: rgba(249, 251, 242, .75); font-size: var(--text-body-sm); }
.hook p strong { color: var(--color-canvas); font-weight: var(--font-weight-medium); }

.section--ink .lead { color: rgba(249, 251, 242, .7); }
.section--ink .eyebrow { color: rgba(249, 251, 242, .55); }
.section--ink .rule { background: rgba(249,251,242,.14); }

.brief-sample {
  background: rgba(249, 251, 242, .06);
  border-radius: var(--radius-cards);
  padding: 26px 30px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.8;
  color: rgba(249,251,242,.8);
  overflow-x: auto;
}
.brief-sample b { color: var(--color-canvas); font-weight: 600; }
.brief-sample .t-dim { color: rgba(249,251,242,.45); }

/* ============================================================
   Gates
   ============================================================ */
.gates { display: grid; gap: 10px; }
.gate {
  display: grid;
  grid-template-columns: 28px minmax(160px, 220px) 1fr;
  gap: 18px;
  align-items: baseline;
  background: var(--surface-canvas);
  border-radius: var(--radius-cards);
  padding: 18px 24px;
}
.section:not(.section--meadow) .gate { background: var(--surface-soft-meadow); }
.gate .n { font-family: var(--font-mono); font-size: 12px; color: var(--color-slate); }
.gate .k { font-weight: var(--font-weight-medium); }
.gate .v { font-size: var(--text-body-sm); color: var(--color-slate); }

/* ============================================================
   Install steps
   ============================================================ */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.step {
  background: var(--surface-soft-meadow);
  border-radius: var(--radius-cards);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.section--meadow .step { background: var(--surface-canvas); }
.step .num {
  font-family: var(--font-hedvig-letters-serif);
  font-size: 14px;
  font-weight: 700;
  width: 30px; height: 30px;
  border-radius: var(--radius-full);
  background: var(--color-deep-ink);
  color: var(--color-hi-yellow);
  display: grid; place-items: center;
}
.step h3 { font-size: var(--text-heading-sm); }
.step p { font-size: var(--text-body-sm); color: var(--color-slate); }
.step .codeblock { margin-top: auto; }

.codeblock {
  background: var(--surface-deep-ink);
  border-radius: 14px;
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.7;
  color: #e9e7f4;
  overflow-x: auto;
  position: relative;
}
.codeblock pre { margin: 0; font: inherit; white-space: pre; }

/* Copy button */
.copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: var(--radius-full);
  transition: background-color 160ms ease, color 160ms ease;
}
.copy--pill {
  background: var(--color-hi-yellow);
  color: var(--color-deep-ink);
  padding: 10px 18px;
  font-size: var(--text-body-sm);
  font-weight: var(--font-weight-medium);
}
.copy--pill:hover { background: #ffea63; }
.copy--icon {
  position: absolute;
  top: 10px; right: 10px;
  width: 30px; height: 30px;
  background: rgba(255,255,255,.09);
  color: rgba(233,231,244,.75);
}
.copy--icon:hover { background: rgba(255,255,255,.18); color: #fff; }
.copy.is-done { background: var(--color-deep-ink); color: var(--color-hi-yellow); }
.copy--icon.is-done { background: var(--color-hi-yellow); color: var(--color-deep-ink); }

/* ============================================================
   CTA
   ============================================================ */
.cta-card {
  background: var(--surface-deep-ink);
  border-radius: 40px;
  padding: clamp(40px, 6vw, 72px);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-card h2 {
  color: var(--color-canvas);
  font-size: clamp(30px, 4.6vw, 52px);
  line-height: 1.06;
  position: relative;
  z-index: 1;
}
.cta-card p {
  color: rgba(249,251,242,.7);
  margin: 20px auto 0;
  max-width: 54ch;
  position: relative;
  z-index: 1;
}
.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 32px;
  position: relative;
  z-index: 1;
}
.cta-card .capsule { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.22); }
.cta-card .capsule code { color: #e9e7f4; }
.cta-card .capsule .prompt { color: rgba(233,231,244,.4); }
.cta-glow {
  position: absolute;
  width: 620px; height: 620px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,226,40,.18), transparent 62%);
  top: -46%; left: 50%;
  transform: translateX(-50%);
  z-index: 0;
  pointer-events: none;
}

/* ============================================================
   Footer
   ============================================================ */
.footer { background: var(--surface-soft-meadow); padding-block: 56px 40px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 40px;
}
.footer h4 {
  font-family: var(--font-inter);
  font-size: 11px;
  font-weight: var(--font-weight-medium);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-slate);
  margin-bottom: 14px;
}
.footer li + li { margin-top: 9px; }
.footer a { font-size: var(--text-body-sm); color: var(--color-deep-ink); }
.footer a:hover { text-decoration: underline; text-underline-offset: 3px; }
.footer .blurb { font-size: var(--text-body-sm); color: var(--color-slate); margin-top: 14px; max-width: 34ch; }
.footer-base {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  align-items: center;
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid rgba(19,14,48,.1);
  font-size: var(--text-body-sm);
  color: var(--color-slate);
}

/* ============================================================
   Scroll reveal
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(18px); }
  .reveal.is-in {
    opacity: 1;
    transform: none;
    transition: opacity 620ms cubic-bezier(.2,.7,.3,1), transform 620ms cubic-bezier(.2,.7,.3,1);
  }
  .reveal.d1.is-in { transition-delay: 70ms; }
  .reveal.d2.is-in { transition-delay: 140ms; }
  .reveal.d3.is-in { transition-delay: 210ms; }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1000px) {
  /* Keep the decorative blooms off the body copy. */
  .blobs { opacity: .42; inset: 2% -12% auto 22%; height: 90%; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: 2; }
  .story, .story--flip .story-copy { grid-template-columns: 1fr; order: 0; }
  .statband .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 24px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: 1fr; }
  .cmdgrid { grid-template-columns: 1fr; gap: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav { padding-left: 20px; }
  .nav-cta .btn--dark { display: none; }

  .nav-links.is-open {
    display: flex;
    position: absolute;
    top: calc(100% + 10px);
    left: var(--page-gutter);
    right: var(--page-gutter);
    flex-direction: column;
    align-items: stretch;
    background: var(--surface-soft-meadow);
    border-radius: var(--radius-cards);
    padding: 12px;
    margin: 0;
    box-shadow: 0 20px 40px -28px rgba(19,14,48,.55);
  }
  .nav-shell .wrap { position: relative; }
}

@media (max-width: 700px) {
  :root { --page-gutter: 20px; }
  .cards, .cards--2, .ideas { grid-template-columns: 1fr; }
  .hook { grid-template-columns: 1fr; gap: 12px; }
  .gate { grid-template-columns: 1fr; gap: 6px; }
  .gate .n { display: none; }
  .card, .idea { padding: 26px; }
  .cta-card { border-radius: 28px; }
  .footer-grid { grid-template-columns: 1fr; }
  .capsule { width: 100%; }
  .hero-actions .btn--dark { width: 100%; }
}

@media (max-width: 480px) {
  .statband .grid { grid-template-columns: 1fr; }
  .terminal-body { padding: 16px; font-size: 11.5px; }
  .terminal { font-size: 11.5px; }
}

/* ============================================================
   Mobile compaction
   Fits more on screen: smaller type, tighter padding, and a nav
   whose actions sit hard right once the links collapse.
   ============================================================ */
@media (max-width: 860px) {
  /* .nav-links carried the auto margin that pushed the actions right.
     With the links hidden, the actions need it themselves. */
  .nav-cta { margin-left: auto; }
}

@media (max-width: 700px) {
  .section { padding-block: 44px; }
  .section-head { margin-bottom: 28px; }
  .section-head h2 { font-size: clamp(24px, 6.4vw, 30px); line-height: 1.12; margin-top: 10px; }
  .section-head .lead { margin-top: 12px; }
  .eyebrow { font-size: 10px; letter-spacing: 0.12em; }
  .lead { font-size: 15.5px; line-height: 1.5; }

  /* hero */
  .hero { padding-block: 28px 44px; }
  .hero-copy h1 { font-size: clamp(29px, 8vw, 36px); line-height: 1.1; margin-top: 12px; }
  .hero-copy .lead { margin-top: 14px; }
  .hero-actions { margin-top: 20px; gap: 10px; }
  .hero-proof { margin-top: 18px; font-size: 13px; }
  .capsule { padding: 5px 5px 5px 16px; }
  .capsule code { font-size: 12.5px; }
  .btn { font-size: 15px; padding: 11px 20px; }

  /* stat band — 2 x 2, not a single column */
  .statband { padding-block: 32px; }
  .statband .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 18px; }
  .stat .n { font-size: 30px; }
  .stat .l { font-size: 13px; line-height: 1.45; margin-top: 7px; }

  /* tabs */
  .tabs { gap: 6px; margin-bottom: 18px; }
  .tab { font-size: 13px; padding: 7px 14px; }
  .tab-note { font-size: 13px; margin-top: 14px; }

  /* terminals */
  .terminal { font-size: 11px; line-height: 1.62; }
  .terminal-bar { padding: 10px 14px; }
  .terminal-bar .title { font-size: 9.5px; letter-spacing: 0.08em; }
  .terminal-body { padding: 14px 16px 16px; }
  .brief-sample { font-size: 10.5px; line-height: 1.62; padding: 18px 16px; }

  /* cards, ideas, steps */
  .card, .idea, .step { padding: 20px; gap: 9px; }
  .card h3, .idea h3, .step h3 { font-size: 19px; }
  .card p, .idea p { font-size: 14.5px; }
  .step p { font-size: 13.5px; }
  .card code, .idea code, .step code { font-size: 12px; }
  .idea .num { width: 34px; height: 34px; font-size: 16px; }
  .idea .fact { font-size: 13px; padding-top: 12px; }
  .card .ic { width: 34px; height: 34px; }
  .cards, .ideas, .steps { gap: 14px; }

  /* tables — smaller type and tighter cells so more columns land */
  table.t { font-size: 12.5px; min-width: 440px; }
  table.t th, table.t td { padding: 11px 13px; }
  table.t thead th { font-size: 9.5px; letter-spacing: 0.08em; }
  table.t code { font-size: 11.5px; padding: 1px 4px; }

  /* hooks, gates, commands */
  .hook { padding: 18px 20px; }
  .hook .when code { font-size: 12px; }
  .hook p { font-size: 13.5px; }
  .gate { padding: 14px 18px; }
  .gate .k { font-size: 15px; }
  .gate .v { font-size: 13px; }
  /* a narrower code column leaves room for the description, so each
     row wraps less and the whole list gets shorter */
  .cmd { grid-template-columns: 130px minmax(0, 1fr); padding: 10px 0; gap: 12px; }
  .cmd code { font-size: 11.5px; }
  .cmd span { font-size: 12.5px; line-height: 1.45; }

  /* cta + footer */
  .cta-card { padding: 34px 22px; }
  .cta-card h2 { font-size: clamp(25px, 7vw, 32px); }
  .cta-card p { font-size: 15px; margin-top: 14px; }
  .cta-actions { margin-top: 22px; }
  .footer { padding-block: 40px 30px; }
  .footer-base { margin-top: 30px; font-size: 13px; }
}

@media (max-width: 420px) {
  :root { --page-gutter: 16px; }
  .stat .n { font-size: 26px; }
  .stat .l { font-size: 12.5px; }
  .statband .grid { gap: 18px 14px; }
  .terminal { font-size: 10px; }
  .brief-sample { font-size: 9.5px; }
  .tab { font-size: 12.5px; padding: 6px 12px; }
  table.t { font-size: 12px; min-width: 400px; }
  table.t th, table.t td { padding: 10px 11px; }
}

/* The four-column comparison is the one table that must not scroll:
   a reader who never swipes never sees the column it is compared against. */
@media (max-width: 700px) {
  table.cmp { min-width: 0; font-size: 11.5px; table-layout: fixed; }
  table.cmp th, table.cmp td { padding: 9px 8px; word-break: break-word; }
  table.cmp thead th { font-size: 9px; letter-spacing: 0.04em; }
  table.cmp td:first-child { white-space: normal; }
}
@media (max-width: 420px) {
  table.cmp { font-size: 10.5px; }
  table.cmp th, table.cmp td { padding: 8px 6px; }
}
