/* =========================================================================
   Loomwork — Editorial Marketing Site
   Warm cream paper, deep ink, restrained gilt.
   Built for literary novelists. No SaaS gradients.
   ========================================================================= */

/* ---------- Tokens --------------------------------------------------------*/
:root {
  /* Paper */
  --paper:        #F8F4ED;
  --paper-warm:   #FAF7F1;
  --paper-deep:   #F2EDE0;
  --paper-shade:  #ECE5D3;

  /* Ink */
  --ink:          #1A1612;
  --ink-deep:     #0F0D0A;
  --ink-soft:     #3D362E;
  --ink-mute:     #6B6259;
  --ink-faint:    #8A8278;
  --ink-line:     #D6CDB9;
  --ink-rule:     #C9BFA8;

  /* Accent — restrained gilt, used like a spine stamp */
  --gilt:         #9C7A3A;
  --gilt-deep:    #7E6128;
  --gilt-soft:    #C8A971;

  /* Accent overlays */
  --highlight:    rgba(156, 122, 58, 0.10);
  --shadow-sm:    0 1px 2px rgba(26, 22, 18, 0.06);
  --shadow-md:    0 12px 32px -16px rgba(26, 22, 18, 0.20),
                  0 4px 10px -6px rgba(26, 22, 18, 0.10);
  --shadow-lg:    0 30px 80px -32px rgba(26, 22, 18, 0.32),
                  0 10px 30px -16px rgba(26, 22, 18, 0.18);

  /* Type */
  --serif:  "Source Serif 4", "Iowan Old Style", "Charter", "Cambria", Georgia, serif;
  --sans:   "Inter Tight", "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --mono:   "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Geometry */
  --maxw:        1180px;
  --maxw-narrow:  720px;
  --maxw-prose:   640px;
  --gutter-x:    clamp(20px, 4vw, 48px);
  --section-y:   clamp(72px, 9vw, 132px);
  --radius-sm:   4px;
  --radius:      6px;
  --radius-lg:   10px;
}

/* ---------- Reset & base --------------------------------------------------*/
*, *::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(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.65;
  font-feature-settings: "kern", "liga", "onum", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
img { color: transparent; }

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--ink-rule);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-color .25s ease, color .25s ease;
}
a:hover { text-decoration-color: var(--gilt); color: var(--ink-deep); }

::selection { background: rgba(156, 122, 58, 0.22); color: var(--ink-deep); }

/* Skip link */
.skip-link {
  position: absolute; left: -9999px; top: 8px;
  background: var(--ink); color: var(--paper);
  padding: 8px 14px; border-radius: 4px;
  font-family: var(--sans); font-size: 14px;
  z-index: 1000;
}
.skip-link:focus { left: 12px; }

/* ---------- Paper texture overlay ----------------------------------------*/
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: .035;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.10  0 0 0 0 0.08  0 0 0 0 0.06  0 0 0 0.7 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: multiply;
}

/* ---------- Typography ----------------------------------------------------*/
h1, h2, h3, h4, h5 {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--ink-deep);
  line-height: 1.1;
  letter-spacing: -0.012em;
  margin: 0;
  text-wrap: balance;
}

h1, .display {
  font-size: clamp(44px, 7.2vw, 84px);
  line-height: 1.02;
  letter-spacing: -0.022em;
  font-weight: 400;
}
h1 em, .display em, .display-italic { font-style: italic; font-weight: 400; }

h2, .h2 {
  font-size: clamp(32px, 4.6vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.018em;
}
h2 em, .h2 em { font-style: italic; }

h3, .h3 {
  font-size: clamp(22px, 2.6vw, 28px);
  line-height: 1.2;
  letter-spacing: -0.012em;
}

h4 {
  font-size: 20px;
  line-height: 1.3;
}

p { margin: 0 0 1.1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

.lede {
  font-size: clamp(20px, 2.1vw, 24px);
  line-height: 1.5;
  color: var(--ink-soft);
  font-weight: 400;
  text-wrap: balance;
}

.eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gilt-deep);
  font-weight: 500;
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 28px; height: 1px;
  background: var(--gilt);
}

.eyebrow.center::before { display: none; }
.eyebrow.center { letter-spacing: 0.20em; }

blockquote {
  margin: 0;
  font-style: italic;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.4;
  color: var(--ink-deep);
  text-wrap: balance;
}

kbd {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--paper-deep);
  border: 1px solid var(--ink-line);
  color: var(--ink-soft);
  box-shadow: inset 0 -1px 0 var(--ink-line);
}

ul.bullets {
  list-style: none;
  padding: 0;
  margin: 0 0 1.4em;
}
ul.bullets li {
  position: relative;
  padding-left: 22px;
  margin: .35em 0;
  color: var(--ink-soft);
}
ul.bullets li::before {
  content: "";
  position: absolute;
  left: 4px; top: .75em;
  width: 6px; height: 1px;
  background: var(--gilt);
}

/* ---------- Layout helpers -----------------------------------------------*/
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--gutter-x);
  position: relative;
}
.narrow { max-width: var(--maxw-narrow); }
.prose { max-width: var(--maxw-prose); }

.section {
  padding-block: var(--section-y);
  position: relative;
}
.section-deep   { background: var(--paper-deep); }
.section-shade  { background: var(--paper-shade); }
.section-warm   { background: var(--paper-warm); }
.section-ink    { background: var(--ink-deep); color: var(--paper-warm); }
.section-ink h1, .section-ink h2, .section-ink h3 { color: var(--paper-warm); }

/* Section head */
.section-head {
  max-width: var(--maxw-narrow);
  margin: 0 auto clamp(40px, 5vw, 72px);
  text-align: center;
}
.section-head .lede { margin-top: 18px; }
.section-head .eyebrow { margin-bottom: 22px; }

.section-head.left {
  text-align: left;
  margin-inline: 0;
}

/* Page-edge fold divider */
.fold-divider {
  position: relative;
  height: 56px;
  overflow: hidden;
  pointer-events: none;
}
.fold-divider svg { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ---------- Buttons -------------------------------------------------------*/
.btn {
  --bg: var(--ink-deep);
  --fg: var(--paper-warm);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: .003em;
  padding: 13px 22px;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--bg);
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  transition: transform .25s ease, background .25s ease, color .25s ease, border-color .25s ease, box-shadow .25s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 22px -10px rgba(26, 22, 18, .35); text-decoration: none; }
.btn:active { transform: translateY(0); }

.btn svg { width: 17px; height: 17px; }

.btn-ghost {
  --bg: transparent;
  --fg: var(--ink-deep);
  border-color: var(--ink-rule);
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  font-size: 16px;
}
.btn-ghost:hover { border-color: var(--ink); background: rgba(26, 22, 18, .04); }

.btn-gilt {
  --bg: var(--gilt);
  --fg: var(--paper-warm);
  border-color: var(--gilt);
}

.btn-lg { padding: 16px 28px; font-size: 16px; }

/* ---------- Navigation ----------------------------------------------------*/
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 244, 237, 0.85);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, background .25s ease;
}
.nav.is-scrolled {
  border-bottom-color: var(--ink-line);
  background: rgba(248, 244, 237, 0.92);
}
.nav-inner {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px var(--gutter-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 400;
  color: var(--ink-deep);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.nav-brand-mark {
  width: 22px; height: 22px;
  display: inline-flex;
  color: var(--gilt-deep);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links a {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  letter-spacing: .002em;
  transition: color .2s ease;
}
.nav-links a:hover { color: var(--ink-deep); }

.nav-actions { display: flex; align-items: center; gap: 14px; }
.nav-actions .btn {
  padding: 9px 18px;
  font-size: 14px;
}

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  background: none;
  border: 1px solid var(--ink-line);
  border-radius: 999px;
  color: var(--ink-deep);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle svg { width: 18px; height: 18px; }

.nav-drawer {
  display: none;
  position: fixed;
  top: 64px; left: 0; right: 0;
  background: var(--paper-warm);
  border-bottom: 1px solid var(--ink-line);
  padding: 20px var(--gutter-x) 28px;
  z-index: 40;
}
.nav-drawer.is-open { display: flex; flex-direction: column; gap: 4px; }
.nav-drawer a {
  font-family: var(--serif);
  font-size: 22px;
  color: var(--ink-deep);
  padding: 10px 0;
  text-decoration: none;
  border-bottom: 1px solid var(--ink-line);
}
.nav-drawer a:last-child { border-bottom: none; }
.nav-drawer .drawer-cta {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ink-deep);
  color: var(--paper-warm);
  border: none;
  border-radius: 999px;
  padding: 14px 22px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
}

/* ---------- Hero ---------------------------------------------------------*/
.hero {
  position: relative;
  padding: clamp(48px, 7vw, 96px) 0 clamp(56px, 8vw, 120px);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
}

.hero-copy { max-width: 580px; position: relative; z-index: 2; }
.hero-copy .eyebrow { margin-bottom: 26px; }
.hero-copy h1 { margin-bottom: 24px; }
.hero-copy .lede { margin-bottom: 36px; max-width: 520px; }

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
}

.hero-meta {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-faint);
  letter-spacing: .005em;
}
.hero-meta .sep {
  display: inline-block;
  width: 3px; height: 3px;
  border-radius: 999px;
  background: var(--ink-faint);
  margin: 0 9px;
  vertical-align: 3px;
}

/* Hero composition (3D parallax) */
.hero-scene {
  position: relative;
  perspective: 1400px;
  perspective-origin: 50% 40%;
  height: clamp(380px, 52vw, 580px);
  transform-style: preserve-3d;
}
.hero-scene__inner {
  position: absolute; inset: 0;
  transform-style: preserve-3d;
  transition: transform .6s cubic-bezier(.22, 1, .36, 1);
  will-change: transform;
}

.layer {
  position: absolute;
  transform-style: preserve-3d;
  will-change: transform;
}

/* Window light wash */
.layer-light {
  inset: -10% -8% auto auto;
  width: 78%;
  height: 86%;
  background: radial-gradient(ellipse 70% 60% at 70% 30%, rgba(255, 244, 220, .9), rgba(255, 244, 220, 0) 60%);
  filter: blur(4px);
  transform: translateZ(-80px);
  z-index: 1;
}

/* Paper sheets */
.layer-paper-back,
.layer-paper-front {
  background: linear-gradient(180deg, #FBF8F0 0%, #F4EFE2 100%);
  border-radius: 2px;
  box-shadow:
    0 1px 0 rgba(0,0,0,.04),
    0 30px 60px -28px rgba(26, 22, 18, .28),
    0 14px 28px -14px rgba(26, 22, 18, .18);
}
.layer-paper-back::after,
.layer-paper-front::after {
  /* paper grain */
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.92' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.07  0 0 0 0 0.05  0 0 0 0 0.03  0 0 0 0.5 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: .12;
  mix-blend-mode: multiply;
  border-radius: inherit;
  pointer-events: none;
}

.layer-paper-back {
  width: 64%;
  aspect-ratio: 8.5 / 11;
  top: 4%;
  left: 6%;
  transform: translateZ(-30px) rotate(-3.6deg);
  z-index: 2;
}

.layer-paper-front {
  width: 70%;
  aspect-ratio: 8.5 / 11;
  top: 8%;
  left: 16%;
  transform: translateZ(20px) rotate(2.4deg);
  z-index: 4;
  padding: 9% 11% 9% 11%;
  display: flex;
  flex-direction: column;
}

/* Typed prose on the front sheet */
.paper-prose {
  font-family: var(--serif);
  font-size: clamp(11px, 1.15vw, 14px);
  line-height: 1.8;
  color: var(--ink);
  letter-spacing: .005em;
  flex: 1;
}
.paper-prose .chapter {
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.32em;
  color: var(--ink-mute);
  text-transform: uppercase;
  margin-bottom: 14px;
}
.paper-prose .chapter-title {
  font-family: var(--serif);
  font-size: clamp(14px, 1.5vw, 18px);
  font-style: italic;
  letter-spacing: -.01em;
  color: var(--ink-deep);
  margin-bottom: 18px;
  line-height: 1.2;
}
.paper-prose p {
  margin: 0 0 .9em;
  text-indent: 1.4em;
}
.paper-prose p:first-of-type { text-indent: 0; }
.paper-prose p:first-of-type::first-letter {
  font-size: 1.6em;
  font-weight: 400;
  line-height: 1;
}

/* Fountain pen */
.layer-pen {
  width: 56%;
  height: auto;
  bottom: 6%;
  right: 0%;
  transform: translateZ(60px) rotate(-22deg);
  z-index: 5;
  filter: drop-shadow(0 18px 24px rgba(26, 22, 18, .25));
  max-width: 100%;
}

/* Ink stain */
.layer-ink {
  width: 14%;
  height: 14%;
  top: 22%;
  left: 8%;
  transform: translateZ(8px);
  z-index: 3;
  opacity: .7;
}

@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; gap: 0; }
  .hero-copy { max-width: none; position: relative; z-index: 2; }
  /* Guarantee a generous gap between meta-info row and the 3D scene */
  .hero-meta { margin-bottom: clamp(32px, 6vw, 56px); }
  /* Contain the 3D scene strictly so the rotated paper + pen never bleed */
  .hero-scene {
    height: clamp(340px, 70vw, 420px);
    margin-top: clamp(48px, 9vw, 80px);
    margin-bottom: clamp(56px, 9vw, 80px);
    overflow: hidden;
    border-radius: 14px;
    isolation: isolate;
    position: relative;
    z-index: 1;
  }
  .hero-scene__inner {
    /* Disable mouse parallax on touch — keeps content inside its container */
    transform: none !important;
  }
  /* Tone down rotation so the paper stays within bounds */
  .hero-scene .layer-paper-front {
    transform: translateZ(40px) rotate(-2deg) !important;
  }
  .hero-scene .layer-paper-back {
    transform: translateZ(0px) rotate(3deg) !important;
  }
  .hero-scene .layer-pen {
    width: 50%;
    bottom: 8%;
    right: 2%;
    transform: translateZ(50px) rotate(-18deg) !important;
  }
  .hero-scene .layer-ink {
    /* Hide ink stain on small screens — too fussy for the layout */
    opacity: 0;
  }
  .trust { margin-top: 24px; padding-top: 32px; }
}
@media (max-width: 540px) {
  /* Mobile hero — single calm sheet, treated like a fine printed page.
     No 3D rotation, no pen, no back-paper grain bleed. */
  .hero-scene {
    height: auto;
    aspect-ratio: 5 / 7;
    margin-top: clamp(36px, 8vw, 56px);
    margin-bottom: clamp(56px, 12vw, 88px);
    border-radius: 0;
    box-shadow: none;
    perspective: none;
    transform-style: flat;
    background: transparent;
    overflow: visible;
    isolation: auto;
  }
  .hero-scene__inner { perspective: none; transform: none !important; }
  /* Hide every decorative layer except the front sheet */
  .hero-scene .layer-light,
  .hero-scene .layer-pen,
  .hero-scene .layer-ink,
  .hero-scene .layer-paper-back {
    display: none !important;
  }
  /* Front paper IS the hero — no decorative ::after grain interfering */
  .hero-scene .layer-paper-front {
    position: absolute;
    inset: 0;
    width: 100%;
    transform: none !important;
    background:
      radial-gradient(ellipse at 22% 0%, rgba(255,255,255,.55), transparent 55%),
      linear-gradient(180deg, #FBF8F0 0%, #F4EFE2 100%);
    border: 1px solid var(--ink-line);
    border-radius: 2px;
    box-shadow:
      0 2px 6px -1px rgba(26,22,18,.08),
      0 24px 48px -16px rgba(26,22,18,.20),
      inset 0 0 0 1px rgba(255,255,255,.4);
  }
  /* Suppress desktop's grain ::after on mobile (kept on tablet+) */
  .hero-scene .layer-paper-front::after,
  .hero-scene .layer-paper-back::after {
    display: none !important;
  }
  /* Gilt rule above chapter, like a fine edition */
  .hero-scene .layer-paper-front::before {
    content: "";
    display: block;
    position: absolute;
    top: clamp(26px, 6.5vw, 36px);
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 1px;
    background: var(--gilt);
    opacity: .75;
  }
  /* Prose */
  .hero-scene .paper-prose {
    padding: clamp(54px, 13vw, 76px) clamp(26px, 6.5vw, 36px) clamp(36px, 8vw, 52px);
    font-size: clamp(14px, 3.5vw, 15.5px);
    line-height: 1.62;
    text-align: left;
    position: relative;
    z-index: 1;
  }
  .hero-scene .paper-prose .chapter {
    text-align: center;
    font-family: var(--sans);
    font-size: 10px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--gilt-deep);
    margin: 0 0 10px;
    font-weight: 500;
  }
  .hero-scene .paper-prose .chapter-title {
    text-align: center;
    font-family: var(--serif);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(22px, 5.6vw, 28px);
    line-height: 1.18;
    color: var(--ink-deep);
    margin: 0 0 clamp(28px, 7vw, 40px);
    letter-spacing: -0.005em;
  }
  .hero-scene .paper-prose p {
    margin: 0 0 0.85em;
    color: var(--ink-soft);
    text-indent: 1.4em;
  }
  .hero-scene .paper-prose p:first-of-type { text-indent: 0; }
  /* Gilt drop cap on first paragraph */
  .hero-scene .paper-prose p:first-of-type::first-letter {
    font-family: var(--serif);
    font-size: 2.8em;
    line-height: 0.85;
    float: left;
    padding: 0.04em 0.1em 0 0;
    color: var(--gilt-deep);
    font-style: normal;
    font-weight: 500;
  }
}

/* ---------- Trust strip --------------------------------------------------*/
.trust {
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--ink-line);
}
.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-mute);
  letter-spacing: .002em;
  align-items: center;
}
.trust-row .dot {
  display: inline-block;
  width: 3px; height: 3px;
  border-radius: 999px;
  background: var(--ink-faint);
}

/* ---------- The first page (philosophy) ----------------------------------*/
.first-page {
  padding: var(--section-y) 0;
}
.first-page .container { display: grid; gap: clamp(40px, 5vw, 72px); }

.first-page-prose {
  max-width: 600px;
  margin-inline: auto;
  text-align: left;
}
.first-page-prose .lede {
  font-size: clamp(22px, 2.4vw, 28px);
  color: var(--ink-deep);
  font-style: italic;
  line-height: 1.5;
  margin-bottom: 32px;
}
.first-page-prose p {
  font-size: 19px;
  line-height: 1.7;
  color: var(--ink-soft);
}

/* Editor frame (paper-textured) */
.editor-frame {
  position: relative;
  margin: 0 auto;
  max-width: 1080px;
  background: var(--paper-warm);
  border: 1px solid var(--ink-line);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.editor-frame::before {
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.10  0 0 0 0 0.08  0 0 0 0 0.06  0 0 0 0.7 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: .04;
  pointer-events: none;
  border-radius: inherit;
}
.editor-frame img {
  width: 100%;
  border-radius: 6px;
  display: block;
}

.figcaption {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-mute);
  text-align: center;
  margin-top: 18px;
  letter-spacing: .005em;
}
.figcaption em { font-family: var(--serif); font-style: italic; }

/* ---------- Five Rooms ---------------------------------------------------*/
.rooms-intro {
  max-width: var(--maxw-prose);
  margin: 0 auto clamp(48px, 5vw, 80px);
  text-align: left;
}
.rooms-intro h2 { margin-bottom: 28px; }
.rooms-intro p { color: var(--ink-soft); font-size: 19px; line-height: 1.7; }

.rooms-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(36px, 4vw, 64px) clamp(28px, 3vw, 48px);
}
.rooms-gallery .room--wide { grid-column: span 2; }

.room {
  display: flex;
  flex-direction: column;
}
.room-frame {
  background: var(--paper-warm);
  border: 1px solid var(--ink-line);
  border-radius: 6px;
  padding: 12px;
  box-shadow: var(--shadow-md);
  transition: transform .4s ease, box-shadow .4s ease;
}
.room-frame img {
  width: 100%;
  border-radius: 3px;
  display: block;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
}
.room:hover .room-frame { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.room-plaque {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--ink-rule);
  max-width: 460px;
}
.room-plaque .room-num {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gilt-deep);
  margin-bottom: 8px;
  display: block;
}
.room-plaque h3 {
  font-style: italic;
  font-size: 24px;
  margin-bottom: 8px;
}
.room-plaque p {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0;
}

@media (max-width: 720px) {
  .rooms-gallery { grid-template-columns: 1fr; }
  .rooms-gallery .room--wide { grid-column: auto; }
}

/* ---------- The Binder ---------------------------------------------------*/
.binder {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(40px, 5vw, 80px);
  align-items: center;
}
.binder-copy h2 { margin-bottom: 24px; }
.binder-copy .lede { color: var(--ink-soft); margin-bottom: 28px; }
.binder-copy ul.bullets li { font-size: 17px; }

.binder-frame {
  background: var(--paper-warm);
  border: 1px solid var(--ink-line);
  border-radius: 8px;
  padding: 14px;
  box-shadow: var(--shadow-lg);
}
.binder-frame img { width: 100%; border-radius: 4px; }

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

/* ---------- Manuscript craft ---------------------------------------------*/
.manuscript {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(40px, 5vw, 80px);
  align-items: center;
}
.manuscript-page {
  background: #FCFAF4;
  border: 1px solid var(--ink-line);
  border-radius: 2px;
  aspect-ratio: 8.5 / 11;
  padding: 8% 11% 8%;
  box-shadow: 0 30px 60px -30px rgba(26,22,18,.35),
              0 14px 28px -16px rgba(26,22,18,.20);
  font-family: "Courier New", "Courier", var(--mono);
  font-size: clamp(10px, .92vw, 13px);
  line-height: 2;
  color: var(--ink);
  position: relative;
  max-width: 480px;
  margin-inline: auto;
}
.manuscript-page::before {
  /* paper grain */
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.07  0 0 0 0 0.05  0 0 0 0 0.03  0 0 0 0.5 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: .08;
  mix-blend-mode: multiply;
  pointer-events: none;
}
.manuscript-page .ms-header {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  margin-bottom: 18%;
  color: var(--ink-soft);
}
.manuscript-page .ms-byline {
  text-align: center;
  margin-bottom: 14%;
}
.manuscript-page .ms-byline .ms-title {
  text-transform: uppercase;
  letter-spacing: .03em;
}
.manuscript-page .ms-body p {
  margin: 0 0 0;
  text-indent: 4ch;
}

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

/* ---------- Trust / Folder ----------------------------------------------*/
.folder {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.1fr);
  gap: clamp(40px, 5vw, 80px);
  align-items: center;
}
.folder-window {
  background: var(--paper-warm);
  border: 1px solid var(--ink-line);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.folder-window-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: var(--paper-deep);
  border-bottom: 1px solid var(--ink-line);
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-mute);
}
.folder-window-bar .dot { width: 11px; height: 11px; border-radius: 999px; }
.folder-window-bar .dot.r { background: #E2A88C; }
.folder-window-bar .dot.y { background: #DEC379; }
.folder-window-bar .dot.g { background: #A8B98A; }
.folder-window-bar .path { margin-left: 16px; }
.folder-tree {
  padding: 18px 22px 26px;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink-soft);
  list-style: none;
  margin: 0;
}
.folder-tree li {
  padding: 5px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.folder-tree .indent-1 { padding-left: 22px; }
.folder-tree .indent-2 { padding-left: 44px; }
.folder-tree svg { width: 15px; height: 15px; color: var(--gilt-deep); flex-shrink: 0; }
.folder-tree .file { color: var(--ink-mute); }
.folder-tree .file svg { color: var(--ink-faint); }

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

/* ---------- Research room ------------------------------------------------*/
.research {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 5vw, 80px);
  align-items: center;
}
.research-copy h2 { margin-bottom: 22px; }
.research-copy p { color: var(--ink-soft); font-size: 18px; line-height: 1.7; }

.research-frame {
  background: var(--paper-warm);
  border: 1px solid var(--ink-line);
  border-radius: 6px;
  padding: 12px;
  box-shadow: var(--shadow-lg);
}
.research-frame img { width: 100%; border-radius: 3px; aspect-ratio: 16/10; object-fit: cover; }

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

/* ---------- Optional intelligence ---------------------------------------*/
.intelligence {
  max-width: var(--maxw-narrow);
  margin: 0 auto;
  text-align: left;
  padding: clamp(36px, 4vw, 56px);
  background: var(--paper-warm);
  border: 1px solid var(--ink-line);
  border-radius: 10px;
  position: relative;
}
.intelligence::before {
  position: absolute;
  top: -10px; left: 32px;
  background: var(--paper-deep);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gilt-deep);
  padding: 4px 12px;
  border: 1px solid var(--ink-line);
  border-radius: 999px;
  content: "Optional · Pro feature";
}
.intelligence h2 {
  font-size: clamp(26px, 3vw, 34px);
  margin-bottom: 18px;
  margin-top: 14px;
}
.intelligence p { color: var(--ink-soft); }

/* ---------- Pricing ------------------------------------------------------*/
.price-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(28px, 3vw, 44px);
  max-width: 920px;
  margin-inline: auto;
}
.price-card {
  background: var(--paper-warm);
  border: 1px solid var(--ink-line);
  border-radius: 10px;
  padding: clamp(32px, 3.5vw, 48px);
  display: flex;
  flex-direction: column;
}
.price-card.is-featured {
  border-color: var(--gilt);
  box-shadow: 0 0 0 1px var(--gilt);
  background: linear-gradient(180deg, #FBF6E8, var(--paper-warm) 60%);
}
.price-tag {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gilt-deep);
  margin-bottom: 16px;
}
.price-card h3 {
  font-style: italic;
  font-size: 30px;
  margin-bottom: 8px;
}
.price-card .price {
  font-family: var(--serif);
  font-size: 44px;
  letter-spacing: -0.02em;
  color: var(--ink-deep);
  margin-bottom: 6px;
}
.price-card .price small {
  font-size: 16px;
  color: var(--ink-mute);
  font-style: italic;
}
.price-card .price-line {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin-bottom: 28px;
  flex: 1;
}
.price-card .btn { align-self: flex-start; }

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

/* ---------- Author quote -------------------------------------------------*/
.author-quote {
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
}
.author-quote blockquote {
  position: relative;
}
.author-quote blockquote::before {
  content: "\201C";
  position: absolute;
  top: -.6em;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--serif);
  font-size: 5em;
  line-height: 1;
  color: var(--gilt);
  opacity: .35;
  font-style: normal;
}
.author-quote .attrib {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-top: 36px;
}
.author-quote .attrib em { font-family: var(--serif); font-style: italic; text-transform: none; letter-spacing: 0; color: var(--ink-soft); }

/* ---------- Footer CTA ---------------------------------------------------*/
.cta-final {
  text-align: center;
  padding: clamp(96px, 12vw, 160px) 0;
}
.cta-final h2 {
  font-style: italic;
  font-size: clamp(36px, 5.4vw, 64px);
  margin-bottom: 38px;
}
.cta-final .meta {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-faint);
  margin-top: 22px;
  letter-spacing: .005em;
}

/* ---------- Footer -------------------------------------------------------*/
.footer {
  border-top: 1px solid var(--ink-line);
  padding: clamp(48px, 5vw, 72px) 0 clamp(36px, 4vw, 56px);
  background: var(--paper);
}
.footer-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.footer .brand {
  font-family: var(--serif);
  font-size: 22px;
  color: var(--ink-deep);
  letter-spacing: -0.01em;
}
.footer .meta {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-mute);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
}
.footer .meta a { color: var(--ink-mute); text-decoration: none; }
.footer .meta a:hover { color: var(--ink-deep); text-decoration: underline; text-decoration-color: var(--gilt); }
.footer .meta .sep {
  display: inline-block;
  width: 3px; height: 3px;
  border-radius: 999px;
  background: var(--ink-faint);
  vertical-align: 3px;
}
.footer .colophon {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--ink-faint);
  margin-top: 8px;
}

/* Footer with reference columns */
.footer-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 36px;
  text-align: left;
  max-width: 720px;
  margin: 8px auto 12px;
  padding-top: 28px;
  border-top: 1px solid var(--ink-line);
}
.footer-col h4 {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gilt-deep);
  font-weight: 500;
  margin: 0 0 14px;
}
.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-col ul li {
  margin: 6px 0;
}
.footer-col a {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink-mute);
  text-decoration: none;
  letter-spacing: .002em;
}
.footer-col a:hover { color: var(--ink-deep); text-decoration: underline; text-decoration-color: var(--gilt); }

@media (max-width: 520px) {
  .footer-cols { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}

/* ---------- Word fade-in (scroll reveal) --------------------------------*/
[data-fade] {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .9s ease, transform .9s cubic-bezier(.22, 1, .36, 1);
}
[data-fade].is-in { opacity: 1; transform: none; }

[data-fade-words] .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .55s ease, transform .55s cubic-bezier(.22, 1, .36, 1);
  transition-delay: calc(var(--i, 0) * 24ms);
}
[data-fade-words].is-in .word { opacity: 1; transform: none; }

/* ---------- Cookie banner (minimal) -------------------------------------*/
.cookie {
  position: fixed;
  bottom: 16px; left: 16px; right: 16px;
  max-width: 480px;
  margin-inline: auto;
  background: var(--paper-warm);
  border: 1px solid var(--ink-line);
  border-radius: 10px;
  padding: 16px 18px;
  display: none;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-lg);
  z-index: 100;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-soft);
}
.cookie.is-visible { display: flex; }
.cookie button {
  font-family: var(--sans);
  font-size: 13px;
  background: var(--ink-deep);
  color: var(--paper-warm);
  border: none;
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
}
.cookie a { color: var(--ink-soft); }

/* ---------- Simple text pages -------------------------------------------*/
.simple-page {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(64px, 8vw, 112px) var(--gutter-x);
}
.simple-page h1 {
  font-size: clamp(36px, 5vw, 56px);
  margin-bottom: 24px;
  font-style: italic;
}
.simple-page h2 {
  font-size: clamp(22px, 2.4vw, 28px);
  margin-top: 48px;
  margin-bottom: 14px;
}
.simple-page p, .simple-page li {
  color: var(--ink-soft);
  font-size: 18px;
  line-height: 1.7;
}
.simple-page ul, .simple-page ol { padding-left: 22px; }
.simple-page ul li, .simple-page ol li { margin: .35em 0; }
.simple-page a:not(.btn) { color: var(--ink-deep); text-decoration-color: var(--gilt); }
.simple-page .lede { font-size: 22px; line-height: 1.5; color: var(--ink-deep); font-style: italic; margin-bottom: 36px; }

/* ---------- Compare table -----------------------------------------------*/
.compare-wrap { overflow-x: auto; }
.compare-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-family: var(--serif);
  background: var(--paper-warm);
  border: 1px solid var(--ink-line);
  border-radius: 8px;
  overflow: hidden;
}
.compare-table th, .compare-table td {
  padding: 18px 20px;
  text-align: left;
  border-bottom: 1px solid var(--ink-line);
  font-size: 16px;
  color: var(--ink-soft);
  vertical-align: top;
}
.compare-table th {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--ink-deep);
  background: var(--paper-deep);
}
.compare-table th:first-child { width: 38%; }
.compare-table tr:last-child th, .compare-table tr:last-child td { border-bottom: none; }
.compare-table .col-loomwork { background: rgba(156, 122, 58, 0.06); }
.compare-table .check { color: var(--gilt-deep); font-weight: 500; }
.compare-table .x { color: var(--ink-faint); }
.compare-table caption {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-mute);
  text-align: left;
  padding: 14px 0;
  caption-side: bottom;
}

/* ---------- Features long-form ------------------------------------------*/
.feature-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 5vw, 72px);
  align-items: center;
  padding-block: clamp(64px, 7vw, 96px);
  border-bottom: 1px solid var(--ink-line);
}
.feature-block:last-of-type { border-bottom: none; }
.feature-block.alt > :first-child { order: 2; }
.feature-block.alt > :last-child  { order: 1; }
.feature-block .copy h2 { font-size: clamp(28px, 3.4vw, 38px); margin-bottom: 18px; }
.feature-block .copy p  { color: var(--ink-soft); font-size: 18px; line-height: 1.7; }
.feature-block .copy .eyebrow { margin-bottom: 16px; }
.feature-block .visual {
  background: var(--paper-warm);
  border: 1px solid var(--ink-line);
  border-radius: 8px;
  padding: 12px;
  box-shadow: var(--shadow-md);
}
.feature-block .visual img {
  width: 100%;
  border-radius: 4px;
  aspect-ratio: 16/10;
  object-fit: cover;
  object-position: top center;
}

@media (max-width: 880px) {
  .feature-block { grid-template-columns: 1fr; }
  .feature-block.alt > :first-child { order: 1; }
  .feature-block.alt > :last-child  { order: 2; }
}

/* ---------- Docs ---------------------------------------------------------*/
.docs-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: clamp(32px, 4vw, 64px);
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(40px, 5vw, 64px) var(--gutter-x) clamp(64px, 8vw, 112px);
}
.docs-toc {
  position: sticky;
  top: 88px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  font-family: var(--sans);
  font-size: 13.5px;
  align-self: start;
  border-right: 1px solid var(--ink-line);
  padding-right: 16px;
}
.docs-toc h4 {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gilt-deep);
  margin-bottom: 14px;
  font-weight: 500;
}
.docs-toc a {
  display: block;
  padding: 5px 0;
  color: var(--ink-mute);
  text-decoration: none;
  border-left: 2px solid transparent;
  padding-left: 10px;
  margin-left: -10px;
  transition: color .2s, border-color .2s;
}
.docs-toc a:hover { color: var(--ink-deep); }
.docs-toc a.is-active { color: var(--ink-deep); border-left-color: var(--gilt); }

.docs-content {
  max-width: 700px;
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink-soft);
}
.docs-content h1 {
  font-size: clamp(36px, 4.6vw, 52px);
  margin-bottom: 16px;
  color: var(--ink-deep);
}
.docs-content h1 + .lede { margin-bottom: 48px; }
.docs-content h2 {
  font-size: clamp(24px, 2.8vw, 32px);
  margin: 64px 0 18px;
  scroll-margin-top: 88px;
  color: var(--ink-deep);
}
.docs-content h3 {
  font-size: 20px;
  margin: 36px 0 12px;
  color: var(--ink-deep);
}
.docs-content p { margin: 0 0 1.1em; }
.docs-content ul, .docs-content ol { padding-left: 22px; margin: 0 0 1.2em; }
.docs-content ul li, .docs-content ol li { margin: .35em 0; }
.docs-content code {
  font-family: var(--mono);
  font-size: .9em;
  background: var(--paper-deep);
  border: 1px solid var(--ink-line);
  border-radius: 4px;
  padding: 1px 6px;
  color: var(--ink-deep);
}
.docs-content pre {
  background: var(--paper-deep);
  border: 1px solid var(--ink-line);
  border-radius: 8px;
  padding: 18px 22px;
  overflow-x: auto;
  margin: 0 0 1.4em;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-deep);
}
.docs-content kbd { font-size: 12px; }
.docs-content blockquote {
  font-size: 18px;
  font-style: italic;
  border-left: 3px solid var(--gilt);
  padding: 6px 0 6px 22px;
  margin: 1.4em 0;
  color: var(--ink-deep);
}
.docs-content a {
  color: var(--ink-deep);
  text-decoration-color: var(--gilt);
}
.docs-content img {
  border: 1px solid var(--ink-line);
  border-radius: 6px;
  margin: 1.6em 0;
  width: 100%;
}
.docs-content hr {
  border: none;
  border-top: 1px solid var(--ink-line);
  margin: 56px 0;
}

@media (max-width: 880px) {
  .docs-shell { grid-template-columns: 1fr; }
  .docs-toc {
    position: static;
    max-height: none;
    border-right: none;
    border-bottom: 1px solid var(--ink-line);
    padding-right: 0;
    padding-bottom: 24px;
    margin-bottom: 12px;
  }
}

/* ---------- Download page ----------------------------------------------- */
.download-hero {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(64px, 8vw, 112px) var(--gutter-x) clamp(48px, 6vw, 80px);
}
.download-hero h1 { margin-bottom: 22px; font-style: italic; }
.download-hero .lede { margin-bottom: 36px; }
.download-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  max-width: 820px;
  margin: 0 auto;
  padding: 0 var(--gutter-x) clamp(64px, 8vw, 112px);
}
.download-card {
  background: var(--paper-warm);
  border: 1px solid var(--ink-line);
  border-radius: 10px;
  padding: 28px 30px;
}
.download-card h3 { font-style: italic; margin-bottom: 8px; font-size: 24px; }
.download-card p { font-size: 16px; color: var(--ink-soft); margin-bottom: 18px; }
.download-card .meta {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-faint);
  letter-spacing: .005em;
  margin-top: 14px;
}
@media (max-width: 720px) { .download-grid { grid-template-columns: 1fr; } }

/* ---------- Reduced motion ----------------------------------------------*/
@media (prefers-reduced-motion: reduce) {
  [data-fade], [data-fade-words] .word {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .hero-scene__inner { transition: none !important; }
  .room-frame { transition: none !important; }
  .btn { transition: none !important; }
}

/* ---------- Responsive nav ----------------------------------------------*/
@media (max-width: 820px) {
  .nav-links { display: none; }
  .nav-actions .btn { display: none; }
  .nav-toggle { display: inline-flex; }
}

/* ---------- Reference subhero (shortcuts / recipes / changelog) ---------*/
.subhero {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(56px, 7vw, 96px) var(--gutter-x) clamp(36px, 4.5vw, 56px);
}
.subhero .eyebrow { margin-bottom: 22px; }
.subhero h1 {
  font-size: clamp(36px, 5.4vw, 64px);
  font-style: italic;
  margin-bottom: 22px;
  line-height: 1.06;
}
.subhero h1 em { font-style: normal; }
.subhero .lede { margin: 0 auto; max-width: 600px; }
.subhero .subhero-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
  flex-wrap: wrap;
}

/* ---------- Reference layout wrapper ------------------------------------*/
.ref-wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 var(--gutter-x) clamp(80px, 9vw, 132px);
}
.ref-wrap.narrow { max-width: 720px; }

/* ---------- Print button -------------------------------------------------*/
.print-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  background: var(--paper-warm);
  border: 1px solid var(--ink-line);
  border-radius: 999px;
  padding: 9px 16px;
  cursor: pointer;
  letter-spacing: .01em;
  transition: border-color .25s ease, color .25s ease, background .25s ease;
}
.print-btn:hover {
  border-color: var(--gilt);
  color: var(--ink-deep);
  background: var(--paper-deep);
}
.print-btn svg { width: 14px; height: 14px; }

/* ---------- Shortcuts cheat sheet ----------------------------------------*/
.shortcuts-card {
  background: var(--paper-warm);
  border: 1px solid var(--ink-line);
  border-radius: 10px;
  padding: clamp(28px, 4vw, 56px);
  box-shadow: var(--shadow-md);
}
.shortcuts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(36px, 4vw, 56px) clamp(28px, 4vw, 64px);
}
.shortcuts-section { break-inside: avoid; page-break-inside: avoid; }
.shortcuts-section h2 {
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  color: var(--ink-deep);
  margin: 0 0 4px;
}
.shortcuts-section .section-rule {
  width: 36px;
  height: 1px;
  background: var(--gilt);
  margin: 0 0 18px;
  display: block;
}
.kbd-row {
  display: grid;
  grid-template-columns: minmax(0, 130px) minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px dotted var(--ink-line);
}
.kbd-row:last-child { border-bottom: none; }
.kbd-row .keys {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}
.kbd-row .keys kbd {
  font-family: var(--mono);
  font-size: 11.5px;
  padding: 3px 8px;
  background: var(--paper);
  border: 1px solid var(--ink-line);
  color: var(--ink-deep);
  box-shadow: inset 0 -1px 0 var(--ink-line);
  border-radius: 5px;
  white-space: nowrap;
}
.kbd-row .keys .plus {
  font-family: var(--sans);
  font-size: 11px;
  color: var(--ink-faint);
  margin: 0 1px;
}
.kbd-row .label {
  font-family: var(--serif);
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.4;
}

@media (max-width: 880px) {
  .shortcuts-grid { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 480px) {
  .kbd-row { grid-template-columns: 110px 1fr; gap: 12px; }
  .kbd-row .label { font-size: 14px; }
}

/* ---------- Recipes ------------------------------------------------------*/
.recipes-list {
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 3vw, 36px);
}
.recipe-card {
  background: var(--paper-warm);
  border: 1px solid var(--ink-line);
  border-radius: 10px;
  padding: clamp(28px, 3.5vw, 48px);
  box-shadow: var(--shadow-sm);
  position: relative;
}
.recipe-card .recipe-num {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gilt-deep);
  margin-bottom: 10px;
  display: block;
}
.recipe-card h2 {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(24px, 2.6vw, 30px);
  color: var(--ink-deep);
  margin: 0 0 16px;
  line-height: 1.2;
  letter-spacing: -0.012em;
}
.recipe-card p {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-soft);
}
.recipe-card .recipe-steps {
  margin: 22px 0 0;
  padding: 22px 0 0;
  border-top: 1px solid var(--ink-rule);
  list-style: none;
  counter-reset: step;
}
.recipe-card .recipe-steps li {
  counter-increment: step;
  position: relative;
  padding-left: 38px;
  margin: .5em 0;
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.recipe-card .recipe-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 26px; height: 26px;
  border-radius: 999px;
  background: var(--paper-deep);
  border: 1px solid var(--ink-line);
  color: var(--gilt-deep);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.recipe-card .recipe-steps li kbd {
  font-family: var(--mono);
  font-size: 11.5px;
}

/* ---------- Changelog ----------------------------------------------------*/
.changelog-list {
  display: flex;
  flex-direction: column;
  gap: clamp(48px, 6vw, 80px);
}
.changelog-entry {
  border-top: 1px solid var(--ink-line);
  padding-top: clamp(28px, 3vw, 40px);
}
.changelog-entry:first-child {
  border-top: none;
  padding-top: 0;
}
.changelog-entry .changelog-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 14px 22px;
  margin-bottom: 16px;
}
.changelog-entry .changelog-version {
  font-family: var(--serif);
  font-size: clamp(28px, 3.4vw, 38px);
  font-weight: 400;
  color: var(--ink-deep);
  letter-spacing: -0.012em;
}
.changelog-entry .changelog-date {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gilt-deep);
}
.changelog-entry .changelog-tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: 19px;
  color: var(--ink-soft);
  margin-bottom: 28px;
  line-height: 1.5;
}
.changelog-entry h3 {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gilt-deep);
  font-weight: 500;
  margin: 28px 0 14px;
}
.changelog-entry h3:first-of-type { margin-top: 6px; }
.changelog-entry ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1em;
}
.changelog-entry ul li {
  position: relative;
  padding-left: 22px;
  margin: .4em 0;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.changelog-entry ul li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: .8em;
  width: 8px;
  height: 1px;
  background: var(--gilt);
}

/* ---------- Print --------------------------------------------------------*/
@media print {
  .nav, .footer, .cookie, .nav-drawer, .hero-scene, .print-btn, .skip-link, .subhero-actions { display: none !important; }
  body { background: white; color: black; }
  body::before { display: none !important; }

  .subhero { padding-top: 0; padding-bottom: 16px; }
  .subhero h1 { font-size: 28px; margin-bottom: 8px; }
  .subhero .lede { font-size: 13px; }
  .subhero .eyebrow { display: none; }

  .shortcuts-card {
    background: white;
    border: none;
    box-shadow: none;
    padding: 0;
  }
  .shortcuts-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px 32px;
  }
  .shortcuts-section {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .shortcuts-section h2 { font-size: 14px; }
  .kbd-row {
    padding: 3px 0;
    border-bottom: none;
    grid-template-columns: 100px 1fr;
    gap: 10px;
  }
  .kbd-row .label { font-size: 11px; }
  .kbd-row .keys kbd {
    font-size: 9.5px;
    padding: 1px 5px;
    background: white;
    border: 1px solid #999;
    color: black;
    box-shadow: none;
  }
  @page { margin: 0.5in; }
}
