/* =========================================================================
   BibleTelling shared styles
   Order: 1 fonts · 2 tokens · 3 base · 4 layout helpers · 5 components
   Mobile-first: base rules target phones; @media (min-width) blocks add
   tablet (768px) and desktop (1024px) changes on top.
   ========================================================================= */

/* ---------- 1. Fonts (local files; fall back to Georgia / system sans) ---------- */
@font-face {
  font-family: "Lora";
  src: url("../fonts/lora/Lora-VariableFont_wght.ttf") format("truetype");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Lora";
  src: url("../fonts/lora/Lora-Italic-VariableFont_wght.ttf") format("truetype");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Norms";
  src: url("../fonts/norms/TTNorms-Medium.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
/* Background texture only: subset to the Hebrew letters + space, Regular weight.
   Full variable master: /fonts/frank-ruhl-libre/ at the repo root. */
@font-face {
  font-family: "Frank Ruhl Libre";
  src: url("../fonts/frank-ruhl-libre/FrankRuhlLibre-Hebrew-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0020, U+05D0-05EA;
}

/* ---------- 2. Tokens ---------- */
:root {
  /* Brand colors */
  --brown: #473118;
  --beige: #fffcf1;
  --red: #c10f18;
  --gold: #c99a00;
  --taupe: #867663;

  /* Derived colors */
  --red-dark: #9e0c13;
  --beige-deep: #f5eedd;  /* slightly darker beige: open mobile menu sections */
  --card-bg: #ffffff;
  --line-soft: rgba(71, 49, 24, 0.12);
  --shadow: 0 1px 2px rgba(71, 49, 24, 0.06), 0 6px 20px rgba(71, 49, 24, 0.06);
  --shadow-lift: 0 2px 4px rgba(71, 49, 24, 0.08), 0 14px 32px rgba(71, 49, 24, 0.12);

  /* Type */
  --font-body: "Lora", Georgia, "Times New Roman", serif;
  --font-head: "Norms", system-ui, "Segoe UI", Roboto, Arial, sans-serif;
  --font-hebrew: "Frank Ruhl Libre", "Times New Roman", serif;

  /* Hebrew background texture (see "Texture" below) */
  --texture-ink: #f3efe3;                    /* very light taupe on beige */
  --texture-size: clamp(12px, 1.1vw, 18px);  /* grows with the window, within limits */
  --texture-leading: 1.6;                    /* line spacing */
  --texture-speed: 0.2;                      /* parallax: text lags 20% behind the page */

  /* Layout */
  --max: 1200px;          /* widest content column */
  --max-journey: 1400px;  /* journey: bento blocks may use more of a wide screen */
  --pad: 1rem;            /* page side padding */
  --radius: 20px;         /* bento card corners */
  --gap: 1rem;            /* space between bento cards */
  --gutter-l: 2.75rem;    /* journey: space left of content for the gold line */
  --gutter-r: 1rem;       /* journey: space right of content */
  --line-w: 3px;          /* journey line thickness */
  /* Desktop bento: screen height left for title + bento (screen minus header and breathing room) */
  --fit-h: calc(100vh - var(--header-min) - 8rem);
  --fit-h: calc(100svh - var(--header-min) - 8rem);

  /* Header (desktop sizes are in the header's 960px media query) */
  --header-logo: 48px;        /* logo height, full size */
  --header-logo-min: 40px;    /* logo height, minimized on scroll */
  --header-pad: 0.75rem;      /* space above/below the bar, full size */
  --header-pad-min: 0.25rem;  /* ... minimized */
  --header-full: calc(var(--header-logo) + 2 * var(--header-pad));   /* bar height at the top of the page */
  --header-float: 0.5rem;     /* space around the floating bar once scrolled */
  --header-min: calc(var(--header-logo-min) + 2 * var(--header-pad-min) + 2 * var(--header-float));
  --header-gap: 0.75rem;      /* narrow screens: space between Give and the menu button */

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (min-width: 768px) {
  :root {
    --pad: 2rem;
    --gap: 1.25rem;
    --gutter-l: 4.5rem;
    --gutter-r: 4.5rem;
  }
}

/* ---------- 3. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--beige);
  color: var(--brown);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
}

img { display: block; max-width: 100%; height: auto; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 0.5em;
}
h2 { font-size: clamp(1.75rem, 4.5vw, 2.75rem); }
h3 { font-size: clamp(1.5rem, 3.5vw, 2.125rem); }
h4 { font-size: 1.25rem; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: inherit; text-underline-offset: 0.2em; }

/* Keyboard focus: always visible. Brown on beige; overridden on dark areas. */
:focus-visible {
  outline: 3px solid var(--brown);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- 4. Layout helpers ---------- */
.container {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--pad));
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* Small label above a heading, with a short gold rule on each side */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  margin-bottom: 0.75rem;
  font-family: var(--font-head);
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.eyebrow::before,
.eyebrow::after {
  content: "";
  width: 1.75rem;
  height: 2px;
  background: var(--gold);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--brown);
  color: var(--beige);
  border-radius: 6px;
}
.skip-link:focus { top: 1rem; }

/* ---------- 5. Components ---------- */

/* Button: red is reserved for calls to action */
.btn {
  display: inline-block;
  padding: 0.8em 1.5em;
  background: var(--red);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  border-radius: 999px;
  transition: background-color 0.2s;
}
.btn:hover { background: var(--red-dark); }
.btn--small { padding: 0.55em 1.1em; font-size: 0.9375rem; }

/* ---- Header ----
   Mobile-first: below 960px the bar is Logo | Give | Menu and the nav is a
   panel that drops down below it, over the page, wherever you are scrolled.
   The cart sits on the panel's Shop row there.
   From 960px: Logo | nav | Give | Cart, with dropdown menus.
   --h is the shrink progress (0 = full size, 1 = minimized), set by nav.js on scroll.
   At --h 0 the header is a full-width beige band. As you scroll it lifts off the
   page: the band fades out and the bar (.site-header__inner) becomes a floating,
   rounded, frosted-beige bar with a fine gold edge.
   With no JS --h stays 0 and every menu is reachable (expanded on mobile, hover/focus on desktop). */
.site-header {
  --h: 0;
  --pad-y: calc(var(--header-pad) - (var(--header-pad) - var(--header-pad-min)) * var(--h));
  position: relative;
  z-index: 20;
  padding-block: calc(var(--header-float) * var(--h));        /* air around the floating bar */
  background: rgb(255 252 241 / calc(1 - var(--h)));
}
/* Sticky, with two values from nav.js for the mobile menu:
   --nav-h: the open menu's height. Taken back off the margin below, so the
            menu drops over the page instead of pushing it down.
   --nav-y: how far the header + menu have moved up (0 or negative). Only when
            the open menu is taller than the screen: scrolling down moves them
            up so the lower options come into view; scrolling up brings them back. */
.js .site-header {
  position: sticky;
  top: var(--nav-y, 0px);
  overflow-anchor: none;   /* the browser must not scroll the page to follow the growing menu */
  /* Give back below the bar what it loses as it shrinks, so the content under
     it never moves (otherwise the browser nudges the scroll position back). */
  margin-bottom: calc(((var(--header-logo) - var(--header-logo-min)) +
                       2 * (var(--header-pad) - var(--header-pad-min)) -
                       2 * var(--header-float)) * var(--h) - var(--nav-h, 0px));
}

/* Gold separator, drawn from the centre when the mobile menu opens, so it
   sits between the menu and the page content. */
.site-header::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform 0.45s var(--ease-out);
  pointer-events: none;
}
.nav-open .site-header::before { transform: scaleX(1); }

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: var(--header-gap);
  width: calc(100% - 2 * var(--header-float) * var(--h));
  padding-block: var(--pad-y);
  border-radius: calc(var(--h) * 2.25rem);
  background: rgb(255 252 241 / calc(var(--h) * 0.86));
  box-shadow:
    inset 0 0 0 1px rgb(201 154 0 / calc(var(--h) * 0.5)),
    0 12px 32px -14px rgb(71 49 24 / calc(var(--h) * 0.45));
  -webkit-backdrop-filter: blur(calc(var(--h) * 14px)) saturate(1.2);
  backdrop-filter: blur(calc(var(--h) * 14px)) saturate(1.2);
}
.site-header__logo { margin-right: auto; }   /* pushes everything else to the right */
.site-header__logo img {
  height: calc(var(--header-logo) - (var(--header-logo) - var(--header-logo-min)) * var(--h));
  width: auto;
}

/* Give: the one red call to action in the bar, with a small heart */
.site-header__give {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  box-shadow: 0 4px 14px -6px rgb(193 15 24 / 0.6);
  transition: background-color 0.2s, transform 0.2s var(--ease-out), box-shadow 0.2s;
}
.site-header__give:hover { transform: translateY(-1px); box-shadow: 0 8px 18px -8px rgb(193 15 24 / 0.7); }
.site-header__heart { width: 1em; height: 1em; fill: currentColor; }
.site-header__give:hover .site-header__heart { animation: heart-beat 0.6s var(--ease-out); }
@keyframes heart-beat { 30% { transform: scale(1.25); } 60% { transform: scale(0.95); } }

/* Cart icon + count badge (count comes from cart.js) */
.cart-link {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  color: var(--brown);
  border-radius: 50%;
  transition: color 0.2s, background-color 0.2s;
}
.cart-link:hover { color: var(--red); background: var(--beige-deep); }
.cart-link__icon {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cart-link__count {
  position: absolute;
  top: 0;
  right: -0.15rem;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.3em;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font: 500 0.6875rem/1.15rem var(--font-head);
  text-align: center;
}
.cart-link__count[hidden] { display: none; }
.cart-link__count.is-bumped { animation: cart-bump 0.35s var(--ease-out); }
@keyframes cart-bump { 40% { transform: scale(1.3); } }
.site-header__cart { display: none; }        /* narrow: the cart is on the Shop row instead */

/* Resize animation helper (nav.js): stand-ins for the words / cart / menu
   button while they fade out of a layout that no longer shows them. */
.nav-ghost {
  position: absolute;
  margin: 0;
  pointer-events: none;
  white-space: nowrap;
  font-family: var(--font-head);
  line-height: 1.3;
}

/* Hamburger: three lines that fold into an X when open (JS only) */
.nav-toggle { display: none; }
.js .nav-toggle {
  display: inline-grid;
  place-content: center;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 50%;
  color: var(--brown);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.3s var(--ease-out), opacity 0.2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- Nav: shared + mobile ----
   --open (0 or 1) on each item drives its chevron (and on desktop its dropdown). */
.site-nav {
  order: 1;                                   /* after Give / Menu on mobile */
  flex-basis: calc(100% + 2 * var(--pad));    /* full screen width */
  margin-inline: calc(-1 * var(--pad));
  font-family: var(--font-head);
  font-size: 1.125rem;
}
.site-nav ul { margin: 0; padding: 0; list-style: none; }
.site-nav__list { padding-block: 0.5rem; }
.site-nav__item { --open: 0; }
.site-nav__item.is-open { --open: 1; }
.site-nav__item--shop { display: flex; align-items: center; }   /* Shop ... cart */
.site-nav__item--shop .site-nav__link { flex: 1; }
.site-nav__cart { margin-right: calc(var(--pad) - 0.45rem); }   /* icon lines up with the page edge */

.site-nav__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4em;
  width: 100%;
  padding: 0.7rem var(--pad);
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  line-height: 1.3;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.site-nav__label { position: relative; }
.site-nav__chev {
  flex: none;
  width: 0.75em;
  height: 0.75em;
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: rotate(calc(var(--open) * 180deg));
  transition: transform 0.35s var(--ease-out);
}

.site-nav__intro { display: none; }          /* desktop dropdowns only */
.site-nav__panel { background: var(--beige-deep); padding-block: 0.4rem; }
.site-nav__sub a {
  display: block;
  padding: 0.55rem var(--pad) 0.55rem calc(var(--pad) + 1.25rem);
  font-size: 1rem;
  text-decoration: none;
  border-left: 2px solid transparent;
}
.site-nav__sub a:hover { border-left-color: var(--gold); background: rgb(201 154 0 / 0.08); }
.site-nav__outline { display: none; }

/* Mobile with JS: the panel and each section open and close.
   Trick: a grid row animating 0fr -> 1fr animates "height: auto".
   - panel: content pinned to the bottom of the row, so it slides down like paper
   - section: content centred in the row, so it opens from its middle like an eyelid */
.js .site-nav {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  visibility: hidden;
  transition: grid-template-rows 0.45s var(--ease-out), visibility 0s 0.45s;
}
.js .site-nav__list { min-height: 0; align-self: end; }
.js.nav-open .site-nav { grid-template-rows: 1fr; visibility: visible; transition-delay: 0s; }

.js .site-nav__menu {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  visibility: hidden;
  transition: grid-template-rows 0.45s var(--ease-out), visibility 0s 0.45s;
}
.js .site-nav__panel { min-height: 0; align-self: center; }
.js .site-nav__item.is-open > .site-nav__menu {
  grid-template-rows: 1fr;
  visibility: visible;
  transition-delay: 0s;
}

/* ---- Nav: desktop (960px+, keep in sync with WIDE in nav.js) ----
   Each word is a soft pill; the open one is tinted and its chevron flips.
   The dropdown is a two-part card centred under its word: a brown intro
   panel on the left, links on the right. Its box starts right under the word
   and its top padding is an invisible "bridge" down to the card, so the
   pointer never leaves the menu on the way down (nav.js also waits a moment
   before closing, so a diagonal move to a link doesn't close it). */
@media (min-width: 960px) {
  :root { --header-logo: 64px; --header-logo-min: 44px; }

  .site-header__inner { flex-wrap: nowrap; column-gap: 1rem; }
  .js .nav-toggle { display: none; }
  .site-header__cart { display: inline-grid; }
  .site-nav__cart { display: none; }

  .site-nav,
  .js .site-nav {
    order: 0;
    display: block;
    flex-basis: auto;
    align-self: stretch;          /* items reach the bar's content edges */
    margin: 0 0.5rem 0 0;
    overflow: visible;
    visibility: visible;
    font-size: 1rem;
  }
  .site-nav__list { display: flex; gap: 0.25rem; height: 100%; padding: 0; }
  .site-nav__item { position: relative; display: flex; align-items: center; }
  .site-nav__link {
    width: auto;
    padding: 0.5rem 0.95rem;
    border-radius: 999px;
    transition: background-color 0.2s, color 0.2s;
  }
  .site-nav__item.is-open > .site-nav__link,
  .site-nav__link:hover { background: rgb(71 49 24 / 0.07); }
  .site-nav__chev { width: 0.7em; height: 0.7em; }

  .site-nav__menu,
  .js .site-nav__menu {
    position: absolute;
    top: 100%;
    left: 50%;
    display: block;
    width: max-content;
    min-width: 26rem;
    padding-top: calc(var(--pad-y) + var(--header-float) * var(--h) + 0.75rem);   /* the bridge */
    transform: translateX(-50%);
    overflow: visible;
    visibility: hidden;
    pointer-events: none;
    transition: visibility 0s 0.3s;
  }
  .site-nav__panel,
  .js .site-nav__panel {
    position: relative;
    display: grid;
    grid-template-columns: 11.5rem minmax(13rem, auto);
    padding: 0;
    background: var(--beige);
    border-radius: 18px;
    box-shadow: 0 2px 4px rgb(71 49 24 / 0.08), 0 24px 48px -16px rgb(71 49 24 / 0.35);
    opacity: var(--open);
    transform: translateY(calc((1 - var(--open)) * -10px)) scale(calc(0.97 + 0.03 * var(--open)));
    transform-origin: top center;
    transition: opacity 0.22s, transform 0.35s var(--ease-out);
  }
  html:not(.js) .site-nav__panel { border: 2px solid var(--gold); }

  .site-nav__intro {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 1.25rem 1.25rem 1.4rem;
    border-radius: 18px 0 0 18px;
    color: var(--beige);
    background:
      radial-gradient(120% 90% at 0% 0%, rgb(201 154 0 / 0.28), transparent 60%),
      var(--brown);
  }
  .site-nav__intro p { margin: 0; }
  .site-nav__kicker {
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold);
  }
  .site-nav__kicker::after {        /* short gold rule under the word */
    content: "";
    display: block;
    width: 1.75rem;
    height: 2px;
    margin-top: 0.5rem;
    background: var(--gold);
  }
  .site-nav__tagline {
    font-family: var(--font-body);
    font-style: italic;
    font-size: 1.0625rem;
    line-height: 1.35;
  }

  .site-nav__sub { padding: 0.6rem; }
  .site-nav__sub a {
    position: relative;
    padding: 0.55rem 2rem 0.55rem 0.85rem;
    border: 0;
    border-radius: 10px;
    font-size: 0.9375rem;
    white-space: nowrap;
    transition: background-color 0.2s, padding 0.25s var(--ease-out);
  }
  .site-nav__sub a::after {          /* gold arrow slides in on hover */
    content: "→";
    position: absolute;
    right: 0.85rem;
    top: 50%;
    color: var(--gold);
    opacity: 0;
    transform: translate(-6px, -50%);
    transition: opacity 0.2s, transform 0.25s var(--ease-out);
  }
  .site-nav__sub a:hover { background: var(--beige-deep); padding-left: 1.1rem; }
  .site-nav__sub a:hover::after { opacity: 1; transform: translate(0, -50%); }

  /* Gold outline, drawn by nav.js from the top centre down both sides */
  .site-nav__outline {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
  }
  .site-nav__outline path {
    fill: none;
    stroke: var(--gold);
    stroke-width: 1.5;
    stroke-dasharray: 1;
    stroke-dashoffset: calc(1 - var(--open));
    transition: stroke-dashoffset 0.5s var(--ease-out) 0.1s;
  }

  /* Open states. .is-hover is set by nav.js (with a short close delay).
     Hover is ignored while a menu is pinned by click (.is-pinned) and after
     Esc or a closing click until the pointer leaves (.is-suppressed). */
  .site-nav:not(.is-pinned) .site-nav__item.is-hover:not(.is-suppressed),
  .site-nav__item:has(:focus-visible):not(.is-suppressed) { --open: 1; }
  .site-nav__item.is-open > .site-nav__menu,
  .site-nav:not(.is-pinned) .site-nav__item.is-hover:not(.is-suppressed) > .site-nav__menu,
  .site-nav__item:has(:focus-visible):not(.is-suppressed) > .site-nav__menu {
    visibility: visible;
    pointer-events: auto;
    transition-delay: 0s;
  }
  /* No JS: plain CSS hover still opens the menus */
  html:not(.js) .site-nav__item:hover { --open: 1; }
  html:not(.js) .site-nav__item:hover > .site-nav__menu { visibility: visible; pointer-events: auto; transition-delay: 0s; }
}

/* Reduced motion: everything still opens and closes, just without movement */
@media (prefers-reduced-motion: reduce) {
  .site-header::before,
  .site-header *,
  .site-header *::after { transition: none !important; animation: none !important; }
}

/* ---- Header over the hero (home page: .site-header--overlay) ----
   At the very top the header has no background and sits over the hero photo
   in light colors (the hero is pulled up under it, see "Hero"). nav.js adds
   .is-solid once the bar has mostly lifted into its floating shape, and the
   colors switch back to brown. With the mobile menu open it is always solid. */
.js .site-header--overlay { background: transparent; }
.nav-open .site-header--overlay { background: var(--beige); }
.site-header--overlay .site-nav__link,
.site-header--overlay .cart-link,
.site-header--overlay .nav-toggle { transition: color 0.35s, background-color 0.2s, text-shadow 0.35s; }
html.js:not(.nav-open) .site-header--overlay:not(.is-solid) .site-nav__link,
html.js:not(.nav-open) .site-header--overlay:not(.is-solid) .cart-link,
html.js:not(.nav-open) .site-header--overlay:not(.is-solid) .nav-toggle {
  color: var(--beige);
  text-shadow: 0 1px 10px rgb(0 0 0 / 0.35);
}
html.js:not(.nav-open) .site-header--overlay:not(.is-solid) .site-nav__link:hover,
html.js:not(.nav-open) .site-header--overlay:not(.is-solid) .site-nav__item.is-open > .site-nav__link,
html.js:not(.nav-open) .site-header--overlay:not(.is-solid) .cart-link:hover { background: rgb(255 252 241 / 0.16); }
html.js:not(.nav-open) .site-header--overlay:not(.is-solid) .cart-link:hover { color: var(--beige); }
html.js:not(.nav-open) .site-header--overlay:not(.is-solid) :focus-visible { outline-color: var(--beige); }
.site-header--overlay .site-nav__panel { color: var(--brown); text-shadow: none; }   /* dropdown cards keep dark text */
.site-header--overlay .site-header__logo img { filter: drop-shadow(0 2px 8px rgb(0 0 0 / 0.25)); }
.site-header--overlay.is-solid .site-header__logo img { filter: none; }

/* ---- Hero ----
   Two scroll phases, set by journey.js:
   1. --reveal phase: the first scroll adds .is-revealed and "Changing Lives."
      plays in under "Telling God's Word," (line 1 already played on load).
      The photo stays put while the visitor reads it.
   2. --p (0 → 1): the full-bleed shot shrinks into a rounded card.
   With no JS or reduced motion, --p stays 0, both lines show, and this is a
   plain full-screen hero. With JS the hero is pulled up under the
   transparent header (--header-full = the header's full height). */
.hero { --p: 0; position: relative; }
.js .hero { margin-top: calc(-1 * var(--header-full)); }
/* Keeps that negative margin inside <main>: otherwise it merges with the header's own
   negative margin when the mobile menu opens, and the page jumps down. */
main { display: flow-root; }

.hero__stage {
  position: relative;
  height: 100vh;
  height: 100svh;            /* "small viewport height": ignores mobile URL bar */
  min-height: 520px;
  overflow: hidden;
}

/* Motion on: the hero is taller than the screen and the stage "sticks" while
   you scroll through it: first the reveal + a short hold, then the shrink. */
.motion .hero { height: 230vh; height: 230svh; }
.motion .hero__stage { position: sticky; top: 0; }

.hero__media {
  --side: max(var(--pad), (100% - var(--max)) / 2);
  position: absolute;
  inset: 0;
  /* clip-path cuts the image to a rectangle; insets grow with --p so the
     full-bleed shot shrinks into a rounded card in the top half, just below
     the floating header. */
  clip-path: inset(
    calc(var(--p) * (var(--header-min) + 2vh))
    calc(var(--p) * var(--side))
    calc(var(--p) * 46%)
    calc(var(--p) * var(--side))
    round calc(var(--p) * 28px)
  );
}
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(calc(1.08 - 0.08 * var(--p)));
}
.hero__media::after {          /* darkens the photo: a little more at the top for the header */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(20, 12, 4, 0.6), rgba(40, 26, 10, 0.42) 28%, rgba(40, 26, 10, 0.62));
}
/* Opening shot: the photo settles from a slow push-in out of the dark */
.motion .hero__media img { animation: hero-settle 3.2s var(--ease-out) both; }
@keyframes hero-settle {
  from { scale: 1.14; filter: brightness(0.35) saturate(0.7); }
  to   { scale: 1;    filter: none; }
}

.hero__text {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  padding-inline: 1.5rem;
  text-align: center;
  color: var(--beige);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
  /* moves to the centre of the shrunk card and scales down */
  transform: translateY(calc(var(--p) * -18%)) scale(calc(1 - 0.35 * var(--p)));
}
.hero__eyebrow {
  font-family: var(--font-head);
  font-size: 0.875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.hero__title {
  max-width: 16ch;
  margin: 0 auto;
  font-size: clamp(2.5rem, 8vw, 6rem);
  line-height: 1.05;
}
.hero__line { display: block; }
.hero__line--2 {               /* the answer: Lora italic in gold */
  margin-top: 0.08em;
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 500;
  color: var(--gold);
  letter-spacing: -0.01em;
}
.hero__line--2::after {        /* short gold rule that draws in under it */
  content: "";
  display: block;
  width: 2.2em;
  height: 2px;
  margin: 0.35em auto 0;
  background: var(--gold);
  transform: scaleX(1);
}
.hero__word { display: inline-block; }

/* Cinematic entrances (only with motion on) */
.motion .hero__eyebrow { animation: hero-eyebrow 1.6s var(--ease-out) 0.15s both; }
@keyframes hero-eyebrow {
  from { opacity: 0; letter-spacing: 0.6em; }
  to   { opacity: 1; letter-spacing: 0.2em; }
}
/* Line 1: each word rises out of a blur, one after another, on load */
.motion .hero__line--1 .hero__word {
  animation: hero-word 1.5s var(--ease-out) both;
  animation-delay: calc(0.45s + var(--w) * 0.22s);
}
@keyframes hero-word {
  from { opacity: 0; filter: blur(14px); transform: translateY(0.35em) scale(1.06); }
  to   { opacity: 1; filter: blur(0);    transform: none; }
}
/* Line 2: waits for the first scroll (.is-revealed), then plays the same way,
   a little slower, and the gold rule draws out from the centre. */
.motion .hero__line--2 .hero__word {
  transition: opacity 1.2s var(--ease-out), filter 1.4s var(--ease-out), transform 1.4s var(--ease-out);
  transition-delay: calc(var(--w) * 0.3s);
}
.motion .hero__line--2::after { transition: transform 1.2s var(--ease-out) 0.7s; }
.motion .hero:not(.is-revealed) .hero__line--2 .hero__word {
  opacity: 0;
  filter: blur(16px);
  transform: translateY(0.45em) scale(1.06);
  transition-duration: 0.4s;
  transition-delay: 0s;
}
.motion .hero:not(.is-revealed) .hero__line--2::after { transform: scaleX(0); transition: transform 0.3s; }

/* Before the reveal, line 1 (and the eyebrow) sit centred on the screen;
   when line 2 arrives they glide up to make room for it. */
.motion .hero__eyebrow,
.motion .hero__line--1 { transition: translate 1.4s var(--ease-out); }
.motion .hero:not(.is-revealed) .hero__eyebrow,
.motion .hero:not(.is-revealed) .hero__line--1 { translate: 0 calc(clamp(2.5rem, 8vw, 6rem) * 0.72); }

/* Scroll cue: label + a gold thread with a light running down it.
   Arrives after line 1, gone once the shrink starts. */
.hero__hint {
  display: none;
  position: absolute;
  left: 50%;
  bottom: 1.75rem;
  margin: 0;
  transform: translateX(-50%);
  color: var(--beige);
  font-family: var(--font-head);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-align: center;
  opacity: calc(1 - var(--p) * 6);
}
.hero__hint-label { display: block; animation: hero-cue-in 1s var(--ease-out) 2s both; }
.hero__hint::after {
  content: "";
  display: block;
  width: 2px;
  height: 3rem;
  margin: 0.75rem auto 0;
  border-radius: 2px;
  background:
    linear-gradient(var(--gold), var(--gold)) 0 0 / 100% 35% no-repeat,
    rgb(255 252 241 / 0.25);
  animation: hero-cue-in 1s var(--ease-out) 2.2s both, hero-cue 1.8s ease-in-out 2.4s infinite;
}
@keyframes hero-cue-in { from { opacity: 0; transform: translateY(-0.5rem); } }
@keyframes hero-cue {
  0%   { background-position: 0 -100%; }
  70%  { background-position: 0 200%; }
  100% { background-position: 0 200%; }
}
.motion .hero__hint { display: block; }

/* ---- Mission ----
   With motion on, the negative margin pulls the mission up so it arrives
   just under the shrunk hero card instead of after the hero's scroll window. */
.mission {
  position: relative;
  padding: 3.5rem 0 clamp(2.5rem, 6vw, 4.5rem);
  text-align: center;
  isolation: isolate;
}
/* Background photo: anchored to the bottom of the section, behind the text.
   The mask fades it into the beige page at the top and bottom (so it hands
   over smoothly to the Hebrew texture below) and softens the sides. */
.mission__art {
  position: absolute;
  inset: auto 0 0;                       /* ends with the section: never under the Hebrew texture */
  z-index: -1;
  height: clamp(16rem, 32vw, 28rem);
  overflow: hidden;
  pointer-events: none;
  -webkit-mask-image:
    linear-gradient(to bottom, transparent 0%, #000 45%, #000 70%, transparent 100%),
    linear-gradient(to right, transparent 0%, #000 22%, #000 78%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to bottom, transparent 0%, #000 45%, #000 70%, transparent 100%),
    linear-gradient(to right, transparent 0%, #000 22%, #000 78%, transparent 100%);
  mask-composite: intersect;
}
.mission__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 62%;
  opacity: 0.42;
  filter: sepia(0.45) saturate(0.85) brightness(1.04);   /* warm it toward the brand browns */
  mix-blend-mode: multiply;
}
/* Slow drift as the section scrolls by (browsers with scroll-driven animations only) */
@supports (animation-timeline: view()) {
  .motion .mission__art img {
    animation: mission-drift linear both;
    animation-timeline: view();
  }
  @keyframes mission-drift {
    from { transform: scale(1.08); }
    to   { transform: scale(1); }
  }
}
.motion .mission { margin-top: -44vh; margin-top: -44svh; padding-top: 1.5rem; }

.mission__inner { max-width: 44rem; }
.mission__title { font-size: clamp(2rem, 5.5vw, 3.25rem); }
.mission__body { font-size: 1.1875rem; }
.mission__vision { display: inline-block; margin-top: 0.5rem; }

/* ---- Texture ----
   Low-contrast Hebrew text (Genesis) behind everything after the mission.
   .texture-zone is full width; .texture fills it and clips the text at the
   screen edges. The text is a little wider than the screen so letters are
   cut mid-glyph, as if it carried on. --t (px) is the parallax shift, set by
   journey.js; without JS or with reduced motion it stays 0. */
.texture-zone { position: relative; }
.texture-zone > :not(.texture) { position: relative; z-index: 1; }

.texture {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  /* Fades in from nothing at the top of the zone, so it starts softly below
     the mission photo instead of at a hard edge. */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 clamp(8rem, 18vw, 14rem));
  mask-image: linear-gradient(to bottom, transparent 0, #000 clamp(8rem, 18vw, 14rem));
}
.texture__text {
  --t: 0;
  margin: 0 -2em;
  color: var(--texture-ink);
  font-family: var(--font-hebrew);
  font-size: var(--texture-size);
  line-height: var(--texture-leading);
  text-align: justify;
  transform: translateY(calc(var(--t) * 1px));
}
.motion .texture__text { will-change: transform; }

/* ---- Journey ---- */
.journey {
  position: relative;
  max-width: calc(var(--max-journey) + var(--gutter-l) + var(--gutter-r));
  margin-inline: auto;
  padding: 1.5rem var(--gutter-r) 6rem var(--gutter-l);
}
/* Everything except the SVG sits above the line */
.journey > :not(.journey__svg) { position: relative; z-index: 1; }

.journey__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.journey__track,
.journey__path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.journey__track {               /* faint dotted route showing the way ahead */
  stroke: var(--taupe);
  stroke-opacity: 0.4;
  stroke-width: 2;
  stroke-dasharray: 1 9;
}
.journey__path { stroke: var(--gold); stroke-width: var(--line-w); }

/* No-JS fallback: a plain gold line down the left gutter */
.journey::before {
  content: "";
  position: absolute;
  top: 9rem;
  bottom: 8rem;
  left: calc(var(--gutter-l) / 2);
  border-left: var(--line-w) solid var(--gold);
  transform: translateX(-50%);
}
.js .journey::before { display: none; }

/* Section title: centred; the line starts at the gold dot beneath it */
.journey__intro {
  max-width: 46rem;
  margin: 0 auto clamp(3rem, 7vw, 5rem);
  text-align: center;
}
.journey__title { font-size: clamp(2rem, 5vw, 3.25rem); margin-bottom: 0.75rem; }
.journey__lede { font-size: 1.125rem; color: var(--taupe); }
.journey__start {
  display: block;
  width: 14px;
  height: 14px;
  margin: 2rem auto 0;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 6px rgba(201, 154, 0, 0.18);
}

/* A stop = one title + one bento, with the dot on the title line */
.stop + .stop { margin-top: clamp(4rem, 9vw, 7rem); }
.stop__head { position: relative; margin-bottom: 1.5rem; }
.stop__title { margin-bottom: 0; font-size: clamp(1.5rem, 3.5vw, 2.125rem); }

.stop__dot {
  position: absolute;
  top: 50%;
  left: calc(var(--gutter-l) / -2);
  width: 20px;
  height: 20px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--beige);
  border: var(--line-w) solid var(--gold);
  transition: background-color 0.4s, box-shadow 0.4s;
}
.stop.is-reached .stop__dot {
  background: var(--gold);
  box-shadow: 0 0 0 6px rgba(201, 154, 0, 0.18);
}

/* Desktop: right-hand stops put their dot (and title) on the right edge.
   Only with JS, so the no-JS fallback line on the left still meets every dot. */
@media (min-width: 768px) {
  .js .stop[data-side="right"] .stop__head { text-align: right; }
  .js .stop[data-side="right"] .stop__dot {
    left: auto;
    right: calc(var(--gutter-r) / -2);
    transform: translate(50%, -50%);
  }
}

/* ---- Bento grid ----
   Phones and tablets: one tile per row, in HTML order, each as tall as its
   content. Desktop (1024px+): 3 x 3 spaces; each tile is placed by the
   --col / --row / --w / --h variables set on it in the HTML.
   Each stop spans the full width between the line's gutters (the gold line
   runs around the blocks, in the gutters and the gaps between stops). The
   bento is a wide 16:9 box, capped so title + bento still fit one screen. */
.bento {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--gap);
}
@media (min-width: 1024px) {
  .stop { container-type: inline-size; }   /* lets the bento size itself from the stop's width */
  .bento {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(3, minmax(0, 1fr));
    height: min(56.25cqw, var(--fit-h));    /* 16:9, or one screen at most */
  }
  .bento > .tile {
    grid-column: var(--col) / span var(--w);
    grid-row: var(--row) / span var(--h);
  }
  /* Bottom row as tall as its text needs (Story of the Day); the rows above share the rest */
  .bento--fit-last { grid-template-rows: minmax(0, 1fr) minmax(0, 1fr) auto; }
}

/* ---- Card: the shared surface (white, rounded, soft shadow) ---- */
.card {
  position: relative;            /* anchor for stretched links */
  margin: 0;
  background: var(--card-bg);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ---- Tile: a card in a bento ----
   Media (photo or video thumbnails) on top, beige label at the bottom.
   Below 1024px a tile is as tall as its content: the photo is cut to
   --img-ratio (default 4:3 landscape; aim the crop with --img-pos) and the
   label is just as tall as its text.
   On desktop the tile fills its grid area and the photo takes the spare space. */
.tile {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.tile__media {
  position: relative;
  flex: 0 0 auto;
  aspect-ratio: var(--img-ratio, 4 / 3);
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
}
.tile__media > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--img-pos, 50% 50%);   /* set --img-pos on .tile__media to aim the crop */
}
.tile__body {                    /* text-only content (Story of the Day) */
  flex: 1 1 auto;
  padding: 1.25rem 1.5rem;
  overflow: hidden;
}
.tile__kicker {
  margin-bottom: 0.5rem;
  font-family: var(--font-head);
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.tile__story-title { margin-bottom: 0.15rem; font-family: var(--font-head); font-size: clamp(1.25rem, 2vw, 1.6rem); line-height: 1.2; }
.tile__story-ref {
  margin-bottom: 0.6rem;
  color: var(--gold);
  font-family: var(--font-head);
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
}
.tile__body p:last-child { font-size: 0.975rem; line-height: 1.5; }

.tile__label {
  flex: 1 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-content: center;
  justify-content: space-between;
  gap: 0.6rem 1rem;
  padding: 0.85rem 1.25rem;
  background: var(--beige);
  border-top: 1px solid var(--line-soft);
  border-radius: 0 0 var(--radius) var(--radius);
}
.tile__text { flex: 1 1 12rem; }
.tile__title { margin: 0; font-size: 1.125rem; }
.tile__title a { text-decoration: none; }
.tile__label p { margin: 0.15rem 0 0; font-size: 0.9375rem; line-height: 1.4; }

/* "Stretched link": the title's link covers the whole tile, so the tile is
   one big click target but screen readers still hear a single, named link.
   Buttons and thumbnails sit above it (z-index 2) and stay clickable. */
.tile .tile__title a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: var(--radius);
}
.tile .btn,
.tile .thumb { position: relative; z-index: 2; }
.tile__title a:focus-visible { outline: none; }
.card:has(.tile__title a:focus-visible) {
  outline: 3px solid var(--brown);
  outline-offset: 3px;
}
.card:has(.tile__title a):hover .tile__title a {
  text-decoration: underline;
  text-decoration-color: var(--gold);
}
.motion .tile { transition: transform 0.25s, box-shadow 0.25s; }
.motion .tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
}

/* Quieter button for links that are not calls to action (red stays for Give) */
.btn--quiet {
  background: transparent;
  color: var(--brown);
  box-shadow: inset 0 0 0 1.5px var(--brown);
}
.btn--quiet:hover { background: var(--brown); color: var(--beige); }

/* Video thumbnails: open on YouTube in a new tab. 2 x 2 by default; --row puts them in one row on desktop. */
.tile__media--thumbs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  padding: 0.5rem;
  aspect-ratio: auto;
  align-content: center;
}
.thumb {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: calc(var(--radius) / 2);
  background: var(--brown);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb__play {                   /* round brown button with a beige triangle */
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2.75rem;
  height: 2.75rem;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(71, 49, 24, 0.82);
  transition: background-color 0.2s;
}
.thumb__play::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 54%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 0.5rem 0 0.5rem 0.8rem;
  border-color: transparent transparent transparent var(--beige);
}
.thumb:hover .thumb__play { background: var(--red); }

/* Project Starfish stats */
.stats {
  flex: 0 0 auto;
  margin: 0;
  padding: 0.75rem 1.25rem;
  list-style: none;
  font-size: 0.875rem;
  line-height: 1.35;
}
.stats li + li { margin-top: 0.6rem; }
.stats__num {
  display: block;
  font-family: var(--font-head);
  font-size: 1.5rem;
  line-height: 1.1;
  border-left: 3px solid var(--gold);
  padding-left: 0.5rem;
  margin-bottom: 0.15rem;
}

@media (min-width: 1024px) {
  .tile { min-height: 0; }
  .tile__media { flex: 1 1 0; aspect-ratio: auto; min-height: 0; }
  .tile__label { flex: 0 0 auto; }
  .tile__media--thumbs { grid-auto-rows: minmax(0, 1fr); align-content: stretch; }
  .tile__media--thumbs .thumb { aspect-ratio: auto; }
  .tile__media--row { grid-template-columns: repeat(4, minmax(0, 1fr)); }   /* all thumbnails in one row */
}

/* ---- Meet the Team ----
   Photos (swipe sideways on phones, five across on desktop), then the
   About BibleTelling story band below them. */
.team { display: grid; gap: var(--gap); }
.team__people {
  display: flex;
  gap: var(--gap);
  margin: 0;
  padding: 0 0 0.5rem;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}
.team__people li { flex: 0 0 min(45%, 14rem); scroll-snap-align: start; }
.team__person {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  text-decoration: none;
}
.team__person img { width: 100%; aspect-ratio: 1; object-fit: cover; object-position: 50% 25%; }
.team__name {
  flex: 1 0 auto;
  padding: 0.6rem 0.75rem;
  background: var(--beige);
  border-top: 1px solid var(--line-soft);
  font-family: var(--font-head);
  font-size: 0.9375rem;
  line-height: 1.25;
  text-align: center;
}
.team__person:hover .team__name { text-decoration: underline; text-decoration-color: var(--gold); }
.motion .team__person { transition: transform 0.25s, box-shadow 0.25s; }
.motion .team__person:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }

@media (min-width: 1024px) {
  .team__people {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    padding: 0;
    overflow: visible;
  }
  .team__person img { aspect-ratio: 5 / 4; }
}

/* ---- About BibleTelling: story band ----
   Brown card with four numbered beats on a gold line, then the numbers.
   .is-in is added by about.js when the band scrolls into view: the line
   draws, the beats rise in one after another (--i), the numbers count up.
   Without JS or with reduced motion (.motion missing) it all just shows. */
.about-story {
  position: relative;
  overflow: hidden;
  padding: clamp(1.75rem, 4vw, 3.25rem);
  border-radius: var(--radius);
  color: var(--beige);
  background:
    radial-gradient(80% 120% at 100% 0%, rgb(201 154 0 / 0.22), transparent 55%),
    radial-gradient(60% 90% at 0% 100%, rgb(193 15 24 / 0.16), transparent 60%),
    var(--brown);
  box-shadow: var(--shadow-lift);
}
.about-story__hebrew {               /* "In the beginning", faint, cut off at the edge */
  position: absolute;
  top: -0.18em;
  right: -0.08em;
  font-family: var(--font-hebrew);
  font-size: clamp(6rem, 16vw, 14rem);
  line-height: 1;
  color: rgb(255 252 241 / 0.05);
  pointer-events: none;
  user-select: none;
}
.about-story__head { position: relative; max-width: 40rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.about-story__kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  margin-bottom: 0.75rem;
  color: var(--gold);
  font-family: var(--font-head);
  font-size: 0.8125rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.about-story__kicker::before { content: ""; width: 1.75rem; height: 2px; background: var(--gold); }
.about-story__title {
  margin: 0;
  font-size: clamp(1.6rem, 3.4vw, 2.5rem);
  line-height: 1.15;
}
.about-story__title em { font-family: var(--font-body); color: var(--gold); }

/* Beats: a column with the line down the left on phones, a row with the
   line across the top on wider screens. The line is ::before on the list. */
.about-story__beats {
  --line: 1;                        /* 0 → 1: how much of the gold line is drawn */
  position: relative;
  display: grid;
  gap: 1.75rem;
  margin: 0;
  padding: 0 0 0 2rem;
  list-style: none;
  counter-reset: none;
}
.about-story__beats::before,
.about-story__beats::after {
  content: "";
  position: absolute;
  left: 0.45rem;
  top: 0.4rem;
  bottom: 0.4rem;
  width: 2px;
}
.about-story__beats::before { background: rgb(255 252 241 / 0.15); }          /* the track */
.about-story__beats::after {                                                    /* the gold line */
  background: var(--gold);
  transform: scaleY(var(--line));
  transform-origin: top;
  transition: transform 1.4s var(--ease-out);
}
.beat { position: relative; }
.beat::before {                     /* a dot on the line for every beat */
  content: "";
  position: absolute;
  left: calc(-2rem + 0.45rem + 1px);
  top: 0.35rem;
  width: 12px;
  height: 12px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 5px rgb(201 154 0 / 0.2);
}
.beat__num {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--gold);
  font-family: var(--font-head);
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
}
.beat__title { margin: 0 0 0.35rem; font-size: 1.1875rem; }
.beat p { margin: 0; font-size: 0.975rem; line-height: 1.5; color: rgb(255 252 241 / 0.78); }

@media (min-width: 768px) {
  .about-story__beats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2rem;
    padding: 2rem 0 0;
  }
  .about-story__beats::before,
  .about-story__beats::after { left: 0; right: 0; top: 0.4rem; bottom: auto; width: auto; height: 2px; }
  .about-story__beats::after { transform: scaleX(var(--line)); transform-origin: left; }
  .beat::before { left: 0; top: calc(-2rem + 0.4rem + 1px); transform: translate(0, -50%); }
}

/* Numbers, program tags and the link */
.about-story__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem 2.5rem;
  margin-top: clamp(2rem, 4vw, 3rem);
  padding-top: clamp(1.5rem, 3vw, 2rem);
  border-top: 1px solid rgb(255 252 241 / 0.14);
}
.about-story__stats { display: flex; gap: 2.5rem; margin: 0; }
.about-story__stats div { display: flex; flex-direction: column-reverse; }
.about-story__stats dt { max-width: 11rem; font-size: 0.875rem; line-height: 1.35; color: rgb(255 252 241 / 0.75); }
.about-story__stats dd {
  margin: 0 0 0.2rem;
  color: var(--gold);
  font-family: var(--font-head);
  font-size: clamp(2.25rem, 4.5vw, 3.25rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.about-story__tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; padding: 0; list-style: none; flex: 1 1 16rem; }
.about-story__tags li {
  padding: 0.35rem 0.85rem;
  border: 1px solid rgb(201 154 0 / 0.55);
  border-radius: 999px;
  font-family: var(--font-head);
  font-size: 0.8125rem;
  color: var(--beige);
}
.about-story__link { margin-left: auto; }
.about-story :focus-visible { outline-color: var(--gold); }

/* Entrance animation (only with motion on and JS running) */
.motion .about-story:not(.is-in) .about-story__beats { --line: 0; }
.motion .beat {
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  transition-delay: calc(0.25s + var(--i) * 0.18s);
}
.motion .about-story:not(.is-in) .beat { opacity: 0; transform: translateY(1.25rem); }
.motion .about-story__head,
.motion .about-story__foot { transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out); }
.motion .about-story__foot { transition-delay: 1s; }
.motion .about-story:not(.is-in) .about-story__head { opacity: 0; transform: translateY(1rem); }
.motion .about-story:not(.is-in) .about-story__foot { opacity: 0; }

/* ---- Footer ----
   One short brown band: brand + slogan, then the contact points.
   Below 960px: stacked and centred. 960px+: slogan left, contact right, one row. */
.site-footer {
  padding-block: 1.25rem;
  background: var(--brown);
  color: var(--beige);
  font-size: 0.9375rem;
}
.site-footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}
.site-footer__slogan { margin: 0; }
.site-footer__brand {
  display: block;                  /* own line when stacked */
  color: var(--gold);              /* gold on brown passes AA (≈4.7:1) */
  font-family: var(--font-head);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.site-footer__contact {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 1.25rem;
  font-style: normal;
}
.site-footer__contact > * { padding-block: 0.25rem; }   /* comfortable tap height */
.site-footer :focus-visible { outline-color: var(--gold); }
@media (min-width: 960px) {
  .site-footer__inner { flex-direction: row; justify-content: space-between; text-align: left; }
  .site-footer__brand { display: inline; margin-right: 0.5em; }
}
