/* ============ Adam Byrne — integrated homepage ============
   One page, two acts.
   Act One (intro → method → proof → selected work → handoff): plain,
   evidence-led editorial HTML. Act Two (forest → chapters → about →
   finale): the field-kit scroll narrative with the knife as wayfinder.
   The knife/canvas system paints into .knife-layer (journey.js). */

:root {
  --bg: #f3efe7;
  --bg-deep: #ece7dc;
  --ink: #26231f;
  --ink-soft: #6b655c;
  --oxblood: #6e1423;
  --signal: #c2452d;
  --steel: #a8a49c;
  --line: #d8d2c6;
  --forest-deep: #101b14;
  --future-deep: #0b0e1a;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

/* smooth scrolling is applied per-click in JS so browser scroll
   restoration and programmatic jumps stay instant */

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.mono { font-family: var(--font-mono); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--oxblood); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }

.skip-link {
  position: absolute;
  left: 1rem; top: -3rem;
  z-index: 100;
  background: var(--ink);
  color: var(--bg);
  padding: 0.6rem 1rem;
  border-radius: 0 0 8px 8px;
  text-decoration: none;
  font: 600 0.85rem/1 var(--font-body);
  transition: top 160ms ease;
}
.skip-link:focus-visible { top: 0; }

/* ============ CTAs ============ */

.cta {
  appearance: none;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--bg);
  font: 600 0.85rem/1 var(--font-body);
  letter-spacing: 0.02em;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}
.cta:hover { transform: translateY(-1px); }
.cta:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }
.cta-primary { background: var(--oxblood); border-color: var(--oxblood); }
.cta-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.cta-outline:hover { background: rgba(38, 35, 31, 0.06); }
.cta-quiet { background: transparent; color: var(--ink-soft); border-color: var(--line); }
.cta-quiet:hover { color: var(--ink); border-color: var(--ink); }
.cta-outline-light { background: transparent; color: #e8e6f2; border-color: rgba(232, 230, 242, 0.5); }
.cta-ghost-light { background: transparent; color: #9a97ad; border-color: transparent; }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.text-link {
  display: inline-block;
  margin-top: 0.4rem;
  color: var(--oxblood);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--oxblood) 35%, transparent);
  padding-bottom: 1px;
}
.text-link:hover { border-bottom-color: var(--oxblood); }

/* ============ Header (solid throughout — the page starts editorial) ============ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0.9rem 2rem;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 300ms ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-decoration: none;
}
.wordmark img { display: block; }

.site-nav { display: flex; gap: 1.6rem; margin-left: auto; }
.site-nav a { color: var(--ink); text-decoration: none; font-size: 0.85rem; font-weight: 500; }
.site-nav a:hover { color: var(--oxblood); }

.header-cta { padding: 0.65rem 1.1rem; font-size: 0.78rem; }

.menu-toggle {
  display: none;
  appearance: none;
  background: transparent;
  border: 0;
  width: 2.2rem; height: 2.2rem;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  margin-left: auto;
}
.menu-toggle span { display: block; height: 2px; background: var(--ink); }

.mobile-menu {
  position: fixed;
  top: 3.6rem; left: 0; right: 0;
  z-index: 49;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1rem 1.5rem 1.4rem;
  box-shadow: 0 18px 30px rgba(38, 35, 31, 0.12);
}
.mobile-menu a { color: var(--ink); text-decoration: none; padding: 0.5rem 0; font-weight: 500; }
.mobile-menu .cta { justify-content: center; margin-top: 0.5rem; }
.mobile-menu[hidden] { display: none; }

/* ============ Act One layout primitives ============ */

.section-inner { max-width: 1160px; margin: 0 auto; padding: 0 2rem; }
.section-label {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--signal);
  margin: 0 0 1.1rem;
}
h1, h2, h3 { font-family: var(--font-display); font-weight: 560; margin: 0; }
.act-one h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); line-height: 1.14; letter-spacing: -0.01em; max-width: 21em; }

/* Act One sections must be opaque: the fixed forest art lives behind
   the page and may be partially faded in near the threshold. */
.act-one { position: relative; z-index: 2; background: var(--bg); }

/* ============ Intro (Adam-first hero) ============ */

.intro {
  display: grid;
  grid-template-columns: minmax(0, 52fr) minmax(0, 48fr);
  gap: 3rem;
  align-items: center;
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(3rem, 8vh, 6rem) 2rem clamp(3.5rem, 9vh, 7rem);
  min-height: min(calc(88vh - 4rem), 780px);
}

.intro-copy .eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--oxblood);
  margin: 0 0 1.4rem;
}
.intro-copy h1 {
  font-size: clamp(2.3rem, 4.6vw, 3.7rem);
  line-height: 1.06;
  letter-spacing: -0.015em;
}
.intro-copy .lede {
  font-size: 1.08rem;
  color: var(--ink-soft);
  max-width: 34em;
  margin: 1.4rem 0 1.8rem;
}
.proof-line {
  margin: 1.6rem 0 0;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

/* the living field of evidence */
.intro-field { position: relative; min-height: 520px; }
.hf-item {
  position: absolute;
  margin: 0;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(38, 35, 31, 0.18);
  overflow: hidden;
}
.hf-item img { width: 100%; height: 100%; object-fit: cover; }
.hf-item figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 1.1rem 0.85rem 0.65rem;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: #fff;
  text-shadow: 0 1px 3px rgba(20, 18, 15, 0.7);
  background: linear-gradient(transparent, rgba(20, 18, 15, 0.85));
}
.hf-a { width: 62%; aspect-ratio: 16 / 9; top: 3%; right: 2%; transform: rotate(1.2deg); z-index: 3; }
.hf-b { width: 46%; aspect-ratio: 4 / 3; top: 36%; left: 0; transform: rotate(-1.6deg); z-index: 4; }
.hf-c { width: 58%; aspect-ratio: 16 / 9; bottom: 4%; right: 0; transform: rotate(0.8deg); z-index: 2; }
.hf-card {
  width: 40%;
  top: 74%;
  left: 0;
  transform: rotate(-0.8deg);
  z-index: 5;
  background: var(--future-deep);
  color: #e8e6f2;
  overflow: visible;
}
.hf-card figcaption {
  position: static;
  background: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1.1rem 1.2rem 1.2rem;
  color: #e8e6f2;
  text-shadow: none;
}
.hf-card strong { font-family: var(--font-display); font-weight: 520; font-size: 1.02rem; line-height: 1.25; }
.hf-card .hf-kicker { color: var(--signal); font-size: 0.6rem; letter-spacing: 0.1em; text-transform: uppercase; }
.hf-card figcaption .mono:last-child { color: #9a97ad; font-size: 0.62rem; }

@media (prefers-reduced-motion: no-preference) {
  .hf-item { animation: hf-drift 11s ease-in-out infinite alternate; }
  .hf-b { animation-delay: -3.5s; animation-duration: 13s; }
  .hf-c { animation-delay: -7s; animation-duration: 12s; }
  .hf-card { animation-delay: -5s; }
  .intro-field.is-paused .hf-item { animation-play-state: paused; }
}
@keyframes hf-drift {
  from { translate: 0 -5px; }
  to   { translate: 0 7px; }
}

/* ============ Method ============ */

.method { padding: clamp(3.5rem, 9vh, 6.5rem) 0; border-top: 1px solid var(--line); }
.method .section-lede { font-size: 1.05rem; color: var(--ink-soft); max-width: 44em; margin: 1.2rem 0 2.6rem; }
.method-grid {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}
.method-grid h3 { font-size: 1.18rem; margin-bottom: 0.5rem; }
.method-num { color: var(--signal); font-size: 0.72rem; margin-right: 0.35rem; vertical-align: 0.35em; letter-spacing: 0.08em; }
.method-grid p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }

/* ============ Proof ============ */

.proof { padding: clamp(3rem, 8vh, 5.5rem) 0; background: var(--bg-deep); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.proof-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.2rem 2.6rem; margin: 0; }
.proof-grid dt { font-family: var(--font-display); font-size: clamp(1.35rem, 2.2vw, 1.8rem); font-weight: 580; letter-spacing: -0.01em; }
.proof-grid dd { margin: 0.35rem 0 0; color: var(--ink-soft); font-size: 0.92rem; max-width: 24em; }

/* ============ Selected work ============ */

.work { padding: clamp(3.5rem, 9vh, 6.5rem) 0 clamp(2.5rem, 6vh, 4rem); }
.work h2 { margin-bottom: 0.6rem; }
.project {
  display: grid;
  grid-template-columns: minmax(0, 58fr) minmax(0, 42fr);
  gap: clamp(1.6rem, 4vw, 3.4rem);
  align-items: center;
  padding: clamp(2.2rem, 6vh, 3.6rem) 0;
  border-bottom: 1px solid var(--line);
}
.project:last-of-type { border-bottom: 0; }
.project:nth-of-type(even) .project-media { order: 2; }
.project-media { border-radius: 12px; overflow: hidden; box-shadow: 0 16px 40px rgba(38, 35, 31, 0.14); }
.project-media img { width: 100%; }
.project-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: var(--line);
  box-shadow: 0 16px 40px rgba(38, 35, 31, 0.14);
  border-radius: 12px;
  overflow: hidden;
}
.project-pair img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
.project-media-card { box-shadow: none; overflow: visible; }
.metric-card, .story-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
  min-height: 300px;
  border-radius: 12px;
  padding: 2.4rem 2.6rem;
  box-shadow: 0 16px 40px rgba(38, 35, 31, 0.14);
}
.metric-card { background: #fff; border: 1px solid var(--line); }
.mc-kicker { color: var(--signal); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; }
.mc-big { font-family: var(--font-display); font-size: clamp(2rem, 4vw, 3rem); font-weight: 580; letter-spacing: -0.01em; }
.mc-row { display: flex; flex-wrap: wrap; gap: 1.4rem; color: var(--ink-soft); font-size: 0.9rem; }
.mc-row strong { color: var(--ink); }
.story-card { background: var(--future-deep); color: #e8e6f2; }
.sc-kicker { color: var(--signal); font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; }
.sc-title { font-family: var(--font-display); font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 520; line-height: 1.2; }
.sc-foot { color: #9a97ad; font-size: 0.7rem; letter-spacing: 0.06em; }
.project-cat { color: var(--signal); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; margin: 0 0 0.7rem; }
.project-body h3 { font-size: clamp(1.4rem, 2.4vw, 1.85rem); margin-bottom: 0.7rem; }
.project-body > p { color: var(--ink-soft); margin: 0 0 1.1rem; }
.project-facts { margin: 0 0 1rem; display: grid; gap: 0.45rem; }
.project-facts div { display: flex; gap: 0.8rem; align-items: baseline; }
.project-facts dt { font-family: var(--font-mono); color: var(--steel); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; min-width: 3.2rem; }
.project-facts dd { margin: 0; font-size: 0.92rem; }

/* ============ Handoff (threshold copy before the forest) ============ */

.handoff {
  padding: clamp(3.5rem, 10vh, 7rem) 0;
  background: var(--bg-deep);
  border-top: 1px solid var(--line);
  text-align: center;
}
.handoff .section-inner { max-width: 780px; }
.handoff h2 { margin: 0 auto 1.2rem; }
.handoff p { color: var(--ink-soft); max-width: 44em; margin: 0 auto 1rem; }
.handoff .cta-row { justify-content: center; margin-top: 1.6rem; }
.handoff-note { margin: 1.1rem 0 0; font-size: 0.7rem; letter-spacing: 0.05em; color: var(--steel); }

/* ============ Knife layer ============ */

.knife-layer {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  opacity: 0; /* journey.js fades it in at the forest threshold */
}
#knife-canvas { position: relative; z-index: 1; width: 100%; height: 100%; display: block; }

/* knife steps back while a project is open */
body.modal-open .knife-layer,
body.modal-open .wayfinder { opacity: 0.08 !important; transition: opacity 250ms ease; }

#knife-shadow {
  position: absolute;
  top: 0; left: 0;
  border-radius: 50%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(8, 10, 8, 0.8) 0%, rgba(8, 10, 8, 0.38) 45%, transparent 72%);
  filter: blur(6px);
  pointer-events: none;
  will-change: transform, opacity;
}

/* scene videos fade in over their poster stills once safely playing */
.scene-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 700ms ease;
}
.scene-video.is-playing { opacity: 1; }

/* ============ Forest threshold (Act Two opens) ============ */

.forest {
  position: relative;
  min-height: 195vh;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 9rem 6vw 0;
  overflow: hidden;
}

/* forest key art: fixed, viewport-sized `cover` so the knife anchor math
   (journey.js ANCHORS) matches exactly; journey.js drives its opacity */
.forest-art { position: fixed; inset: 0; z-index: 0; opacity: 0; visibility: hidden; }
.fo-base {
  position: absolute; inset: 0;
  background: #101b14 url('/assets/scene/hero-forest.jpg') center / cover no-repeat;
}
.fo-motes { position: absolute; inset: 0; overflow: hidden; }
.fo-motes i {
  position: absolute;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: rgba(255, 244, 205, 0.55);
  filter: blur(1px);
  animation: mote 9s ease-in-out infinite;
}
@keyframes mote {
  0%, 100% { transform: translate(0, 0); opacity: 0.15; }
  50% { transform: translate(14px, -26px); opacity: 0.75; }
}
.fo-vignette {
  position: absolute; inset: 0;
  background: radial-gradient(130% 100% at 50% 40%, transparent 62%, rgba(6, 10, 7, 0.6) 100%);
}

.forest-copy { position: relative; z-index: 1; max-width: 34rem; }
.forest .eyebrow {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #d9c9a3;
  margin: 0 0 1.5rem;
}
.forest h2 {
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 4.4vw, 3.8rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  font-weight: 560;
  color: #f6f2e7;
  margin: 0 0 1.3rem;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
  max-width: none;
}
.forest .sub { color: #ece5d2; font-size: 1.15rem; font-weight: 600; margin: 0 0 0.5rem; }
.forest .body { color: #cfc7b2; max-width: 46ch; line-height: 1.65; margin: 0 0 2.2rem; }

.scroll-hint {
  position: absolute;
  bottom: 2.2rem; left: 50%;
  transform: translateX(-50%);
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(240, 234, 216, 0.55);
  animation: pulse 2.4s ease-in-out infinite;
  transition: opacity 400ms ease;
  z-index: 1;
}
.scroll-hint.is-hidden { opacity: 0; }
@keyframes pulse { 0%, 100% { opacity: 0.45; } 50% { opacity: 1; } }

/* ============ Wayfinder (knife dock + chapter rail) ============ */

.wayfinder {
  position: fixed;
  right: 1.4rem;
  top: 50%;
  transform: translate(8px, -50%);
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 350ms ease, transform 350ms ease, visibility 0s linear 350ms;
}
.wayfinder.is-active {
  opacity: 1;
  visibility: visible;
  transform: translate(0, -50%);
  transition: opacity 350ms ease, transform 350ms ease;
}
.wayfinder-label {
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--steel);
  text-align: right;
  margin: 0 0 0.2rem;
}
.wf-btn {
  appearance: none;
  border: 0;
  background: none;
  padding: 0.15rem 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  color: var(--ink-soft);
  font: 500 0.72rem/1 var(--font-body);
}
.wf-btn .wf-name {
  opacity: 0;
  transform: translateX(4px);
  transition: opacity 200ms ease, transform 200ms ease;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  white-space: nowrap;
}
.wf-btn:hover .wf-name, .wf-btn:focus-visible .wf-name, .wf-btn[aria-current] .wf-name { opacity: 1; transform: none; }
.wf-btn .wf-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  border: 1.5px solid var(--ink-soft);
  background: transparent;
  flex: none;
  transition: background 200ms ease, border-color 200ms ease, transform 200ms ease;
}
.wf-btn[aria-current] .wf-dot { background: var(--oxblood); border-color: var(--oxblood); transform: scale(1.25); }
.wf-btn:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 6px; }

/* ============ Chapters ============ */

.chapters { position: relative; background: var(--bg); z-index: 1; }

.chapter {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  padding: 6.5rem 6vw;
  max-width: 110rem;
  margin: 0 auto;
}
/* the knife docks top-right as a wayfinder, so every chapter keeps its
   content column on the left and gives artifacts the width */
.chapter .ch-content { max-width: 46rem; justify-self: start; }

.ch-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--oxblood);
  margin: 0 0 1.2rem;
}
.chapter h2 {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 3.4vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.005em;
  font-weight: 580;
  margin: 0 0 0.6rem;
}
.ch-line {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 480;
  font-size: 1.3rem;
  line-height: 1.3;
  color: var(--oxblood);
  margin: 0 0 1rem;
}
.ch-body { color: var(--ink-soft); max-width: 58ch; line-height: 1.6; margin: 0 0 2.2rem; }

/* ----- artifacts: the largest visual element of every chapter ----- */

.artifacts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  max-width: 46rem;
}

.artifact {
  appearance: none;
  border: 1px solid var(--line);
  background: #fbf8f1;
  border-radius: 0.9rem;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  align-items: stretch;
  min-height: 6.4rem;
  font: inherit;
  color: inherit;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}
.artifact:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 34px -18px rgba(38, 35, 31, 0.45);
  border-color: var(--steel);
}
.artifact:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }

.artifact > img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 400ms ease; }
.artifact:hover > img { transform: scale(1.04); }

.artifact .pair { display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; }
.artifact .pair img { width: 100%; height: 100%; object-fit: cover; display: block; }

.a-meta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 0.3rem;
  padding: 0.9rem 1.1rem;
}
.a-meta strong { font-size: 0.95rem; letter-spacing: -0.005em; }
.a-meta .mono { font-size: 0.6rem; letter-spacing: 0.08em; color: var(--ink-soft); text-transform: uppercase; }

/* featured artifact: full row, media on top */
.artifact.is-featured {
  grid-column: 1 / -1;
  grid-template-columns: 1fr;
  grid-template-rows: minmax(15rem, 38vh) auto;
}
.artifact.is-featured > img, .artifact.is-featured .pair { grid-row: 1; min-height: 0; }
.artifact.is-featured .a-meta { flex-direction: row; align-items: baseline; justify-content: space-between; gap: 1rem; }

/* typographic cards */
.artifact.is-typo, .artifact.is-metrics, .artifact.is-press { grid-template-columns: 1fr; grid-template-rows: none; }
.artifact.is-typo .a-meta, .artifact.is-metrics .a-meta, .artifact.is-press .a-meta { display: none; }

.a-typo { display: flex; flex-direction: column; justify-content: center; gap: 0.45rem; padding: 1.1rem 1.2rem; }
.a-typo strong { font-size: 1.1rem; line-height: 1.25; letter-spacing: -0.005em; font-weight: 600; }
.a-kicker { font-family: var(--font-mono); font-size: 0.58rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--oxblood); }
.a-desc { font-size: 0.82rem; line-height: 1.45; color: var(--ink-soft); }

.artifact.is-dark { background: #2a2622; border-color: #423c34; color: #f0ebdf; }
.artifact.is-dark .a-desc { color: #b3aa97; }
.artifact.is-dark .a-kicker { color: #d98d77; }

.artifact.is-metrics.is-featured { grid-template-rows: none; }
.artifact.is-metrics .a-typo { padding: 1.6rem 1.6rem; }
.artifact.is-metrics .metric strong { font-size: 1.35rem; color: var(--oxblood); display: block; letter-spacing: -0.01em; }
.artifact.is-metrics .metric span { font-size: 0.68rem; color: var(--ink-soft); }
.artifact.is-metrics .metric-row { display: flex; gap: 1rem; margin-top: 0.4rem; }
.artifact.is-metrics .metric-row .metric strong { font-size: 0.95rem; }

.artifact.is-press .a-typo strong { font-style: italic; font-weight: 550; }

/* ============ About / current direction ============ */

.why { position: relative; background: var(--bg-deep); padding: 9rem 1.5rem; z-index: 1; }
.why-inner { max-width: 38rem; margin: 0 auto; }
.why h2 { font-family: var(--font-display); font-size: clamp(2rem, 3.2vw, 2.75rem); line-height: 1.1; letter-spacing: -0.005em; font-weight: 570; margin: 0 0 1.5rem; max-width: none; }
.why p { max-width: 58ch; line-height: 1.65; margin: 0 0 1.1rem; }

/* ============ Finale ============ */

.finale {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  padding: 8rem 6vw;
  overflow: hidden;
  color: #e8e6f2;
  z-index: 1;
}
.finale-art { position: absolute; inset: 0; z-index: 0; }
.fa-base { position: absolute; inset: 0; background: #0b0e1a url('/assets/scene/finale-future.jpg') center / cover no-repeat; }
.fa-stars { position: absolute; inset: 0; overflow: hidden; }
.fa-stars i { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: rgba(210, 222, 255, 0.8); animation: pulse 4s ease-in-out infinite; }
.fa-vignette { position: absolute; inset: 0; background: radial-gradient(110% 90% at 50% 45%, transparent 55%, rgba(2, 3, 8, 0.8) 100%); }

.finale-copy { position: relative; z-index: 1; max-width: 32rem; }
.finale h2 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4.6vw, 3.9rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  font-weight: 560;
  margin: 0 0 1rem;
  color: #f0eefb;
  max-width: none;
}
.finale .body { color: #b9bdd8; max-width: 46ch; line-height: 1.65; margin: 0 0 1.2rem; }
.finale .finale-line {
  font-family: var(--font-display);
  font-weight: 520;
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  color: #f0eefb;
  margin: 0 0 2.2rem;
}

/* ============ Footer (revealed only at the end) ============ */

.site-footer { background: #05070f; color: #8f93ad; padding: 2.6rem 2rem 2rem; }
.f-id { text-align: center; margin-bottom: 1.2rem; }
.f-id strong { display: block; color: #e8e6f2; font-family: var(--font-display); font-weight: 540; font-size: 1.05rem; }
.f-id span { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: #8f93ad; }
.f-nav { display: flex; flex-wrap: wrap; gap: 1.6rem; justify-content: center; margin-bottom: 1.4rem; }
.f-nav a { color: #b9bdd8; text-decoration: none; font-size: 0.82rem; }
.f-nav a:hover { color: #fff; }
.f-credit { display: flex; flex-wrap: wrap; gap: 0.4rem 2rem; justify-content: space-between; font-size: 0.62rem; }
.f-credit a { color: inherit; }

/* ============ Modal ============ */

.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 1.5rem; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(20, 17, 13, 0.55); backdrop-filter: blur(4px); }
.modal-card {
  position: relative;
  background: var(--bg);
  border-radius: 1rem;
  max-width: 46rem;
  width: 100%;
  max-height: 86vh;
  overflow: auto;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.5);
  animation: modal-in 320ms cubic-bezier(.22, .9, .3, 1) both;
}
@keyframes modal-in { from { opacity: 0; transform: translateY(14px) scale(0.985); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .modal-card { animation: none; } }

.modal-close {
  position: absolute;
  top: 0.7rem; right: 0.7rem;
  z-index: 2;
  appearance: none;
  border: 0;
  background: rgba(38, 35, 31, 0.75);
  color: var(--bg);
  width: 2.1rem; height: 2.1rem;
  border-radius: 50%;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}
.modal-close:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
.modal-media img { width: 100%; max-height: 46vh; object-fit: cover; display: block; }
.modal-media:empty { display: none; }
.modal-body { padding: 1.6rem 1.8rem 1.8rem; }
.modal-body h3 { font-family: var(--font-display); font-weight: 570; margin: 0 0 0.6rem; font-size: 1.65rem; line-height: 1.15; }
.modal-body p { color: var(--ink-soft); margin: 0 0 1rem; }
.modal-facts { display: grid; grid-template-columns: auto 1fr; gap: 0.3rem 1.2rem; margin: 0 0 1rem; }
.modal-facts dt { font-family: var(--font-mono); font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--steel); align-self: baseline; }
.modal-facts dd { margin: 0; font-size: 0.88rem; }
.modal-note { font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--steel); margin: 0; }

/* ============ Reduced motion ============ */

@media (prefers-reduced-motion: reduce) {
  .fo-motes i, .fa-stars i, .scroll-hint { animation: none; }
  .artifact, .artifact img, .cta { transition: none; }
}

/* ============ Responsive ============ */

@media (max-width: 1000px) {
  .intro { grid-template-columns: 1fr; min-height: 0; gap: 3.4rem; }
  .intro-field { min-height: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
  .intro-field .hf-item { position: static; width: auto; transform: none; aspect-ratio: 4 / 3; }
  .intro-field .hf-card { aspect-ratio: auto; display: flex; align-items: center; }
  .method-grid { grid-template-columns: 1fr 1fr; }
  .proof-grid { grid-template-columns: 1fr 1fr; }
  .project { grid-template-columns: 1fr; gap: 1.6rem; }
  .project:nth-of-type(even) .project-media { order: 0; }
}

@media (max-width: 900px) {
  .site-nav, .header-cta { display: none; }
  .menu-toggle { display: flex; }
  .site-header { padding: 0.8rem 1.25rem; }

  .forest { min-height: 165vh; padding-top: 7.5rem; }
  .fo-base, .fa-base { background-position: 62% center; }

  .chapter { padding: 5.5rem 1.25rem 3rem; min-height: 0; }
  /* headroom for the small docked knife above the content */
  .chapter .ch-content { padding-top: 28vh; }
  .artifacts { max-width: none; grid-template-columns: 1fr; }
  .artifact.is-featured { grid-template-rows: minmax(11rem, 30vh) auto; }

  .wayfinder { right: 0.7rem; }
  .wf-btn .wf-name { display: none; }

  .why { padding: 6rem 1.25rem; }
  .finale-copy { margin-top: 26vh; }
  .f-credit { justify-content: center; text-align: center; }
}

@media (max-width: 700px) {
  .section-inner { padding: 0 1.4rem; }
  .intro { padding-left: 1.4rem; padding-right: 1.4rem; }
  .intro-field { grid-template-columns: 1fr; }
  .intro-field .hf-a { aspect-ratio: 16 / 9; }
  .method-grid { grid-template-columns: 1fr; }
  .proof-grid { grid-template-columns: 1fr; gap: 1.6rem; }
  .project-pair { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .artifact { grid-template-columns: 6.5rem 1fr; }
  .artifact.is-featured, .artifact.is-typo, .artifact.is-metrics, .artifact.is-press { grid-template-columns: 1fr; }
}
