/* bhaktilibrary.org's own layout — the top bar, the footer, and the home
   page's full-width sections. Loaded after styles.css, whose palette, type
   and components it builds on. styles.css is shared with the online
   concordance (concordance/build.js reads it); this file is not, so a rule
   that only this site needs belongs here and nowhere else.

   Breakpoints are in rem, so they answer "the text got big" as well as "the
   screen got small": at the largest browser text setting a laptop gets the
   phone layout, which is the layout that fits that much type. */

:root {
  --measure: 36rem;            /* prose column */
  --container: 74rem;          /* widest a section's content runs */
  --gutter: 1.25rem;
  --bar-h: 3.75rem;            /* the top bar, for anchor offsets */
  --radius: 14px;
  --shadow-soft: 0 1px 2px rgba(59, 44, 32, 0.06), 0 8px 24px -12px rgba(59, 44, 32, 0.22);
  --shadow-phone: 0 2px 4px rgba(30, 20, 12, 0.10), 0 28px 60px -22px rgba(30, 20, 12, 0.55);
  --phone-frame: #1d1915;
  /* The dark band the concordance sits in. Its own tokens rather than
     --espresso/--paper, because those two swap places in dark mode and the
     band must stay dark in both. */
  --band-bg: #3b2c20;
  --band-ink: #f6eedf;
  --band-soft: #d3c2ae;
  --band-line: rgba(246, 238, 223, 0.16);
  --band-card: rgba(246, 238, 223, 0.06);
  --bar-bg: rgba(251, 244, 232, 0.86);
}
@media (prefers-color-scheme: dark) {
  :root {
    --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px -12px rgba(0, 0, 0, 0.6);
    --shadow-phone: 0 0 0 1px rgba(255, 255, 255, 0.07), 0 28px 60px -22px rgba(0, 0, 0, 0.8);
    --phone-frame: #0b0907;
    --band-bg: #241b15;
    --band-ink: #ece5d9;
    --band-soft: #b4a291;
    --band-line: rgba(236, 229, 217, 0.12);
    --band-card: rgba(236, 229, 217, 0.04);
    --bar-bg: rgba(23, 18, 14, 0.86);
  }
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Every anchor target clears the sticky bar. */
[id] { scroll-margin-top: calc(var(--bar-h) + 1rem); }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
@media (min-width: 48rem) { :root { --gutter: 2rem; } }

.skip {
  position: absolute;
  left: 0.75rem;
  top: 0.6rem;
  transform: translateY(-200%);
  z-index: 30;
  background: var(--espresso);
  color: var(--paper);
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  text-decoration: none;
}
.skip:focus { transform: none; color: var(--paper); }

/* ------------------------------------------------------------- top bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bar-bg);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.topbar.scrolled {
  border-bottom-color: var(--chrome-line);
  box-shadow: 0 6px 20px -16px rgba(59, 44, 32, 0.45);
}
.topbar-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  min-height: var(--bar-h);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  padding-block: 0.45rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--espresso);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
  margin-right: auto;
}
.brand:hover { color: var(--espresso); }
.brand img { width: 30px; height: 30px; display: block; }
.topnav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.4rem;
  font-size: 0.95rem;
}
.topnav a:not(.btn) {
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.topnav a:not(.btn):hover { color: var(--espresso); text-decoration: underline; text-underline-offset: 0.2em; }
.topnav .out { opacity: 0.7; }

/* On a phone, and at the largest text steps on anything: the wordmark gives
   way to the mark alone, and "Features" — the one in-page link — goes, so
   the two destinations that leave this page always fit on one line. */
@media (max-width: 40rem) {
  .topnav-features { display: none !important; }
  .topnav { gap: 0.25rem 0.9rem; }
}
@media (max-width: 26rem) {
  .brand span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
/* Past that — the top text steps on a phone — the bar wraps onto more than
   one line, and a sticky bar that tall would hold a fifth of the screen
   still. It scrolls away with the page instead. */
@media (max-width: 22rem) {
  .topbar { position: static; }
}

/* ------------------------------------------------------------- buttons */
.btn { line-height: 1.25; text-align: center; transition: opacity 0.15s ease, transform 0.15s ease; }
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 0.45rem 0.95rem; font-size: 0.92rem; border-radius: 7px; white-space: nowrap; }
.btn-lg { padding: 0.8rem 1.6rem; font-size: 1.02rem; border-radius: 10px; }
.btn-ghost {
  background: transparent;
  color: var(--espresso);
  box-shadow: inset 0 0 0 1px var(--chrome-line);
}
.btn-ghost:hover { color: var(--espresso); background: var(--chrome); opacity: 1; }
.btn-light { background: var(--band-ink); color: var(--band-bg); }
.btn-light:hover { color: var(--band-bg); }
.btn:focus-visible, .topnav a:focus-visible, .brand:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* --------------------------------------------------------- type helpers */
.eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-soft);
}
h2.eyebrow { font-size: 0.78rem; }
.display {
  font-size: clamp(1.7rem, 1.15rem + 2vw, 2.55rem);
  line-height: 1.14;
  letter-spacing: -0.005em;
  margin: 0 0 1rem;
  color: var(--espresso);
  text-wrap: balance;
}
.prose { max-width: var(--measure); }
.prose p:first-child { margin-top: 0; }

/* Two columns from a tablet up: a heading, and the prose that answers it. */
.split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem 4rem; }
@media (min-width: 52rem) {
  .split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; }
  .split-media { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; }
}

/* ---------------------------------------------------------------- hero */
.wide main { padding-bottom: 0; }

.hero { padding: clamp(1.75rem, 1rem + 3vw, 3.5rem) 0 0; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem; align-items: center; }
@media (min-width: 60rem) {
  .hero-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 3rem; }
}

/* Śrīla Prabhupāda — first in the page, at the head of the reading column.
   The portrait at a size that still reads as a portrait, his identification
   beside it, and the app's name directly under the two. */
.founder {
  margin: 0 0 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.25rem;
  align-items: center;
  padding-bottom: 1.6rem;
  border-bottom: 1px solid var(--chrome-line);
}
.founder .portrait {
  width: 132px;
  /* The height attribute is a presentational hint for `height`, so setting
     width alone would leave the image stretched to its intrinsic 596 px.
     `auto` hands the sizing back to the aspect ratio the attributes supply,
     which is what stops the reflow on load. */
  height: auto;
  flex: none;
  border-radius: 8px;
  border: 1px solid var(--chrome-line);
  box-shadow: 0 2px 12px rgba(59, 44, 32, 0.18);
}
/* Beside the portrait while it has room for his name; under it once the
   text is too large for that (it wraps rather than breaking "Bhaktivedanta"
   across lines). */
.founder .who { display: flex; flex-direction: column; min-width: 0; flex: 1 1 12rem; }
.founder .honorific { font-style: italic; color: var(--accent-soft); font-size: 0.95rem; }
.founder .name {
  color: var(--espresso);
  font-weight: 700;
  font-size: 1.3rem;
  line-height: 1.25;
  margin: 0.1rem 0 0.3rem;
}
.founder .title { color: var(--accent-soft); font-size: 0.95rem; line-height: 1.4; }
/* A statement about him, so it sits with his name rather than opening the
   body copy. Quieter than the Founder-Ācārya title, which is the formal one. */
.founder .role { color: var(--muted); font-style: italic; font-size: 0.9rem; margin-top: 0.4rem; line-height: 1.4; }

.hero-title { margin: 0 0 1rem; font-weight: 700; color: var(--espresso); }
.hero-name {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  margin-bottom: 0.7rem;
}
.hero-name img { width: 44px; height: 44px; display: block; }
.hero-tagline {
  display: block;
  font-size: clamp(2rem, 1.25rem + 2.6vw, 3.15rem);
  line-height: 1.08;
  letter-spacing: -0.012em;
  text-wrap: balance;
}
.hero-lede {
  font-size: 1.2rem;
  line-height: 1.55;
  color: var(--ink);
  max-width: 34rem;
  margin: 0 0 1.6rem;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin: 0 0 1.4rem; }
.facts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1.1rem;
  color: var(--accent-soft);
  font-size: 0.92rem;
}
.facts li { display: inline-flex; align-items: center; gap: 0.4rem; }
.facts li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--stripe-2);
  opacity: 0.85;
}

/* The phones. A device is a dark rounded frame around a simulator
   screenshot, which already carries its own status bar and island. */
.device {
  display: block;
  line-height: 0;
  background: var(--phone-frame);
  padding: 7px;
  border-radius: 40px;
  box-shadow: var(--shadow-phone);
}
.device picture { display: block; }
.device img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 33px;
}
a.device { cursor: zoom-in; }
a.device:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.hero-figure { margin: 0; }
.hero-visual {
  position: relative;
  margin: 0 auto;
  width: min(100%, 30rem);
  /* Tall enough to hold the front phone: 54% of the width at a 600:1304
     screen inside a 7px frame is about 1.19 widths, plus its 6% drop. */
  aspect-ratio: 4 / 5.05;
}
.hero-visual .device { position: absolute; width: 54%; }
.hero-visual .device-back { right: 1%; top: 0; transform: rotate(3deg); transform-origin: top right; }
.hero-visual .device-front { left: 3%; top: 6%; }
.hero-figure figcaption {
  margin: 1.1rem auto 0;
  width: min(100%, 30rem);
  text-align: center;
  font-size: 0.88rem;
  font-style: italic;
  color: var(--muted);
}
@media (min-width: 60rem) {
  .hero-visual, .hero-figure figcaption { width: 100%; max-width: 31rem; margin-right: 0; }
}
@media (prefers-reduced-motion: no-preference) {
  .hero-visual .device { transition: transform 0.35s ease; }
  .hero-visual:hover .device-back { transform: rotate(4.5deg) translateX(6px); }
}

.stripe-bleed { margin: clamp(2.5rem, 1.5rem + 3vw, 4rem) 0 0; height: 6px; }

/* ------------------------------------------------------------ the shelf */
.shelf { background: var(--chrome); border-bottom: 1px solid var(--chrome-line); padding: 2.4rem 0 2.2rem; text-align: center; }
.shelf .eyebrow { margin-bottom: 1rem; }
/* Each title on a spine of its own: a separator between wrapped, centred
   titles always ends up starting a line somewhere. */
.books {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  max-width: 62rem;
}
.books li {
  padding: 0.45rem 1rem;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--chrome-line);
  color: var(--espresso);
  font-size: clamp(1rem, 0.94rem + 0.3vw, 1.12rem);
  line-height: 1.3;
}
.shelf-note { margin: 1rem auto 0; max-width: 40rem; color: var(--muted); font-size: 0.97rem; }

/* ----------------------------------------------------------------- why */
.why, .text, .closing { padding: clamp(3rem, 2rem + 4vw, 5.5rem) 0; }
.why .display { margin: 0; }
.why .prose p { font-size: 1.15rem; }

/* ------------------------------------------------------------ features */
.app-features { padding: clamp(3rem, 2rem + 4vw, 5.5rem) 0; border-top: 1px solid var(--chrome-line); }
.section-head { margin: 0 0 2.5rem; }

.tour { display: grid; grid-template-columns: minmax(0, 1fr); }
.tour-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 3.5rem; }
.step { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; align-items: center; }
.step-text h3 {
  font-size: clamp(1.35rem, 1.1rem + 0.9vw, 1.75rem);
  line-height: 1.2;
  color: var(--espresso);
  margin: 0 0 0.75rem;
  text-wrap: balance;
}
.step-text p { margin: 0 0 0.85rem; max-width: 32rem; }
.step-kicker {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.78rem !important;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-soft);
  margin-bottom: 0.6rem !important;
}
.step-n {
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--paper);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 0.12rem 0.5rem;
}
.step-shot { width: min(72%, 17rem); margin: 0 auto; }

/* A step beside its own phone from a tablet up, alternating sides, so the
   page without the sticky stage still reads as a designed sequence. */
@media (min-width: 48rem) {
  .step { grid-template-columns: minmax(0, 1fr) 15rem; gap: 3rem; }
  .step:nth-child(even) { grid-template-columns: 15rem minmax(0, 1fr); }
  .step:nth-child(even) .step-text { order: 2; }
  .step-shot { width: 100%; }
}

.tour-stage { display: none; }

/* The sticky tour, on a wide window with JavaScript: the steps scroll in the
   left column and one phone holds still in the right, changing to match the
   step at the middle of the window. */
@media (min-width: 60rem) {
  .js .tour { grid-template-columns: minmax(0, 1fr) auto; gap: 4rem; }
  .js .tour-steps { gap: 0; }
  .js .step {
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Capped, so a very tall window does not spread seven steps over a
       dozen screens. */
    min-height: min(72vh, 46rem);
    padding: min(12vh, 7rem) 0;
    opacity: 0.38;
    transition: opacity 0.35s ease;
  }
  .js .step:first-child { padding-top: 1rem; }
  .js .step.active { opacity: 1; }
  .js .step .step-shot { display: none; }
  .js .tour-stage { display: block; }
  .js .stage-sticky {
    position: sticky;
    top: calc(var(--bar-h) + max(1.5rem, (100vh - var(--notice-h, 0px) - var(--bar-h) - 40rem) / 2));
    display: grid;
    grid-template-columns: 11rem auto;
    gap: 2.5rem;
    align-items: center;
  }
  /* 18rem wide, unless the window is too short to show all of it: then as
     wide as lets its whole height — a 600:1304 screen in a 7px frame — sit
     between the bar and the bottom edge. A 1366x768 laptop is the case.
     "The bottom edge" is the analytics notice's top while it shows: it is
     fixed there, and a phone held still behind it never scrolls clear
     (--notice-h, set by analytics.js; #761 QA). */
  .js .stage-device {
    width: min(18rem, calc((100vh - var(--notice-h, 0px) - var(--bar-h) - 3rem - 14px) * 600 / 1304 + 14px));
  }
  .tour-rail ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--chrome-line); }
  .tour-rail a {
    display: block;
    padding: 0.45rem 0 0.45rem 1rem;
    margin-left: -1px;
    border-left: 2px solid transparent;
    color: var(--muted);
    text-decoration: none;
    font-size: 0.92rem;
    line-height: 1.3;
    transition: color 0.2s ease, border-color 0.2s ease;
  }
  .tour-rail a:hover { color: var(--espresso); }
  .tour-rail a.on { color: var(--espresso); border-left-color: var(--stripe-2); font-weight: 700; }
  .tour-rail a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  /* The first screen stays in flow and gives the frame its height; the rest
     lie over it and cross-fade. */
  .js .stage-device { position: relative; }
  .js .stage-device img {
    position: absolute;
    top: 7px;
    left: 7px;
    width: calc(100% - 14px);
    opacity: 0;
    transition: opacity 0.35s ease;
  }
  .js .stage-device img:first-child { position: relative; top: 0; left: 0; width: 100%; }
  .js .stage-device img.on { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .js .step, .js .stage-device img { transition: none; }
}

/* The small print of the feature list: four things that need a sentence,
   not a screen. */
.extras {
  list-style: none;
  margin: 4rem 0 0;
  padding: 2.5rem 0 0;
  border-top: 1px solid var(--chrome-line);
  display: grid;
  gap: 2rem 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(14.5rem, 100%), 1fr));
}
.extras svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.extras h3 { font-size: 1.08rem; color: var(--espresso); margin: 0.6rem 0 0.35rem; }
.extras p { margin: 0; font-size: 0.97rem; color: var(--ink); line-height: 1.5; }

/* -------------------------------------------------- the concordance band */
.band {
  background: var(--band-bg);
  color: var(--band-ink);
  padding: clamp(3rem, 2rem + 4vw, 5.5rem) 0;
}
.band a:not(.btn) { color: var(--band-ink); }
.band a:not(.btn):hover { color: #fff; }
.band .eyebrow { color: var(--band-soft); text-transform: none; letter-spacing: 0.04em; font-size: 0.95rem; }
.band .display { color: var(--band-ink); }
.band-copy p { max-width: 32rem; }
.band-note { color: var(--band-soft); font-size: 0.95rem; }
.band .band-note a { color: var(--band-soft); }

.browser {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  background: var(--paper);
  box-shadow: 0 0 0 1px var(--band-line), 0 30px 60px -24px rgba(0, 0, 0, 0.6);
}
.browser-bar {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.55rem 0.8rem;
  background: var(--chrome);
  border-bottom: 1px solid var(--chrome-line);
}
.browser .dots { display: inline-flex; gap: 6px; flex: none; }
.browser .dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--chrome-line); }
.browser .url {
  flex: 1;
  min-width: 0;
  font-size: 0.8rem;
  color: var(--muted);
  background: var(--paper);
  border-radius: 6px;
  padding: 0.18rem 0.6rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.browser a.shot { display: block; line-height: 0; cursor: zoom-in; }
.browser img { display: block; width: 100%; height: auto; }

.chain-head { font-size: 1.15rem; color: var(--band-ink); margin: clamp(3rem, 2rem + 3vw, 4.5rem) 0 1.1rem; }
.chain {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(auto-fit, minmax(min(13rem, 100%), 1fr));
  counter-reset: chain;
}
.chain li {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1rem 1.15rem 1.1rem;
  border-radius: var(--radius);
  background: var(--band-card);
  border: 1px solid var(--band-line);
}
.chain-label { font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--band-soft); font-weight: 700; }
.chain-word { font-size: 1.6rem; font-weight: 700; font-style: italic; line-height: 1.25; }
.chain-gloss { color: var(--band-soft); font-size: 0.95rem; line-height: 1.45; }
/* The arrow between the first three — a form, its headword, its root — on a
   row wide enough to hold all four. The fourth starts from the other end. */
@media (min-width: 62rem) {
  .chain { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.6rem; }
  .chain li:nth-child(-n + 2)::after {
    content: "";
    position: absolute;
    right: -1.25rem;
    top: 50%;
    width: 0.9rem;
    height: 0.9rem;
    border-top: 1.5px solid var(--band-soft);
    border-right: 1.5px solid var(--band-soft);
    transform: translateY(-50%) rotate(45deg);
    opacity: 0.8;
  }
  .chain li:nth-child(4) { border-style: dashed; }
}
.chain-note { color: var(--band-soft); max-width: 44rem; margin: 1.2rem 0 0; }

/* Mirrors the app's primer notice; the wording lives in index.astro. */
.notice-band {
  margin: 2.5rem 0 0;
  padding: 1.1rem 1.3rem;
  border-radius: var(--radius);
  border: 1px solid rgba(226, 175, 69, 0.45);
  background: rgba(226, 175, 69, 0.07);
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--band-ink);
}
.notice-band strong { color: #f0c96e; }
@media (prefers-color-scheme: dark) { .notice-band strong { color: var(--stripe-1); } }

/* ---------------------------------------------------- the text, closing */
.text .display { margin-bottom: 0; }
.closing { border-top: 1px solid var(--chrome-line); }
.closing .split { align-items: center; }
.closing .thanks-head { margin-top: 2rem; }
.cta-panel {
  background: var(--band-bg);
  color: var(--band-ink);
  border-radius: 18px;
  padding: clamp(1.5rem, 1rem + 2vw, 2.4rem);
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}
.cta-panel::before {
  /* The icon's stripe, along the panel's top edge. */
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  background: linear-gradient(to bottom,
    var(--stripe-1) 0 25%, var(--stripe-2) 25% 50%,
    var(--stripe-3) 50% 75%, var(--stripe-4) 75% 100%);
}
.cta-panel h2 { color: var(--band-ink); margin: 0.3rem 0 0.6rem; font-size: 1.6rem; }
.cta-panel p { color: var(--band-soft); margin: 0 0 1.3rem; }

/* -------------------------------------------------------------- footer */
footer.site { margin-top: 0; padding: 2.5rem 0 3rem; text-align: left; }
footer.site { border-top: 1px solid var(--chrome-line); }
.footer-inner { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.footer-inner > p { max-width: 46rem; }
.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-bottom: 1.25rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--chrome-line);
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--espresso) !important;
  font-weight: 700;
  font-size: 1.05rem;
}
.footer-brand img { width: 36px; height: 36px; display: block; }
footer.site .footer-top nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; }
footer.site .footer-top nav a { margin: 0; text-decoration: none; }
footer.site .footer-top nav a:hover { text-decoration: underline; color: var(--espresso); }

/* --------------------------------------------- plain pages (the policy) */
/* A reading column under a left-aligned title, both on the top bar's left
   edge. Deliberately plain: a policy wants a measure, not a layout. */
.plain { padding-top: clamp(2rem, 1.5rem + 2vw, 3.5rem); padding-bottom: 3rem; }
.page-head {
  max-width: 40rem;
  padding-bottom: 1.25rem;
  margin-bottom: 1.75rem;
  border-bottom: 1px solid var(--chrome-line);
}
.page-head h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.9rem, 1.4rem + 1.6vw, 2.6rem);
  line-height: 1.12;
  color: var(--espresso);
}
.page-head .tagline { margin: 0; color: var(--accent-soft); font-style: italic; }
.plain main.prose { max-width: 40rem; }

/* ----------------------------------------------------------- the beta page */
.beta-hero .hero-tagline { font-size: clamp(2.4rem, 1.5rem + 3.2vw, 3.6rem); }
.beta-note { margin: 0; color: var(--muted); font-size: 0.95rem; max-width: 32rem; }
.beta-figure { justify-self: center; }
.beta-figure .device { width: min(17rem, 70vw); margin: 0 auto; transform: rotate(-2deg); }
@media (prefers-reduced-motion: no-preference) {
  .beta-figure .device { transition: transform 0.35s ease; }
  .beta-figure .device:hover { transform: rotate(0deg) translateY(-4px); }
}


/* ------------------------------------------------------------ lightbox */
/* The screenshots are phone-shaped, so the constraint that matters is
   height, not width — cap on both and let the aspect ratio settle it. The
   web capture is the exception, and says so with .wide. */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem;
  background: rgba(23, 18, 14, 0.9);
  cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: min(92vw, 460px);
  max-height: 92vh;
  border-radius: 14px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}
.lightbox.wide img { max-width: min(94vw, 1100px); border-radius: 8px; }
.lightbox-close {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  background: none;
  border: 0;
  color: #fbf4e8;
  font: inherit;
  font-size: 2.25rem;
  line-height: 1;
  padding: 0.25rem 0.6rem;
  cursor: pointer;
  border-radius: 8px;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.12); }
.lightbox-close:focus-visible { outline: 2px solid #fbf4e8; }

/* --------------------------------------------------------- narrow tweaks */
@media (max-width: 40rem) {
  .founder { gap: 1rem; }
  .founder .portrait { width: 96px; }
  .founder .name { font-size: 1.12rem; }
  .founder .title, .founder .honorific { font-size: 0.88rem; }
  .founder .role { font-size: 0.84rem; }
  .hero-lede { font-size: 1.08rem; }
  .hero-cta .btn { flex: 1 1 auto; }
}
