/* ==========================================================================
   Amoris Gratia
   Love and nature, in balance: crimson and rose for love, moss and leaf for
   nature, on warm linen paper; deep forest for the dark moments. Sections
   alternate paper, sage and rose so neither side ever drops out of view.
   Garamond throughout: a well-made old book about large questions.
   ========================================================================== */

/* Garamond: the typeface of Renaissance printing and Enlightenment books.
   Cormorant for headlines (tall, luminous, calligraphic), EB Garamond for
   reading and for labels set in spaced capitals, like an inscription. */
@font-face {
  font-family: "Cormorant Garamond";
  src: url("/assets/fonts/cormorant-garamond-roman.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("/assets/fonts/cormorant-garamond-italic.woff2") format("woff2");
  font-weight: 300 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "EB Garamond";
  src: url("/assets/fonts/eb-garamond-roman.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "EB Garamond";
  src: url("/assets/fonts/eb-garamond-italic.woff2") format("woff2");
  font-weight: 400 800;
  font-style: italic;
  font-display: swap;
}

:root {
  /* Paper and ink */
  --bg:            #F6F0E6;   /* warm linen */
  --surface:       #FBF8F1;
  --ink:           #262A18;   /* forest, nearly black */
  --ink-2:         #4A4A33;
  --muted:         #6A6650;
  --rule:          #E0D6C3;

  /* Love */
  --accent:        #922532;   /* crimson */
  --accent-strong: #731A26;
  --accent-wash:   #F4DEDA;
  --rose:          #C4566E;   /* blossom, for drawings */
  --rose-wash:     #F7E6E1;   /* a rose-tinted section */

  /* Nature */
  --leaf:          #52611E;   /* moss, dark enough for text */
  --leaf-soft:     #7A8A35;   /* moss, for drawings */
  --sage-wash:     #ECEEDD;   /* a sage-tinted section */
  --plum:          #65364A;   /* heather */

  /* Deep forest, for the dark moments */
  --night:         #27321C;
  --night-deep:    #1B2413;
  --night-rule:    #3F4B31;
  --on-night:      #F1EADB;
  --on-night-2:    #C9C6AE;
  --accent-night:  #F2AFBD;   /* rose, for accents on dark */

  --display: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --serif:   "EB Garamond", Garamond, "Iowan Old Style", Georgia, serif;
  --ui:      "EB Garamond", Garamond, "Iowan Old Style", Georgia, serif;

  --max:     78rem;
  --measure: 38rem;
  --gutter:  16px;
  --header:  64px;
}
@media (min-width: 640px)  { :root { --gutter: 32px; } }
@media (min-width: 1200px) { :root { --gutter: 48px; } }

/* ---- base ---------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header) + 24px);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.1875rem/1.6 var(--ui);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }

a { color: inherit; text-decoration: none; }
a:focus-visible, summary:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--accent-wash); color: var(--ink); }

.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 6px;
  font: 500 1.0625rem var(--ui);
}
.skip:focus { top: 12px; }

/* Read aloud by screen readers, never drawn. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

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

.display {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2.75rem, 1.5rem + 5vw, 5.75rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.h2 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.875rem, 1.3rem + 2.2vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.008em;
  text-wrap: balance;
}

.eyebrow {
  font: 500 0.9375rem/1.3 var(--ui);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--leaf);
  margin-bottom: 1.25rem;
}

.lede {
  font-family: var(--serif);
  font-size: clamp(1.1875rem, 1.05rem + 0.5vw, 1.375rem);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 36rem;
  text-wrap: pretty;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  font: 500 1.0625rem/1 var(--ui);
  color: var(--accent);
}
.link-arrow::after {
  content: "\2192";
  transition: transform 0.2s ease;
}
.link-arrow:hover { color: var(--accent-strong); }
.link-arrow:hover::after { transform: translateX(4px); }

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

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 2.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 1.4rem;
  border-radius: 8px;
  border: 1px solid var(--ink);
  font: 500 1.0625rem/1 var(--ui);
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); }
.btn-secondary { background: transparent; color: var(--ink); }
.btn-secondary:hover { background: var(--ink); color: var(--bg); }

/* ---- header ---------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 240, 230, 0.92);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--rule);
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.3125rem;
  letter-spacing: -0.004em;
  color: var(--ink);
}
.brand-mark {
  width: 18px;
  height: 18px;
  fill: var(--accent);
  transition: transform 0.6s cubic-bezier(.2,.8,.2,1);
}
.brand:hover .brand-mark { transform: rotate(90deg); }

.nav-desktop { display: none; }
.nav-desktop a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font: 450 1.0625rem/1 var(--ui);
  color: var(--ink-2);
  transition: color 0.2s ease;
}
.nav-desktop a:hover { color: var(--ink); }
.nav-desktop a[aria-current="page"] { color: var(--ink); }
.nav-desktop a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  height: 1px;
  background: var(--accent);
}

/* Mobile menu: a native <details>, so it works with no JavaScript at all. */
.menu summary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0 4px;
  cursor: pointer;
  list-style: none;
  font: 500 1.0625rem/1 var(--ui);
  color: var(--ink);
}
.menu summary::-webkit-details-marker { display: none; }
.menu-icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}
.menu[open] .menu-icon path { d: path("M6 6L18 18M18 6L6 18"); }

.menu-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  padding: 8px var(--gutter) 24px;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
  box-shadow: 0 24px 40px -24px rgba(38, 42, 24, 0.22);
}
.menu-panel a {
  display: flex;
  align-items: center;
  min-height: 56px;
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.5rem;
  border-bottom: 1px solid var(--rule);
}
.menu-panel a:last-child { border-bottom: 0; }
.menu-panel a[aria-current="page"] { color: var(--accent); }

@media (min-width: 900px) {
  .nav-desktop { display: flex; gap: 1.4rem; }
  .menu { display: none; }
}

@media (min-width: 1200px) { .nav-desktop { gap: 2rem; } }

/* ---- sections ------------------------------------------------------------- */

.section { padding-block: clamp(4.5rem, 3rem + 6vw, 8.5rem); }
.section + .section { border-top: 1px solid var(--rule); }

/* Tinted sections: sage for nature, rose for love. A change of colour is
   division enough, so no rule is drawn where one begins or ends. */
.tint-sage { background: var(--sage-wash); }
.tint-rose { background: var(--rose-wash); }
.section.tint-sage, .section.tint-rose,
.tint-sage + .section, .tint-rose + .section { border-top: 0; }

/* The hedera: a heart-shaped ivy leaf, the printers' ornament. */
.fleuron {
  display: block;
  width: 104px;
  height: 28px;
  margin: 0 auto 1.75rem;
  background: url("/assets/hedera.svg") center / contain no-repeat;
}
.fleuron-start { margin-inline: 0; }
.section-head { max-width: 46rem; margin-bottom: clamp(2.5rem, 2rem + 2vw, 4rem); }

/* ---- the hero: full-bleed ---------------------------------------------- */

/* On the home page the header floats over the hero. The page slides up
   underneath it, and site.js makes the header solid once the hero has
   scrolled away. Browsers without :has() skip the floating state entirely
   and simply keep a solid header, which is a safe way to fail. */
.is-home main { margin-top: calc(-1 * var(--header)); }

.is-home .site-header:not(.is-solid):not(:has(.menu[open])) {
  background: transparent;
  border-bottom-color: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.site-header { transition: background-color 0.35s ease, border-color 0.35s ease; }

.reel {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-start;
  min-height: 100vh;
  min-height: 100svh;
  padding-block: calc(var(--header) + clamp(1.25rem, 6vh, 4rem)) 7rem;
  overflow: hidden;
  background: #EAD3D1;
  color: var(--ink);
}
@media (max-height: 560px) and (orientation: landscape) { .reel { min-height: 40rem; } }
.reel-media { position: absolute; inset: 0; z-index: -2; }
.reel-video, .reel-photo { width: 100%; height: 100%; object-fit: cover; }
.reel-shade { display: none; }

.reel-copy { position: relative; text-align: center; }
.reel-title {
  max-width: 13ch;
  margin-inline: auto;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(3.4rem, 1.6rem + 6.4vw, 6.75rem);
  line-height: 0.98;
  letter-spacing: -0.012em;
  text-wrap: balance;
  text-shadow: 0 0 36px rgba(251, 240, 230, 0.8);
}
/* Two lines on wide screens, so the words stay in the sky above the tree. */
@media (min-width: 900px) { .reel-title { max-width: 16ch; } }
.reel-title em { font-style: italic; color: var(--accent); }

.reel-cue {
  position: absolute;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 20px;
}
.reel-cue-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(rgba(251, 244, 234, 0.9), transparent);
  transform-origin: top;
}

/* A real photo or video: centred words, light on a dark wash. */
.hero-photo .reel { align-items: center; background: #1F2416; color: #F6EEE6; }
.hero-photo .reel-shade {
  display: block;
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg,
    rgba(27, 36, 19, 0.60) 0%,
    rgba(27, 36, 19, 0.18) 34%,
    rgba(27, 36, 19, 0.10) 62%,
    rgba(27, 36, 19, 0.55) 100%);
}
.hero-photo .reel-title { text-shadow: 0 2px 40px rgba(0, 0, 0, 0.45); }
.hero-photo .reel-title em { color: var(--accent-night); }
.hero-photo .reel a:focus-visible { outline-color: var(--accent-night); }
.hero-photo.is-home .site-header:not(.is-solid):not(:has(.menu[open])) .brand,
.hero-photo.is-home .site-header:not(.is-solid):not(:has(.menu[open])) .nav-desktop a,
.hero-photo.is-home .site-header:not(.is-solid):not(:has(.menu[open])) .menu summary { color: #F6EEE6; }
.hero-photo.is-home .site-header:not(.is-solid):not(:has(.menu[open])) .brand-mark { fill: var(--accent-night); }
.hero-photo.is-home .site-header:not(.is-solid):not(:has(.menu[open])) .nav-desktop a[aria-current="page"]::after { background: var(--accent-night); }

/* The illustration: a tree of life at dawn. A heart-shaped canopy of leaves
   and blossom, people holding hands beneath it, hills and a wildflower
   meadow. Layers are sized against the hero's height, so the tree always
   stands on its hill. Everything that moves animates transform or opacity
   only, so it stays smooth on a phone. */
.hero-art {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse 34% 30% at 50% 57%, rgba(255, 244, 218, 0.95), rgba(252, 226, 190, 0.55) 45%, transparent 100%),
    radial-gradient(ellipse 80% 55% at 50% 62%, rgba(246, 196, 176, 0.55), transparent 70%),
    linear-gradient(180deg, #E6CDD0 0%, #EDD6D3 26%, #F4E1D6 50%, #F7E8D6 72%, #F3E4CC 100%);
}
.hero-art svg { position: absolute; max-width: none; }
.hero-hills { left: 0; bottom: 0; width: 100%; }
.hero-far  { height: 46%; }
.hero-hill { height: 36%; }            /* its crest stands 26% up the hero */
.hero-near { height: 30%; }
.hero-tree {
  left: 50%;
  bottom: 22%;
  height: 40%;
  width: auto;
  aspect-ratio: 800 / 720;
  transform: translateX(-50%);
  overflow: visible;
}
.hero-people {
  left: 50%;
  bottom: 25.2%;
  height: 6.6%;
  width: auto;
  aspect-ratio: 360 / 112;
  transform: translateX(-50%);
}
.hero-meadow { left: 0; bottom: 0; width: 100%; height: max(20%, 15vw); }
@media (max-width: 700px) {
  .hero-tree   { height: 35%; }
  .hero-people { height: 5.8%; }
}

.hero-trunk { fill: #4A3A2B; }
.hero-flower path { fill: none; stroke: #4B5B1D; stroke-width: 2; stroke-linecap: round; }
.hero-canopy { transform-box: view-box; transform-origin: 400px 700px; }

/* Thin clouds drifting across the dawn. */
.hero-clouds i {
  position: absolute;
  width: 34vw;
  min-width: 220px;
  height: 3.2vw;
  min-height: 22px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(253, 243, 238, 0.85), rgba(253, 243, 238, 0) 70%);
}
.hero-clouds i:nth-child(1) { left: -6%;  top: 44%; }
.hero-clouds i:nth-child(2) { left: 68%;  top: 38%; width: 40vw; }
.hero-clouds i:nth-child(3) { left: 30%;  top: 50%; width: 26vw; opacity: 0.7; }

.hero-birds { width: clamp(64px, 7vw, 116px); height: auto; aspect-ratio: 2 / 1; }
.hero-birds-left  { left: 11%;  top: 47%; }
.hero-birds-right { right: 12%; top: 41%; width: clamp(52px, 5.5vw, 92px); }
.hero-bird { fill: none; stroke: #5D3F4A; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; opacity: 0.75; transform-box: fill-box; transform-origin: center; }
@media (max-width: 700px) { .hero-birds-left { left: 4%; top: 49%; } .hero-birds-right { right: 5%; top: 45%; } }

/* Petals carried off the tree by the wind. */
.hero-petals i {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 11px;
  height: 7px;
  border-radius: 100% 0 100% 0;
  background: var(--c, #D26A80);
  opacity: 0.85;
}
.hero-petals i:nth-child(1)  { --x: 44%; --y: 50%; --c: #D26A80; --dx: -34vw; --dy: 30vh; --d: 13s; --t: -1s; }
.hero-petals i:nth-child(2)  { --x: 55%; --y: 46%; --c: #922532; --dx:  30vw; --dy: 34vh; --d: 15s; --t: -6s; }
.hero-petals i:nth-child(3)  { --x: 48%; --y: 55%; --c: #E9A3B3; --dx: -22vw; --dy: 38vh; --d: 11s; --t: -3s; }
.hero-petals i:nth-child(4)  { --x: 58%; --y: 58%; --c: #B5374A; --dx:  38vw; --dy: 22vh; --d: 16s; --t: -9s; }
.hero-petals i:nth-child(5)  { --x: 41%; --y: 58%; --c: #E9A3B3; --dx: -40vw; --dy: 18vh; --d: 14s; --t: -12s; }
.hero-petals i:nth-child(6)  { --x: 52%; --y: 44%; --c: #D26A80; --dx:  18vw; --dy: 44vh; --d: 12s; --t: -2s; }
.hero-petals i:nth-child(7)  { --x: 46%; --y: 47%; --c: #922532; --dx: -16vw; --dy: 42vh; --d: 17s; --t: -8s; }
.hero-petals i:nth-child(8)  { --x: 60%; --y: 50%; --c: #E9A3B3; --dx:  26vw; --dy: 40vh; --d: 13s; --t: -5s; }
.hero-petals i:nth-child(9)  { --x: 39%; --y: 52%; --c: #B5374A; --dx: -30vw; --dy: 36vh; --d: 15s; --t: -14s; }
.hero-petals i:nth-child(10) { --x: 56%; --y: 54%; --c: #D26A80; --dx:  44vw; --dy: 30vh; --d: 18s; --t: -4s; }
.hero-petals i:nth-child(11) { --x: 50%; --y: 49%; --c: #F7E3E4; --dx: -8vw;  --dy: 46vh; --d: 12s; --t: -10s; }
.hero-petals i:nth-child(12) { --x: 43%; --y: 45%; --c: #D26A80; --dx: -46vw; --dy: 26vh; --d: 19s; --t: -7s; }
.hero-petals i:nth-child(13) { --x: 62%; --y: 47%; --c: #922532; --dx:  34vw; --dy: 16vh; --d: 14s; --t: -11s; }
.hero-petals i:nth-child(14) { --x: 53%; --y: 57%; --c: #E9A3B3; --dx:  12vw; --dy: 36vh; --d: 11s; --t: -13s; }

@media (prefers-reduced-motion: no-preference) {
  .hero-canopy { animation: rustle 7s ease-in-out infinite alternate; }
  .hero-sun-disc { transform-box: fill-box; transform-origin: center; animation: glow 9s ease-in-out infinite alternate; }
  .hero-clouds i { animation: cloud 70s linear infinite alternate; }
  .hero-clouds i:nth-child(2) { animation-duration: 90s; animation-direction: alternate-reverse; }
  .hero-birds { animation: glide 12s ease-in-out infinite alternate; }
  .hero-birds-right { animation-duration: 15s; animation-delay: -6s; }
  .hero-bird { animation: flap 1.6s ease-in-out infinite alternate; }
  .hero-bird:nth-child(2) { animation-delay: -0.5s; }
  .hero-bird:nth-child(3) { animation-delay: -1.1s; }
  .hero-flower { transform-box: fill-box; transform-origin: 50% 100%; animation: bloom-sway 5s ease-in-out infinite alternate; }
  .hero-flower:nth-child(2n) { animation-duration: 6.5s; animation-delay: -2s; }
  .hero-flower:nth-child(3n) { animation-duration: 4.2s; animation-delay: -3.5s; }
  .hero-petals i { opacity: 0; animation: petal var(--d) linear var(--t) infinite; }
  .reel-cue-line { animation: cue 2.4s ease-in-out infinite; }
  /* Nothing moves while the hero is off screen. */
  .reel.is-away .hero-art *, .reel.is-away .reel-cue-line { animation-play-state: paused; }
}
@keyframes rustle { from { transform: rotate(-0.5deg); } to { transform: rotate(0.5deg); } }
@keyframes glow   { from { opacity: 0.8; transform: scale(0.96); } to { opacity: 1; transform: scale(1.04); } }
@keyframes cloud  { from { transform: translate3d(-4vw, 0, 0); } to { transform: translate3d(6vw, 0, 0); } }
@keyframes glide  { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(3vw, -1.5vh, 0); } }
@keyframes flap   { from { transform: scaleY(1); } to { transform: scaleY(0.55); } }
@keyframes bloom-sway { from { transform: rotate(-3deg); } to { transform: rotate(3deg); } }
@keyframes petal {
  0%   { opacity: 0; transform: translate3d(0, 0, 0) rotate(0deg); }
  10%  { opacity: 0.9; }
  85%  { opacity: 0.8; }
  100% { opacity: 0; transform: translate3d(var(--dx), var(--dy), 0) rotate(620deg); }
}
@keyframes cue   { 0% { transform: scaleY(0); opacity: 1; } 60% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

@keyframes breathe { 0%, 100% { opacity: 0.14; transform: scale(1); } 50% { opacity: 0.22; transform: scale(1.35); } }

/* ---- vision ---------------------------------------------------------------- */

.vision-inner { max-width: 62rem; text-align: center; }
.vision-title {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2.25rem, 1.3rem + 3.8vw, 4.75rem);
  line-height: 1.08;
  letter-spacing: -0.010em;
  text-wrap: balance;
}

/* ---- chapters: a picture beside the words ------------------------------------- */

.chapter-grid {
  display: grid;
  gap: clamp(2.5rem, 2rem + 3vw, 5rem);
  align-items: center;
}
.chapter-grid-flip .chapter-art { order: 2; }
@media (min-width: 960px) {
  .chapter-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .chapter-grid-flip .chapter-art { order: 0; }
}
.chapter-copy .h2 { margin-bottom: 1.5rem; }
.chapter-text {
  max-width: 34rem;
  font-family: var(--serif);
  font-size: clamp(1.1875rem, 1.07rem + 0.45vw, 1.375rem);
  line-height: 1.6;
  color: var(--ink-2);
  text-wrap: pretty;
}
.chapter-text + .chapter-text { margin-top: 1.25rem; }
.chapter-coda { color: var(--ink); font-style: italic; }
.chapter-art { min-width: 0; }

/* The band: five distinct voices converge into one sound. */
.band { width: 100%; max-width: 40rem; margin-inline: auto; overflow: visible; }
.band-wave  { fill: none; stroke-width: 2.2; stroke-linecap: round; opacity: 0.7; }
.band-pulse { fill: none; stroke-width: 3.2; stroke-linecap: round; stroke-dasharray: 80 920; stroke-dashoffset: 1000; opacity: 0; }
.band-union { fill: var(--accent); }
.band-glow  { fill: var(--accent); opacity: 0.12; transform-box: fill-box; transform-origin: center; }

/* The museum: Earth on a plinth, under glass. */
.museum { width: 100%; max-width: 23rem; margin-inline: auto; overflow: visible; }
.museum-stars  { fill: var(--accent); }
.earth-water   { fill: #CFDDD8; stroke: var(--ink); stroke-width: 1.5; }
.earth-land    { fill: #AEB874; stroke: var(--ink); stroke-width: 1.2; stroke-linejoin: round; }
.earth-line    { fill: none; stroke: var(--ink); stroke-opacity: 0.3; stroke-width: 1; }
.earth-sprout  { fill: none; stroke: #5B6A22; stroke-width: 2; stroke-linecap: round; }
.earth-leaf    { fill: #7A8A35; }
.earth-bloom   { fill: var(--rose); }
.earth-bloom-heart { fill: #F2C46B; }
.museum-ink, .museum-slab, .museum-knob, .museum-rim { fill: var(--ink); }
.museum-plinth { fill: var(--surface); stroke: var(--ink); stroke-width: 1.5; }
.museum-plaque { fill: none; stroke: var(--accent); stroke-width: 1.2; }
.museum-glass  { fill: rgba(255, 255, 255, 0.16); stroke: var(--ink); stroke-width: 1.5; }
.museum-shine  { fill: none; stroke: #fff; stroke-width: 4; stroke-linecap: round; opacity: 0.85; }

@media (prefers-reduced-motion: no-preference) {
  .band-pulse { animation: pulse 5.6s cubic-bezier(.45,.05,.3,1) infinite; }
  .band-pulse:nth-child(2) { animation-delay: 0.7s; }
  .band-pulse:nth-child(3) { animation-delay: 1.4s; }
  .band-pulse:nth-child(4) { animation-delay: 2.1s; }
  .band-pulse:nth-child(5) { animation-delay: 2.8s; }
  .band-glow { animation: breathe 5s ease-in-out infinite; }
  .museum-stars > * { animation: twinkle-bright 4.5s ease-in-out infinite; }
  .museum-stars > :nth-child(2n) { animation-delay: -1.7s; animation-duration: 5.5s; }
  .museum-stars > :nth-child(3n) { animation-delay: -3.1s; animation-duration: 3.8s; }
  .earth-leaf { transform-box: fill-box; transform-origin: 50% 100%; animation: leaf 4s ease-in-out infinite alternate; }
}
@keyframes pulse { 0% { stroke-dashoffset: 1000; opacity: 0; } 8% { opacity: 0.95; } 88% { opacity: 0.95; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes twinkle-bright { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
@keyframes leaf { from { transform: rotate(-4deg); } to { transform: rotate(4deg); } }

/* ---- line icons -------------------------------------------------------------- */

.icon {
  width: 40px;
  height: 40px;
  margin-bottom: 2.5rem;
  fill: none;
  stroke: var(--leaf);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon .icon-accent { stroke: var(--accent); }
.icon .icon-dot { fill: var(--accent); stroke: none; }

/* ---- our enemy ------------------------------------------------------------- */

.enemy-inner { max-width: 62rem; text-align: center; }
.enemy-q {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.875rem, 1.2rem + 2.8vw, 3.5rem);
  line-height: 1.15;
  letter-spacing: -0.008em;
  text-wrap: balance;
}
.enemy-no {
  margin-top: 0.5rem;
  font-family: var(--display);
  font-weight: 500;
  font-style: italic;
  font-size: clamp(4.25rem, 2rem + 9.5vw, 9.5rem);
  line-height: 1;
  letter-spacing: -0.014em;
  color: var(--accent);
}
.bunting { width: 100%; max-width: 40rem; margin: 2.25rem auto 0; overflow: visible; }
.bunting-string { stroke: var(--ink); stroke-width: 1.4; stroke-opacity: 0.55; }
.flag-cloth { transform-box: fill-box; transform-origin: 50% 0; }
.enemy-body { max-width: 40rem; margin: 2.75rem auto 0; text-align: left; }
.enemy-body p {
  font-family: var(--serif);
  font-size: clamp(1.1875rem, 1.07rem + 0.45vw, 1.375rem);
  line-height: 1.6;
  color: var(--ink-2);
  text-wrap: pretty;
}
.enemy-body p + p { margin-top: 1.25rem; }
.enemy-body p:last-child { color: var(--ink); }

@media (prefers-reduced-motion: no-preference) {
  .flag-cloth { animation: flutter 3.2s ease-in-out infinite alternate; }
  .flag:nth-child(3n) .flag-cloth   { animation-delay: -1.1s; animation-duration: 3.8s; }
  .flag:nth-child(3n+1) .flag-cloth { animation-delay: -2.2s; animation-duration: 2.9s; }
}
@keyframes flutter { from { transform: rotate(-4deg) skewX(-3deg); } to { transform: rotate(4deg) skewX(3deg); } }

/* ---- ego: the reveal -------------------------------------------------------- */

.ego {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(6rem, 4rem + 8vw, 11rem);
  background: var(--night-deep);
  color: var(--on-night);
  text-align: center;
}
/* "Shine the light of consciousness across all our inner darkness." */
.ego-light {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: -1;
  width: 110vmax;
  height: 110vmax;
  transform: translate(-50%, -50%) scale(1);
  background: radial-gradient(circle, rgba(255, 228, 192, 0.34) 0%, rgba(226, 128, 148, 0.20) 24%, transparent 58%);
  transition: transform 2.6s cubic-bezier(.2,.7,.2,1), opacity 2.6s ease;
}
html.js-reveal .ego:not(.is-lit) .ego-light { transform: translate(-50%, -50%) scale(0.4); opacity: 0.35; }

/* The forest at night crowds in from both sides; fireflies keep watch. */
.ego-leaves {
  position: absolute;
  top: 0;
  z-index: -1;
  width: clamp(90px, 22vw, 320px);
  height: 100%;
  max-width: none;
}
.ego-leaves-left  { left: 0; }
.ego-leaves-right { right: 0; }
.ego-fireflies i {
  position: absolute;
  z-index: -1;
  left: var(--x);
  top: var(--y);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #FBE7A8;
  box-shadow: 0 0 10px 3px rgba(251, 222, 140, 0.55);
  opacity: 0.8;
}
.ego-fireflies i:nth-child(1)  { --x: 12%; --y: 30%; --d: 5s;   --t: -1s; }
.ego-fireflies i:nth-child(2)  { --x: 22%; --y: 68%; --d: 6.5s; --t: -3s; }
.ego-fireflies i:nth-child(3)  { --x: 30%; --y: 18%; --d: 4.5s; --t: -2s; }
.ego-fireflies i:nth-child(4)  { --x: 17%; --y: 84%; --d: 7s;   --t: -5s; }
.ego-fireflies i:nth-child(5)  { --x: 76%; --y: 24%; --d: 5.5s; --t: -4s; }
.ego-fireflies i:nth-child(6)  { --x: 86%; --y: 58%; --d: 6s;   --t: -1.5s; }
.ego-fireflies i:nth-child(7)  { --x: 70%; --y: 80%; --d: 4.8s; --t: -3.5s; }
.ego-fireflies i:nth-child(8)  { --x: 90%; --y: 36%; --d: 7.5s; --t: -6s; }
.ego-fireflies i:nth-child(9)  { --x: 8%;  --y: 52%; --d: 5.2s; --t: -2.5s; }
.ego-fireflies i:nth-child(10) { --x: 64%; --y: 12%; --d: 6.8s; --t: -0.5s; }
@media (prefers-reduced-motion: no-preference) {
  .ego-fireflies i { animation: firefly var(--d) ease-in-out var(--t) infinite; }
}
@keyframes firefly {
  0%, 100% { opacity: 0.1; transform: translate3d(0, 0, 0); }
  30%      { opacity: 0.95; }
  50%      { opacity: 0.5; transform: translate3d(14px, -18px, 0); }
  70%      { opacity: 0.9; }
}

.ego-inner { max-width: 50rem; }
.ego-kicker {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.625rem);
  color: var(--on-night-2);
}
.ego-word {
  margin: 0.25rem 0 1.75rem;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(5.5rem, 2rem + 16vw, 15rem);
  line-height: 1.2;
  letter-spacing: -0.018em;
  color: #F6EEE6;
  text-shadow: 0 0 70px rgba(250, 218, 170, 0.30);
}
.ego-body { max-width: 38rem; margin-inline: auto; }
.ego-body p {
  font-family: var(--serif);
  font-size: clamp(1.1875rem, 1.07rem + 0.45vw, 1.375rem);
  line-height: 1.6;
  color: var(--on-night-2);
  text-wrap: pretty;
}
.ego-body .ego-lead {
  margin-bottom: 1.25rem;
  font-size: clamp(1.375rem, 1.15rem + 0.9vw, 1.875rem);
  line-height: 1.35;
  color: #F6EEE6;
  text-wrap: balance;
}

/* ---- how we fight back ------------------------------------------------------ */

.practices {
  display: grid;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
@media (min-width: 800px) { .practices { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.practice {
  padding: clamp(1.75rem, 1.4rem + 1.4vw, 2.75rem);
  background: var(--bg);
}
.practice .icon { margin-bottom: 2rem; }
.practice h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.5rem, 1.3rem + 0.8vw, 1.875rem);
  line-height: 1.15;
  letter-spacing: -0.004em;
}
.practice-gloss {
  margin-top: 0.3rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.125rem;
  color: var(--accent);
}
.practice p:not(.practice-gloss) {
  margin-top: 1rem;
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--ink-2);
  text-wrap: pretty;
}

/* ---- we don't just fight ------------------------------------------------------ */

.love .h2 { font-size: clamp(2.25rem, 1.4rem + 3.4vw, 4.25rem); }
.love .verbs, .love .verbs li { border-color: rgba(146, 37, 50, 0.16); }
.verbs { border-top: 1px solid var(--rule); }
.verbs li {
  display: grid;
  gap: 0.75rem 3rem;
  padding-block: clamp(1.75rem, 1.4rem + 1.2vw, 2.5rem);
  border-bottom: 1px solid var(--rule);
}
@media (min-width: 860px) {
  .verbs li { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: baseline; }
}
.verb {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.008em;
  text-wrap: balance;
}
.verbs p {
  max-width: 36rem;
  font-family: var(--serif);
  font-size: clamp(1.125rem, 1.07rem + 0.25vw, 1.25rem);
  line-height: 1.6;
  color: var(--ink-2);
  text-wrap: pretty;
}

/* ---- essay index ------------------------------------------------------------ */

.index-list { border-top: 1px solid var(--rule); }
.index-list a,
.index-list .index-row {
  display: grid;
  gap: 0.5rem 2rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--rule);
}
.index-title {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.004em;
}
.index-summary {
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.5;
  color: var(--ink-2);
  text-wrap: pretty;
}
.index-arrow {
  display: none;
  color: var(--accent);
  font-size: 1.5rem;
  transition: transform 0.25s ease;
}
.index-list a:hover .index-title { color: var(--accent); }
.index-list a:hover .index-arrow { transform: translateX(6px); }

/* A document that is planned but not published: listed, not linked. */
.index-row .index-title { color: var(--ink-2); }
.index-tag {
  justify-self: start;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font: 500 0.8125rem/1 var(--ui);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

@media (min-width: 800px) {
  .index-list a,
  .index-list .index-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) auto;
    align-items: baseline;
  }
  .index-arrow { display: block; }
}

/* ---- resources ---------------------------------------------------------------- */

.resources-list .eyebrow { margin-bottom: 1.5rem; }

/* ---- essays --------------------------------------------------------------- */

.essay-head {
  padding-block: clamp(3.5rem, 2rem + 5vw, 6.5rem) clamp(2.5rem, 2rem + 2.5vw, 4rem);
  background: var(--sage-wash);
}
.essay-title { max-width: 18ch; }
.dek {
  margin-top: 1.75rem;
  max-width: 44rem;
  font-family: var(--serif);
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  line-height: 1.5;
  color: var(--ink-2);
  text-wrap: pretty;
}

.essay-grid {
  display: grid;
  gap: 2rem;
  padding-block: clamp(2.5rem, 2rem + 2.5vw, 4.5rem) clamp(4rem, 3rem + 4vw, 7rem);
}
@media (min-width: 1024px) {
  .essay-grid {
    grid-template-columns: 15rem minmax(0, var(--measure));
    gap: clamp(3rem, 1rem + 5vw, 6rem);
  }
}

.toc ol { counter-reset: t; }
.toc a {
  display: block;
  padding: 0.45rem 0 0.45rem 1rem;
  border-left: 1px solid var(--rule);
  font: 450 1rem/1.4 var(--ui);
  color: var(--muted);
  transition: color 0.2s ease, border-color 0.2s ease;
}
.toc a:hover { color: var(--ink); }
.toc a.is-active { color: var(--ink); border-left-color: var(--accent); }

.toc-desktop { display: none; }
.toc-label {
  font: 500 0.8125rem/1 var(--ui);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}
@media (min-width: 1024px) {
  .toc-desktop {
    display: block;
    position: sticky;
    top: calc(var(--header) + 32px);
    align-self: start;
    max-height: calc(100vh - var(--header) - 64px);
    overflow-y: auto;
  }
  .toc-mobile { display: none; }
}

.toc-mobile {
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--surface);
}
.toc-mobile summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 0 1rem;
  cursor: pointer;
  list-style: none;
  font: 500 1.0625rem/1 var(--ui);
}
.toc-mobile summary::-webkit-details-marker { display: none; }
.toc-mobile summary::after { content: "+"; font-size: 1.25rem; color: var(--muted); }
.toc-mobile[open] summary::after { content: "\2212"; }
.toc-mobile ol { padding: 0 1rem 1rem; }
.toc-mobile a { min-height: 40px; display: flex; align-items: center; }

/* The reading column. */
.prose {
  font-family: var(--serif);
  /* Garamond is narrow: a larger size keeps lines near 70 characters. */
  font-size: clamp(1.25rem, 1.17rem + 0.3vw, 1.3125rem);
  line-height: 1.7;
  color: var(--ink);
  min-width: 0;
}
.prose > * + * { margin-top: 1.25rem; }
.prose p { text-wrap: pretty; }
.prose h2 {
  margin-top: 4rem;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.875rem, 1.5rem + 1.4vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.005em;
  text-wrap: balance;
}
.prose h2 + * { margin-top: 1.25rem; }
.prose h3 {
  margin-top: 2.75rem;
  font-weight: 600;
  font-size: 1.3125rem;
  line-height: 1.3;
}
.prose h3 + * { margin-top: 0.75rem; }
.prose strong { font-weight: 600; }
.prose em { font-style: italic; }
.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.prose a:hover { color: var(--accent-strong); }

.prose ul { display: grid; gap: 0.6rem; }
.prose ul li {
  position: relative;
  padding-left: 1.5rem;
}
.prose ul li::before {
  content: "";
  position: absolute;
  left: 0.25rem;
  top: 0.75em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.prose blockquote {
  margin-block: 2.25rem;
  padding: 0.25rem 0 0.25rem 1.5rem;
  border-left: 2px solid var(--accent);
  font-size: clamp(1.3125rem, 1.15rem + 0.6vw, 1.5rem);
  line-height: 1.45;
}
.prose blockquote + * { margin-top: 2.25rem; }
.prose hr { height: 28px; border: 0; margin-block: 3rem; background: url("/assets/hedera.svg") center / 104px 28px no-repeat; }

/* Asides inside an essay. */
.callout {
  margin-block: 3.5rem !important;
  padding: 1.75rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 12px;
}
.callout .eyebrow { margin-bottom: 0.75rem; }
.callout-text {
  font-size: 1.3125rem;
  line-height: 1.4;
}
.callout .link-arrow { margin-top: 0.5rem; }

/* The Progress Tree. */
.tree {
  margin-block: 2.5rem !important;
  padding: clamp(1.25rem, 1rem + 1vw, 2rem);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 12px;
}
.tree-root {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 1.25rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--rule);
  font-size: 1.25rem;
  line-height: 1.3;
}
.tree-root::before {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px var(--accent-wash);
}
.tree-branches { display: grid; gap: 1.75rem; }
@media (min-width: 560px) { .tree-branches { grid-template-columns: repeat(2, 1fr); gap: 1.75rem 1.25rem; } }
/* A branch the specifications have not reached yet: drawn, but unwalked. */
.tree-path.tree-path-open li { font-style: italic; color: var(--muted); }
.tree-path.tree-path-open li::after { border-style: dashed; background: transparent; }
.tree-name {
  font: 600 0.9375rem/1 var(--ui);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--leaf);
  margin-bottom: 0.75rem;
}
.tree-path { margin: 0 !important; }
.tree-path li {
  position: relative;
  padding: 0.3rem 0 0.3rem 1.25rem;
  font: 450 1.0625rem/1.35 var(--ui);
  color: var(--ink-2);
}
.tree-path li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--rule);
}
.tree-path li::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0.8rem;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--muted);
}
.tree-path li:first-child::before { top: 0.8rem; }
.tree-path li:last-child::before  { bottom: calc(100% - 0.8rem); }

/* ---- continue reading ------------------------------------------------------ */

.continue { background: var(--rose-wash); }
.continue .h2 { margin-bottom: 2.5rem; }

/* ---- 404 ------------------------------------------------------------------ */

.notfound { min-height: 60vh; display: flex; align-items: center; }
.notfound .display { max-width: 14ch; }
.notfound .lede { margin-top: 1.5rem; }

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

.site-footer {
  background: var(--night);
  color: var(--on-night);
  padding-top: clamp(3.5rem, 2.5rem + 3vw, 5rem);
}
.footer-grid {
  display: grid;
  gap: 2.5rem;
  padding-bottom: 3rem;
}
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1.2fr 1fr; } }
.site-footer .brand { color: var(--on-night); }
.site-footer .brand-mark { fill: var(--accent-night); }
.footer-brand p {
  margin-top: 0.75rem;
  max-width: 22rem;
  font-family: var(--serif);
  font-size: 1.125rem;
  color: var(--on-night-2);
}
.footer-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; }
.footer-nav h2 {
  font: 500 0.8125rem/1 var(--ui);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-night-2);
  margin-bottom: 0.75rem;
}
.footer-nav a {
  display: flex;
  align-items: center;
  min-height: 40px;
  font-size: 0.9375rem;
  color: var(--on-night);
}
.footer-nav a:hover { color: var(--accent-night); }
.footer-base {
  padding-block: 1.5rem 2rem;
  border-top: 1px solid var(--night-rule);
  font-size: 0.875rem;
  color: var(--on-night-2);
}
.site-footer a:focus-visible { outline-color: var(--accent-night); }

/* ---- scroll reveals ---------------------------------------------------------- */

/* site.js adds .js-reveal to <html> only when it is about to run the
   reveals, so without JavaScript (or with reduced motion) nothing is ever
   hidden. */
html.js-reveal [data-reveal] {
  transition:
    opacity 0.9s cubic-bezier(.2,.7,.2,1) var(--reveal-delay, 0ms),
    transform 0.9s cubic-bezier(.2,.7,.2,1) var(--reveal-delay, 0ms);
}
html.js-reveal [data-reveal]:not(.is-in) { opacity: 0; transform: translateY(28px); }
html.js-reveal .enemy-no[data-reveal]:not(.is-in) { transform: translateY(18px) scale(0.9); }
html.js-reveal .ego-word[data-reveal]:not(.is-in) { transform: scale(0.94); }

/* Drawings wait for their moment rather than finishing off screen. */
html.js-reveal [data-reveal]:not(.is-in) * { animation-play-state: paused !important; }

/* ---- motion off ------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation: none !important;
  }
}
