/* ============================================================
   Herbison Memorial — shared layout
   ------------------------------------------------------------
   RULE: no colour, font or texture is hardcoded in this file.
   Every visual value comes from a theme's custom properties.
   A theme = tokens-del.css or tokens-janis.css. Nothing else.
   ============================================================ */

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--base-size);
  line-height: var(--leading);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
  line-height: 1.12;
  margin: 0 0 .5em;
  color: var(--ink);
}
h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; max-width: var(--measure); }

/* ---------- shell ---------- */

.wrap {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 24px;
}

.skip {
  position: absolute; left: -9999px;
}
.skip:focus {
  left: 16px; top: 16px; z-index: 99;
  background: var(--card-bg); color: var(--ink);
  padding: 10px 16px; border-radius: var(--radius);
  border: 1px solid var(--accent);
}

/* ---------- nav ---------- */

.nav {
  position: sticky; top: 0; z-index: 20;
  background: var(--nav-bg);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--hairline);
}
.nav .wrap {
  display: flex; align-items: center; gap: var(--gap);
  min-height: 62px;
}
.nav-mark {
  font-family: var(--font-display);
  font-size: 1.12rem;
  letter-spacing: .02em;
  margin-right: auto;
  white-space: nowrap;
}
.nav-mark .dot { color: var(--accent); }
.nav ul {
  display: flex; flex-wrap: wrap; gap: 4px 16px;
  list-style: none; margin: 0; padding: 0;
}
.nav a { text-decoration: none; font-size: .88rem; }
.nav a:hover { color: var(--accent); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 9px;
  min-height: var(--tap);
  padding: 11px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--ink);
  font: inherit; font-size: .94rem;
  cursor: pointer;
  transition: background .18s ease, color .18s ease;
}
.btn:hover { background: var(--accent); color: var(--accent-ink); }
.btn--solid { background: var(--accent); color: var(--accent-ink); }
.btn--solid:hover { filter: brightness(1.06); }
.btn--ghost { border-color: var(--hairline-strong); }
.btn--icon { padding: 11px 14px; }

/* ---------- hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--hero-bg);
  color: var(--hero-ink);
  isolation: isolate;
}
.hero-texture {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: var(--texture-opacity);
  pointer-events: none;
  z-index: -1;
}
.hero .wrap {
  display: grid;
  gap: var(--gap);
  grid-template-columns: var(--hero-columns);
  align-items: center;
  min-height: var(--hero-min-h);
  padding-top: 60px; padding-bottom: 60px;
}
/* headings and buttons inside the hero take the hero's own ink, never the page ink */
.hero h1, .hero h2, .hero h3, .hero h4 { color: var(--hero-ink); }
.hero h1 { margin-bottom: .18em; }
.hero .kicker { color: var(--hero-accent); }
.hero p { color: var(--hero-muted); }
.hero .btn {
  color: var(--hero-ink);
  border-color: color-mix(in srgb, var(--hero-ink) 42%, transparent);
}
.hero .btn:hover {
  background: var(--hero-accent);
  border-color: var(--hero-accent);
  color: var(--accent-ink);
}
.hero .btn--solid {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.hero .btn--solid:hover {
  background: var(--hero-accent);
  border-color: var(--hero-accent);
  color: var(--accent-ink);
}
.hero-lede { font-size: 1.12rem; }

.portrait {
  aspect-ratio: 4 / 5;
  border-radius: var(--portrait-radius);
  background: var(--placeholder);
  border: var(--portrait-border);
  box-shadow: var(--portrait-shadow);
  display: grid; place-items: center;
  color: var(--placeholder-ink);
  font-size: .8rem; letter-spacing: .08em; text-transform: uppercase;
  text-align: center; padding: 20px;
}

/* ---------- date band ---------- */

.dateband {
  display: flex; align-items: baseline; gap: 14px;
  font-size: .78rem;
  letter-spacing: var(--caps-tracking);
  text-transform: uppercase;
  color: var(--hero-muted);
}
.dateband .sep { color: var(--hero-accent); }
.dateband--inline { color: var(--slate); }
.dateband--inline .sep { color: var(--accent); }

.rule {
  border: 0; height: 1px;
  background: var(--hairline);
  margin: 0;
}
.rule--accent { background: var(--accent); width: 56px; }

/* ---------- sections ---------- */

.section { padding: var(--section-pad) 0; }
.section--mat { background: var(--paper-2); }

/* The band. It carries its OWN ink so a heading can never land dark-on-dark,
   whether the band is dark (Del) or a soft tint (Janis). */
.section--band { background: var(--band-bg); color: var(--band-ink); }
.section--band h1, .section--band h2,
.section--band h3, .section--band h4 { color: var(--band-ink); }
.section--band p, .section--band .lede { color: var(--band-muted); }
.section--band .kicker { color: var(--band-accent); }
.section--band .meta { color: var(--band-muted); }
.section--band .rule { background: var(--band-hairline); }
.section--band .rule--accent { background: var(--band-accent); }
.section--band .timeline .what { color: var(--band-ink); }
.section--band .timeline .where { color: var(--band-muted); }
/* cards sit on white and keep the page ink whatever the band does */
.section--band .card, .section--band .tcard, .section--band .person { color: var(--ink); }
.section--band .card h3, .section--band .tcard h3,
.section--band .person .name { color: var(--ink); }
.section--band .card p { color: var(--slate); }
.section--band .card .kicker { color: var(--accent); }

.kicker--marker { color: var(--marker); }
.section--band .kicker--marker { color: var(--band-marker); }

.section-head { margin-bottom: 34px; }
.section-head .kicker {
  display: block; margin-bottom: 10px;
  font-size: .74rem; letter-spacing: var(--caps-tracking);
  text-transform: uppercase; color: var(--accent);
}
.section-head .lede { color: var(--slate); font-size: 1.02rem; }

/* ---------- chapter cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--gap);
}
.card {
  display: flex; flex-direction: column;
  background: var(--card-bg);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
}
.card .ph { aspect-ratio: 3 / 2; }
.card-body { padding: 20px 22px 24px; flex: 1 1 auto; }
.card h3 { margin-bottom: .35em; }
.card .kicker {
  font-size: .7rem; letter-spacing: var(--caps-tracking);
  text-transform: uppercase; color: var(--accent);
  display: block; margin-bottom: 8px;
}
.card p { font-size: .93rem; color: var(--slate); margin: 0; }

/* ---------- image placeholders ---------- */

.ph {
  position: relative;
  background: var(--placeholder);
  color: var(--placeholder-ink);
  display: grid; place-items: center;
  text-align: center; padding: 14px;
  font-size: .68rem; letter-spacing: .1em; text-transform: uppercase;
  filter: var(--placeholder-filter);
}
.ph--tall { aspect-ratio: 3 / 4; }
.ph--wide { aspect-ratio: 16 / 9; }
.ph--square { aspect-ratio: 1 / 1; }

/* ---------- gallery ---------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  grid-auto-rows: 10px;
  gap: 14px;
}
.gallery .tile {
  border-radius: var(--tile-radius);
  overflow: hidden;
  border: var(--tile-border);
  box-shadow: var(--card-shadow);
  cursor: zoom-in;
  grid-row: span var(--span, 22);
  position: relative;                     /* the photograph's number sits on the tile */
}

/* The number of the photograph, upper right. Dark and translucent with a hairline so it stays
   legible over a pale photograph and a dark one — a solid chip would vanish into one or the other.
   Deliberately small: it is a reference, not part of the picture. */
.tile-id {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  font-size: .66rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
  padding: 3px 5px;
  border-radius: 3px;
  color: #fff;
  background: rgba(8, 10, 14, .55);
  border: 1px solid rgba(255, 255, 255, .28);
}
.gallery .tile .ph { height: 100%; }

/* ---------- lightbox ---------- */

.lightbox {
  position: fixed; inset: 0; z-index: 60;
  background: var(--scrim);
  display: grid; place-items: center;
  padding: 4vw; cursor: zoom-out;
}
.lightbox-inner { width: min(1100px, 92vw); aspect-ratio: 16 / 10; }

/* ---------- slideshow ---------- */

.slideshow {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: var(--tile-border);
  box-shadow: var(--card-shadow);
  background: var(--ink-2);
}
.slideshow .stage { position: relative; aspect-ratio: 16 / 9; }
.slideshow .frame {
  position: absolute; inset: 0;
  opacity: 0; transition: opacity 1.4s ease;
}
.slideshow .frame.is-on { opacity: 1; }
/* The caption and the dots are presentation, so they live in components.css (colour and
   type), not here. Structure only: the box, the 16:9 stage, the frames. */

/* ---------- film wall ---------- */

.films {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--gap);
}
.film { display: flex; flex-direction: column; gap: 12px; }
.film .ph { border-radius: var(--radius); }
.film h3 { font-size: 1.02rem; margin: 0; }
.film .meta { font-size: .78rem; color: var(--slate); letter-spacing: .04em; }
.play {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 1.6rem; color: var(--accent-ink);
}
.play span {
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--accent); display: grid; place-items: center;
  padding-left: 4px;
}

/* ---------- testimonials ---------- */

.tcards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: var(--gap);
}
.tcard {
  background: var(--card-bg);
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 24px 26px;
  box-shadow: var(--card-shadow);
}
.tcard blockquote {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-size: 1.08rem;
  line-height: 1.5;
}
.tby { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%;
  flex: 0 0 40px;
  display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink);
  font-size: .82rem; font-weight: 600; letter-spacing: .04em;
}
.tby .who { font-size: .88rem; font-weight: 600; }
.tby .rel { font-size: .78rem; color: var(--slate); }

/* ---------- timeline ---------- */

.timeline { list-style: none; margin: 0; padding: 0 0 0 26px; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px;
  width: 1px; background: var(--hairline-strong);
}
.timeline li { position: relative; padding: 0 0 26px; }
.timeline li::before {
  content: ""; position: absolute; left: -25px; top: 9px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--accent);
}
.timeline .when {
  font-size: .76rem; letter-spacing: var(--caps-tracking);
  text-transform: uppercase; color: var(--accent); display: block;
}
.timeline .what { font-family: var(--font-display); font-size: 1.06rem; }
.timeline .where { font-size: .86rem; color: var(--slate); }

/* ---------- map ---------- */

.mapbox {
  position: relative;
  aspect-ratio: 21 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  border: var(--tile-border);
  background: var(--placeholder);
  display: grid; place-items: center;
  color: var(--placeholder-ink);
  font-size: .72rem; letter-spacing: .1em; text-transform: uppercase;
}
.mapbox .pin {
  position: absolute; width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 22%, transparent);
}
.mapbox .pin--a { left: 32%; top: 58%; }
.mapbox .pin--b { left: 63%; top: 34%; }
.mapbox .pin--c { left: 71%; top: 66%; }

/* ---------- form ---------- */

.form { display: grid; gap: 16px; max-width: 620px; }
.field { display: grid; gap: 7px; }
.field label { font-size: .84rem; letter-spacing: .04em; color: var(--slate); }
.field input, .field textarea, .field select {
  font: inherit; font-size: .96rem;
  padding: 12px 14px;
  min-height: var(--tap);
  color: var(--ink);
  background: var(--card-bg);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius);
}
.field textarea { min-height: 132px; resize: vertical; }
.field input:focus-visible, .field textarea:focus-visible, .btn:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.hp { position: absolute; left: -9999px; }
.form .note { font-size: .82rem; color: var(--slate); }

/* ---------- family / survived by ---------- */

.people { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 18px; }
.person {
  background: var(--card-bg); border: 1px solid var(--hairline);
  border-radius: var(--radius); padding: 18px 20px;
}
.person .name { font-family: var(--font-display); font-size: 1.05rem; }
.person .rel { font-size: .78rem; color: var(--slate); letter-spacing: .04em; }
/* Someone who has passed is not a faded entry or a broken one: the dashed border and the
   reduced opacity this used to carry read as "incomplete". They keep their place in the
   order, at full strength, with a hairline in the marker colour and one small line above
   the name. Quiet, not solemn — the list is mostly living people and should read that way. */
/* The family page reads in blocks — see content.FAMILY_GROUPS for the order. The heading is small
   and quiet: it is a signpost, not a title, and the cards are what the eye should land on. */
.family-group + .family-group { margin-top: 38px; }
.group-head {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: var(--caps-tracking);
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--hairline);
}

/* A husband or wife under the brother or sister they married. The pair is one cell of the grid with
   the two stacked inside it — a margin alone put the spouse in the next column along, which is not
   what "under" means. The nested card is set in and carries a rule down its left edge. */
.person-cell--pair {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-self: start;
}
.person-cell--pair .person { width: 100%; }
.person--nested {
  margin-left: 16px;
  border-left: 3px solid var(--marker-soft, var(--hairline));
}

.person--gone { border-color: var(--marker); background: var(--paper-2); }
.person--gone .name { color: var(--ink); }
.in-memory {
  display: block; margin: 0 0 5px; font-size: .68rem; letter-spacing: var(--caps-tracking);
  text-transform: uppercase; color: var(--marker);
}

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

.foot {
  background: var(--foot-bg);
  color: var(--foot-ink);
  padding: 54px 0 40px;
  margin-top: 0;
}
.foot a { color: inherit; }
.foot .cols {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px; margin-bottom: 34px;
}
.foot h4 { color: var(--foot-ink); font-size: .8rem; letter-spacing: var(--caps-tracking); text-transform: uppercase; opacity: .7; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: .9rem; }
.foot .fine { font-size: .78rem; opacity: .62; border-top: 1px solid var(--hairline); padding-top: 20px; }

/* ---------- token swatches (review page only) ---------- */

.swatches { display: flex; flex-wrap: wrap; gap: 14px; }
.sw { width: 118px; }
.sw .chip { height: 62px; border-radius: var(--radius); border: 1px solid var(--hairline); }
.sw .lbl { font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; color: var(--slate); margin-top: 6px; }

/* ---------- review page furniture ---------- */

.component { padding: 46px 0; border-bottom: 1px dashed var(--hairline-strong); }
.component > .wrap > .tag {
  font-size: .7rem; letter-spacing: var(--caps-tracking);
  text-transform: uppercase; color: var(--accent); margin-bottom: 18px; display: block;
}

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .portrait { max-width: 340px; }
  .nav ul { gap: 4px 14px; }
}
@media (max-width: 620px) {
  body { font-size: 17px; }
  .gallery { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .section { padding: calc(var(--section-pad) * .62) 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .slideshow .frame { transition: none; }
}

@media print {
  .nav, .foot, .reviewnote, .btn { display: none; }
  body { background: #fff; color: #000; }
}


/* ---------- the private flight record ----------
   Its own scope: the site's .note and .fine only exist inside .form and .foot, so a page that
   used them bare would render unstyled, and a bare .grid would be a new global. */
.flight-note h2 { margin-top: 2.4em; font-size: 1.15rem; }
.flight-note .note {
  border-left: 3px solid var(--marker);
  background: var(--card-bg);
  padding: 14px 18px; margin: 22px 0; border-radius: var(--radius);
}
.flight-note .note p { margin: 0; }
.flight-note .fine { font-size: .84rem; color: var(--slate); max-width: var(--measure); }
.flight-note .table-wrap { overflow-x: auto; margin: 16px 0; }
.flight-note table { border-collapse: collapse; font-size: .9rem; width: 100%; max-width: var(--measure); }
.flight-note th, .flight-note td { text-align: left; padding: 6px 14px 6px 0; border-bottom: 1px solid var(--hairline); vertical-align: top; }
.flight-note th { color: var(--slate); font-weight: normal; width: 40%; }
.flight-note .grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; margin: 18px 0;
}
.flight-note figure { margin: 0; }
.flight-note figure img { width: 100%; height: auto; display: block; border-radius: var(--radius); }
.flight-note figcaption { font-size: .78rem; color: var(--slate); margin-top: 7px; }
.flight-note code { font-size: .88em; }
.flight-note ul { max-width: var(--measure); }
.flight-note li { margin-bottom: .5em; }

.flight-note .flight-map { margin: 18px 0; }
.flight-note .flight-map img { width: 100%; height: auto; display: block; border-radius: var(--radius); }
.flight-note .flight-map a { display: block; }
.flight-note table a { color: var(--accent); }

.flight-note .profile-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  margin: 16px 0;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--card-bg);
  -webkit-overflow-scrolling: touch;
}
.flight-note .profile-scroll a { display: block; }
/* the chart is 9000 px wide on purpose: scaled to fit, the terrain detail is lost */
.flight-note .profile-scroll img { width: 9000px; height: auto; display: block; max-width: none; }

/* ---- the flight page is a document, not a gallery: more room for its tables ---- */
/* The shell itself has to widen, not just the inner block: a child cannot exceed its parent,
   which is what left the page at 1140px with the tables inside it. */
/* Two classes, not one: components.css also sets .wrap and loads after this file, so an equal
   specificity rule here would lose the cascade and the page would stay at the shell width. */
.wrap.wrap--wide { max-width: min(1680px, 94vw); }
/* Prose keeps a readable measure even so: a 1600px-wide line of text is unreadable however much
   room there is. Only the tables and figures take the extra width. */
.flight-note { max-width: none; }
.flight-note p, .flight-note .fine, .flight-note ul, .flight-note h2 {
  max-width: 74ch;
}
/* tables take the room that the prose does not */
.flight-note table { max-width: none; }
.flight-note figure, .flight-note .table-wrap { max-width: none; }

/* the METAR table: the plain-words column is the long one and gets the space */
.flight-note table.metar th:nth-child(1), .flight-note table.metar td:nth-child(1) { width: 7%; }
.flight-note table.metar th:nth-child(2), .flight-note table.metar td:nth-child(2) { width: 26%; }
.flight-note table.metar th:nth-child(3), .flight-note table.metar td:nth-child(3) { width: 67%; }
.flight-note table.metar td { vertical-align: top; padding: 10px 14px; }
.flight-note table.metar code { white-space: nowrap; }

/* the four reports that cover the flight, marked in the table's own terms */
.flight-note tr.in-flight { background: rgba(201, 162, 75, .10); }
.flight-note tr.in-flight td:first-child { border-left: 2px solid var(--gold, #C9A24B); }

@media (max-width: 900px) {
  /* stacked on a phone, not squashed into three narrow columns */
  .flight-note table.metar th:nth-child(n), .flight-note table.metar td:nth-child(n) { width: auto; }
  .flight-note .table-wrap { overflow-x: auto; }
  .flight-note table.metar { min-width: 720px; }
}

/* the station's hourly record: six columns, read down not across */
.flight-note table.station th, .flight-note table.station td { padding: 5px 14px; }
.flight-note table.station td:nth-child(1) { white-space: nowrap; }
.flight-note table.station td:nth-child(5) { white-space: nowrap; }
.flight-note table.station td:nth-child(n+2) { text-align: right; }
.flight-note table.station th:nth-child(n+2) { text-align: right; }
.flight-note table.station .fine { font-weight: normal; }

/* the waypoint table: number and time read down, speed/course/position read across */
.flight-note table.waypoints th { width: auto; }
.flight-note table.waypoints td, .flight-note table.waypoints th { font-variant-numeric: tabular-nums; }
.flight-note table.waypoints td:nth-child(n+3), .flight-note table.waypoints th:nth-child(n+3) { text-align: right; }
.flight-note table.waypoints td:nth-child(1) { white-space: nowrap; }
