/* ===========================================================================
   Joaquin S. Torres — author site
   Built by Branding Zombie Designs from the Claude Design prototype
   "Bloodstone Author Site.dc.html".

   Palette is sampled from the book cover. Leaf green (--green) is the only
   saturated colour in the system and is reserved for calls to action.
   =========================================================================== */

/* ---------- tokens ------------------------------------------------------ */
:root {
  --ink:            #0F1229;  /* page background, night sky            */
  --ink-deep:       #080A18;  /* quiet sections, footer                */
  --panel:          #1B1F3D;  /* cards, banded sections                */
  --panel-hover:    #161A33;
  --line:           #4A4A78;  /* twilight — borders, dim meta          */
  --lilac:          #B9B4D6;  /* body copy on dark                     */
  --lilac-dim:      #8E88BC;  /* secondary copy on dark                */
  --parchment:      #F4EEDC;  /* headings on dark, light section bg    */
  --parchment-warm: #EFE3CE;  /* Book Two section                      */
  --slate:          #3B3F5E;  /* body copy on parchment                */
  --slate-deep:     #1B1F3D;  /* headings on parchment                 */
  --green:          #3DBF8A;  /* THE accent — CTAs only                */
  --green-bright:   #7FE0B8;
  --green-deep:     #2A8F66;
  --clay:           #C98A78;  /* editorial flags, warm neutral         */
  --umber:          #8A5A3B;
  --umber-ink:      #2C2A26;
  --umber-body:     #4A463F;

  --font-display: 'Cinzel', 'Trajan Pro', Georgia, serif;
  --font-body:    'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-serif:   'Lora', Georgia, 'Times New Roman', serif;

  --wrap:      1120px;
  --wrap-wide: 1280px;
  --wrap-read: 680px;

  /* The built-in CSS easings are too weak to read as intentional.
     --ease-out for anything entering or responding to the user,
     --ease-in-out for things moving on screen, --ease for colour only. */
  --ease-out:    cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease:        cubic-bezier(0.16, 1, 0.3, 1);
  --header-h: 96px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--lilac);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-wrap: pretty;
  overflow-x: clip;
}

img, video { max-width: 100%; }
/* Images carry width/height attributes so the browser can reserve space and
   avoid layout shift. `height: auto` is what stops those attributes from
   being taken literally once CSS resizes the element — without it every
   fluid image renders at its intrinsic pixel height and squashes. */
img { height: auto; border-style: none; }

a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-bright); }

h1, h2, h3, h4 { text-wrap: balance; }

input, button, textarea { font: inherit; }

::selection { background: var(--green-deep); color: var(--parchment); }

/* Visible focus for keyboard users on every interactive element. */
:focus-visible {
  outline: 2px solid var(--green-bright);
  outline-offset: 3px;
  border-radius: 2px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip-path: inset(50%);
  overflow: hidden; white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 12px; top: -100px;
  z-index: 200;
  background: var(--green);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 14px 22px;
  border-radius: 3px;
  transition: top 200ms ease;
}
.skip-link:focus { top: 12px; color: var(--ink); }

/* ---------- shared primitives ------------------------------------------ */
.wrap      { max-width: var(--wrap);      margin-inline: auto; }
.wrap-wide { max-width: var(--wrap-wide); margin-inline: auto; }
.wrap-read { max-width: var(--wrap-read); margin-inline: auto; }
.wrap-mid  { max-width: 1000px;           margin-inline: auto; }
.wrap-prose{ max-width: 640px;            margin-inline: auto; }

.section        { padding: 130px 40px; background: var(--ink); position: relative; }
.section--tight { padding: 110px 40px; }
.section--panel { background: var(--panel); }
.section--deep  { background: var(--ink-deep); }
.section--edged { border-top: 1px solid rgba(74, 74, 120, 0.4); }
.section--edged-b { border-bottom: 1px solid rgba(74, 74, 120, 0.4); }

/* Eyebrow — the small uppercase label above a heading. */
.eyebrow {
  margin: 0 0 22px;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--green);
}
.eyebrow--dark  { color: var(--green-deep); }
.eyebrow--umber { color: var(--umber); }

.h-section {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1.22;
  color: var(--parchment);
}
.h-section--sm { font-size: clamp(24px, 2.6vw, 34px); line-height: 1.25; }
.h-page {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 3.8vw, 48px);
  line-height: 1.14;
  color: var(--parchment);
}

.lede  { margin: 28px 0 0; font-size: 19px; line-height: 1.78; color: var(--lilac); }
.body  { margin: 22px 0 0; font-size: 18px; line-height: 1.8;  color: var(--lilac); }
.body:first-child { margin-top: 0; }
.body--lift { color: var(--parchment); }
.body--quiet { color: var(--lilac-dim); }
.body--serif {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 18px;
  line-height: 1.78;
  color: var(--lilac-dim);
}
.measure { max-width: 60ch; }
.measure--tight { max-width: 54ch; }
.measure--narrow { max-width: 52ch; }

/* ---------- buttons ----------------------------------------------------- */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 16px 30px;
  border-radius: 3px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease,
              color 160ms ease, transform 160ms var(--ease-out);
}
/* Instant physical feedback — the interface acknowledging the press. */
.btn:active { transform: scale(0.97); }

.btn--primary { background: var(--green); color: var(--ink); }
.btn--primary:focus-visible { background: var(--green-bright); color: var(--ink); }

.btn--ghost { color: var(--parchment); border-color: var(--line); }
.btn--ghost:focus-visible {
  border-color: var(--lilac);
  background: rgba(74, 74, 120, 0.25);
  color: var(--parchment);
}

.btn--dark { background: var(--umber-ink); color: var(--parchment-warm); }
.btn--dark:focus-visible { background: var(--umber); color: var(--parchment-warm); }

/* Hover only where a real cursor exists. On touch, :hover fires on tap and
   sticks after it, which reads as a stuck button. */
@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover { background: var(--green-bright); color: var(--ink); }
  .btn--ghost:hover {
    border-color: var(--lilac);
    background: rgba(74, 74, 120, 0.25);
    color: var(--parchment);
  }
  .btn--dark:hover { background: var(--umber); color: var(--parchment-warm); }
}

.btn--sm { padding: 14px 26px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }

/* ---------- header ------------------------------------------------------ */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(74, 74, 120, 0);
  transition: background 240ms ease, border-color 240ms ease, backdrop-filter 240ms ease;
}
.header.is-scrolled,
.header.is-open {
  background: rgba(8, 10, 24, 0.92);
  border-bottom-color: rgba(74, 74, 120, 0.55);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.header__home { display: flex; align-items: center; gap: 11px; color: var(--parchment); }
.header__mark { width: 32px; height: 32px; object-fit: contain; opacity: 0.9; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav__link {
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--lilac);
  padding: 9px 13px;
  border-radius: 4px;
  transition: color 160ms ease, background 160ms ease;
}
.nav__link:focus-visible { color: var(--parchment); background: rgba(74, 74, 120, 0.28); }
.nav__link[aria-current="page"] { color: var(--parchment); box-shadow: inset 0 -1px 0 var(--green); }

.nav__cta {
  margin-left: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--green);
  padding: 11px 18px;
  border-radius: 3px;
  transition: background 160ms ease, transform 160ms var(--ease-out);
}
.nav__cta:focus-visible { background: var(--green-bright); color: var(--ink); }
.nav__cta:active { transform: scale(0.97); }

@media (hover: hover) and (pointer: fine) {
  .nav__link:hover { color: var(--parchment); background: rgba(74, 74, 120, 0.28); }
  .nav__cta:hover { background: var(--green-bright); color: var(--ink); }
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--parchment);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 10px 14px;
  cursor: pointer;
}
.nav-toggle__bars { position: relative; width: 16px; height: 10px; }
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: ""; position: absolute; left: 0; right: 0; height: 1px;
  background: currentColor; transition: transform 260ms var(--ease);
}
.nav-toggle__bars::before { top: 0; }
.nav-toggle__bars::after  { bottom: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(4.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after  { transform: translateY(-4.5px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 14px 22px 24px;
    background: rgba(8, 10, 24, 0.97);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(74, 74, 120, 0.55);
  }
  .header.is-open .nav { display: flex; }
  .nav__link { padding: 15px 6px; font-size: 14px; }
  .nav__cta { margin: 12px 0 0; text-align: center; padding: 16px 18px; font-size: 13px; }
}

/* ---------- hero -------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background: var(--ink);
  display: flex;
  flex-direction: column;
}
.hero__video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(0.8) hue-rotate(212deg) contrast(1.06);
  animation: bsDrift 46s ease-in-out infinite;
}
.hero__video--bloom {
  opacity: 0.9;
  filter: blur(26px) saturate(0.8) hue-rotate(212deg);
  animation: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0,0,0,0.7) 26%, rgba(0,0,0,0) 58%);
          mask-image: linear-gradient(to bottom, #000 0%, rgba(0,0,0,0.7) 26%, rgba(0,0,0,0) 58%);
}
.hero__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(100deg, rgba(8,10,24,0.86) 0%, rgba(8,10,24,0.55) 40%, rgba(15,18,41,0.12) 74%, rgba(15,18,41,0) 100%),
    linear-gradient(to bottom, rgba(8,10,24,0.72) 0%, rgba(15,18,41,0.5) 42%, rgba(15,18,41,0.62) 76%, var(--ink) 100%);
}
.hero__treeline {
  position: absolute; left: -2%; bottom: 0;
  width: 104%; height: 14%;
  object-fit: cover; object-position: center top;
  opacity: 0.95;
  will-change: transform;
  pointer-events: none;
}
.hero__fade {
  position: absolute; left: 0; right: 0; bottom: 0; height: 20%;
  background: linear-gradient(to bottom, rgba(15,18,41,0) 0%, var(--ink) 94%);
}
.hero__masthead { position: relative; z-index: 5; padding: 108px 20px 0; text-align: center; }
.hero__name {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  /* Floor raised from 19px: the byline shortened to "J. S. Torres", and at
     6.4vw a 375px phone rendered the masthead at 24px — smaller than the
     body copy beneath it. */
  font-size: clamp(30px, 6.4vw, 104px);
  line-height: 1.05;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--parchment);
}
.hero__kicker {
  margin: 20px auto 0;
  max-width: 660px;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--lilac-dim);
}
.hero__body {
  position: relative; z-index: 5;
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 40px;
  align-items: center;
  width: 100%;
  max-width: var(--wrap-wide);
  margin: 0 auto;
  padding: 40px 40px 90px;
}
/* Staggered rather than one block fade — the eye follows the sequence
   eyebrow → lockup → line → buttons, which is the reading order anyway.
   Delays stay short; long stagger reads as a slow page, not a considered one. */
.hero__copy > * { animation: bsFade 700ms var(--ease-out) both; }
.hero__copy > *:nth-child(1) { animation-delay: 80ms; }
.hero__copy > *:nth-child(2) { animation-delay: 140ms; }
.hero__copy > *:nth-child(3) { animation-delay: 210ms; }
.hero__copy > *:nth-child(4) { animation-delay: 280ms; }
/* Opacity only. The render's `transform` belongs to the parallax loop — an
   entrance animation on the same property would win the cascade for its
   duration and then hand back with a jump. */
.hero__render { animation: bsFadeIn 900ms var(--ease-out) both; animation-delay: 180ms; }
.hero__eyebrow {
  margin: 0 0 24px;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--green);
}
.hero__title { display: block; width: 100%; min-width: 0; max-width: 470px; height: auto; }
.hero__tagline { margin: 30px 0 0; font-size: 19px; line-height: 1.7; color: var(--lilac); max-width: 46ch; }
.hero__render {
  display: block;
  width: 100%;
  max-width: 660px;
  will-change: transform;
  filter: drop-shadow(0 40px 70px rgba(0, 0, 0, 0.6));
}

/* ---------- pitch (cover alongside copy) -------------------------------- */
.split { display: flex; flex-wrap: wrap; align-items: center; gap: 70px; }
.split__copy { flex: 1 1 440px; }
.split__aside { flex: 0 1 300px; min-width: 0; }

.cover-link { display: block; transition: transform 320ms var(--ease-out); }
.cover-link:focus-visible { transform: translateY(-10px); }
.cover-link:active { transform: translateY(-4px) scale(0.99); }
@media (hover: hover) and (pointer: fine) {
  .cover-link:hover { transform: translateY(-10px); }
}
.cover-img {
  display: block; width: 100%;
  border-radius: 2px;
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(185, 180, 214, 0.16);
}

/* ---------- pull-quote band --------------------------------------------- */
.band { padding: 120px 40px; background: var(--panel); border-top: 1px solid rgba(74,74,120,0.4); border-bottom: 1px solid rgba(74,74,120,0.4); }
.band__inner { max-width: 940px; margin: 0 auto; text-align: center; }
.band__mark { display: block; width: 44px; height: 44px; object-fit: contain; margin: 0 auto 34px; opacity: 0.75; }
.band__quote {
  margin: 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(24px, 2.9vw, 38px);
  line-height: 1.45;
  color: var(--parchment);
}

/* ---------- teacher section (parchment tonal break) --------------------- */
.parchment { padding: 130px 40px; background: var(--parchment); color: var(--slate-deep); }
.parchment .h-section { color: var(--slate-deep); }
.parchment .body { color: var(--slate); }
.parchment .body--lift { color: var(--slate-deep); font-weight: 500; }

.portrait {
  display: block;
  flex: 0 1 320px;
  min-width: 0;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: 56% 26%;
  border-radius: 2px;
  box-shadow: 0 26px 60px rgba(27, 31, 61, 0.28);
}
.signature {
  margin: 26px 0 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 19px;
  color: var(--green-deep);
}

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(115px, 1fr));
  gap: 1px;
  margin-top: 44px;
  background: rgba(27, 31, 61, 0.16);
  border: 1px solid rgba(27, 31, 61, 0.16);
}
.facts__cell { background: var(--parchment); padding: 20px 18px; }
.facts__value {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  color: var(--slate-deep);
}
.facts__label {
  margin: 6px 0 0;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6B6F8C;
}

/* ---------- review cards ------------------------------------------------ */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 28px;
}
.card {
  margin: 0;
  background: var(--panel);
  border: 1px solid rgba(74, 74, 120, 0.55);
  border-radius: 3px;
  padding: 40px 36px;
}
.card--tight { padding: 32px 28px; }
.card__quote {
  margin: 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 19px;
  line-height: 1.7;
  color: var(--parchment);
}
.card__source {
  margin-top: 24px;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lilac-dim);
}
.card__title { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 19px; color: var(--parchment); }
.card__body { margin: 14px 0 0; font-size: 16px; line-height: 1.7; color: var(--lilac-dim); }

.section-title { margin: 0 0 54px; text-align: center; }

.rating {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin: 0 0 44px;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lilac-dim);
}
.rating__stars { color: var(--green); letter-spacing: 0.16em; font-size: 15px; }

/* ---------- world section (reversed tree) ------------------------------- */
.world { position: relative; padding: 130px 40px; background: var(--panel); overflow: hidden; }
.world__tree {
  position: absolute;
  left: -12px; top: -774px;
  width: 776px; height: 863px;
  /* Decorative, deliberately larger than its container and clipped by the
     section's overflow — must not be clamped by the global max-width. */
  max-width: none;
  opacity: 0.6;
  will-change: transform;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 52%, rgba(0,0,0,0) 86%);
          mask-image: linear-gradient(to bottom, #000 0%, #000 52%, rgba(0,0,0,0) 86%);
}
.world__inner { position: relative; max-width: var(--wrap); margin: 0 auto; display: flex; justify-content: flex-end; }
.world__copy { max-width: 520px; }
.world__mark { display: block; width: 34px; height: 34px; object-fit: contain; margin-bottom: 26px; opacity: 0.7; }

/* ---------- the leaf / emotional beat ----------------------------------- */
.leaffield { position: relative; padding: 170px 40px 190px; background: var(--ink-deep); overflow: hidden; }
.leaffield__drift { position: absolute; opacity: 0.3; will-change: transform; pointer-events: none; }
.leaffield__inner { position: relative; max-width: 600px; margin: 0 auto; text-align: center; }
.leaffield__leaf {
  display: block;
  width: 74px;
  margin: 0 auto 60px;
  animation: bsSway 9s ease-in-out infinite;
  transition: filter 300ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .leaffield__leaf:hover { filter: drop-shadow(0 0 34px rgba(61, 191, 138, 0.65)); }
}
.leaffield p {
  margin: 26px 0 0;
  font-family: var(--font-serif);
  font-size: 20px;
  line-height: 1.85;
  color: var(--lilac);
}
.leaffield p:first-of-type { margin-top: 0; }
.leaffield .is-lift  { color: var(--parchment); }
.leaffield .is-green { color: var(--green); font-style: italic; }

/* ---------- what's next (warm) ------------------------------------------ */
.warm { padding: 130px 40px; background: var(--parchment-warm); color: var(--umber-ink); }
.warm .h-section { color: var(--umber-ink); font-size: clamp(28px, 3.2vw, 42px); line-height: 1.2; }
.warm__body { margin: 28px 0 0; font-size: 19px; line-height: 1.8; color: var(--umber-body); max-width: 58ch; }
.warm__pull {
  margin: 20px 0 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 20px;
  color: var(--umber-ink);
  max-width: 58ch;
}
.warm__status { margin: 30px 0 0; font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--umber); }

/* ---------- schools / newsletter ---------------------------------------- */
.duo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 70px;
  align-items: center;
}
.panel-card {
  background: var(--panel);
  border: 1px solid rgba(74, 74, 120, 0.55);
  border-radius: 3px;
  padding: 38px 34px;
}
.panel-card__label { margin: 0; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--lilac-dim); }
.panel-card__body { margin: 16px 0 0; font-size: 17px; line-height: 1.7; color: var(--lilac); }

.join { padding: 120px 40px; background: var(--panel); border-top: 1px solid rgba(74, 74, 120, 0.4); }
.join__inner { max-width: var(--wrap-read); margin: 0 auto; text-align: center; }
.join__form { display: flex; gap: 12px; margin-top: 36px; justify-content: center; flex-wrap: wrap; }
.join__input {
  flex: 1 1 280px;
  max-width: 340px;
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 15px 18px;
  font-size: 16px;
  color: var(--parchment);
  outline: none;
  transition: border-color 200ms ease;
}
.join__input::placeholder { color: var(--lilac-dim); }
.join__input:focus { border-color: var(--green); }
.join__btn { border: none; padding: 15px 30px; }
.join__note { margin: 14px 0 0; font-size: 13px; color: var(--lilac-dim); }
.join__msg {
  margin: 36px 0 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 20px;
  color: var(--green);
}
.join__msg--error { color: var(--clay); }
[hidden] { display: none !important; }

/* ---------- notes teaser + index ---------------------------------------- */
.notes-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 44px;
}
.notes-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 26px; }
.note-card {
  display: block;
  background: var(--panel);
  border: 1px solid rgba(74, 74, 120, 0.5);
  border-radius: 3px;
  padding: 32px 28px;
  transition: border-color 200ms ease, transform 200ms var(--ease-out);
}
.note-card:focus-visible { border-color: var(--green); transform: translateY(-4px); }
.note-card:active { transform: translateY(-1px) scale(0.995); }
@media (hover: hover) and (pointer: fine) {
  .note-card:hover { border-color: var(--green); transform: translateY(-4px); }
}
.note-card__cat { margin: 0; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--green); }
.note-card__title { margin: 16px 0 0; font-family: var(--font-display); font-weight: 600; font-size: 20px; line-height: 1.35; color: var(--parchment); }
.note-card__dek { margin: 14px 0 0; font-size: 15px; line-height: 1.7; color: var(--lilac-dim); }
.note-card__date { margin: 20px 0 0; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--line); }

.note-list { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 1px; background: rgba(74, 74, 120, 0.45); }
.note-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 32px;
  background: var(--ink);
  padding: 36px 16px;
  transition: background 200ms ease;
}
/* The indent used to animate `padding`, which forces layout on every frame.
   Translating the two children instead keeps it on the compositor and looks
   identical. */
.note-row__meta,
.note-row__main { transition: transform 260ms var(--ease-out); }
.note-row:focus-visible { background: var(--panel-hover); }
.note-row:focus-visible .note-row__meta,
.note-row:focus-visible .note-row__main { transform: translateX(10px); }
@media (hover: hover) and (pointer: fine) {
  .note-row:hover { background: var(--panel-hover); }
  .note-row:hover .note-row__meta,
  .note-row:hover .note-row__main { transform: translateX(10px); }
}
.note-row__meta { flex: 0 0 150px; }
.note-row__cat { margin: 0; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--green); }
.note-row__date { margin: 10px 0 0; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--line); }
.note-row__main { flex: 1 1 320px; }
.note-row__title { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 23px; line-height: 1.32; color: var(--parchment); }
.note-row__dek { margin: 14px 0 0; font-size: 17px; line-height: 1.7; color: var(--lilac-dim); max-width: 58ch; }

/* ---------- single note ------------------------------------------------- */
.article { padding: 70px 40px 120px; background: var(--ink); }
.article__back { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; }
.article__meta { margin: 44px 0 0; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--green); }
.article__title {
  margin: 20px 0 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(30px, 3.4vw, 42px);
  line-height: 1.2;
  color: var(--parchment);
}
.article__rule { width: 60px; height: 1px; background: var(--line); margin: 38px 0; border: 0; }
.article__body p {
  margin: 0 0 26px;
  font-family: var(--font-serif);
  font-size: 19px;
  line-height: 1.9;
  color: var(--lilac);
}
/* Author-uploaded images inside a note. */
.article__cover {
  display: block;
  width: 100%;
  margin: 0 0 40px;
  border-radius: 3px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
.note-figure { margin: 40px 0; }
.note-figure img { display: block; width: 100%; border-radius: 3px; }
.note-figure figcaption {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--lilac-dim);
  font-family: var(--font-body);
}
.article__body h2 {
  margin: 46px 0 18px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(21px, 2.2vw, 27px);
  line-height: 1.3;
  color: var(--parchment);
}
.article__body blockquote {
  margin: 36px 0;
  padding-left: 26px;
  border-left: 2px solid var(--green);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 20px;
  line-height: 1.75;
  color: var(--parchment);
}
.article__body a { border-bottom: 1px solid rgba(61, 191, 138, 0.4); }

.tag-row {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 40px 0 0; padding: 0; list-style: none;
}
.tag {
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--lilac-dim);
  border: 1px solid rgba(74, 74, 120, 0.6);
  border-radius: 2px;
  padding: 6px 11px;
}

.byline {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 50px;
  padding-top: 36px;
  border-top: 1px solid rgba(74, 74, 120, 0.5);
}
.byline__img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }
.byline__name { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 15px; letter-spacing: 0.08em; color: var(--parchment); }
.byline__role { margin: 4px 0 0; font-size: 14px; color: var(--lilac-dim); }

/* ---------- the book page ----------------------------------------------- */
.page-top { padding-top: var(--header-h); }

.book-hero { position: relative; padding: 80px 40px 110px; background: var(--ink); overflow: hidden; }
.book-hero__mountains {
  position: absolute; left: -4%; bottom: 0;
  width: 108%; height: 55%;
  object-fit: cover; object-position: center bottom;
  opacity: 0.2;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.6) 38%, #000 72%);
          mask-image: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.6) 38%, #000 72%);
}
.book-hero__scrim { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(15,18,41,0.5) 0%, rgba(15,18,41,0.1) 40%, rgba(15,18,41,0.8) 100%); }
.book-hero__inner { position: relative; max-width: var(--wrap); margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 60px; }
.book-hero__cover { display: block; flex: 0 1 300px; min-width: 0; width: 100%; border-radius: 2px; box-shadow: 0 40px 90px rgba(0,0,0,0.65), 0 0 0 1px rgba(185,180,214,0.16); }
.book-hero__copy { flex: 1 1 420px; }
.book-hero__title { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: clamp(34px, 4vw, 54px); line-height: 1.12; color: var(--parchment); }
.book-hero__sub { margin: 16px 0 0; font-family: var(--font-display); font-weight: 500; font-size: 16px; letter-spacing: 0.2em; text-transform: uppercase; color: #B7A6B5; }

.excerpt { position: relative; padding: 120px 40px; background: var(--ink); overflow: hidden; }
/* Sized from its height and allowed to overflow — the section clips it.
   Without max-width:none the global clamp squashes it against the container. */
.excerpt__sword { position: absolute; right: -2%; top: -6%; height: 118%; width: auto; max-width: none; opacity: 0.16; pointer-events: none; }
.excerpt__inner { position: relative; max-width: var(--wrap-read); margin: 0 auto; }
.excerpt__body { margin-top: 36px; border-left: 2px solid var(--green); padding: 8px 0 8px 30px; }
.excerpt__body p { margin: 0 0 22px; font-family: var(--font-serif); font-size: 19px; line-height: 1.9; color: var(--lilac); }
.excerpt__body p:last-child { margin-bottom: 0; }

/* Asterism marking the elision between the opening line and the scene. */
.excerpt__elision {
  margin: 30px 0 30px !important;
  color: var(--line) !important;
  font-size: 16px !important;
  letter-spacing: 0.4em;
  text-indent: 0.4em;
  user-select: none;
}

.excerpt__source {
  margin: 26px 0 0;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--lilac-dim);
}

.band__source {
  margin: 30px 0 0;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--lilac-dim);
}

/* Editorial flag — visible only where content is still awaiting Jack.
   Every element carrying this class is a launch blocker. */
.flag {
  margin: 26px 0 0;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--clay);
}

/* ---------- press ------------------------------------------------------- */
.press-stack { display: flex; flex-direction: column; gap: 26px; }
.press-card__label { margin: 0 0 18px; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--green); }
.press-card__text { margin: 0; font-size: 18px; line-height: 1.8; color: var(--lilac); }
.data-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 22px 40px; }
.data-grid dt { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--lilac-dim); }
.data-grid dd { margin: 6px 0 0; font-size: 17px; color: var(--parchment); }
.dl-row { display: flex; flex-wrap: wrap; gap: 12px; }
.dl-btn {
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--parchment);
  border: 1px solid var(--line);
  padding: 13px 20px;
  border-radius: 3px;
  transition: border-color 240ms ease, background 240ms ease;
}
.dl-btn:hover, .dl-btn:focus-visible { border-color: var(--green); color: var(--parchment); background: rgba(74,74,120,0.2); }
.dl-btn--pending { color: var(--clay); border-style: dashed; border-color: rgba(201, 138, 120, 0.5); }

/* ---------- 404 --------------------------------------------------------- */
.lost { padding: 180px 40px 160px; background: var(--ink-deep); text-align: center; }
.lost__leaf { display: block; width: 60px; margin: 0 auto 46px; animation: bsSway 9s ease-in-out infinite; }

/* ---------- footer ------------------------------------------------------ */
.footer { position: relative; background: var(--ink-deep); padding: 0 0 60px; }
.footer__treeline { position: relative; height: 150px; overflow: hidden; }
.footer__treeline img { display: block; width: 100%; height: 150px; object-fit: cover; object-position: top; }
.footer__treeline::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(8,10,24,0) 0%, rgba(8,10,24,0.5) 45%, var(--ink-deep) 100%);
}
.footer__cols {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 20px 40px 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 50px;
}
.footer__brand { display: flex; align-items: center; gap: 12px; }
.footer__mark { width: 36px; height: 36px; object-fit: contain; opacity: 0.85; }
.footer__name { font-family: var(--font-display); font-weight: 600; font-size: 16px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--parchment); }
.footer__tag { margin: 18px 0 0; font-family: var(--font-serif); font-style: italic; font-size: 16px; line-height: 1.7; color: var(--lilac-dim); max-width: 34ch; }
.footer__col { display: flex; flex-direction: column; gap: 12px; }
.footer__heading { margin: 0 0 4px; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--line); }
.footer__link { font-size: 15px; color: var(--lilac); transition: color 200ms ease; }
.footer__link:hover, .footer__link:focus-visible { color: var(--green); }
.footer__muted { font-size: 15px; color: var(--line); }

.footer__base {
  max-width: var(--wrap);
  margin: 44px auto 0;
  padding: 22px 40px 0;
  border-top: 1px solid rgba(74, 74, 120, 0.35);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
}
.footer__base p { margin: 0; font-size: 13px; color: var(--line); }
.footer__base a { color: var(--lilac-dim); transition: color 200ms ease; }
.footer__base a:hover, .footer__base a:focus-visible { color: var(--green); }

/* Studio credit — Branding Zombie Designs */
.footer__credit { display: flex; align-items: center; gap: 8px; }
.footer__credit a {
  color: var(--lilac-dim);
  border-bottom: 1px solid transparent;
  transition: color 220ms ease, border-color 220ms ease;
}
.footer__credit a:hover,
.footer__credit a:focus-visible { color: var(--green); border-bottom-color: var(--green); }

/* ---------- the scroll leaf --------------------------------------------- */
.scroll-leaf {
  position: fixed;
  right: 34px; top: 0;
  width: 26px;
  opacity: 0;
  z-index: 60;
  pointer-events: none;
  will-change: transform;
  /* It used to snap between 0 and 0.42 at the ends of the page. */
  transition: opacity 400ms ease;
}
/* One leaf on a phone is clutter over a narrow column, not atmosphere. */
@media (max-width: 700px) { .scroll-leaf { display: none; } }

/* ---------- scroll reveals ---------------------------------------------- */
/* The `.js` class is set by an inline script in <head>, so the hidden state
   only ever applies when the observer that clears it is guaranteed to run.
   Without JS every block is simply visible. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 620ms var(--ease-out), transform 620ms var(--ease-out);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* Grids cascade rather than landing as one slab. 60ms apart — enough to
   read as a sequence, short enough that the last card isn't a wait. */
.js [data-reveal-stagger] > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 560ms var(--ease-out), transform 560ms var(--ease-out);
}
.js [data-reveal-stagger].is-in > * { opacity: 1; transform: none; }
.js [data-reveal-stagger].is-in > *:nth-child(1) { transition-delay: 0ms; }
.js [data-reveal-stagger].is-in > *:nth-child(2) { transition-delay: 60ms; }
.js [data-reveal-stagger].is-in > *:nth-child(3) { transition-delay: 120ms; }
.js [data-reveal-stagger].is-in > *:nth-child(4) { transition-delay: 180ms; }
.js [data-reveal-stagger].is-in > *:nth-child(5) { transition-delay: 240ms; }

/* ---------- motion ------------------------------------------------------ */
@keyframes bsFade   { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes bsFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes bsDrift {
  0%   { transform: scale(1.08) translate3d(0, 0, 0); }
  50%  { transform: scale(1.14) translate3d(-1.5%, -1%, 0); }
  100% { transform: scale(1.08) translate3d(0, 0, 0); }
}
@keyframes bsSway {
  0%   { transform: rotate(-5deg) translateY(0); }
  50%  { transform: rotate(4deg) translateY(-10px); }
  100% { transform: rotate(-5deg) translateY(0); }
}

/* Reduced motion means less movement, not a dead interface. Position and
   scale animations go; colour and opacity stay, because they carry meaning
   — which button is focused, whether a card is active. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation: none !important;
    transition-property: color, background-color, border-color, opacity, filter, box-shadow !important;
    transition-duration: 160ms !important;
  }

  .scroll-leaf,
  .leaffield__drift { display: none; }

  /* Reveals resolve immediately rather than never. */
  .js [data-reveal],
  .js [data-reveal-stagger] > * { opacity: 1 !important; transform: none !important; }

  .hero__copy > *, .hero__render { opacity: 1; }

  /* Nothing should sit mid-transform when transforms are switched off. */
  .cover-link:hover, .note-card:hover, .btn:active,
  .note-row:hover .note-row__meta, .note-row:hover .note-row__main { transform: none !important; }
}

/* ---------- responsive -------------------------------------------------- */
@media (max-width: 900px) {
  :root { --header-h: 84px; }
  .section, .band, .parchment, .warm, .world, .join, .book-hero, .excerpt { padding-inline: 26px; }
  .split, .duo, .book-hero__inner { gap: 44px; }
  .world__inner { justify-content: flex-start; }
  .world__tree { left: -40%; opacity: 0.35; }
  .footer__cols, .footer__base { padding-inline: 26px; }
}

@media (max-width: 700px) {
  .section, .section--tight { padding-block: 88px; }
  .band, .parchment, .warm, .join { padding-block: 88px; }
  .leaffield { padding-block: 120px 130px; }
  .hero__masthead { padding-top: 92px; }
  .hero__body { padding: 32px 26px 72px; gap: 34px; }
  .hero__name { letter-spacing: 0.06em; }
  .excerpt__sword { opacity: 0.09; }
  .notes-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .note-row { padding: 28px 12px; }
  .note-row__meta { flex-basis: 100%; }
  .article { padding: 50px 26px 96px; }
  .footer__base { flex-direction: column; }

  /* Footer links were 15px text with no padding — roughly a 20px tap target
     against Apple's and Google's 44px guidance. */
  .footer__col { gap: 2px; }
  .footer__link { padding: 11px 0; }
  .footer__cols { gap: 38px; }

  /* Full-width buttons stop the two-up rows breaking into an orphan. */
  .btn-row .btn { flex: 1 1 100%; text-align: center; }
  .hero__tagline { font-size: 17px; }
  .lede { font-size: 17px; }
  .band__quote { line-height: 1.4; }
  .excerpt__body { padding-left: 20px; }
  .leaffield p { font-size: 18px; }
}

@media (max-width: 480px) {
  .card { padding: 30px 24px; }
  .panel-card { padding: 30px 26px; }
  .btn { padding: 15px 24px; font-size: 12px; }
  .band__quote { font-size: 22px; }
}
