/*
 * Tathyastra marketing site.
 *
 * Big type on solid colour. Every section is a block that commits to one
 * background: violet, cream, ink or a photograph. Bricolage Grotesque does the
 * shouting, Inter does the talking.
 */

:root {
  --cream: #f7f1e5;
  --cream-2: #efe7d7;
  --paper: #fffdf9;

  --ink: #14111b;
  --ink-2: #3b3548;
  --ink-soft: #6a6379;
  --ink-faint: #948da1;

  --violet: #5b4bd6;
  --violet-deep: #3d2cad;
  --violet-lift: #7461ef;

  --amber: #f5a524;
  --lime: #c8e64f;

  --rule: #e2d9c6;
  --rule-ink: #2a2437;

  --on-violet: #f4f0ff;
  --on-violet-soft: #e0daff;
  --on-ink: #f6f3fb;
  --on-ink-soft: #a49dbb;

  --display: "Bricolage Grotesque", "Inter", ui-sans-serif, system-ui, sans-serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;

  --maxw: 1240px;
  --gut: 24px;
  --r: 20px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 92px;
  background: var(--cream);
}

body {
  font-family: var(--sans);
  font-size: 17.5px;
  line-height: 1.6;
  color: var(--ink-2);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
::selection { background: var(--lime); color: var(--ink); }

/* ---------------------------------------------------------------- type ---- */

h1, h2, h3, .mega {
  font-family: var(--display);
  font-weight: 700;
  color: var(--ink);
  line-height: 0.98;
  letter-spacing: -0.032em;
  text-wrap: balance;
  font-variation-settings: "wdth" 100;
}

.mega, h1 { font-size: clamp(50px, 8.4vw, 122px); line-height: 0.92; letter-spacing: -0.042em; }
h2 { font-size: clamp(36px, 5vw, 68px); }
h3 { font-size: clamp(23px, 2.5vw, 32px); line-height: 1.06; letter-spacing: -0.026em; }

h4 {
  font-family: var(--sans);
  font-size: 17.5px; font-weight: 650;
  color: var(--ink); letter-spacing: -0.012em; line-height: 1.35;
}

p { text-wrap: pretty; }

.lede { font-size: clamp(18px, 1.8vw, 22px); line-height: 1.5; color: var(--ink-2); }
.eyebrow {
  display: inline-block; font-size: 12px; font-weight: 650;
  letter-spacing: 0.15em; text-transform: uppercase; color: var(--violet);
}
.muted { color: var(--ink-soft); }
.small { font-size: 16px; line-height: 1.58; }
.tiny { font-size: 13.5px; line-height: 1.55; color: var(--ink-soft); }
.hl { background: var(--lime); color: var(--ink); padding: 0 .12em; border-radius: 3px; }

/* -------------------------------------------------------------- blocks ---- */

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gut); }
.wrap-narrow { max-width: 820px; }

section { position: relative; }
.block { padding: clamp(72px, 8.5vw, 132px) 0; }
.block-tight { padding: clamp(48px, 5.5vw, 76px) 0; }

.b-cream { background: var(--cream); }
.b-paper { background: var(--paper); }

.b-violet { background: var(--violet); color: var(--on-violet-soft); }
.b-violet h1, .b-violet h2, .b-violet h3, .b-violet h4, .b-violet .mega { color: #fff; }
.b-violet .lede { color: var(--on-violet); }
.b-violet .muted, .b-violet .tiny { color: var(--on-violet-soft); }
.b-violet .eyebrow { color: var(--lime); }

.b-ink { background: var(--ink); color: var(--on-ink-soft); }
.b-ink h1, .b-ink h2, .b-ink h3, .b-ink h4, .b-ink .mega { color: var(--on-ink); }
.b-ink .lede { color: #d5d0e2; }
.b-ink .muted, .b-ink .tiny { color: var(--on-ink-soft); }
.b-ink .eyebrow { color: var(--lime); }

/* ---------------------------------------------------------------- nav ----- */

.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  background: rgba(247, 241, 229, .88);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--rule);
  transition: background .25s ease, border-color .25s ease;
}

/* The paper bar is the default so the nav is readable with scripts blocked.
   While it is still over the hero, script adds .ghost and it goes see-through
   with light contents, because every page opens on violet or a photograph. */
.nav.ghost:not(.open) {
  background: transparent;
  backdrop-filter: none;
  border-bottom-color: transparent;
}
.nav.ghost:not(.open) .brand,
.nav.ghost:not(.open) .nav-links a { color: #fff; }
.nav.ghost:not(.open) .nav-links a:hover { color: var(--lime); }
.nav.ghost:not(.open) .nav-links a.on { box-shadow: inset 0 -2px 0 var(--lime); }
.nav.ghost:not(.open) .btn-quiet { color: rgba(255, 255, 255, .86); }
.nav.ghost:not(.open) .btn-quiet:hover { color: #fff; }
.nav.ghost:not(.open) .btn-primary { background: var(--cream); color: var(--ink); }
.nav.ghost:not(.open) .btn-primary:hover { background: #fff; }
.nav.ghost:not(.open) .burger {
  background: rgba(255, 255, 255, .14);
  border-color: rgba(255, 255, 255, .42);
  backdrop-filter: blur(8px);
}
.nav.ghost:not(.open) .brand svg rect { fill: rgba(255, 255, 255, .22); }
.nav.ghost:not(.open) .burger span,
.nav.ghost:not(.open) .burger span::before,
.nav.ghost:not(.open) .burger span::after { background: #fff; }
.nav-in { display: flex; align-items: center; gap: 30px; height: 72px; }

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--display); font-weight: 700; font-size: 21px;
  color: var(--ink); letter-spacing: -0.03em;
}
.brand svg { display: block; }

.nav-links { display: flex; align-items: center; gap: 30px; margin-left: auto; font-size: 15.5px; font-weight: 500; }
.nav-links a { color: var(--ink-2); padding: 4px 0; transition: color .15s; }
.nav-links a:hover { color: var(--violet); }
.nav-links a.on { color: var(--ink); box-shadow: inset 0 -2px 0 var(--violet); }
.nav-cta { display: flex; align-items: center; gap: 14px; }

.burger {
  display: none; margin-left: auto; width: 44px; height: 44px;
  align-items: center; justify-content: center;
  border: 1px solid var(--rule); border-radius: 12px;
  background: var(--paper); cursor: pointer;
}
.burger span { display: block; width: 18px; height: 2px; background: var(--ink); position: relative; border-radius: 2px; }
.burger span::before, .burger span::after {
  content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: var(--ink); border-radius: 2px;
}
.burger span::before { top: -6px; }
.burger span::after { top: 6px; }

/* The open menu stays in normal flow and the bar grows to fit it. */
@media (max-width: 920px) {
  .nav-in { flex-wrap: wrap; height: auto; min-height: 72px; }
  .nav-links, .nav-cta { display: none; }
  .burger { display: flex; }
  .nav.open .nav-in { padding-bottom: 18px; }
  .nav.open .nav-links {
    display: flex; order: 3; width: 100%; margin-left: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    padding-top: 8px; border-top: 1px solid var(--rule);
  }
  .nav.open .nav-links a { padding: 13px 0; width: 100%; font-size: 18px; }
  .nav.open .nav-cta { display: flex; order: 4; width: 100%; padding-top: 14px; border-top: 1px solid var(--rule); }
}

/* ------------------------------------------------------------- buttons ---- */

.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--sans); font-size: 16px; font-weight: 600;
  padding: 14px 24px; border-radius: 999px;
  border: 2px solid transparent; cursor: pointer;
  transition: background .16s, border-color .16s, color .16s, transform .12s;
  white-space: nowrap; letter-spacing: -0.01em;
}
.btn:active { transform: translateY(1px); }
.btn-sm { font-size: 15px; padding: 11px 20px; }

.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--violet-deep); }

.btn-ghost { border-color: var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--cream); }

.btn-quiet { color: var(--ink-2); padding: 12px 2px; font-weight: 500; }
.btn-quiet:hover { color: var(--violet); }

/* On a violet or ink block the light button leads. */
.b-violet .btn-primary { background: var(--cream); color: var(--ink); }
.b-violet .btn-primary:hover { background: #fff; }
.b-ink .btn-primary { background: var(--lime); color: var(--ink); }
.b-ink .btn-primary:hover { background: #fff; }
.b-violet .btn-ghost, .b-ink .btn-ghost { border-color: rgba(255, 255, 255, .45); color: #fff; }
.b-violet .btn-ghost:hover, .b-ink .btn-ghost:hover { background: #fff; color: var(--ink); border-color: #fff; }

.arrow { transition: transform .18s; }
a:hover > .arrow, .btn:hover .arrow { transform: translateX(3px); }

.link-more { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 16px; color: var(--violet); }
.link-more:hover { color: var(--violet-deep); }
.b-violet .link-more, .b-ink .link-more { color: var(--lime); }

/* ---------------------------------------------------------------- hero ---- */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--violet);
  color: var(--on-violet-soft);
  /* The bar floats, so the hero carries its height in its own top padding. */
  padding: calc(72px + clamp(48px, 5.5vw, 88px)) 0 clamp(56px, 6vw, 92px);
}
.hero .mega { color: #fff; max-width: 15ch; }

/* The photographic hero runs nearly the height of the window and hangs its
   type off the bottom, the way a cover does. */
.hero-photo {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: min(93vh, 920px);
  padding-top: calc(72px + 48px);
  padding-bottom: clamp(52px, 7vw, 104px);
}
.hero-photo .mega { max-width: 17ch; }

.hero-bg {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 46%;
}

/* A neutral scrim rising from the foot of the frame. The peaks keep their own
   colour, so the picture reads as a photograph and not as a tinted backdrop.
   Violet appears only in the last stretch, to hand off to the block below. */
.hero-photo::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to top, rgba(74, 58, 200, .2) 0%, rgba(74, 58, 200, .07) 12%, transparent 24%),
    linear-gradient(to top, rgba(12, 9, 24, .7) 0%, rgba(14, 10, 28, .48) 28%, rgba(16, 11, 32, .16) 58%, transparent 86%),
    linear-gradient(to right, rgba(10, 8, 20, .56) 0%, rgba(10, 8, 20, .17) 44%, transparent 66%);
}

/* Stacked, the type runs the whole height of the frame, so the scrim flattens
   into an overall wash that only lets the peak through at the top. */
@media (max-width: 900px) {
  .hero-photo::before {
    background:
      linear-gradient(to top, rgba(74, 58, 200, .24) 0%, rgba(74, 58, 200, .09) 14%, transparent 26%),
      linear-gradient(to bottom, rgba(10, 8, 22, .4) 0%, rgba(11, 8, 26, .7) 26%, rgba(12, 9, 28, .82) 62%, rgba(13, 10, 32, .86) 100%);
  }
  .hero-bg { object-position: 72% 44%; }
}

.hero-label {
  display: inline-flex; align-items: center; gap: 15px;
  font-size: 12.5px; font-weight: 650; letter-spacing: .17em;
  text-transform: uppercase; color: rgba(255, 255, 255, .84);
}
.hero-label::before {
  content: ""; width: 32px; height: 2px;
  background: var(--lime); border-radius: 2px;
}

.hero-lede {
  max-width: 42ch;
  font-size: clamp(18px, 1.6vw, 21px); line-height: 1.5;
  color: rgba(255, 255, 255, .9);
}

.hero-actions {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 14px 28px; margin-top: clamp(28px, 3vw, 38px);
}

@media (max-width: 560px) {
  .hero-photo { min-height: 0; padding-top: calc(72px + 44px); padding-bottom: clamp(40px, 9vw, 64px); }
}

/* Full-bleed photograph, edge to edge. */
.bleed { position: relative; line-height: 0; background: var(--ink); }
.bleed img { width: 100%; height: clamp(280px, 40vw, 540px); object-fit: cover; }
/* A scrim so the caption stays readable over a bright sky or a dark terrace. */
.bleed::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 40%;
  background: linear-gradient(transparent, rgba(0, 0, 0, .55));
  pointer-events: none;
}
.bleed .credit {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: 20px; z-index: 1;
  width: 100%; max-width: var(--maxw); padding: 0 var(--gut);
  font-size: 13.5px; font-weight: 500; line-height: 1.4; color: rgba(255, 255, 255, .92);
}

/* --------------------------------------------------------------- grids ---- */

.grid { display: grid; gap: 28px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 920px) { .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); } }

.split {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(32px, 5vw, 76px); align-items: center;
}
.split.reverse > :first-child { order: 2; }
@media (max-width: 920px) {
  .split { grid-template-columns: minmax(0, 1fr); gap: 34px; }
  .split.reverse > :first-child { order: 0; }
}

/* --------------------------------------------------------------- cards ---- */

.card { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r); padding: 30px; }
.b-violet .card { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .22); }
.b-ink .card { background: #1d1829; border-color: var(--rule-ink); }

.feat { transition: transform .18s, box-shadow .18s; }
.feat:hover { transform: translateY(-3px); box-shadow: 0 24px 44px -30px rgba(20, 17, 27, .5); }
.feat h3 { margin: 18px 0 10px; }
.feat p { font-size: 16px; color: var(--ink-soft); }
.b-violet .feat p, .b-ink .feat p { color: inherit; }

.ico {
  width: 46px; height: 46px; border-radius: 14px;
  display: grid; place-items: center;
  background: var(--violet); color: #fff;
}
.b-violet .ico { background: var(--lime); color: var(--ink); }
.b-ink .ico { background: var(--violet); color: #fff; }

/* Big numbered rows, used where a feature deserves room. */
.rows { display: grid; }
.row {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(20px, 3vw, 48px); align-items: start;
  padding: clamp(28px, 3.4vw, 46px) 0; border-top: 1px solid var(--rule);
}
.b-ink .row, .b-violet .row { border-top-color: rgba(255, 255, 255, .2); }
.row .no {
  font-family: var(--display); font-weight: 700; font-size: 22px;
  color: var(--violet); letter-spacing: -0.03em; padding-top: 4px;
}
.b-violet .row .no, .b-ink .row .no { color: var(--lime); }
.row p { color: var(--ink-soft); }
.b-violet .row p, .b-ink .row p { color: inherit; }
@media (max-width: 860px) {
  .row { grid-template-columns: 40px minmax(0, 1fr); }
  .row > :last-child { grid-column: 2; }
}

/* ----------------------------------------------------------- shotframe ---- */

.shot { border-radius: var(--r); overflow: hidden; background: var(--paper); border: 1px solid var(--rule); box-shadow: 0 30px 60px -40px rgba(20, 17, 27, .55); }
.shot img { width: 100%; height: auto; }
.b-ink .shot, .b-violet .shot { border-color: rgba(255, 255, 255, .22); }

.shot-bar { display: flex; align-items: center; gap: 6px; padding: 11px 14px; border-bottom: 1px solid var(--rule); background: var(--cream-2); }
.b-ink .shot-bar, .b-violet .shot-bar { background: rgba(0, 0, 0, .25); border-color: rgba(255, 255, 255, .16); }
.shot-bar i { width: 9px; height: 9px; border-radius: 50%; background: #cfc4ad; display: block; }
.shot-bar span { margin-left: 10px; font-family: var(--mono); font-size: 11.5px; color: var(--ink-faint); }

figure { margin: 0; }
figcaption { margin-top: 14px; font-size: 14.5px; line-height: 1.5; color: var(--ink-soft); }
.b-ink figcaption, .b-violet figcaption { color: inherit; }

.photo { border-radius: var(--r); overflow: hidden; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo-tall img { height: clamp(320px, 44vw, 620px); }

/* ---------------------------------------------------------------- misc ---- */

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13.5px; font-weight: 600; padding: 6px 14px;
  border-radius: 999px; border: 1px solid var(--rule); background: var(--paper); color: var(--ink-2);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); }

.ticks { list-style: none; display: grid; gap: 13px; }
/* Absolute marker: a list item may hold a bold lead-in and its sentence, and a
   grid column would put each in its own cell and wrap a word at a time. */
.ticks li { position: relative; padding-left: 30px; font-size: 16.5px; line-height: 1.55; color: var(--ink-2); }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 10px; width: 15px; height: 3px;
  background: var(--violet); border-radius: 3px;
}
.b-violet .ticks li, .b-ink .ticks li { color: inherit; }
.b-violet .ticks li::before, .b-ink .ticks li::before { background: var(--lime); }

/* A day, told as a list of moments. */
.tl { display: grid; }
.tl-row {
  display: grid; grid-template-columns: 104px minmax(0, 1fr);
  gap: 26px; padding: 26px 0; border-top: 1px solid rgba(255, 255, 255, .16);
}
.tl-row:first-child { border-top: 0; padding-top: 0; }
.tl-time { font-family: var(--display); font-weight: 700; font-size: 21px; color: var(--lime); letter-spacing: -0.03em; }
.tl-row h4 { margin-bottom: 6px; font-size: 19px; }
.tl-row p { font-size: 16px; }
@media (max-width: 560px) { .tl-row { grid-template-columns: minmax(0, 1fr); gap: 8px; } }

.stat .n { font-family: var(--display); font-weight: 700; font-size: clamp(40px, 4.6vw, 62px); line-height: 1; letter-spacing: -0.04em; color: var(--ink); }
.b-violet .stat .n, .b-ink .stat .n { color: #fff; }
.stat .l { margin-top: 12px; font-size: 15px; color: var(--ink-soft); }
.b-violet .stat .l, .b-ink .stat .l { color: inherit; }

.ledger { width: 100%; border-collapse: collapse; font-size: 16px; font-variant-numeric: tabular-nums; }
.ledger td { padding: 11px 0; text-align: left; }
.ledger td:last-child { text-align: right; }
.ledger tr + tr { border-top: 1px solid var(--rule); }
.b-violet .ledger tr + tr, .b-ink .ledger tr + tr { border-top-color: rgba(255, 255, 255, .2); }
.ledger .tot { font-weight: 700; color: var(--ink); }
.b-violet .ledger .tot, .b-ink .ledger .tot { color: #fff; }

/* Numbered steps. */
.steps { display: grid; counter-reset: step; }
.step { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 24px; padding: 30px 0; border-top: 1px solid var(--rule); }
.step:first-child { border-top: 0; }
.b-ink .step, .b-violet .step { border-top-color: rgba(255, 255, 255, .2); }
.step::before {
  counter-increment: step; content: counter(step);
  width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center;
  background: var(--violet); color: #fff;
  font-family: var(--display); font-weight: 700; font-size: 20px;
}
.b-ink .step::before, .b-violet .step::before { background: var(--lime); color: var(--ink); }
.step h3 { margin-bottom: 10px; }
.step p { color: var(--ink-soft); }
.b-ink .step p, .b-violet .step p { color: inherit; }
@media (max-width: 560px) { .step { grid-template-columns: minmax(0, 1fr); gap: 14px; } }

.qa { border-top: 1px solid var(--rule); padding: 28px 0; }
.qa h4 { font-size: 19px; margin-bottom: 8px; }
.qa p { color: var(--ink-soft); font-size: 16px; }

.note { border-left: 3px solid var(--violet); padding: 4px 0 4px 18px; font-size: 16px; color: var(--ink-soft); }

/* ---------------------------------------------------------------- form ---- */

.contact-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); align-items: start; }
@media (max-width: 920px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 620px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }

.field { display: grid; gap: 8px; }
.field label { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.field .hint { font-size: 13px; font-weight: 400; color: var(--ink-faint); }

input, select, textarea {
  font-family: var(--sans); font-size: 16px; color: var(--ink);
  background: var(--paper); border: 1.5px solid var(--rule);
  border-radius: 12px; padding: 13px 15px; width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: #a8a0b0; }
textarea { resize: vertical; min-height: 132px; line-height: 1.6; }
select { appearance: none; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--violet); box-shadow: 0 0 0 4px rgba(91, 75, 214, .16);
}
input[aria-invalid="true"], textarea[aria-invalid="true"], select[aria-invalid="true"] { border-color: #c0392b; }
.err { font-size: 13.5px; color: #c0392b; }

.info { display: grid; }
.info dt { font-size: 11.5px; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 6px; }
.info dd { margin-bottom: 22px; font-size: 16px; color: var(--ink-2); }
.info dd a { color: var(--ink); box-shadow: inset 0 -1.5px 0 var(--violet); }
.info dd a:hover { color: var(--violet); }

.placeholder {
  display: inline-block; margin-left: 8px;
  font-size: 10.5px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase;
  color: #8a5d09; background: #fdf0d3; border: 1px solid #edd9a8;
  border-radius: 6px; padding: 2px 7px; vertical-align: 2px;
}

/* --------------------------------------------------------------- aside ---- */

/* A grid item stretches to the row height by default, which leaves sticky no
   slack to slide in. align-self: start makes the list content-height, so it
   pins under the bar and then releases at the end of the chapters on its own. */
.toc {
  position: sticky;
  top: 104px;
  align-self: start;
  max-height: calc(100vh - 150px);
  overflow-y: auto;
  overscroll-behavior: contain;
  display: grid; gap: 2px; align-content: start;
  font-size: 15px;
}
.toc-label {
  font-size: 11.5px; font-weight: 650; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-faint);
  padding-left: 16px; margin-bottom: 12px;
}
.toc a {
  color: var(--ink-soft); padding: 8px 0 8px 16px;
  border-left: 2px solid var(--rule);
  transition: color .15s, border-color .15s;
}
.toc a:hover { color: var(--ink); border-left-color: var(--rule-2, #d8d3c9); }
.toc a.on { color: var(--ink); border-left-color: var(--violet); font-weight: 600; }
.page { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: clamp(30px, 5vw, 70px); }
@media (max-width: 920px) { .page { grid-template-columns: minmax(0, 1fr); } .toc { display: none; } }

.chapter + .chapter { margin-top: clamp(64px, 7vw, 104px); padding-top: clamp(64px, 7vw, 104px); border-top: 1px solid var(--rule); }

/* -------------------------------------------------------------- footer ---- */

.foot { background: var(--ink); color: var(--on-ink-soft); padding: 76px 0 40px; }
.foot h4 { font-family: var(--sans); font-size: 12px; font-weight: 650; letter-spacing: .14em; text-transform: uppercase; color: #7d7592; margin-bottom: 15px; }
.foot a { color: #c8c2d6; font-size: 15.5px; display: block; padding: 5px 0; }
.foot a:hover { color: #fff; }
.foot .brand { color: #fff; }
.foot-top { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1fr; gap: 36px; }
@media (max-width: 820px) { .foot-top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .foot-top { grid-template-columns: 1fr; } }
.foot-bot {
  margin-top: 56px; padding-top: 26px; border-top: 1px solid var(--rule-ink);
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between;
  font-size: 13.5px; color: #7d7592;
}

/* ------------------------------------------------------------- reveal ----- */

.rv { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; } }
