/* One Origin — the shell shared by every story page.

   index.html keeps its own inline styles because it *is* the story. These pages
   are the individual scenes that used to live inside it, so they borrow the same
   palette, type scale and layout vocabulary instead of the lighter tool-page look
   in connections.css.

   Load order on a scene page: scene.css, then modules.css / perspectives.css for
   the components, then theme.css, then cards.css. */

:root {
  color-scheme: light;
  --void: #F7F4EC; --void-2: #FFFCF5;
  --sand: #2D332E; --sand-dim: #687064;
  --clay: #B85E37; --clay-deep: #87472D; --verdant: #47745E; --crimson: #A23E3E; --gold: #875D20;
  --hair: rgba(45, 51, 46, 0.16);
  --panel: rgba(255, 252, 245, .72);
  --panel-2: rgba(243, 238, 228, .6);
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'IBM Plex Sans', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--void);
  color: var(--sand);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 500; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: var(--gold); }
::selection { background: var(--clay); color: var(--void); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ---------- page chrome ---------- */

.scene-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 20px 24px 14px;
  border-bottom: 1px solid var(--hair);
}
.scene-head .brand {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: var(--sand);
  text-decoration: none;
}
.scene-head .brand:hover { color: var(--clay); }
.scene-head .crumb {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sand-dim);
}
.scene-head .crumb a { color: var(--sand-dim); text-decoration-color: var(--clay); }

/* ---------- the scene itself ---------- */

.scene {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 7vh 6vw 6vh;
  position: relative;
}
.scene--tall { min-height: 100svh; justify-content: center; }

.inner { max-width: 820px; width: 100%; }
/* Same width as the module rules in modules.css, so both agree. */
.inner--wide { max-width: 1020px; }

.kicker {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--sand-dim);
  display: flex;
  align-items: center;
  gap: 0.6em;
  margin-bottom: 1.4em;
}
.kicker::before {
  content: '';
  width: 22px;
  height: 1px;
  background: var(--clay);
  display: inline-block;
}

.headline { font-size: clamp(1.9rem, 4.2vw, 2.9rem); line-height: 1.08; max-width: 20ch; }
.headline .accent { color: var(--clay); }

.lede {
  font-size: clamp(1rem, 1.6vw, 1.12rem);
  color: var(--sand);
  opacity: 0.85;
  max-width: 62ch;
  margin-top: 1.3em;
}

.fig-caption {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--sand-dim);
  margin-top: 1.4em;
  max-width: 62ch;
  line-height: 1.6;
}
.fig-caption a { color: var(--sand-dim); text-decoration-color: var(--clay); }

.readout { font-family: var(--mono); font-size: 1rem; color: var(--gold); margin-top: 1.1em; }
.readout b { font-size: 1.35rem; font-weight: 500; }

/* Opening banner, matching the hero treatment on the main story. */
.scene-art {
  margin: 0 0 2.4em;
  border: 1px solid var(--hair);
  border-radius: 12px;
  overflow: hidden;
  background: var(--panel-2);
}
.scene-art img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 7;
  object-fit: cover;
}
.scene-art figcaption {
  padding: 10px 14px;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--sand-dim);
  border-top: 1px solid var(--hair);
}

.reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in-view { opacity: 1; transform: none; }

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

.scene-foot {
  max-width: 1080px;
  margin: 0 auto;
  padding: 26px 24px 40px;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--sand-dim);
  border-top: 1px solid var(--hair);
}
.scene-foot a { color: var(--sand-dim); text-decoration-color: var(--clay); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { transition: none; opacity: 1; transform: none; }
  .scene-art img,
  .cards a { transition: none; animation: none; }
}
