/* ==========================================================================
   Questline Studios — site styles
   Tokens are taken from the Questline seal (navy halves + gold) and an
   atlas-paper ground. One accent (gold), used sparingly.
   ========================================================================== */

/* Self-hosted fonts (latin subset, SIL Open Font License) */
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../fonts/fraunces-roman.woff2") format("woff2"); }
@font-face { font-family: "Fraunces"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/fraunces-italic.woff2") format("woff2"); }
@font-face { font-family: "Inter Tight"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("../fonts/inter-tight.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/plex-mono-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/plex-mono-500.woff2") format("woff2"); }

:root {
  /* Colour */
  --paper: #F4EEE0;      /* page ground */
  --paper-deep: #EAE1CC; /* alternate section ground */
  --ink: #0E1B2C;        /* body text */
  --navy: #02386A;       /* seal, dark half */
  --navy-2: #044486;     /* seal, light half */
  --gold: #E9D17B;       /* seal ring — accent, fills + text on navy only */
  --brass: #6E5310;      /* small accent text on paper (AA on --paper) */
  --rule: #CDBF9F;       /* hairlines on paper */
  --muted: #4A5566;      /* secondary text on paper */

  /* Type */
  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.5rem, 1.25rem + 1vw, 2rem);
  --step-3: clamp(2rem, 1.5rem + 2vw, 3.1rem);
  --step-4: clamp(2.5rem, 1.55rem + 4.2vw, 5.4rem);

  /* Space */
  --gutter: 20px;
  --max: 1240px;
  --section: clamp(4rem, 3rem + 5vw, 8rem);

  --radius: 3px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

@media (min-width: 768px) { :root { --gutter: 40px; } }

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  font-feature-settings: "ss01", "cv11";
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  font-optical-sizing: auto;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

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

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--navy-2);
  outline-offset: 3px;
  border-radius: 2px;
}
.on-navy :focus-visible { outline-color: var(--gold); }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--paper);
  padding: 10px 14px; border-radius: var(--radius);
}
.skip-link:focus { top: 12px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

/* Utility face: labels, file numbers, dates, statuses */
.label {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brass);
}
.on-navy .label { color: var(--gold); }

.lede { font-size: var(--step-1); line-height: 1.55; max-width: 36ch; }

/* --------------------------------------------------------------------------
   Header + navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  border-bottom: 1px solid var(--rule);
}
@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .site-header { background: var(--paper); }
}

.site-header__bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 68px;
}

.brand {
  display: inline-flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--navy);
  min-height: 44px;
}
.brand img { width: 46px; height: auto; }
.brand__name {
  font-family: var(--font-display);
  font-weight: 700; font-size: 1.125rem; letter-spacing: 0.01em; line-height: 1;
}
.brand__name span { display: block; font-family: var(--font-mono); font-weight: 500; font-size: 0.6875rem; letter-spacing: 0.22em; color: var(--brass); margin-top: 4px; }

.nav-toggle {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px; min-width: 44px; padding: 0 14px;
  background: transparent; color: var(--ink);
  border: 1px solid var(--ink); border-radius: var(--radius);
  font: 500 0.875rem/1 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase;
  cursor: pointer;
}
.nav-toggle__icon { width: 18px; height: 12px; position: relative; }
.nav-toggle__icon::before, .nav-toggle__icon::after {
  content: ""; position: absolute; left: 0; right: 0; height: 2px; background: currentColor;
  transition: transform .25s var(--ease), top .25s var(--ease);
}
.nav-toggle__icon::before { top: 1px; }
.nav-toggle__icon::after { top: 9px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__icon::before { top: 5px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__icon::after { top: 5px; transform: rotate(-45deg); }

.site-nav { display: none; }
.site-nav.is-open {
  display: block;
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  box-shadow: 0 18px 30px -24px rgba(14, 27, 44, .45);
}
.site-nav ul { list-style: none; margin: 0; padding: 8px var(--gutter) 20px; }
.site-nav a {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 52px; padding: 4px 0;
  font-family: var(--font-display); font-size: 1.5rem; font-weight: 500;
  text-decoration: none; border-bottom: 1px solid var(--rule);
}
.site-nav a[aria-current="page"] { color: var(--navy-2); }
.site-nav a[aria-current="page"]::after { content: "●"; font-size: .6rem; color: var(--brass); }

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .site-nav, .site-nav.is-open { display: block; position: static; background: none; border: 0; box-shadow: none; }
  .site-nav ul { display: flex; gap: 6px; padding: 0; }
  .site-nav a {
    min-height: 44px; padding: 0 14px; border: 0;
    font-family: var(--font-body); font-size: 0.9375rem; font-weight: 500;
    position: relative;
  }
  .site-nav a::before {
    content: ""; position: absolute; left: 14px; right: 14px; bottom: 8px; height: 2px;
    background: var(--gold); transform: scaleX(0); transform-origin: left;
    transition: transform .3s var(--ease);
  }
  .site-nav a:hover::before, .site-nav a[aria-current="page"]::before { transform: scaleX(1); }
  .site-nav a[aria-current="page"] { color: var(--ink); }
  .site-nav a[aria-current="page"]::after { content: none; }
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  font: 600 0.9375rem/1 var(--font-body); letter-spacing: 0.01em;
  text-decoration: none; border-radius: var(--radius);
  border: 1.5px solid var(--navy);
  transition: background-color .2s, color .2s, transform .2s var(--ease);
}
.btn--primary { background: var(--navy); color: #fff; }
.btn--primary:hover { background: var(--ink); border-color: var(--ink); }
.btn--ghost { background: transparent; color: var(--navy); }
.btn--ghost:hover { background: var(--navy); color: #fff; }
.btn--gold { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.btn--gold:hover { background: #F3E3A6; }
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

.text-link {
  font-weight: 600; color: var(--navy-2);
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
}
.on-navy .text-link { color: var(--gold); }

/* --------------------------------------------------------------------------
   Hero (home)
   -------------------------------------------------------------------------- */
.hero { padding-top: clamp(2.5rem, 2rem + 4vw, 6rem); padding-bottom: clamp(3rem, 2rem + 4vw, 6rem); overflow: hidden; }
.hero__grid { display: grid; gap: 40px; align-items: center; }
.hero__title { font-size: var(--step-4); font-weight: 600; letter-spacing: -0.03em; line-height: 1.02; margin-top: 18px; max-width: 13ch; }
.hero__title em { font-style: italic; font-weight: 400; color: var(--navy-2); }
.hero__body { margin-top: 26px; font-size: var(--step-1); max-width: 40ch; color: var(--ink); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; margin-top: 32px; }
.hero__seal { justify-self: center; width: min(76vw, 360px); }
.hero__seal img { width: 100%; }

@media (min-width: 900px) {
  .hero__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; }
  .hero__seal { width: 100%; max-width: 520px; justify-self: end; margin-right: -24px; }
}

/* "Next release" dispatch strip */
.dispatch { border-block: 1px solid var(--ink); }
.dispatch__inner {
  display: grid; gap: 6px 24px; padding-block: 16px;
  align-items: baseline;
}
.dispatch__text { font-family: var(--font-display); font-size: var(--step-1); font-weight: 500; }
.dispatch__text a { text-decoration-color: var(--gold); text-decoration-thickness: 2px; }
@media (min-width: 768px) {
  .dispatch__inner { grid-template-columns: auto 1fr auto; }
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
.section { padding-block: var(--section); }
.section--deep { background: var(--paper-deep); }
.section--navy { background: var(--navy); color: #F7F2E6; }
.section--navy h2, .section--navy h3 { color: #fff; }

.section-head { display: grid; gap: 14px; margin-bottom: clamp(2.5rem, 2rem + 2vw, 4rem); }
.section-head h2 { font-size: var(--step-3); max-width: 18ch; }
.section-head p:not(.label) { max-width: 52ch; color: var(--muted); }
.section--navy .section-head p:not(.label) { color: #C9D4E3; }
@media (min-width: 900px) {
  .section-head--split { grid-template-columns: 5fr 7fr; align-items: end; gap: 56px; }
  .section-head--split p { justify-self: start; }
}

/* --------------------------------------------------------------------------
   The questline route (signature element)
   Solid line = shipped, dashed = in development, branch = side quest.
   -------------------------------------------------------------------------- */
.route { list-style: none; margin: 0; padding: 0; position: relative; }

.waypoint {
  position: relative;
  display: grid; gap: 10px;
  padding: 0 0 clamp(2.75rem, 2rem + 2.5vw, 4.5rem) 44px;
}
/* the line */
.waypoint::before {
  content: ""; position: absolute; left: 11px; top: 26px; bottom: -2px; width: 0;
  border-left: 2px solid var(--navy);
  transform-origin: top;
}
.waypoint--dev::before { border-left-style: dashed; border-left-color: var(--navy-2); }
.waypoint:last-child::before { display: none; }
/* the marker */
.waypoint__marker {
  position: absolute; left: 0; top: 2px;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--navy);
  display: grid; place-items: center;
}
.waypoint__marker::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 1px var(--navy); }
.waypoint--dev .waypoint__marker { border-style: dashed; border-color: var(--navy-2); }
.waypoint--dev .waypoint__marker::after { background: transparent; box-shadow: inset 0 0 0 2px var(--navy-2); }

.waypoint .status::before { display: none; } /* the route marker already carries the state */
.waypoint__status { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; }
.waypoint__title { font-size: var(--step-2); }
.waypoint__title a { text-decoration: none; }
.waypoint__title a:hover { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 3px; }
.waypoint__body { max-width: 60ch; color: var(--ink); }
.waypoint__meta { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--muted); letter-spacing: .02em; display: flex; flex-wrap: wrap; gap: 0 12px; }
.waypoint__aside { display: none; }
/* Every project mark sits in the same frame, so seals and wordmarks share one centre line and one height */
.mark { display: block; width: 100%; height: 150px; object-fit: contain; }

/* the side-quest branch */
.waypoint--side { margin-left: 11px; padding-left: 80px; padding-bottom: 0; }
.waypoint--side::before { display: none; }
.waypoint--side .waypoint__branch {
  position: absolute; left: 0; top: -40px; width: 42px; height: 54px;
  border-left: 2px dashed var(--navy-2); border-bottom: 2px dashed var(--navy-2);
  border-bottom-left-radius: 18px;
}
.waypoint--side .waypoint__marker { left: 42px; transform: translateX(-2px); border-radius: 3px; rotate: 45deg; width: 20px; height: 20px; top: 4px; }
.waypoint--side .waypoint__marker::after { rotate: -45deg; }

@media (min-width: 900px) {
  .waypoint { grid-template-columns: 200px minmax(0, 1fr) minmax(0, 280px); gap: 8px 40px; padding-left: 56px; align-items: start; }
  .waypoint::before { left: 11px; }
  .waypoint__status { grid-column: 1; grid-row: 1 / span 3; flex-direction: column; gap: 8px; padding-top: 6px; }
  .waypoint__title, .waypoint__body, .waypoint__meta, .waypoint__more { grid-column: 2; }
  .waypoint__aside { grid-column: 3; grid-row: 1 / span 4; }
  .waypoint--side { padding-left: 80px; }
  .waypoint__meta { flex-direction: column; }
  .waypoint__aside { display: block; }
}

/* motion: draw the route once when it scrolls into view */
@media (prefers-reduced-motion: no-preference) {
  .js .route .waypoint::before { transform: scaleY(0); transition: transform 1.1s var(--ease); }
  .js .route.is-drawn .waypoint::before { transform: scaleY(1); }
  .js .route .waypoint:nth-child(2)::before { transition-delay: .25s; }
  .js .route .waypoint:nth-child(3)::before { transition-delay: .5s; }
  .js .route .waypoint__marker { opacity: 0; transform: scale(.6); transition: opacity .4s, transform .4s var(--ease); }
  .js .route.is-drawn .waypoint__marker { opacity: 1; transform: none; }
  .js .route.is-drawn .waypoint:nth-child(2) .waypoint__marker { transition-delay: .3s; }
  .js .route.is-drawn .waypoint:nth-child(3) .waypoint__marker { transition-delay: .6s; }
  .js .route.is-drawn .waypoint:nth-child(4) .waypoint__marker { transition-delay: .9s; }
  .js .route .waypoint--side .waypoint__marker { transform: scale(.6); }
  .js .route.is-drawn .waypoint--side .waypoint__marker { transform: none; }
}

/* Status chips — text first, colour second */
.status {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 0.75rem; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink);
}
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--navy); }
.status--out::before { background: var(--gold); box-shadow: 0 0 0 1.5px var(--navy); }
.status--soon::before { background: var(--navy-2); }
.status--dev::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--navy-2); }
.status--side::before { border-radius: 1px; rotate: 45deg; background: transparent; box-shadow: inset 0 0 0 1.5px var(--navy-2); }
.on-navy .status { color: #F7F2E6; }
.on-navy .status::before { box-shadow: inset 0 0 0 1.5px var(--gold); }
.on-navy .status--out::before { background: var(--gold); }

/* --------------------------------------------------------------------------
   Graphic placeholders — hatched like the seal's oceans
   -------------------------------------------------------------------------- */
.ph {
  margin: 0; position: relative;
  aspect-ratio: var(--ratio, 4 / 3);
  border: 1.5px dashed color-mix(in srgb, var(--navy) 55%, transparent);
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(135deg, transparent 0 9px, color-mix(in srgb, var(--navy) 9%, transparent) 9px 11px),
    var(--paper);
  display: grid; place-items: end start;
  overflow: hidden;
}
.ph__inner { padding: 14px 16px; display: grid; gap: 4px; background: var(--paper); border-top-right-radius: var(--radius); max-width: 92%; }
.ph__id { font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 500; letter-spacing: .1em; color: var(--brass); }
.ph__name { font-weight: 600; font-size: 0.9375rem; line-height: 1.3; }
.ph__spec { font-family: var(--font-mono); font-size: 0.6875rem; color: var(--muted); line-height: 1.4; }
.on-navy .ph { background: repeating-linear-gradient(135deg, transparent 0 9px, rgba(233, 209, 123, .14) 9px 11px), var(--navy); border-color: rgba(233, 209, 123, .55); }
.on-navy .ph__inner { background: var(--navy); }
.on-navy .ph__name { color: #fff; }
.on-navy .ph__id { color: var(--gold); }
.on-navy .ph__spec { color: #C9D4E3; }

/* --------------------------------------------------------------------------
   Real images
   -------------------------------------------------------------------------- */
.cover {
  width: 100%; aspect-ratio: 2 / 3; object-fit: cover;
  border-radius: 1px 3px 3px 1px;
  box-shadow: 0 1px 0 rgba(14, 27, 44, .2), 6px 10px 18px -12px rgba(14, 27, 44, .6);
}
.portrait { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); }
.shot { width: 100%; border: 1px solid var(--rule); border-radius: var(--radius); background: #fff; }

/* Fanned covers (Projects page): three real covers, stacked, that fan out once in view */
.fan { position: relative; aspect-ratio: 7 / 5; }
.fan__book {
  position: absolute; left: 50%; bottom: 7%; width: 31%;
  aspect-ratio: 2 / 3; object-fit: cover;
  border-radius: 2px 4px 4px 2px;
  box-shadow: 0 0 0 1px rgba(14, 27, 44, .14), 0 18px 28px -16px rgba(14, 27, 44, .6);
  transform-origin: 50% 100%;
  transition: transform .9s var(--ease);
}
.fan__book--left   { transform: translateX(-124%) rotate(-12deg); }
.fan__book--right  { transform: translateX(24%) rotate(12deg); }
.fan__book--centre { transform: translateX(-50%) translateY(-4%); }
@media (hover: hover) {
  .fan:hover .fan__book--left   { transform: translateX(-128%) rotate(-14deg); }
  .fan:hover .fan__book--right  { transform: translateX(28%) rotate(14deg); }
  .fan:hover .fan__book--centre { transform: translateX(-50%) translateY(-7%); }
}
@media (prefers-reduced-motion: no-preference) {
  .js .fan:not(.is-drawn) .fan__book { transform: translateX(-50%) rotate(0deg); }
  .js .fan.is-drawn .fan__book--left  { transition-delay: .1s; }
  .js .fan.is-drawn .fan__book--right { transition-delay: .2s; }
}
.inset { margin: 32px 0 0; }
.inset figcaption, .prose figcaption { margin-top: 10px; font-family: var(--font-mono); font-size: .8125rem; color: var(--muted); letter-spacing: .02em; }
.prose img { width: 100%; border: 1px solid var(--rule); border-radius: var(--radius); background: #fff; }
.post-foot { margin-top: 3em; padding-top: 1.25em; border-top: 1px solid var(--rule); }

/* --------------------------------------------------------------------------
   The shelf (Puzzle Shelf books)
   -------------------------------------------------------------------------- */
.shelf { list-style: none; margin: 0; padding: 0; display: grid; gap: 36px 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.book { display: grid; gap: 12px; align-content: start; }
.book__cover { position: relative; }
.book__cover::after { /* the shelf edge */
  content: ""; position: absolute; left: -10px; right: -10px; bottom: -8px; height: 8px;
  background: var(--gold); border-radius: 1px;
}
.book__cover .ph { --ratio: 2 / 3; }
.book h3 { font-size: 1.1875rem; line-height: 1.2; margin-top: 12px; }
.book p { font-size: 0.9375rem; color: #C9D4E3; }
@media (min-width: 900px) {
  .shelf { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 28px; }
}
.shelf-foot { margin-top: clamp(3rem, 2rem + 3vw, 4.5rem); display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; border-top: 1px solid rgba(233, 209, 123, .35); padding-top: 24px; }
.shelf-foot img { width: 110px; }

/* --------------------------------------------------------------------------
   About teaser / split media
   -------------------------------------------------------------------------- */
.split { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) {
  .split { grid-template-columns: 5fr 7fr; gap: 72px; }
  .split--flip { grid-template-columns: 7fr 5fr; }
  .split--flip > :first-child { order: 2; }
}
.split h2 { font-size: var(--step-3); margin-bottom: 22px; }
/* --------------------------------------------------------------------------
   Journal list
   -------------------------------------------------------------------------- */
.posts { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.post-row { border-bottom: 1px solid var(--rule); }
.post-row a {
  display: grid; gap: 8px; padding: 26px 0; text-decoration: none;
}
.post-row h2, .post-row h3 { font-size: var(--step-2); transition: color .2s; }
.post-row p { color: var(--muted); max-width: 62ch; }
.post-row a:hover :is(h2, h3) { color: var(--navy-2); text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 3px; text-underline-offset: .15em; }
@media (min-width: 900px) {
  .post-row a { grid-template-columns: 200px 1fr; gap: 8px 40px; padding: 32px 0; }
  .post-row .label { padding-top: 10px; grid-row: 1 / span 2; }
}

/* --------------------------------------------------------------------------
   Contact band
   -------------------------------------------------------------------------- */
.contact-band { padding-block: clamp(3.5rem, 3rem + 3vw, 6rem); }
.contact-band__grid { display: grid; gap: 28px; align-items: end; }
.contact-band h2 { font-size: var(--step-3); max-width: 20ch; }
@media (min-width: 900px) { .contact-band__grid { grid-template-columns: 1fr auto; } }

/* --------------------------------------------------------------------------
   Page header (inner pages)
   -------------------------------------------------------------------------- */
.page-head { padding-top: clamp(2.5rem, 2rem + 3vw, 5rem); padding-bottom: clamp(2rem, 1.5rem + 2vw, 3.5rem); border-bottom: 1px solid var(--ink); }
.page-head h1 { font-size: var(--step-4); margin-top: 16px; max-width: 16ch; }
.page-head .lede { margin-top: 22px; max-width: 46ch; }
.page-head__grid { display: grid; gap: 32px; align-items: end; }
@media (min-width: 900px) { .page-head__grid { grid-template-columns: minmax(0, 1fr) auto; } }
.page-head__mark { width: 160px; height: auto; }
@media (min-width: 900px) { .page-head__mark { width: 200px; } }
.page-head__mark--wide { width: min(100%, 300px); }
@media (min-width: 900px) { .page-head__mark--wide { width: 380px; } }

.breadcrumb { font-family: var(--font-mono); font-size: 0.8125rem; letter-spacing: .04em; color: var(--muted); }
.breadcrumb a { color: var(--muted); display: inline-block; padding-block: 12px; }
.breadcrumb span[aria-hidden] { margin-inline: 8px; }
.on-navy .breadcrumb, .on-navy .breadcrumb a { color: #C9D4E3; }

/* Prose (journal posts, long copy) */
.prose { max-width: 66ch; font-size: 1.125rem; line-height: 1.7; }
.prose h2 { font-size: var(--step-2); margin: 2.2em 0 .6em; }
.prose h3 { font-size: var(--step-1); margin: 1.8em 0 .5em; }
.prose ul, .prose ol { padding-left: 1.25em; margin: 0 0 1em; }
.prose li { margin-bottom: .4em; }
.prose li::marker { color: var(--brass); }
.prose blockquote { margin: 1.6em 0; }
.prose figure { margin: 2em 0; }

/* Fact list (definition-style) */
.facts { display: grid; gap: 0; margin: 0; border-top: 1px solid var(--ink); }
.facts div { display: grid; gap: 4px; padding: 16px 0; border-bottom: 1px solid var(--rule); }
.facts dt { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--brass); }
.facts dd { margin: 0; font-weight: 500; }
@media (min-width: 600px) { .facts div { grid-template-columns: 180px 1fr; gap: 24px; } }

/* Steps — only used where the content is a real sequence */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; gap: 0; border-top: 1px solid var(--ink); }
.steps li { counter-increment: step; display: grid; grid-template-columns: 56px 1fr; gap: 4px 16px; padding: 22px 0; border-bottom: 1px solid var(--rule); }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-mono); font-weight: 500; font-size: .9375rem; color: var(--brass);
  grid-row: 1 / span 2; padding-top: 4px;
}
.steps h3 { font-size: 1.3125rem; }
.steps p { color: var(--muted); max-width: 58ch; }
.on-navy .steps { border-top-color: var(--gold); }
.on-navy .steps li { border-bottom-color: rgba(233, 209, 123, .3); }
.on-navy .steps li::before { color: var(--gold); }
.on-navy .steps p { color: #C9D4E3; }

/* Project index (work page) */
.project { display: grid; gap: 28px; padding-block: clamp(3rem, 2rem + 3vw, 5rem); border-bottom: 1px solid var(--rule); }
.project:first-child { padding-top: 0; }
.project h2 { font-size: var(--step-3); margin: 12px 0 18px; }
.project p { max-width: 56ch; }
.project .ph { --ratio: 4 / 3; }
@media (min-width: 900px) {
  .project { grid-template-columns: 6fr 5fr; gap: 64px; align-items: center; }
  .project:nth-child(even) > :first-child { order: 2; }
}

/* Book entries: small cover beside the copy, always the same side */
.project--book { grid-template-columns: minmax(0, 1fr); align-items: start; }
.project--book .ph, .project--book .cover { width: min(100%, 260px); }
.project--book:first-of-type { padding-top: 0; }
@media (min-width: 700px) {
  .project--book, .project--book:nth-child(n) { grid-template-columns: 240px minmax(0, 1fr); gap: 48px; align-items: start; }
  .project--book:nth-child(n) > :first-child { order: 0; }
  .project--book .ph, .project--book .cover { width: 100%; }
}
@media (min-width: 900px) {
  .project--book, .project--book:nth-child(n) { grid-template-columns: 280px minmax(0, 1fr); gap: 64px; }
}

/* Split with a heading column that stays at the top */
@media (min-width: 900px) {
  .split--top { align-items: start; }
  .split--top > :first-child { position: sticky; top: 110px; }
}

/* Theme tiles (Crack the Card) */
.themes { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.themes h3 { font-size: 1.25rem; margin: 14px 0 6px; }
.themes p { color: var(--muted); font-size: .9375rem; }

/* --------------------------------------------------------------------------
   ADRA page: case-file treatment (black ink on paper, stamped labels)
   -------------------------------------------------------------------------- */
.casefile {
  background: #FBF8F0; border: 1px solid #1A1A1A; border-radius: 2px;
  padding: clamp(20px, 4vw, 44px);
  position: relative;
  box-shadow: 8px 8px 0 -1px var(--paper-deep), 8px 8px 0 0 #1A1A1A;
}
.casefile__head { display: grid; gap: 12px; border-bottom: 2px solid #1A1A1A; padding-bottom: 18px; margin-bottom: 24px; }
@media (min-width: 700px) { .casefile__head { grid-template-columns: 1fr auto; align-items: end; } }
.casefile .label { color: #1A1A1A; }
.stamp {
  display: inline-block; font-family: var(--font-mono); font-weight: 500; font-size: .8125rem;
  letter-spacing: .14em; text-transform: uppercase;
  color: #8E1B12; border: 2px solid #8E1B12; padding: 6px 10px; rotate: -3deg;
}
.casefile .facts { border-top: 0; }
.casefile .facts dt { color: #1A1A1A; }
.redact { background: #1A1A1A; color: #1A1A1A; border-radius: 1px; padding: 0 .2em; user-select: none; }

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */
.form { display: grid; gap: 22px; max-width: 640px; }
.field { display: grid; gap: 8px; }
.field label, .field legend { font-weight: 600; font-size: .9375rem; }
.field .hint { font-size: .875rem; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 50px; padding: 12px 14px;
  font: 400 1rem/1.4 var(--font-body); color: var(--ink);
  background: #FFFDF7; border: 1.5px solid #8C8270; border-radius: var(--radius);
}
.field textarea { min-height: 180px; resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--navy-2); outline-offset: 1px; border-color: var(--navy-2); }
.field--hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: .875rem; color: var(--muted); }
.notice { padding: 16px 18px; border-left: 4px solid var(--navy); background: var(--paper-deep); margin-bottom: 28px; }
.notice--error { border-left-color: #8E1B12; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer { background: var(--ink); color: #D5DCE6; padding-block: clamp(3rem, 2rem + 3vw, 5rem) 32px; }
.site-footer a { color: #fff; text-decoration: none; display: inline-block; padding-block: 8px; }
.site-footer a:hover { text-decoration: underline; text-decoration-color: var(--gold); }
.footer-grid { display: grid; gap: 36px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.footer-grid .footer-brand { grid-column: 1 / -1; }
.footer-brand img { width: 84px; margin-bottom: 16px; }
.footer-brand p { max-width: 34ch; }
.site-footer h2 { font-family: var(--font-mono); font-size: .75rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.footer-base { margin-top: 48px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .14); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; font-size: .875rem; color: #A9B4C4; }
@media (min-width: 900px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .footer-grid .footer-brand { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
}
