/* ═══════════════════════════════════════════════════════════════════════════
   VAULT — Will C. Web Design
   Editorial Monograph (extends willcwebdesign.com tokens)
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  /* Colors — match main site */
  --ink: #0f0d0b;
  --ink-soft: #1a1815;
  --ink-line: #2a2722;
  --cream: #fbf6eb;
  --cream-soft: #f4eedd;
  --cream-line: #e8dfc8;
  --amber: #d97706;
  --amber-soft: #f59e0b;
  --amber-dim: #92400e;
  --mute-dark: #8a827a;
  --mute-light: #6b625a;

  /* Type */
  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Spacing */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px;
  --s-6: 24px; --s-8: 32px; --s-10: 40px; --s-12: 48px;
  --s-14: 56px; --s-16: 64px; --s-20: 80px; --s-24: 96px;
  --s-32: 128px; --s-40: 160px; --s-48: 192px;

  --r-sm: 2px; --r-md: 4px; --r-lg: 8px; --r-full: 999px;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 180ms; --dur: 340ms; --dur-slow: 640ms;

  --max: 1200px;
  --max-narrow: 760px;
  --gutter: clamp(20px, 4vw, 48px);
}

/* ── RESET ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--cream);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; background: none; border: 0; cursor: pointer; color: inherit; }
ul { list-style: none; }
h1, h2, h3, h4 { font-weight: 500; line-height: 1.05; text-wrap: balance; }
p { text-wrap: pretty; }
::selection { background: var(--amber); color: var(--ink); }

/* ── NOISE ───────────────────────────────────────────────────────────────── */
.ink-surface { position: relative; }
.ink-surface::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.7 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
  z-index: 1;
}

/* ── LAYOUT ─────────────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
  z-index: 2;
}
.container--narrow { max-width: var(--max-narrow); }

.section {
  padding: clamp(var(--s-16), 10vw, var(--s-32)) 0;
  position: relative;
}
.section--tight { padding: clamp(var(--s-10), 6vw, var(--s-16)) 0; }
.section--ink { background: var(--ink); color: var(--cream); }
.section--cream { background: var(--cream); color: var(--ink); }
.section--ink-soft { background: var(--ink-soft); color: var(--cream); }

/* ── TYPE ────────────────────────────────────────────────────────────────── */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--amber-soft);
  margin-bottom: var(--s-6);
}
.section--cream .eyebrow { color: var(--amber-dim); }

h1, .h1 {
  font-family: var(--serif);
  font-size: clamp(40px, 7vw, 80px);
  line-height: 1.02;
  letter-spacing: -0.02em;
}
h2, .h2 {
  font-family: var(--serif);
  font-size: clamp(30px, 4.5vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.015em;
}
h3, .h3 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.h-em {
  font-style: italic;
  font-family: var(--serif);
  color: var(--amber-soft);
}
.section--cream .h-em { color: var(--amber-dim); }

.lede {
  font-family: var(--serif);
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.45;
  color: var(--mute-dark);
  max-width: 60ch;
}
.section--cream .lede { color: var(--mute-light); }

.body {
  font-size: clamp(15px, 1.6vw, 17px);
  line-height: 1.65;
  max-width: 64ch;
}

/* ── NAV (floating pill, mirrors willcwebdesign.com main site) ───────────── */
.nav {
  position: fixed;
  top: 20px;
  left: 16px;
  right: 16px;
  margin: 0 auto;
  max-width: 1100px;
  z-index: 100;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 10px 10px 22px;
  background: rgba(15, 13, 11, 0.72);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid rgba(251, 246, 235, 0.08);
  border-radius: var(--r-full);
  box-shadow: 0 12px 40px -10px rgba(0, 0, 0, 0.5);
  gap: var(--s-4);
}
.nav__logo {
  display: inline-flex;
  align-items: baseline;
  gap: var(--s-2);
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
  letter-spacing: -0.015em;
  color: var(--cream);
}
.nav__logo small {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--mute-dark);
}
.nav__center {
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav__link {
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--cream);
  opacity: 0.72;
  border-radius: var(--r-full);
  transition: opacity var(--dur-fast) var(--ease),
              background var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease);
}
.nav__link:hover { opacity: 1; background: rgba(251, 246, 235, 0.06); }
.nav__link.is-active { opacity: 1; color: var(--amber); }
.nav__cta {
  display: inline-flex;
  align-items: center;
  padding: 12px 22px;
  background: var(--amber);
  color: var(--ink);
  border-radius: var(--r-full);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: background var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.nav__cta:hover { background: var(--amber-soft); transform: translateY(-1px); }

@media (max-width: 860px) {
  .nav { top: 12px; left: 12px; right: 12px; }
  .nav__inner { padding: 8px 8px 8px 18px; gap: var(--s-2); }
  .nav__center { display: none; }
  .nav__cta { padding: 10px 18px; font-size: 13px; }
}

/* ── QUIET HERO (library framing) ─────────────────────────────────────────── */
.quiet-hero {
  /* Top padding clears the floating fixed nav (~88px tall + 20px gap).
     Bottom padding extended so the long ink-fade has room to breathe. */
  padding: clamp(var(--s-24), 14vw, var(--s-40)) 0 clamp(var(--s-20), 12vw, var(--s-32));
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
/* Animated background canvas (grainient) sits at the very back */
.quiet-hero[data-grainient] > canvas,
.quiet-hero[data-aurora] > canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* Blur + darken overlay over the animated background.
   Sits above the canvas, below the noise + content.
   One smooth gradient: 72% ink wash at the top, ramping to solid --ink at
   the bottom so the hero dissolves into the next section's color. */
.quiet-hero[data-grainient]::before,
.quiet-hero[data-aurora]::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    to top,
    var(--ink) 0%,
    rgba(15, 13, 11, 0.72) 80%,
    rgba(15, 13, 11, 0.72) 100%
  );
  backdrop-filter: blur(48px) saturate(0.85);
  -webkit-backdrop-filter: blur(48px) saturate(0.85);
}

/* Noise overlay above blur, below content */
.quiet-hero.ink-surface::after { z-index: 2; }

/* Content sits on top of everything */
.quiet-hero .container { position: relative; z-index: 3; }

/* Section that follows the hero has minimal top padding —
   the hero's long ink-fade already gives the breathing room. */
.quiet-hero + .section {
  padding-top: clamp(var(--s-2), 1.5vw, var(--s-4));
}
.quiet-hero__head {
  font-family: var(--serif);
  font-size: clamp(40px, 6vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin-bottom: var(--s-6);
  max-width: 18ch;
  color: var(--cream);
}

/* Gradient text on hero eyebrow labels only — adapted from
   reactbits.dev/text-animations/gradient-text */
.quiet-hero .eyebrow {
  background-image: linear-gradient(
    to right,
    #d97706 0%,
    #f59e0b 25%,
    #fde68a 50%,
    #f59e0b 75%,
    #d97706 100%
  );
  background-size: 300% 100%;
  background-position: 0% 50%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: gradient-flow 8s ease-in-out infinite alternate;
  display: inline-block;
}

@keyframes gradient-flow {
  0%   { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

@media (prefers-reduced-motion: reduce) {
  .quiet-hero .eyebrow {
    animation: none;
    background-position: 50% 50%;
  }
}
.quiet-hero__lede {
  font-family: var(--serif);
  font-size: clamp(19px, 2vw, 23px);
  line-height: 1.5;
  color: var(--mute-dark);
  max-width: 56ch;
  margin-bottom: var(--s-8);
}

/* ── BUTTONS ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-4) var(--s-8);
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--r-md);
  transition: transform var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
  border: 1px solid transparent;
}
.btn--primary {
  background: var(--amber);
  color: var(--ink);
}
.btn--primary:hover { background: var(--amber-soft); transform: translateY(-1px); }
.btn--ghost {
  background: transparent;
  color: var(--cream);
  border-color: var(--ink-line);
}
.btn--ghost:hover { border-color: var(--cream); }
.section--cream .btn--ghost { color: var(--ink); border-color: var(--cream-line); }
.section--cream .btn--ghost:hover { border-color: var(--ink); }
.btn__arrow {
  font-family: var(--mono);
  font-size: 13px;
  transition: transform var(--dur-fast) var(--ease);
}
.btn:hover .btn__arrow { transform: translateX(3px); }

/* ── PILLS (sub-niche filter) ────────────────────────────────────────────── */
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin: var(--s-6) 0 var(--s-10);
}
.pills--filter { margin-top: var(--s-6); margin-bottom: 0; }
.pill {
  padding: var(--s-2) var(--s-4);
  border: 1px solid var(--cream);
  border-radius: var(--r-full);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--mute-dark);
  transition: all var(--dur-fast) var(--ease);
}
.pill:hover { border-color: var(--cream); color: var(--cream); }
.pill.is-active {
  background: var(--amber);
  border-color: var(--cream);
  color: var(--ink);
}
.section--cream .pill { border-color: var(--cream-line); color: var(--mute-light); }
.section--cream .pill:hover { border-color: var(--ink); color: var(--ink); }

/* ── PAIN GRID ───────────────────────────────────────────────────────────── */
.pain-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--s-6);
  margin-top: var(--s-10);
}
.pain {
  padding: var(--s-8);
  background: var(--ink-soft);
  border: 1px solid var(--ink-line);
  border-radius: var(--r-md);
}
.section--cream .pain { background: var(--cream-soft); border-color: var(--cream-line); }
.pain__quote {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.35;
  color: var(--cream);
  margin-bottom: var(--s-3);
}
.section--cream .pain__quote { color: var(--ink); }
.pain__quote::before, .pain__quote::after { content: '"'; color: var(--amber-soft); }
.section--cream .pain__quote::before, .section--cream .pain__quote::after { color: var(--amber-dim); }
.pain__source {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--mute-dark);
}

/* ── WEDGE ───────────────────────────────────────────────────────────────── */
.wedge {
  border-left: 3px solid var(--amber);
  padding: var(--s-6) 0 var(--s-6) var(--s-8);
}
.wedge__claim {
  font-family: var(--serif);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.25;
  margin-bottom: var(--s-4);
}

/* ═══════════════════════════════════════════════════════════════════════════
   MAGIC BENTO (vault library cards)
   Adapted from reactbits.dev/components/magic-bento — amber palette, no GSAP
   ═══════════════════════════════════════════════════════════════════════════ */
:root {
  --bento-glow: 217, 119, 6;          /* amber #d97706 as RGB triplet */
  --bento-bg: #120F17;
  --bento-border: rgba(255, 255, 255, 0.06);
  --bento-radius: 18px;
}

/* ── LIBRARY SEARCH ──────────────────────────────────────────────────────── */
.library-search {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--s-4);
  width: 100%;
  margin: 0 0 var(--s-4);
}
.library-search__field {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  padding: 12px 16px 12px 44px;
  background: rgba(15, 13, 11, 0.6);
  border: 1px solid rgba(251, 246, 235, 0.12);
  border-radius: var(--r-full);
  transition: border-color var(--dur-fast) var(--ease),
              background var(--dur-fast) var(--ease);
}
.library-search__field:focus-within {
  border-color: var(--amber);
  background: rgba(15, 13, 11, 0.72);
}
.library-search__icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--mute-dark);
  pointer-events: none;
  display: inline-flex;
}
.library-search__field:focus-within .library-search__icon { color: var(--amber-soft); }
.library-search__input {
  flex: 1;
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--cream);
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.02em;
  outline: 0;
}
.library-search__input::placeholder { color: var(--mute-dark); }
.library-search__input::-webkit-search-cancel-button { -webkit-appearance: none; }
.library-search__clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  margin-left: var(--s-2);
  border-radius: var(--r-full);
  color: var(--mute-dark);
  background: transparent;
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.library-search__clear:hover { color: var(--cream); background: rgba(251, 246, 235, 0.08); }
.library-search__count {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--mute-dark);
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.library-search__empty {
  grid-column: 1 / -1;
  padding: var(--s-12) var(--s-6);
  text-align: center;
  font-family: var(--serif);
  font-size: clamp(18px, 1.6vw, 22px);
  color: var(--mute-dark);
}

/* Mobile adapt — single column, 16px input to prevent iOS zoom-on-focus,
   bigger tap targets, count moves below the input. */
@media (max-width: 720px) {
  .library-search {
    grid-template-columns: 1fr;
    gap: var(--s-2);
  }
  .library-search__field {
    padding: 14px 14px 14px 42px;
  }
  .library-search__icon { left: 14px; }
  .library-search__input {
    font-size: 16px;
  }
  .library-search__clear {
    width: 32px;
    height: 32px;
  }
  .library-search__count {
    font-size: 10px;
    text-align: left;
    padding-left: var(--s-4);
  }
  .library-search__empty {
    padding: var(--s-10) var(--s-4);
    font-size: 17px;
  }
}

.library {
  position: relative;
  display: grid;
  gap: var(--s-3);
  margin-top: var(--s-3);
  user-select: none;
  grid-template-columns: 1fr;
}
/* Hide non-matching cards while search is active */
.library__item[data-hidden] { display: none !important; }
@media (min-width: 600px) {
  .library { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  /* Mixed-size bento: 4 cols × 3 rows, two 2×2 hero cards (cards 3 + 4) */
  .library {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(180px, auto);
  }
  .library__item:nth-child(3) {
    grid-column: span 2;
    grid-row: span 2;
  }
  .library__item:nth-child(4) {
    grid-column: 1 / span 2;
    grid-row: 2 / span 2;
  }
  .library__item:nth-child(6) {
    grid-column: 4;
    grid-row: 3;
  }
  /* If page has exactly 5 cards, stretch card 5 to fill remaining cells */
  .library__item:nth-child(5):last-child {
    grid-column: 3 / span 2;
  }

  /* When search is active, drop the bento spans so the filtered results
     reflow into a clean uniform grid instead of leaving 2×2 gaps. */
  .library[data-search-active] .library__item:nth-child(3),
  .library[data-search-active] .library__item:nth-child(4),
  .library[data-search-active] .library__item:nth-child(5):last-child,
  .library[data-search-active] .library__item:nth-child(6) {
    grid-column: auto;
    grid-row: auto;
  }
  .library[data-search-active] .library__item:nth-child(3) .library__title,
  .library[data-search-active] .library__item:nth-child(4) .library__title {
    font-size: clamp(22px, 2.2vw, 28px);
  }
  .library[data-search-active] .library__item:nth-child(3) .library__hook,
  .library[data-search-active] .library__item:nth-child(4) .library__hook {
    font-size: 14px;
    line-height: 1.55;
  }

  /* Bigger cards get bigger title + description so the type doesn't
     feel small against the card area. */
  .library__item:nth-child(3) .library__title,
  .library__item:nth-child(4) .library__title {
    font-size: clamp(28px, 2.8vw, 36px);
    line-height: 1.1;
  }
  .library__item:nth-child(3) .library__hook,
  .library__item:nth-child(4) .library__hook {
    font-size: clamp(16px, 1.35vw, 18px);
    line-height: 1.6;
  }
  /* Card 5 stretched to 2 cols (5-card pages) gets a smaller bump */
  .library__item:nth-child(5):last-child .library__hook {
    font-size: clamp(15px, 1.2vw, 16px);
  }
}

.library__item {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--s-3);
  min-height: 220px;
  padding: var(--s-8);
  background: var(--bento-bg);
  border: 1px solid var(--bento-border);
  border-radius: var(--bento-radius);
  overflow: hidden;
  cursor: default;
  transition:
    transform 0.3s var(--ease),
    box-shadow 0.3s var(--ease),
    border-color 0.3s var(--ease);

  /* mouse-tracked custom properties (set by bento.js) */
  --glow-x: 50%;
  --glow-y: 50%;
  --glow-intensity: 0;
  --glow-radius: 220px;
}

.library__item:hover {
  transform: translateY(-2px);
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(var(--bento-glow), 0.15);
  border-color: rgba(var(--bento-glow), 0.25);
}

/* Cursor-following border glow (the signature effect) */
.library__item::after {
  content: '';
  position: absolute;
  inset: 0;
  padding: 1.5px;
  background: radial-gradient(
    var(--glow-radius) circle at var(--glow-x) var(--glow-y),
    rgba(var(--bento-glow), calc(var(--glow-intensity) * 0.9)) 0%,
    rgba(var(--bento-glow), calc(var(--glow-intensity) * 0.4)) 30%,
    transparent 60%
  );
  border-radius: inherit;
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.3s var(--ease);
}

/* Card content */
.library__type {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(var(--bento-glow), 0.95);
  position: relative;
  z-index: 1;
}
.library__title {
  font-family: var(--serif);
  font-size: clamp(22px, 2.2vw, 28px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--cream);
  position: relative;
  z-index: 1;
}
.library__hook {
  font-size: 14px;
  line-height: 1.55;
  color: var(--mute-dark);
  position: relative;
  z-index: 1;
}
.library__status {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--mute-light);
  position: relative;
  z-index: 1;
}
.library__status--live {
  color: var(--amber);
}

.library__item--link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

/* Vault email gate · success state replaces the form after submit */
.gate__success {
  text-align: center;
  padding: var(--s-3) 0;
}
.gate__success-mark {
  font-family: var(--mono);
  font-size: 36px;
  line-height: 1;
  color: #4ade80;
  margin: 0 0 var(--s-3);
}
.gate__success-head {
  font-family: var(--serif);
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.2;
  color: var(--cream);
  margin: 0 0 var(--s-3);
}
.gate__success-sub {
  font-size: 14px;
  line-height: 1.55;
  color: var(--mute-dark);
  max-width: 440px;
  margin: 0 auto;
}
.gate__err {
  font-size: 13px;
  color: #f87171;
  margin: var(--s-3) 0 0;
  text-align: center;
}

/* Back-to-vault link · sits inside the hero, just below the lede paragraph */
.back-to-vault {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: var(--s-6);
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--mute-light);
  text-decoration: none;
  padding: 4px 0;
  transition: color var(--dur-fast) var(--ease);
}
.back-to-vault:hover { color: var(--amber-soft); }
.back-to-vault::before {
  content: "←";
  font-family: var(--mono);
  transition: transform var(--dur-fast) var(--ease);
}
.back-to-vault:hover::before { transform: translateX(-3px); }

/* Particles + click ripple (injected by bento.js) */
.bento-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(var(--bento-glow), 1);
  box-shadow: 0 0 6px rgba(var(--bento-glow), 0.6);
  pointer-events: none;
  z-index: 3;
  opacity: 0;
  transform: scale(0);
}
.bento-ripple {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 4;
  background: radial-gradient(
    circle,
    rgba(var(--bento-glow), 0.4) 0%,
    rgba(var(--bento-glow), 0.2) 30%,
    transparent 70%
  );
  transform: scale(0);
  opacity: 1;
}

/* Global spotlight (fixed-position element appended by bento.js) */
.bento-spotlight {
  position: fixed;
  width: 800px;
  height: 800px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(
    circle,
    rgba(var(--bento-glow), 0.18) 0%,
    rgba(var(--bento-glow), 0.10) 15%,
    rgba(var(--bento-glow), 0.05) 25%,
    rgba(var(--bento-glow), 0.02) 40%,
    rgba(var(--bento-glow), 0.01) 65%,
    transparent 70%
  );
  z-index: 200;
  opacity: 0;
  transform: translate(-50%, -50%);
  mix-blend-mode: screen;
  transition: opacity 0.3s var(--ease);
  will-change: transform, opacity;
}

@media (prefers-reduced-motion: reduce) {
  .library__item { transition: none; }
  .library__item:hover { transform: none; }
  .bento-spotlight, .bento-particle, .bento-ripple { display: none; }
}

/* ── AUDIT CTA ───────────────────────────────────────────────────────────── */
.cta {
  padding: clamp(var(--s-16), 10vw, var(--s-24)) 0;
  background: var(--cream);
  color: var(--ink);
  text-align: center;
}
.cta__head {
  font-family: var(--serif);
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.05;
  margin: 0 auto var(--s-6);
  max-width: 22ch;
}
.cta__lede {
  font-size: clamp(15px, 1.6vw, 17px);
  color: var(--mute-light);
  max-width: 56ch;
  margin: 0 auto var(--s-10);
}

/* ── FOOTER ──────────────────────────────────────────────────────────────── */
.footer {
  padding: var(--s-12) 0;
  background: var(--ink);
  color: var(--mute-dark);
  border-top: 1px solid var(--ink-line);
  font-size: 13px;
}
.footer__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s-4);
}
.footer__nav {
  display: flex;
  gap: var(--s-6);
  flex-wrap: wrap;
}

/* ── HUB GRID (root index) ───────────────────────────────────────────────── */
.hubs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--s-6);
  margin-top: var(--s-12);
}
.hub-card {
  padding: var(--s-10);
  background: var(--ink-soft);
  border: 1px solid var(--ink-line);
  border-radius: var(--r-md);
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}
.hub-card:hover { border-color: var(--amber); transform: translateY(-2px); }
.hub-card__name {
  font-family: var(--serif);
  font-size: clamp(28px, 3vw, 36px);
  line-height: 1.1;
}
.hub-card__claim {
  font-size: 15px;
  color: var(--mute-dark);
  flex-grow: 1;
}
.hub-card__arrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber-soft);
}

/* ── UTIL ────────────────────────────────────────────────────────────────── */
.section-label {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin-bottom: var(--s-6);
}
.section-label__num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--amber-soft);
  letter-spacing: 0.18em;
}
.section--cream .section-label__num { color: var(--amber-dim); }
.section-label__line {
  flex: 1;
  height: 1px;
  background: var(--ink-line);
  max-width: 80px;
}
.section--cream .section-label__line { background: var(--cream-line); }

.skip-link {
  position: absolute; left: -9999px;
}
.skip-link:focus { left: 16px; top: 16px; background: var(--amber); color: var(--ink); padding: 8px 16px; z-index: 100; }
