/* =========================================================================
   Glenn Lyvers — "The Galley"
   The site as a living galley proof: an asymmetric measure + a marginal
   rail that carries metadata (dates, marks, line, status). Editorial,
   precise, calm, slightly unconventional. One accent (oxblood); three
   quiet sectional tints used only on the marginal rail.
   ========================================================================= */

:root {
  /* --- neutrals (one dominant family) --- */
  --paper:     #f7f3ea;   /* warm cream ground          */
  --surface:   #fffdf8;   /* raised stock (rare)        */
  --ink:       #232019;   /* primary text               */
  --ink-soft:  #4a4339;   /* secondary text             */
  --muted:     #8a7f6d;   /* marginalia, captions       */
  --rule:      #e1d8c6;   /* hairlines                  */
  --rule-soft: #ece4d3;

  /* --- one deliberate accent --- */
  --accent:      #8a3a2e;   /* oxblood, brand-wide       */
  --accent-deep: #6f2c22;

  /* --- sectional tints: rail only, never loud --- */
  --tint: #8a3a2e;

  /* --- type --- */
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --text:    "EB Garamond", Georgia, "Times New Roman", serif;
  --mono:    "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* --- type scale (perfect fourth ≈ 1.333) --- */
  --t-xl:   clamp(3.4rem, 9vw, 8rem);
  --t-l:    clamp(2rem, 4.4vw, 3.2rem);
  --t-h:    1.5rem;
  --t-body: 1.18rem;
  --t-meta: 0.8rem;
  --t-micro:0.7rem;

  /* --- spacing rhythm (8px base) --- */
  --s1: .25rem; --s2: .5rem; --s3: 1rem; --s4: 1.5rem; --s5: 2.5rem; --s6: 4rem;

  /* --- geometry: three radii only --- */
  --r0: 0;       /* default: rules, plates, the grid */
  --r-sm: 3px;   /* form fields                      */
  --r-md: 12px;  /* media / video only               */

  /* --- measures --- */
  --measure: 34rem;   /* ~62ch reading column */
  --wrap:    72rem;
  --rail:    8.5rem;  /* marginal rail width  */
  --pad:     clamp(1.25rem, 4vw, 2.5rem);

  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* sectional tints (rail + section mark only) */
html.path-poetry   { --tint: #8a3a2e; }
html.path-tech     { --tint: #356067; }
html.path-teaching { --tint: #937018; }
html.path-photo    { --tint: #4c6059; }

/* ---------- reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; }  /* mega-heroes are full-bleed (100vw) */
body {
  margin: 0;
  padding: 0 var(--pad);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: var(--t-body);
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "liga" 1, "onum" 1;
}
img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color 160ms var(--ease); }
a:hover { color: var(--accent-deep); }

h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; line-height: 1.1; color: var(--ink); letter-spacing: -0.012em; margin: 0 0 .5em; }
h1 { font-size: var(--t-l); }
h2 { font-size: 1.7rem; margin: 1.8em 0 .5em; }
h3 { font-size: var(--t-h); margin: 1.5em 0 .4em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; }
.main { padding: var(--s6) 0; max-width: var(--wrap); margin: 0 auto; }
.reading { max-width: var(--measure); }
.reading p { margin: 0 0 1.1em; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--surface); padding: .5rem 1rem; border: 1px solid var(--rule); z-index: 50; }

/* shared focus treatment */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible,
.part:focus-visible, .index-list a:focus-visible {
  outline: 2px solid var(--ink); outline-offset: 3px; border-radius: var(--r-sm);
}

/* ---------- masthead (solid paper, hairline — no glass) ---------- */
.masthead { border-bottom: 1px solid var(--rule); background: var(--paper); position: sticky; top: 0; z-index: 30; view-transition-name: masthead; }
.masthead-inner { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s4); padding: var(--s3) 0; }
.brand { display: flex; flex-direction: column; line-height: 1.02; text-decoration: none; color: var(--ink); }
.brand-name { font-family: var(--display); font-size: 1.55rem; font-weight: 600; letter-spacing: -0.01em; }
.brand-tag { font-family: var(--mono); font-size: var(--t-micro); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: .3rem; }

.nav-toggle { display: none; font-family: var(--mono); font-size: var(--t-micro); letter-spacing: .1em; text-transform: uppercase; background: none; border: 1px solid var(--rule); border-radius: var(--r-sm); padding: .45rem .8rem; color: var(--ink-soft); cursor: pointer; }
.nav-list { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s4); margin: 0; padding: 0; }
.nav-list a {
  font-family: var(--text); font-variant: small-caps; font-size: 1.05rem;
  letter-spacing: .04em; color: var(--ink-soft); text-decoration: none;
  padding-bottom: 2px; border-bottom: 1px solid transparent;
  transition: color 160ms var(--ease), border-color 160ms var(--ease);
}
.nav-list a:hover { color: var(--ink); border-color: var(--accent); }

/* =========================================================================
   HOME — the galley front page. Asymmetric: a standing headline over a
   measure, with the three pillars set as a typographic contents list
   (not cards), each keyed by a marginal numeral and a sectional mark.
   ========================================================================= */
.home .main { padding-top: var(--s6); }

.galley {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  column-gap: var(--s5);
  align-items: start;
}
.galley-rail {
  font-family: var(--mono); font-size: var(--t-micro);
  letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
  line-height: 1.9; padding-top: .5rem;
}
.galley-rail .mark { color: var(--accent); display: block; font-size: 1rem; margin-bottom: .6rem; }
.galley-rail .rule { display: block; width: 1px; height: 2.5rem; background: var(--rule); margin: .8rem 0; }

.overture-eyebrow { font-family: var(--mono); font-size: var(--t-meta); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 var(--s3); }
.overture-name {
  font-family: var(--display); font-weight: 600;
  font-size: var(--t-xl); line-height: .9; letter-spacing: -.025em;
  margin: 0;
  font-variation-settings: "opsz" 144;
}
.overture-name .line { display: block; }
.overture-name em { font-style: normal; color: var(--accent); }
.overture-verse {
  font-family: var(--text); font-style: italic;
  font-size: clamp(1.2rem, 2.4vw, 1.7rem);
  color: var(--ink-soft); line-height: 1.5;
  max-width: 30rem; margin: var(--s4) 0 0;
  text-wrap: balance;
}
.overture-flourish { margin: var(--s4) 0 0; display: flex; align-items: center; gap: var(--s3); }
.overture-flourish::after { content: ""; height: 1px; flex: 0 1 9rem; background: var(--rule); }
.overture-flourish span { color: var(--accent); font-size: 1.2rem; line-height: 1; }

/* the three pillars as a contents list */
.parts { list-style: none; margin: var(--s6) 0 0; padding: 0; border-top: 1px solid var(--rule); }
.part {
  --c: var(--accent);
  position: relative; display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr) auto;
  column-gap: var(--s5); align-items: baseline;
  padding: var(--s4) 0; border-bottom: 1px solid var(--rule);
  text-decoration: none; color: var(--ink);
  transition: background 180ms var(--ease);
}
.p-poetry { --c: #8a3a2e; } .p-tech { --c: #356067; } .p-teaching { --c: #937018; }
.part-no { font-family: var(--mono); font-size: var(--t-meta); color: var(--c); letter-spacing: .1em; padding-top: .4rem; }
.part-main { min-width: 0; }
.part-k { font-family: var(--display); font-weight: 600; font-size: clamp(1.8rem, 3.4vw, 2.7rem); line-height: 1.02; display: inline-flex; align-items: baseline; gap: .6rem; }
.part-k .glyph { font-size: .7em; color: var(--c); transition: transform 200ms var(--ease); }
.part-d { font-family: var(--text); color: var(--ink-soft); font-size: 1.05rem; margin: .35rem 0 0; max-width: 42ch; }
.part-go { font-family: var(--mono); font-size: var(--t-micro); letter-spacing: .12em; text-transform: uppercase; color: var(--c); white-space: nowrap; padding-top: .5rem; }
.part-go::after { content: " \2192"; display: inline-block; transition: transform 180ms var(--ease); }
/* hover: a sectional tint wipes in from the rail, marks shift */
.part::before { content: ""; position: absolute; left: 0; top: 0; bottom: -1px; width: 2px; background: var(--c); transform: scaleY(0); transform-origin: top; transition: transform 200ms var(--ease); }
.part:hover, .part:focus-visible { background: color-mix(in srgb, var(--c) 5%, transparent); outline: none; }
.part:hover::before, .part:focus-visible::before { transform: scaleY(1); }
.part:hover .part-k .glyph, .part:focus-visible .part-k .glyph { transform: rotate(-6deg) scale(1.12); }
.part:hover .part-go::after, .part:focus-visible .part-go::after { transform: translateX(5px); }
.part:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }

/* =========================================================================
   FEATURED BOOK — flagship novel callout on the home galley.
   ========================================================================= */
.book-feature {
  --c: var(--accent-deep);
  display: grid; gap: var(--s2);
  margin: var(--s6) 0 0; padding: var(--s5) var(--s5) var(--s5) calc(var(--s5) + 3px);
  position: relative; text-decoration: none; color: var(--ink);
  border: 1px solid var(--rule);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--c) 6%, var(--surface)), var(--surface));
  transition: background 200ms var(--ease), border-color 200ms var(--ease), transform 200ms var(--ease);
}
.book-feature.has-cover {
  grid-template-columns: auto 1fr; column-gap: var(--s5); align-items: center;
}
.bf-cover {
  display: block; width: 132px; height: auto; border-radius: 2px;
  box-shadow: 0 12px 30px rgba(0,0,0,.32), 0 1px 0 rgba(0,0,0,.15);
}
.bf-body { display: grid; gap: var(--s2); min-width: 0; }
@media (max-width: 560px) {
  .book-feature.has-cover { grid-template-columns: 84px 1fr; column-gap: var(--s4); }
  .bf-cover { width: 84px; }
}
.book-feature::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--c);
}
.book-feature:hover, .book-feature:focus-visible {
  outline: none; border-color: color-mix(in srgb, var(--c) 45%, var(--rule));
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 10%, var(--surface)), var(--surface));
}
.book-feature:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.bf-eyebrow {
  font-family: var(--mono); font-size: var(--t-micro); letter-spacing: .18em;
  text-transform: uppercase; color: var(--c);
}
.bf-title {
  font-family: var(--display); font-weight: 600; line-height: 1.04;
  font-size: clamp(2rem, 4.2vw, 3rem); color: var(--ink);
}
.bf-title em { font-style: italic; color: var(--c); }
.bf-desc {
  font-family: var(--text); color: var(--ink-soft);
  font-size: 1.08rem; line-height: 1.5; max-width: 52ch;
}
.bf-go {
  font-family: var(--mono); font-size: var(--t-micro); letter-spacing: .12em;
  text-transform: uppercase; color: var(--c); white-space: nowrap; margin-top: var(--s1);
}
.bf-go::after { content: " \2192"; display: inline-block; transition: transform 180ms var(--ease); }
.book-feature:hover .bf-go::after, .book-feature:focus-visible .bf-go::after { transform: translateX(5px); }

/* =========================================================================
   BOOK PITCH — the back-cover sell beneath the featured-novel card.
   ========================================================================= */
.book-pitch { margin: var(--s5) 0 0; max-width: var(--measure); }
.bp-hook {
  font-family: var(--display); font-weight: 600; font-style: italic;
  font-size: clamp(1.5rem, 3.4vw, 2.1rem); line-height: 1.2;
  color: var(--accent-deep); margin: 0 0 var(--s4);
}
.bp-body p { margin: 0 0 1.05em; color: var(--ink-soft); }
.bp-beat {
  font-family: var(--display); font-style: italic; color: var(--accent);
  font-size: 1.3rem; line-height: 1.32;
}
.bp-infection {
  font-family: var(--display); font-weight: 600; letter-spacing: -.01em;
  font-size: clamp(1.8rem, 5vw, 2.6rem); color: var(--accent);
  margin: var(--s4) 0 !important;
}
.bp-close { color: var(--ink) !important; }
.bp-close em { font-style: italic; color: var(--accent-deep); }
.bp-cta {
  display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap;
  margin-top: var(--s5); padding-top: var(--s4); border-top: 1px solid var(--rule);
}
.bp-btn {
  font-family: var(--mono); text-transform: uppercase; letter-spacing: .12em;
  font-size: var(--t-meta); color: var(--surface); background: var(--accent);
  text-decoration: none; padding: .85rem 1.7rem; border-radius: var(--r-sm);
  box-shadow: 0 8px 22px rgba(138,58,46,.26);
  transition: transform 180ms var(--ease), filter 180ms var(--ease);
}
.bp-btn:hover { transform: translateY(-2px); filter: brightness(1.08); color: var(--surface); }
.bp-note {
  font-family: var(--mono); text-transform: uppercase; letter-spacing: .08em;
  font-size: var(--t-micro); color: var(--muted);
}

/* =========================================================================
   SCROLL CHOREOGRAPHY — content sets itself as you read down the galley.
   JS (footer.php) adds .is-in via IntersectionObserver; gated behind html.js
   so non-JS / no-paint clients always see content. Reduced-motion opts out.
   ========================================================================= */
@media (prefers-reduced-motion: no-preference) {
  html.js .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition:
      opacity .85s var(--ease),
      transform .85s var(--ease),
      filter .85s var(--ease),
      clip-path .85s var(--ease);
    will-change: opacity, transform;
  }
  html.js .reveal.is-in {
    opacity: 1;
    transform: none;
    filter: none;
    clip-path: inset(0 0 0 0);
  }

  /* Variant — list rows enter laterally from the marginal edge */
  html.js .reveal-x { transform: translateX(-34px); }

  /* Variant — cards/media settle in from slightly back */
  html.js .reveal-scale { transform: translateY(28px) scale(.94); transform-origin: bottom center; }

  /* Variant — display type resolves out of a soft focus */
  html.js .reveal-blur { filter: blur(10px); transform: translateY(22px); }

  /* Variant — verse + headings wipe open from the binding edge */
  html.js .reveal-wipe { clip-path: inset(0 0 100% 0); transform: translateY(14px); }
}

/* Homepage overture still lands on load (above the fold, no scroll trigger). */
@media (prefers-reduced-motion: no-preference) {
  @keyframes overtureName { from { opacity: 0; transform: translateY(.7rem); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
  @keyframes overtureRule { from { transform: scaleX(0); } to { transform: scaleX(1); } }
  @keyframes overtureFade { from { opacity: 0; transform: translateY(.5rem); } to { opacity: 1; transform: none; } }
  .home .overture-eyebrow { animation: overtureFade 600ms var(--ease) 80ms both; }
  .home .overture-name { animation: overtureName 760ms var(--ease) both; }
  .home .overture-verse { animation: overtureFade 700ms var(--ease) 300ms both; }
  .home .overture-flourish::after { transform-origin: left; animation: overtureRule 520ms var(--ease) 420ms both; }
}

/* =========================================================================
   PATH LANDINGS + LISTINGS — left-aligned galley, marginal labels
   ========================================================================= */
.page-title { max-width: var(--wrap); margin: 0 0 var(--s5); }
.page-title .eyebrow { font-family: var(--mono); font-size: var(--t-meta); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 0 0 var(--s2); }
.page-title h1 { font-size: var(--t-l); }
.path-intro { max-width: var(--measure); margin: 0 0 var(--s5); color: var(--ink-soft); font-style: italic; font-size: 1.25rem; }

/* =========================================================================
   PATH HEROES — every section opens on a full title plate: marginal rail,
   oversized two-line headline with a tinted italic turn, a "specimen" of
   the section's own material, and a tentacle flourish (see below) that has
   swum in from the Bloodsworth novel and taken up residence in the galley.
   ========================================================================= */
.path-hero {
  display: grid; grid-template-columns: var(--rail) minmax(0, 1fr);
  column-gap: var(--s5); align-items: start;
  position: relative; margin: 0 0 var(--s6);
}
.ph-rail {
  font-family: var(--mono); font-size: var(--t-micro);
  letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
  line-height: 1.9; padding-top: .5rem;
}
.ph-rail .mark { color: var(--tint); display: block; font-size: 1rem; margin-bottom: .6rem; }
.ph-rail .rule { display: block; width: 1px; height: 2.5rem; background: var(--rule); margin: .8rem 0; }
.ph-main { min-width: 0; }
.ph-eyebrow { font-family: var(--mono); font-size: var(--t-meta); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 var(--s3); }
.ph-title {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(2.7rem, 7vw, 5.6rem); line-height: .95; letter-spacing: -.022em;
  margin: 0; font-variation-settings: "opsz" 144;
}
.ph-title .line { display: block; }
.ph-title em { font-style: italic; color: var(--tint); }
.ph-specimen {
  font-family: var(--text); font-style: italic;
  font-size: clamp(1.15rem, 2.2vw, 1.4rem); line-height: 1.5;
  color: var(--ink-soft); max-width: 34rem; margin: var(--s4) 0 0;
  text-wrap: balance;
}
.ph-specimen .src {
  display: block; font-family: var(--mono); font-style: normal;
  font-size: var(--t-micro); letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); margin-top: .55rem;
}
.ph-specimen.mono { font-family: var(--mono); font-style: normal; font-size: .95rem; color: var(--ink-soft); letter-spacing: .02em; }
.ph-flourish { margin: var(--s4) 0 0; color: var(--tint); }

/* --- the tentacle flourish rule --- */
.orn-rule { width: min(15rem, 70%); height: auto; display: block; overflow: visible; }
.orn-rule path { stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }
.orn-rule circle { fill: currentColor; }

/* --- the deeps: tentacles rising behind the Fiction hero --- */
.orn-deeps {
  position: absolute; right: 0; bottom: -1rem;
  width: clamp(170px, 28vw, 330px); height: auto;
  color: var(--tint); opacity: .1; pointer-events: none;
}
.orn-deeps path { stroke: currentColor; fill: none; stroke-linecap: round; }
.orn-deeps .w-thick { stroke-width: 8; }
.orn-deeps .w-thin { stroke-width: 3.5; }
.orn-deeps circle { fill: currentColor; }

/* --- the drape: one arm escaping over the top of the Bloodsworth card --- */
.orn-drape {
  position: absolute; top: -4px; right: 2.2rem;
  width: 46px; height: auto; color: var(--accent-deep); opacity: .45;
  pointer-events: none;
}
.orn-drape path { stroke: currentColor; fill: none; stroke-linecap: round; }
.orn-drape .w-thick { stroke-width: 4.5; }
.orn-drape .w-thin { stroke-width: 2.5; }
.orn-drape circle { fill: currentColor; }

/* --- hero + ornament choreography --- */
@media (prefers-reduced-motion: no-preference) {
  .path-hero .ph-eyebrow  { animation: overtureFade 600ms var(--ease) 80ms both; }
  .path-hero .ph-title    { animation: overtureName 760ms var(--ease) both; }
  .path-hero .ph-specimen { animation: overtureFade 700ms var(--ease) 300ms both; }
  .path-hero .ph-flourish,
  .home .ph-flourish      { animation: overtureFade 700ms var(--ease) 420ms both; }

  /* the flourish draws itself in like a pen stroke, suckers landing after */
  .orn-rule .draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: ornDraw 1.3s var(--ease) .45s forwards; }
  @keyframes ornDraw { to { stroke-dashoffset: 0; } }
  .orn-rule .dot { opacity: 0; animation: ornDot .45s var(--ease) forwards; }
  .orn-rule .d1 { animation-delay: .75s; } .orn-rule .d2 { animation-delay: .85s; }
  .orn-rule .d3 { animation-delay: .95s; } .orn-rule .d4 { animation-delay: 1.05s; }
  .orn-rule .d5 { animation-delay: 1.15s; } .orn-rule .d6 { animation-delay: 1.45s; }
  @keyframes ornDot { to { opacity: 1; } }

  /* each arm of the deeps sways on its own slow tidal clock */
  .orn-deeps .tn { transform-origin: 50% 100%; animation: tnSway 8s ease-in-out infinite alternate; }
  .orn-deeps .tn2 { animation-duration: 11s; animation-delay: -3s; }
  .orn-deeps .tn3 { animation-duration: 9.5s; animation-delay: -6s; }
  @keyframes tnSway { from { transform: rotate(-1.6deg); } to { transform: rotate(1.8deg); } }

  /* the drape dangles from the card's top edge */
  .orn-drape { transform-origin: 30px 0; animation: drapeSway 7s ease-in-out infinite alternate; }
  @keyframes drapeSway { from { transform: rotate(-2.2deg); } to { transform: rotate(2.4deg); } }
}

@media (max-width: 48rem) {
  .ph-rail { display: none; }
  .path-hero { grid-template-columns: 1fr; }
  .orn-deeps { opacity: .07; right: -.5rem; }
}

/* =========================================================================
   MEGA HEROES — full-viewport cinematic openings. A canvas scene runs
   behind the headline (assets/js/hero.js); everything degrades to a fully
   designed static plate without JS or with reduced motion.
   ========================================================================= */
.mega-hero {
  position: relative;
  width: 100vw;
  margin: calc(var(--s6) * -1) calc(50% - 50vw) var(--s6);
  min-height: max(88vh, 36rem);
  min-height: max(88svh, 36rem);
  overflow: hidden;
  display: grid;
}
.mega-hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.mh-content {
  position: relative; z-index: 2;
  align-self: center; justify-self: center;
  text-align: center; max-width: 64rem;
  padding: var(--s6) var(--pad) calc(var(--s6) * 1.6);
}
.mh-eyebrow {
  font-family: var(--mono); font-size: var(--t-meta); letter-spacing: .16em;
  text-transform: uppercase; margin: 0 0 var(--s4); opacity: .85;
}
.mh-title {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(3rem, 11vw, 9.5rem); line-height: .92; letter-spacing: -.03em;
  margin: 0; font-variation-settings: "opsz" 144;
  transition: opacity .9s var(--ease);
}
.mh-title .line { display: block; }
.mh-title em { font-style: italic; color: var(--tint); }
.mh-verse {
  font-family: var(--text); font-style: italic;
  font-size: clamp(1.15rem, 2.3vw, 1.55rem); line-height: 1.5;
  margin: var(--s4) auto 0; max-width: 36rem; text-wrap: balance; opacity: .88;
}
.mh-verse .src {
  display: block; font-family: var(--mono); font-style: normal;
  font-size: var(--t-micro); letter-spacing: .12em; text-transform: uppercase;
  opacity: .75; margin-top: .55rem;
}
.mh-cue {
  position: absolute; z-index: 2; bottom: 1.3rem; left: 50%; transform: translateX(-50%);
  font-family: var(--mono); font-size: var(--t-micro); letter-spacing: .22em;
  text-transform: uppercase; opacity: .75; text-align: center; pointer-events: none;
}
.mh-cue::after {
  content: ""; display: block; width: 1px; height: 2.1rem;
  background: currentColor; margin: .55rem auto 0;
}

/* --- tide (home): paper sky over an ink sea --- */
.mh-tide { background: linear-gradient(180deg, #f8f4eb 0%, #f1eadb 52%, #e6ddc9 68%); color: var(--ink); }
.mh-tide .mh-content { align-self: start; padding-top: max(9vh, 3.5rem); }
/* the name is set in Garamond — bookish, personal — rather than the display face */
.mh-tide .mh-title {
  font-family: var(--text); font-weight: 600; letter-spacing: -.01em;
  font-size: clamp(3.2rem, 12vw, 10.5rem); line-height: .94;
  font-variation-settings: normal;
}
.mh-tide .mh-title em { font-weight: 500; }
.mh-tide .mh-eyebrow { color: var(--muted); }
.mh-tide .mh-cue { color: #d8dcd2; }
/* static fallback: a calm sea drawn in CSS */
.mh-tide.mh-static { background: linear-gradient(180deg, #f8f4eb 0%, #f1eadb 55%, #d7d4c2 66%, #1b3136 68%, #0c181b 100%); }

/* --- deeps (fiction): beneath the bay --- */
.mh-deeps {
  background: radial-gradient(130% 100% at 50% -10%, #143036 0%, #0c1d22 48%, #050e11 100%);
  color: #e8e0cd;
  min-height: max(94vh, 38rem);
  min-height: max(94svh, 38rem);
}
.mh-deeps .mh-eyebrow { color: #7fb3a8; }
.mh-deeps .mh-title { color: #ece4d0; text-shadow: 0 0 44px rgba(127,179,168,.22); }
.mh-deeps .mh-title em { color: #7fb3a8; }
.mh-deeps .mh-verse { color: #b6c2b3; }
.mh-deeps .mh-cue { color: #7fb3a8; }
.mh-deeps::after {  /* breathing vignette — the deep is alive */
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background: radial-gradient(90% 70% at 50% 55%, transparent 55%, rgba(3,8,10,.55) 100%);
}
@media (prefers-reduced-motion: no-preference) {
  .mh-deeps::after { animation: deepBreathe 7s ease-in-out infinite alternate; }
  @keyframes deepBreathe { from { opacity: .75; } to { opacity: 1; } }
}

/* --- verse (poetry): the headline condenses out of ink --- */
.mh-versefield { background: var(--paper); color: var(--ink); }
.mh-versefield .mh-eyebrow { color: var(--muted); }
.mh-versefield .mh-cue { color: var(--muted); }
.mh-versefield.mh-ghost .mh-title { animation: none; opacity: 0; }  /* particles are the title */
.mh-versefield .mh-content { pointer-events: none; }  /* let the cursor stir the ink */

/* --- plates (photography): an iris opens onto the pictures --- */
.mh-plates { background: #0f120f; color: #efe9da; }
.mh-plates canvas { clip-path: circle(0% at 50% 52%); }
.mh-plates.iris-open canvas {
  transition: clip-path 1.7s cubic-bezier(.2, .7, .2, 1) .15s;
  clip-path: circle(142% at 50% 52%);
}
.mh-plates .mh-content {
  background: radial-gradient(70% 90% at 50% 50%, rgba(8,10,8,.52), transparent 70%);
}
.mh-plates .mh-title { color: #f2ecdc; text-shadow: 0 2px 34px rgba(0,0,0,.6); }
.mh-plates .mh-title em { color: #cbb892; }
.mh-plates .mh-eyebrow { color: #cbb892; }
.mh-plates .mh-verse { color: #d9d2c0; }
.mh-plates .mh-cue { color: #cbb892; }
.mh-plates.mh-static canvas, html:not(.js) .mh-plates canvas { clip-path: none; }

/* entrance + cue choreography */
@media (prefers-reduced-motion: no-preference) {
  .mh-eyebrow { animation: overtureFade 700ms var(--ease) 150ms both; }
  .mh-title   { animation: overtureName 900ms var(--ease) 60ms both; }
  .mh-verse   { animation: overtureFade 800ms var(--ease) 450ms both; }
  .mh-cue::after { transform-origin: top; animation: cueDrop 2.1s var(--ease) 1.2s infinite; }
  @keyframes cueDrop {
    0% { transform: scaleY(0); transform-origin: top; }
    42% { transform: scaleY(1); transform-origin: top; }
    58% { transform: scaleY(1); transform-origin: bottom; }
    100% { transform: scaleY(0); transform-origin: bottom; }
  }
}

@media (max-width: 48rem) {
  .mega-hero { min-height: max(76vh, 30rem); min-height: max(76svh, 30rem); }
  .mh-deeps { min-height: max(84vh, 32rem); min-height: max(84svh, 32rem); }
}

.listing-group { margin: var(--s5) 0 0; }
.listing-group > h2 {
  font-family: var(--mono); font-size: var(--t-meta); font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  border: 0; padding: 0 0 var(--s2); margin: 0 0 var(--s2);
  border-bottom: 1px solid var(--rule);
}

.index-list { list-style: none; margin: 0; padding: 0; max-width: var(--wrap); }
.index-list li { border-bottom: 1px solid var(--rule-soft); }
.index-list a {
  display: grid; grid-template-columns: minmax(0,1fr) auto; gap: var(--s4);
  align-items: baseline; padding: var(--s3) 0 var(--s3) var(--s4);
  position: relative; text-decoration: none; color: var(--ink);
  transition: padding-left 180ms var(--ease), color 160ms var(--ease);
}
.index-list a::before { content: ""; position: absolute; left: 0; top: .9rem; bottom: .9rem; width: 2px; background: var(--tint); transform: scaleY(0); transform-origin: top; transition: transform 180ms var(--ease); }
.index-list a:hover { padding-left: calc(var(--s4) + .4rem); color: var(--accent); }
.index-list a:hover::before { transform: scaleY(1); }
.index-list .t { font-family: var(--display); font-size: clamp(1.35rem, 2.4vw, 1.85rem); font-weight: 500; line-height: 1.18; }
.index-list .d { font-family: var(--mono); font-size: var(--t-micro); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
@media (max-width: 32rem) { .index-list a { grid-template-columns: 1fr; gap: .25rem; } .index-list .d { justify-self: start; } }

/* =========================================================================
   POEM — the reading room. Asymmetric galley: a marginal rail carries the
   date + leaf mark; a thin "ink" line in the gutter fills with reading
   progress. Verbatim text is never wrapped or numbered — fidelity first.
   ========================================================================= */
.poem-page {
  display: grid; grid-template-columns: var(--rail) minmax(0, var(--measure));
  column-gap: var(--s5); justify-content: start;
  max-width: 48rem; margin: 0 auto;
}
.poem-rail { font-family: var(--mono); font-size: var(--t-micro); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding-top: .6rem; position: relative; }
.poem-rail .mark { color: var(--accent); font-size: 1rem; display: block; margin-bottom: .6rem; }
/* reading-progress ink line (set by JS via --read; 0 → 1) */
.poem-rail .ink { position: absolute; left: 0; top: 3rem; bottom: 0; width: 2px; background: var(--rule); }
.poem-rail .ink::before { content: ""; position: absolute; inset: 0 0 auto 0; height: calc(var(--read, 0) * 100%); background: var(--accent); transition: height 90ms linear; }

.poem-head { margin: 0 0 var(--s5); grid-column: 2; }
.poem-head h1 { font-family: var(--display); font-style: italic; font-weight: 400; font-size: clamp(2rem, 4vw, 3rem); }
.poem-meta { display: none; } /* moved into the rail */
.poem-body { grid-column: 2; font-size: 1.3rem; line-height: 1.78; }
.poem-body p { margin: 0 0 1.15em; }
.poem-body em { color: var(--ink-soft); }
.poem-body img { margin: 1.4rem 0; border-radius: var(--r-md); }
.poem-nav { grid-column: 2; display: flex; justify-content: space-between; gap: var(--s3); margin-top: var(--s6); padding-top: var(--s4); border-top: 1px solid var(--rule); font-family: var(--mono); font-size: var(--t-meta); }
.poem-nav a { text-decoration: none; max-width: 46%; }
.poem-nav .dir { display: block; font-size: var(--t-micro); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: .2rem; }
.poem-nav .nxt { text-align: right; margin-left: auto; }
@media (max-width: 40rem) {
  .poem-page { grid-template-columns: 1fr; }
  .poem-head, .poem-body, .poem-nav { grid-column: 1; }
  .poem-rail { display: flex; gap: var(--s3); align-items: center; margin-bottom: var(--s3); padding-top: 0; }
  .poem-rail .ink { display: none; }
}

/* =========================================================================
   ARTICLES / SERVICES
   ========================================================================= */
.article { max-width: var(--measure); }
.article h1 { font-size: var(--t-l); }
.lede-block { font-size: 1.3rem; color: var(--ink-soft); font-style: italic; max-width: 42ch; margin: 0 0 var(--s5); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem,1fr)); gap: var(--s4); margin: var(--s5) 0; }
.card { background: transparent; border: 0; border-top: 2px solid var(--rule); border-radius: var(--r0); padding: var(--s3) 0 0; }
.card.feature { border-top-color: var(--accent); }
.card h3 { margin-top: 0; }
.price { font-family: var(--display); font-size: 2rem; color: var(--accent); }
.price small { font-family: var(--mono); font-size: var(--t-micro); color: var(--muted); letter-spacing: .05em; }

.btn {
  display: inline-block; font-family: var(--mono); font-size: var(--t-meta);
  letter-spacing: .1em; text-transform: uppercase;
  background: var(--ink); color: var(--paper);
  padding: .7rem 1.3rem; border-radius: var(--r-sm); text-decoration: none;
  transition: background 160ms var(--ease), transform 160ms var(--ease);
}
.btn:hover { background: var(--accent); color: #fff; transform: translateY(-1px); }

/* =========================================================================
   CONTACT FORM
   ========================================================================= */
.contact-form { max-width: var(--measure); }
.contact-form p { margin: 0 0 var(--s3); }
.contact-form label { display: block; font-family: var(--mono); font-size: var(--t-micro); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: .35rem; }
.contact-form input, .contact-form textarea { width: 100%; font-family: var(--text); font-size: 1.05rem; color: var(--ink); background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-sm); padding: .7rem .8rem; transition: border-color 160ms var(--ease); }
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.contact-form textarea { resize: vertical; }
.contact-form .hp { position: absolute; left: -5000px; height: 0; overflow: hidden; }
.form-ok { max-width: var(--measure); border-left: 3px solid var(--accent); padding: var(--s3) var(--s4); font-size: 1.15rem; background: color-mix(in srgb, var(--accent) 6%, transparent); }
.form-errors { max-width: var(--measure); margin: 0 0 var(--s4); list-style: none; padding: var(--s3) var(--s4); border-left: 3px solid var(--accent); background: color-mix(in srgb, var(--accent) 7%, transparent); color: var(--accent-deep); }
.form-errors li { margin: .2rem 0; }
.contact-alt { color: var(--muted); margin-top: var(--s4); }
.song audio { width: 100%; max-width: 28rem; margin-top: .4rem; }

/* =========================================================================
   MEDIA (Musical Interlude) — media radius is the only --r-md use
   ========================================================================= */
.media-section { margin: var(--s6) 0 0; }
.media-head { font-family: var(--mono); font-size: var(--t-meta); font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 var(--s4); padding-bottom: var(--s2); border-bottom: 1px solid var(--rule); }
.music-cols { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s5) var(--s6); align-items: start; }
.music-cols .media-section { margin-top: 0; }
.media-grid { display: grid; gap: var(--s4); grid-template-columns: 1fr; }
@media (max-width: 52rem) { .music-cols { grid-template-columns: 1fr; } }
.media-card { margin: 0; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-md); overflow: hidden; transition: box-shadow 200ms var(--ease), transform 200ms var(--ease); }
.media-card:hover { box-shadow: 0 12px 30px -18px rgba(35,32,25,.35); transform: translateY(-2px); }
.video-frame { position: relative; aspect-ratio: 16 / 9; background: #000; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.card-title { font-family: var(--display); font-size: 1.15rem; font-weight: 500; color: var(--ink); padding: .85rem 1.1rem; line-height: 1.25; }
.song-card { display: flex; flex-direction: column; gap: .65rem; padding: 1.2rem 1.1rem 1.4rem; }
.song-card .card-title { padding: 0; }
.song-card audio { width: 100%; }

/* =========================================================================
   FOOTER — a galley colophon
   ========================================================================= */
.site-footer { border-top: 1px solid var(--rule); margin-top: var(--s6); padding: var(--s5) 0; }
.footer-inner { display: grid; grid-template-columns: var(--rail) 1fr; column-gap: var(--s5); row-gap: var(--s3); align-items: baseline; max-width: var(--wrap); margin: 0 auto; }
.footer-brand { font-family: var(--display); font-size: 1.3rem; margin: 0; }
.footer-nav { grid-column: 2; display: flex; flex-wrap: wrap; gap: var(--s4); }
.footer-nav a { font-family: var(--text); font-variant: small-caps; font-size: 1rem; letter-spacing: .03em; color: var(--ink-soft); text-decoration: none; }
.footer-nav a:hover { color: var(--accent); }
.footer-meta { grid-column: 2; font-family: var(--mono); font-size: var(--t-micro); letter-spacing: .04em; color: var(--muted); margin: 0; }

/* =========================================================================
   VIEW TRANSITIONS — cross-document spatial continuity (masthead persists).
   Outgoing page lifts + dissolves; incoming page rises from below with a
   breath of focus, so navigation feels like turning a leaf, not a cut.
   ========================================================================= */
@view-transition { navigation: auto; }

@keyframes vtOut {
  to { opacity: 0; transform: translateY(-18px) scale(.992); filter: blur(3px); }
}
@keyframes vtIn {
  from { opacity: 0; transform: translateY(26px) scale(.994); filter: blur(4px); }
}
::view-transition-old(root) {
  animation: vtOut 320ms var(--ease) both;
}
::view-transition-new(root) {
  animation: vtIn 460ms var(--ease) both;
}

/* =========================================================================
   SCROLL-DRIVEN EXTRAS — progressive sugar for browsers with native
   scroll timelines; everything below degrades to nothing where unsupported.
   ========================================================================= */
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    /* A thin oxblood meter charts your descent down the page. */
    body::before {
      content: "";
      position: fixed;
      inset: 0 auto auto 0;
      height: 2px;
      width: 100%;
      background: linear-gradient(90deg, var(--accent), var(--tint));
      transform-origin: 0 50%;
      transform: scaleX(0);
      z-index: 60;
      animation: progressBar linear both;
      animation-timeline: scroll(root);
    }
    @keyframes progressBar { to { transform: scaleX(1); } }

    /* The marginal rail drifts gently against the text it annotates. */
    .galley-rail, .poem-rail {
      animation: railDrift linear both;
      animation-timeline: view();
      animation-range: entry 0% exit 100%;
    }
    @keyframes railDrift {
      from { transform: translateY(-14px); }
      to   { transform: translateY(34px); }
    }
  }
}

/* =========================================================================
   REDUCED MOTION — a fully designed static state
   ========================================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .home .overture-flourish::after { transform: scaleX(1); }
  .poem-rail .ink::before { transition: none; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* =========================================================================
   RESPONSIVE
   ========================================================================= */
@media (max-width: 48rem) {
  .galley { grid-template-columns: 1fr; }
  .galley-rail { display: none; }
  .part { grid-template-columns: 2.5rem minmax(0,1fr); }
  .part-go { grid-column: 2; padding-top: .3rem; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-nav, .footer-meta { grid-column: 1; }
}
@media (max-width: 760px) {
  .nav-toggle { display: inline-block; align-self: center; }
  .nav-list { display: none; width: 100%; flex-direction: column; gap: .25rem; margin-top: var(--s3); }
  .nav-list.is-open { display: flex; }
  .masthead-inner { flex-wrap: wrap; align-items: center; }
  .nav { width: 100%; display: flex; flex-direction: column; }
}
