/* v3 polish layer: one fade curve, one plate treatment, calmer accents. Loaded last. */
:root {
  --bg: #08111c;
  --ink-2: #b4bfcc;            /* body copy on navy: ~10:1 */
  --ink-3: #8592a3;            /* captions / meta: ~5.6:1 */
  --ivory: #ece7dc;            /* matches the photo grade's highlight */
  --fade-len: clamp(120px, 15vw, 240px);
  /* eased (ease-in-out) navy fade: no visible band where it ends */
  --fade: rgba(8,17,28,1) 0%, rgba(8,17,28,.987) 8.1%, rgba(8,17,28,.951) 15.5%, rgba(8,17,28,.896) 22.5%, rgba(8,17,28,.825) 29%, rgba(8,17,28,.741) 35.3%, rgba(8,17,28,.648) 41.2%, rgba(8,17,28,.55) 47.1%, rgba(8,17,28,.45) 52.9%, rgba(8,17,28,.352) 58.8%, rgba(8,17,28,.259) 64.7%, rgba(8,17,28,.175) 71%, rgba(8,17,28,.104) 77.5%, rgba(8,17,28,.049) 84.5%, rgba(8,17,28,.013) 91.9%, rgba(8,17,28,0) 100%;
  --section-pad: clamp(96px, 10vw, 152px);
  --h2: clamp(46px, 4.6vw, 72px);
}
html, body, .feature, footer, .closing { background-color: var(--bg); }

/* Film grain over the whole page: dithers every gradient so nothing bands */
body::after { content: ''; position: fixed; inset: 0; z-index: 50; pointer-events: none; opacity: .05; mix-blend-mode: overlay;
  background-image: url("assets/grain.svg"); }

/* Header: same navy, quieter rule */
.site-header { background: rgba(8,17,28,.78); border-bottom-color: rgba(255,255,255,.06); }
.brand-dot { color: var(--red); }

/* Hero: no glow, no typing ticker; field fades out before the next panel */
h1 .accent { text-shadow: none; }
h1 .accent::after { height: .045em; bottom: -.04em; }
.hero::after { content: ''; position: absolute; inset: auto 0 0; height: var(--fade-len); z-index: 1; pointer-events: none; background: linear-gradient(0deg, var(--fade)); }
.hero-link { color: var(--ink-2); }
.standfirst { color: var(--ink-2); }

/* Section rhythm + one h2 scale everywhere */
.ed-copy h2, .ed-split-title, .closing h2 { font-size: var(--h2); line-height: .98; letter-spacing: -.045em; }
.ed-learned, .ed-here { padding-block: var(--section-pad); }
.ed-copy p:not(.lead), .closing-body p { color: var(--ink-2); }
.p2-body { color: var(--ink-2); }
.feature section { border-top-color: rgba(255,255,255,.06); }

/* Panel 2: bottom of the portrait uses the same eased fade */
.p2-cover::after { background: linear-gradient(0deg, var(--fade)) bottom / 100% 46% no-repeat, linear-gradient(90deg, rgba(8,17,28,.88) 32%, rgba(8,17,28,.35) 52%, transparent 66%); }

/* Plates (library, White Ribbon): same soft-edged treatment, so neither looks pasted in */
.ed-fig { background: none; box-shadow: none !important; }
.ed-fig::after { display: none; }
/* Full-bleed meadow: eased fade top and bottom */
.ed-bleed::before { inset: auto 0 0; height: var(--fade-len); background: linear-gradient(0deg, var(--fade)); }
.ed-bleed::after { box-shadow: none; inset: 0 0 auto; height: calc(var(--fade-len) * .7); background: linear-gradient(180deg, var(--fade)); z-index: 1; }

/* Closing: same fades, aligned to the page grid, calmer button */
.coastal-stage { height: min(78svh, 760px); background: var(--bg); align-items: center; }
.coastal-frame picture { display: block; height: 100%; }
.coastal-frame img { height: 100%; filter: brightness(.82); }
.coastal-frame::before, .coastal-frame::after { content: ''; position: absolute; left: 0; right: 0; height: var(--fade-len); z-index: 1; pointer-events: none; }
.coastal-frame::before { top: 0; background: linear-gradient(180deg, var(--fade)); }
.coastal-frame::after { bottom: 0; background: linear-gradient(0deg, var(--fade)); }
.closing-inner { position: relative; z-index: 2; width: min(100% - 2 * var(--gutter), 1280px); margin-inline: auto; }
.coastal-stage .closing-inner h2 { max-width: 9.5ch; }
.closing-body { padding: 8px 0 var(--section-pad); }
.closing-body p { font-size: 21px; line-height: 1.55; max-width: 34ch; }
.contact-button { background: var(--ivory); color: var(--bg); border-radius: 2px; font-weight: 600; letter-spacing: .1em; gap: 40px; }
.contact-button:hover { background: #fff; transform: none; }
.contact-button:active { transform: scale(.98); }
.contact-button:focus-visible { outline: 2px solid var(--ivory); outline-offset: 4px; }

/* Footer: tidy, credits legible */
footer { border-top-color: rgba(255,255,255,.06); color: var(--ink-3); padding-block: 28px 30px; row-gap: 10px; }
footer .credits { font-size: 11px; color: var(--ink-3); letter-spacing: .06em; }

@media (max-width: 900px) {
  :root { --fade-len: 96px; --section-pad: 76px; }
  .ed-copy h2, .ed-split-title, .closing h2 { font-size: clamp(40px, 10.5vw, 56px); }
  .coastal-stage { height: 92vw; min-height: 360px; }
  .closing-body p { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) { body::after { display: none; } }

/* r7 */
.ed-here .ed-fig img { filter: brightness(.93); }
/* closing: cover the parallax travel, left scrim to seat the title (same idea as panel 2) */
.coastal-frame img { height: 118%; filter: brightness(.76); }
.coastal-stage::before { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(90deg, rgba(8,17,28,.62) 0%, rgba(8,17,28,.38) 28%, rgba(8,17,28,0) 58%); }
.coastal-stage .closing-inner { padding-top: 6%; }
.closing-body p { max-width: 40ch; }
.ed-for { padding-bottom: clamp(56px, 6vw, 88px); }
.feature > section:first-child { border-top: 0; }
/* r8: plates go back to crisp edges; the fade into navy is baked into the photo (smoothstep vignette to #08111c) */
.ed-here .ed-fig img { filter: none; }
@media (max-width: 700px) {
  .coastal-stage { align-items: end; }
  .coastal-stage .closing-inner { padding: 0 0 22%; }
  .coastal-stage::before { background: linear-gradient(0deg, rgba(8,17,28,.55) 0%, rgba(8,17,28,.2) 45%, rgba(8,17,28,0) 70%); }
}

/* v24.5: footer keeps the third link on one line; on phones the links take their own row */
footer nav a { white-space: nowrap; }
@media (max-width: 700px) { footer { flex-wrap: wrap; } footer nav { flex-basis: 100%; order: 2; gap: 22px; justify-content: flex-start; margin: 0; } footer > a { order: 3; } }
