/* ==========================================================================
   Flight 811 memorial
   --------------------------------------------------------------------------
   One night theme from top to bottom (set on <main data-theme="night">).
   Stillness is the design: no pinned scenes, no counters, no parallax.
   The only motion is the shared .reveal, used here as a fade only
   (.reveal--fade), and it is off under prefers-reduced-motion.
   Layout primitives (split, times, heads) are re-declared here rather than
   borrowed from story.css so this page stays independent of the home page.
   ========================================================================== */

/* Quieter grain on the memorial, and never animated. */
.memorial .grain { opacity: .035; animation: none !important; }

/* ---- Page ground --------------------------------------------------------- */
.m { position: relative; overflow: clip; }
.m__sky { /* a few fixed stars in the first screen only; static */
  position: absolute; inset: 0 0 auto 0; height: 110svh; pointer-events: none; opacity: .45;
  background-image:
    radial-gradient(1px 1px at 12% 22%, rgba(255,255,255,.5), transparent 60%),
    radial-gradient(1px 1px at 78% 14%, rgba(255,255,255,.35), transparent 60%),
    radial-gradient(1px 1px at 38% 38%, rgba(255,255,255,.22), transparent 60%),
    radial-gradient(1.5px 1.5px at 66% 30%, rgba(255,255,255,.36), transparent 60%),
    radial-gradient(1px 1px at 90% 46%, rgba(255,255,255,.26), transparent 60%),
    radial-gradient(1px 1px at 24% 62%, rgba(255,255,255,.2), transparent 60%),
    radial-gradient(1px 1px at 54% 9%, rgba(255,255,255,.28), transparent 60%),
    radial-gradient(1px 1px at 6% 44%, rgba(255,255,255,.18), transparent 60%);
  -webkit-mask-image: linear-gradient(#000 55%, transparent);
  mask-image: linear-gradient(#000 55%, transparent);
}
.m .wrap { position: relative; }

/* ---- Opening ------------------------------------------------------------ */
.m-open { min-height: 100svh; display: grid; align-items: center; padding: 120px 0 72px; }
.m-note {
  display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: .4rem 1rem;
  padding: .75rem 1.1rem; margin-bottom: clamp(48px, 9vh, 96px);
  border: 1px solid var(--hair); border-radius: 12px;
  font-size: .95rem; color: var(--fg); background: var(--card);
}
.m-note__label { font-size: .7rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.m-open__eyebrow { margin-bottom: 1.6rem; }
.m-open__title { font-weight: 280; }
.m-open__date {
  margin-top: 1.4rem; font-family: var(--serif); font-style: italic; font-weight: 300;
  font-size: var(--step-3); line-height: 1.1; color: var(--accent);
}
.m-open__lede { margin-top: 2.2rem; max-width: 34rem; }

/* In-page contents: quiet, like a programme */
.m-contents { margin-top: clamp(48px, 9vh, 96px); padding-top: 1.6rem; border-top: 1px solid var(--hair); }
.m-contents ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .8rem 2rem; }
.m-contents a { display: inline-flex; align-items: baseline; gap: .55rem; text-decoration: none; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding-block: .2rem; }
.m-contents a:hover { color: var(--fg); }
.m-contents b { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: 0; text-transform: none; font-size: 1rem; color: var(--accent); }

/* ---- Section rhythm and heads ----------------------------------------- */
.m-sec { padding: clamp(80px, 13vh, 170px) 0; border-top: 1px solid var(--hair); }
.m-head { display: grid; grid-template-columns: auto 1fr; gap: clamp(18px, 3vw, 40px); align-items: end; margin-bottom: clamp(44px, 8vh, 96px); }
.m-head__num { font-family: var(--serif); font-style: italic; font-weight: 250; font-size: clamp(3.6rem, 2.4rem + 5vw, 7.5rem); line-height: .8; color: var(--accent); letter-spacing: -.04em; }
.m-head__title { margin-top: .7rem; font-family: var(--serif); font-weight: 300; font-size: var(--step-4); line-height: 1; letter-spacing: -.025em; }

.m-split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(36px, 6vw, 110px); align-items: start; }
@media (max-width: 900px) { .m-split { grid-template-columns: 1fr; } }

.context-line { font-size: var(--step-1); line-height: 1.5; color: var(--muted); max-width: 40rem; text-wrap: pretty; }
.quote--xs { font-size: var(--step-1); line-height: 1.35; }

/* ---- 1 · The night ------------------------------------------------------ */
.m-times { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--hair); }
.m-times li { display: grid; grid-template-columns: 9.5rem 1fr; gap: 1.2rem; padding: 1.3rem 0; border-bottom: 1px solid var(--hair); align-items: baseline; }
.m-times .t { font-family: var(--mono); font-size: .95rem; letter-spacing: .04em; color: var(--accent); font-variant-numeric: tabular-nums; }
.m-times .d { font-size: 1.06rem; line-height: 1.55; }
.m-times .d small { display: block; margin-top: .35rem; color: var(--muted); font-size: .84rem; }
.m-src { margin-top: 1.4rem; max-width: 34rem; }
@media (max-width: 560px) { .m-times li { grid-template-columns: 1fr; gap: .35rem; } }

.m-aboard { padding: clamp(22px, 3vw, 34px); border: 1px solid var(--hair); border-radius: 20px; background: var(--card); }
.m-aboard__grid { margin: 1.4rem 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--hair); }
.m-aboard__grid div { padding: 1rem 0 1.1rem; border-bottom: 1px solid var(--hair); }
.m-aboard__grid div:nth-child(odd) { padding-right: 1rem; }
.m-aboard__grid dt { font-size: .74rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.m-aboard__grid dd { margin: .35rem 0 0; font-family: var(--serif); font-weight: 300; font-size: var(--step-3); line-height: 1; font-variant-numeric: lining-nums tabular-nums; }
.m-aboard__total dd { color: var(--fg); }
.m-aboard__line { margin: 1.4rem 0 .9rem; font-family: var(--serif); font-weight: 330; font-size: var(--step-2); line-height: 1.25; }

/* ---- 2 · In his words -------------------------------------------------- */
.m-words__intro { margin-bottom: clamp(40px, 7vh, 80px); }
.m-words { list-style: none; margin: 0; padding: 0 0 0 clamp(20px, 4vw, 56px); border-left: 1px solid var(--hair); max-width: 52rem; display: grid; gap: clamp(48px, 9vh, 104px); }
.m-word { position: relative; }
.m-word::before { /* a small still marker on the hairline */
  content: ""; position: absolute; left: calc(-1 * clamp(20px, 4vw, 56px) - 4px); top: .45rem;
  width: 7px; height: 7px; border-radius: 50%; background: var(--bg); border: 1px solid var(--brass);
}
.m-word__label { margin-bottom: 1rem; }
.m-word .quote { max-width: 30em; text-wrap: pretty; }
.m-words__more { margin-top: clamp(48px, 8vh, 88px); padding-left: clamp(20px, 4vw, 56px); }

/* ---- 3 · The cause ------------------------------------------------------ */
.m-record {
  margin: 0; max-width: 60rem;
  padding: clamp(24px, 4vw, 52px); border-radius: 20px;
  border: 1px solid var(--hair); background: var(--card);
}
.m-record__head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-bottom: 1.2rem; margin-bottom: 1.6rem; border-bottom: 1px solid var(--hair); }
.m-record__verb { color: var(--muted); }
.m-record__text { margin: 0; font-family: var(--serif); font-weight: 330; font-size: var(--step-1); line-height: 1.55; text-wrap: pretty; }
.m-record figcaption { margin-top: 1.6rem; font-size: .84rem; color: var(--muted); max-width: 44rem; }

.m-chain__intro { margin: clamp(64px, 11vh, 130px) 0 clamp(32px, 5vh, 56px); max-width: 36rem; color: var(--muted); }
.m-chain { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hair); }
.m-link { display: grid; grid-template-columns: minmax(0, 13rem) minmax(0, 1fr); gap: clamp(16px, 4vw, 64px); padding: clamp(28px, 5vh, 48px) 0; border-bottom: 1px solid var(--hair); }
.m-link__when { font-family: var(--mono); font-size: .88rem; letter-spacing: .04em; color: var(--accent); padding-top: .3rem; }
.m-link__body { max-width: 44rem; }
.m-link__body > * + * { margin-top: .9rem; }
.m-link__title { font-family: var(--serif); font-weight: 350; font-size: var(--step-2); line-height: 1.15; letter-spacing: -.01em; }
.m-link__body p { color: var(--muted); }
.m-link__quote { margin: 1.1rem 0 0; padding-left: 1.1rem; border-left: 1px solid var(--brass); }
.m-link__quote p { font-family: var(--serif); font-weight: 330; font-size: 1.1rem; line-height: 1.5; color: var(--fg); }
.m-link__src { font-size: .8rem !important; letter-spacing: .02em; color: var(--muted); }
.m-link--key .m-link__title { color: var(--fg); }
.m-link--key .m-link__when { font-weight: 600; }
@media (max-width: 720px) { .m-link { grid-template-columns: 1fr; gap: .6rem; } .m-link__when { padding-top: 0; } }

/* The eight view ports, once, still. */
.m-ports { display: flex; flex-wrap: wrap; gap: clamp(10px, 2vw, 20px); padding-top: .6rem; }
.m-ports .port { --size: clamp(28px, 3.4vw, 40px); color: var(--muted); }
.m-ports .port__stripe { transition: none; background: var(--muted); }
.m-ports .port:nth-child(1) { --angle: -40deg; } .m-ports .port:nth-child(2) { --angle: -8deg; }
.m-ports .port:nth-child(3) { --angle: -34deg; } .m-ports .port:nth-child(4) { --angle: 22deg; }
.m-ports .port:nth-child(5) { --angle: -18deg; } .m-ports .port:nth-child(6) { --angle: 38deg; }
.m-ports .port:nth-child(7) { --angle: -26deg; } .m-ports .port:nth-child(8) { --angle: 12deg; }

.m-cause__coda { margin-top: clamp(64px, 11vh, 130px); max-width: 26em; }

/* ---- 4 · The captain ---------------------------------------------------- */
.m-captain { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(36px, 6vw, 110px); align-items: start; }
.m-captain__photo { margin: 0; max-width: 520px; }
.m-captain__frame { border-radius: 4px; overflow: hidden; background: #0b0b0b; box-shadow: var(--shadow); }
.m-captain__frame img { width: 100%; height: auto; filter: grayscale(1) contrast(1.02) brightness(.92); }
.m-captain__words > * + * { margin-top: 2rem; }
.m-captain__short { max-width: 14em; }
.m-captain__words .quote--s { max-width: 28em; }
.m-captain__coda { margin-top: 2.6rem !important; color: var(--fg); }
@media (max-width: 900px) { .m-captain { grid-template-columns: 1fr; } .m-captain__photo { max-width: 420px; } }

/* ---- 5 · What it became ----------------------------------------------- */
.m-became__stage { text-align: center; }
.m-became__line { font-style: italic; color: var(--accent); font-weight: 280; }
.m-became__src { margin-top: 1.6rem; }
.m-became__mission { margin: clamp(56px, 10vh, 110px) auto 0; max-width: 22em; }
.m-became__rule { width: min(240px, 50vw); height: 1px; margin: clamp(64px, 11vh, 130px) auto; background: var(--brass); opacity: .55; }
.m-became__then { margin-bottom: 1.6rem; }
.m-became__gift { max-width: 30em; margin-inline: auto; }
.m-became__more { margin-top: 2.6rem; }

/* ---- 6 · Listen --------------------------------------------------------- */
.m-listen { max-width: 52rem; display: grid; gap: 2rem; }
.m-listen__intro > * + * { margin-top: 1rem; }
.m-player { margin: 0; padding: clamp(20px, 3vw, 30px); border: 1px solid var(--hair); border-radius: 20px; background: var(--card); }
.m-player__label { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem 1.4rem; margin: 0 0 1.1rem !important; }
.m-player__title { font-size: .8rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--fg); }
.m-player__meta { font-family: var(--mono); font-size: .8rem; color: var(--muted); }
.m-player audio { display: block; width: 100%; color-scheme: dark; }

.m-transcript { border: 1px solid var(--hair); border-radius: 16px; background: transparent; }
.m-transcript summary {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .4rem 1rem;
  padding: 1.1rem 1.3rem; cursor: pointer; list-style: none; border-radius: 16px;
  font-weight: 600; font-size: .95rem;
}
.m-transcript summary::-webkit-details-marker { display: none; }
.m-transcript summary > span:first-child::before { content: "+"; display: inline-block; width: 1.2em; color: var(--accent); font-weight: 500; }
.m-transcript[open] summary > span:first-child::before { content: "–"; }
.m-transcript__flag { font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.m-transcript__caveat { padding: 0 1.3rem; }
.m-transcript summary + .m-transcript__caveat { margin-top: .4rem; }
.m-transcript__lines { margin: 1.2rem 0; padding: 1.2rem 1.3rem 0 3.2rem; border-top: 1px solid var(--hair); display: grid; gap: .7rem; font-family: var(--mono); font-size: .84rem; line-height: 1.6; color: var(--muted); }
.m-transcript__lines li::marker { color: var(--faint); }
.m-transcript > .m-transcript__caveat:last-child { padding-bottom: 1.3rem; }

/* ---- 7 · Remembering ---------------------------------------------------- */
.m-remember { text-align: center; min-height: 92svh; display: grid; align-items: center; }
.m-remember__marks { display: flex; justify-content: center; gap: clamp(14px, 2.6vw, 34px); height: clamp(110px, 20vh, 200px); margin: 0 auto 3.4rem; }
.m-remember__marks i { width: 1px; background: linear-gradient(transparent, rgba(240,237,232,.75) 18%, rgba(240,237,232,.75) 82%, transparent); }
.m-remember__line { font-weight: 300; }
.m-remember__quote { margin: 3rem auto 0; max-width: 22em; }
.m-remember__policy { margin-top: 2.6rem; color: var(--muted); font-size: .95rem; letter-spacing: .02em; }

/* ---- Sources + close ---------------------------------------------------- */
.m-sources__grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: clamp(40px, 6vw, 110px); align-items: start; }
@media (max-width: 900px) { .m-sources__grid { grid-template-columns: 1fr; } }
.m-sources__list { list-style: none; margin: 1.4rem 0 0; padding: 0; border-top: 1px solid var(--hair); }
.m-sources__list li { display: grid; gap: .35rem; padding: 1.1rem 0; border-bottom: 1px solid var(--hair); }
.m-sources__list a { text-decoration: none; line-height: 1.45; }
.m-sources__list a:hover { text-decoration: underline; }
.m-close { display: grid; gap: 12px; }
.m-close > .eyebrow { margin-bottom: .2rem; }
.m-close__door {
  display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: center;
  padding: 20px 22px; border-radius: 18px; border: 1px solid var(--hair); background: var(--card);
  text-decoration: none; transition: border-color var(--fast) ease, background var(--fast) ease;
}
.m-close__door:hover { border-color: rgba(240,237,232,.4); background: rgba(255,255,255,.05); }
.m-close__door .port { --size: 32px; }
.m-close__door .port__stripe { transition: none; }
.m-close__title { display: block; font-family: var(--serif); font-weight: 400; font-size: 1.45rem; line-height: 1.1; }
.m-close__sub { display: block; margin-top: .3rem; font-size: .86rem; color: var(--muted); }

/* ---- Mobile refinements ------------------------------------------------- */
@media (max-width: 640px) {
  .m-open { padding-top: 96px; }
  .m-head { grid-template-columns: 1fr; gap: 6px; }
  .m-aboard__grid dd { font-size: var(--step-2); }
  .m-transcript__lines { padding-left: 2.4rem; }
}

/* ---- Reduced motion: belt and braces (site.css already gates .reveal) --- */
@media (prefers-reduced-motion: reduce) {
  .memorial *, .memorial *::before, .memorial *::after { transition: none !important; animation: none !important; }
}
