/* Blue Line Project — memorial at night: granite, candlelight, one thin blue line.
   Single committed dark look (a memorial after dusk), so no light-theme override. */
:root {
  --night: #06080d;        /* page ground */
  --granite: #0c1018;      /* raised bands */
  --stone: #141a25;        /* cards, inputs */
  --etch: #222b3a;         /* hairlines */
  --text: #e8ecf3;         /* primary text */
  --muted: #8e98aa;        /* secondary text */
  --line: #3b7bff;         /* the thin blue line */
  --line-glow: rgba(59, 123, 255, .55);
  --flame: #f2c27b;        /* candlelight */
  --flame-soft: rgba(242, 194, 123, .14);

  --display: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --engrave: "Cinzel", "Trajan Pro", Georgia, serif;
  --body: "Manrope", "Segoe UI", system-ui, sans-serif;

  --step--1: clamp(.8rem, .78rem + .1vw, .86rem);
  --step-0: clamp(1rem, .97rem + .15vw, 1.08rem);
  --step-1: clamp(1.25rem, 1.15rem + .4vw, 1.5rem);
  --step-2: clamp(1.7rem, 1.45rem + 1vw, 2.4rem);
  --step-3: clamp(2.3rem, 1.8rem + 2.2vw, 3.8rem);
  --step-4: clamp(3rem, 2rem + 4.6vw, 6.4rem);

  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --wrap: 1200px;
  --ease: cubic-bezier(.22, .8, .2, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 500; line-height: 1.05; margin: 0; text-wrap: balance; letter-spacing: -.01em; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--line); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--line); color: #fff; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 64px);
  margin-inline: auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter-r);
}
@media (min-width: 720px) { .wrap { padding-left: max(32px, var(--gutter)); padding-right: max(32px, var(--gutter-r)); } }

.eyebrow {
  font-family: var(--engrave);
  font-size: var(--step--1);
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--flame);
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.eyebrow::before { content: ""; width: 34px; height: 1px; background: var(--line); box-shadow: 0 0 10px var(--line-glow); }
.lede { color: var(--muted); font-size: var(--step-1); line-height: 1.6; max-width: 58ch; font-weight: 300; }
em.serif { font-family: var(--display); font-style: italic; }

/* ---------- Buttons ---------- */
.btn {
  --b: var(--text);
  display: inline-flex; align-items: center; gap: 12px;
  padding: 16px 30px;
  font: 600 .78rem/1 var(--body);
  letter-spacing: .2em; text-transform: uppercase;
  text-decoration: none; color: var(--night);
  background: var(--text);
  border: 1px solid var(--text);
  position: relative; overflow: hidden; cursor: pointer;
  transition: color .4s var(--ease), border-color .4s var(--ease);
  isolation: isolate;
}
.btn::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--line);
  transform: scaleX(0); transform-origin: right;
  transition: transform .5s var(--ease);
}
.btn:hover { color: #fff; border-color: var(--line); }
.btn:hover::after { transform: scaleX(1); transform-origin: left; }
.btn .arrow { transition: transform .4s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn--ghost { background: transparent; color: var(--text); border-color: rgba(232, 236, 243, .35); }
.btn--line { background: var(--line); border-color: var(--line); color: #fff; box-shadow: 0 0 30px -6px var(--line-glow); }
.btn--line::after { background: var(--text); }
.btn--line:hover { color: var(--night); border-color: var(--text); }

/* ---------- Preloader ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 200;
  background: var(--night);
  display: grid; place-items: center;
  transition: opacity .8s var(--ease), visibility .8s;
}
.preloader__inner { width: min(320px, 70vw); text-align: center; }
.preloader__mark { font-family: var(--engrave); letter-spacing: .5em; font-size: .78rem; color: var(--muted); margin-bottom: 18px; padding-left: .5em; }
.preloader__bar { height: 2px; background: var(--etch); overflow: hidden; }
.preloader__bar span { display: block; height: 100%; background: var(--line); box-shadow: 0 0 14px var(--line); transform: scaleX(0); transform-origin: left; animation: load 1.1s var(--ease) forwards; }
@keyframes load { to { transform: scaleX(1); } }
.loaded .preloader { opacity: 0; visibility: hidden; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding-top: env(safe-area-inset-top, 0px);
  transition: background .5s var(--ease), border-color .5s var(--ease), backdrop-filter .5s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled { background: rgba(6, 8, 13, .82); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); border-color: var(--etch); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 84px; transition: height .4s var(--ease); }
.scrolled .nav { height: 68px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand__badge { width: 38px; height: 38px; flex: none; }
.brand__name { font-family: var(--engrave); font-size: .92rem; letter-spacing: .26em; line-height: 1.2; }
.brand__name small { display: block; font-family: var(--body); font-size: .62rem; letter-spacing: .3em; color: var(--muted); }
.nav__links { display: flex; align-items: center; gap: clamp(24px, 2.8vw, 38px); list-style: none; margin: 0; padding: 0; }
.nav__links a:not(.btn) {
  text-decoration: none; font-size: .76rem; letter-spacing: .2em; text-transform: uppercase; font-weight: 500;
  color: var(--muted); position: relative; padding: 6px 0; transition: color .3s;
}
.nav__links a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--line); transform: scaleX(0); transition: transform .4s var(--ease); box-shadow: 0 0 8px var(--line); }
.nav__links a:not(.btn):hover, .nav__links a:not(.btn)[aria-current="page"] { color: var(--text); }
.nav__links a:not(.btn):hover::after, .nav__links a:not(.btn)[aria-current="page"]::after { transform: scaleX(1); }
.nav__links .btn { padding: 13px 22px; }
.nav__toggle { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; position: relative; z-index: 110; }
.nav__toggle span { position: absolute; left: 10px; right: 10px; height: 1.5px; background: var(--text); transition: transform .4s var(--ease), opacity .3s; }
.nav__toggle span:nth-child(1) { top: 16px; }
.nav__toggle span:nth-child(2) { top: 22px; }
.nav__toggle span:nth-child(3) { top: 28px; }
.menu-open .nav__toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-open .nav__toggle span:nth-child(2) { opacity: 0; }
.menu-open .nav__toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: fixed; inset: 0; z-index: 105;
    flex-direction: column; justify-content: center; gap: 28px;
    background: rgba(6, 8, 13, .97);
    padding: env(safe-area-inset-top, 0px) var(--gutter-r) env(safe-area-inset-bottom, 0px) var(--gutter);
    opacity: 0; visibility: hidden; transition: opacity .5s var(--ease), visibility .5s;
  }
  .nav__links a:not(.btn) { font-family: var(--display); font-size: 2.2rem; letter-spacing: 0; text-transform: none; color: var(--text); }
  .menu-open .nav__links { opacity: 1; visibility: visible; }
  .menu-open { overflow: hidden; }
}

/* ---------- Hero (home) ---------- */
.hero { position: relative; min-height: min(100svh, 980px); display: flex; align-items: flex-end; overflow: hidden; isolation: isolate; }
.hero__slides { position: absolute; inset: 0; z-index: -2; }
.hero__slide { position: absolute; inset: 0; opacity: 0; transition: opacity 2.2s ease; }
.hero__slide img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); }
.hero__slide.active { opacity: 1; }
.hero__slide.active img { animation: kenburns 9s linear forwards; }
@keyframes kenburns { from { transform: scale(1.14) translate3d(1%, 0, 0); } to { transform: scale(1.02) translate3d(-1%, -1%, 0); } }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background:
  linear-gradient(180deg, rgba(6,8,13,.75) 0%, rgba(6,8,13,.25) 35%, rgba(6,8,13,.55) 65%, var(--night) 100%),
  radial-gradient(ellipse at 20% 80%, rgba(6,8,13,.7), transparent 60%); }
#embers { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero__content { padding-block: 180px 110px; width: 100%; }
.hero h1 { font-size: var(--step-4); font-weight: 400; max-width: 20ch; }
.hero h1 .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero h1 .line > span { display: inline-block; animation: rise 1.4s var(--ease) both; }
.hero h1 .line:nth-child(2) > span { animation-delay: .15s; }
.hero h1 em { font-style: italic; color: var(--flame); }
@keyframes rise { from { transform: translateY(105%); } }
.thin-line { position: relative; height: 2px; margin-block: 34px; max-width: 520px; }
.thin-line::before { content: ""; position: absolute; inset: 0; background: var(--line); box-shadow: 0 0 12px var(--line), 0 0 40px var(--line-glow); transform-origin: left; animation: draw 1.8s .6s var(--ease) both; }
@keyframes draw { from { transform: scaleX(0); } }
.hero__row { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-end; justify-content: space-between; }
.hero__row .lede { animation: fade 1.4s .9s var(--ease) both; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 14px; animation: fade 1.4s 1.1s var(--ease) both; }
@keyframes fade { from { opacity: 0; transform: translateY(18px); } }
.hero__dots { position: absolute; right: var(--gutter-r); bottom: 40px; display: flex; gap: 10px; }
.hero__dots button { width: 34px; height: 2px; border: 0; padding: 0; background: rgba(232,236,243,.25); cursor: pointer; position: relative; overflow: hidden; }
.hero__dots button::after { content: ""; position: absolute; inset: 0; background: var(--text); transform: scaleX(0); transform-origin: left; }
.hero__dots button.active::after { animation: progress 7s linear forwards; }
@keyframes progress { to { transform: scaleX(1); } }
.scroll-cue { position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); width: 1px; height: 54px; background: linear-gradient(var(--etch), transparent); overflow: hidden; }
.scroll-cue::after { content: ""; position: absolute; left: 0; width: 1px; height: 18px; background: var(--line); animation: drip 2.2s ease-in-out infinite; }
@keyframes drip { from { top: -18px; } to { top: 54px; } }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { position: relative; overflow: hidden; isolation: isolate; padding-block: 200px 110px; }
.page-hero__bg { position: absolute; inset: -10% 0; z-index: -2; }
.page-hero__bg img { width: 100%; height: 100%; object-fit: cover; animation: kenburns 14s linear forwards; }
.page-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(6,8,13,.8), rgba(6,8,13,.55) 50%, var(--night)); }
.page-hero h1 { font-size: var(--step-4); font-weight: 400; max-width: 16ch; margin-top: 22px; }
.page-hero h1 em { color: var(--flame); }
.page-hero .lede { margin-top: 26px; }
.page-hero .eyebrow, .page-hero .lede { animation: fade 1.2s .2s var(--ease) both; }
.page-hero h1 { animation: fade 1.2s .05s var(--ease) both; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(80px, 11vw, 150px); position: relative; }
.section--granite { background: var(--granite); }
/* Daylight band: re-scopes the tokens so every component inside renders on white */
.section--light {
  --night: #ffffff;
  --granite: #f5f7fb;
  --stone: #f0f3f8;
  --etch: #dfe4ec;
  --text: #0b1220;
  --muted: #4a5568;
  --line: #1f5fe0;
  --line-glow: rgba(31, 95, 224, .28);
  --flame: #8a5a12;
  --flame-soft: rgba(138, 90, 18, .1);
  color-scheme: light;
  background: var(--night);
  color: var(--text);
}
.page-hero + .section--light { padding-top: clamp(64px, 8vw, 110px) !important; }
.section--light .btn--ghost { border-color: rgba(11, 18, 32, .3); }
.section--light .btn--ghost:hover { color: #fff; }
.section--light .field input::placeholder, .section--light .field textarea::placeholder { color: #8a94a6; }
.section--light .field .err { color: #c53030; }
.section--light .field.invalid input, .section--light .field.invalid textarea, .section--light .field.invalid select { border-color: #c53030; }
.section--light .topic-chips button[aria-pressed="true"] { color: var(--line); background: rgba(31, 95, 224, .08); }
.section--light .panel { background: var(--granite); box-shadow: 0 30px 60px -40px rgba(11, 18, 32, .25); }
.section__head { display: grid; gap: 22px; margin-bottom: clamp(44px, 6vw, 72px); max-width: 760px; }
.section__head h2 { font-size: var(--step-3); }
.section__head h2 em { color: var(--flame); }
.center { text-align: center; margin-inline: auto; justify-items: center; }

/* Reveal: visible at rest; JS only hides elements still below the fold */
.js .reveal.pending { opacity: 0; transform: translateY(40px); }
.reveal { transition: opacity 1.2s var(--ease), transform 1.2s var(--ease); }
.reveal.d1 { transition-delay: .12s; } .reveal.d2 { transition-delay: .24s; } .reveal.d3 { transition-delay: .36s; }

/* ---------- Stats ---------- */
.stats { border-block: 1px solid var(--etch); background: var(--granite); }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 46px 28px; border-left: 1px solid var(--etch); display: grid; gap: 10px; align-content: start; }
.stat:first-child { border-left: 0; }
.stat__num { font-family: var(--display); font-size: var(--step-3); line-height: 1; font-variant-numeric: tabular-nums lining-nums; }
.stat__num sup { font-size: .45em; color: var(--line); vertical-align: top; margin-left: 2px; }
.stat__label { color: var(--muted); font-size: .9rem; line-height: 1.5; }
@media (max-width: 820px) { .stats__grid { grid-template-columns: 1fr 1fr; } .stat:nth-child(3) { border-left: 0; } .stat:nth-child(n+3) { border-top: 1px solid var(--etch); } }
@media (max-width: 440px) { .stats__grid { grid-template-columns: 1fr; } .stat { border-left: 0; border-top: 1px solid var(--etch); } .stat:first-child { border-top: 0; } }

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; border-bottom: 1px solid var(--etch); padding-block: 26px; }
.marquee__track { display: flex; width: max-content; animation: marquee 42s linear infinite; }
.marquee__track span { font-family: var(--engrave); font-size: clamp(1.1rem, 2.4vw, 1.8rem); letter-spacing: .35em; color: transparent; -webkit-text-stroke: 1px rgba(232,236,243,.35); white-space: nowrap; padding-right: 2.2em; display: inline-flex; align-items: center; gap: 2.2em; }
.marquee__track span::after { content: ""; width: 7px; height: 7px; background: var(--line); transform: rotate(45deg); box-shadow: 0 0 10px var(--line); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Split ---------- */
.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(40px, 7vw, 110px); align-items: center; }
.split--rev .split__media { order: 2; }
.split__media { position: relative; min-width: 0; }
.split__media .frame { position: relative; overflow: hidden; aspect-ratio: 4 / 5; max-width: 100%; }
.split__media .frame img { width: 100%; height: 118%; object-fit: cover; will-change: transform; }
.split__media .tag { position: absolute; left: -1px; bottom: 34px; background: var(--night); padding: 18px 24px; border-left: 2px solid var(--line); font-family: var(--engrave); font-size: .72rem; letter-spacing: .28em; color: var(--muted); max-width: 80%; }
.split__media .tag strong { display: block; font-family: var(--display); font-size: 1.6rem; color: var(--text); letter-spacing: 0; font-weight: 500; }
.split__body { display: grid; gap: 26px; min-width: 0; }
.split__body h2 { font-size: var(--step-3); }
.split__body h2 em { color: var(--flame); }
.split__body p { color: var(--muted); max-width: 56ch; }
.signature { font-family: var(--display); font-style: italic; font-size: var(--step-1); color: var(--text); border-left: 2px solid var(--line); padding-left: 20px; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split--rev .split__media { order: 0; } .split__media .frame { aspect-ratio: 4 / 3; } }

/* ---------- Pillars ---------- */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--etch); border: 1px solid var(--etch); }
.pillar { background: var(--night); padding: 44px 36px 48px; display: grid; gap: 18px; align-content: start; position: relative; overflow: hidden; transition: background .6s var(--ease); }
.pillar::before { content: ""; position: absolute; left: 0; top: 0; height: 2px; width: 100%; background: var(--line); box-shadow: 0 0 14px var(--line); transform: scaleX(0); transform-origin: left; transition: transform .7s var(--ease); }
.pillar:hover { background: var(--stone); }
.pillar:hover::before { transform: scaleX(1); }
.pillar svg { width: 40px; height: 40px; stroke: var(--flame); fill: none; stroke-width: 1.2; }
.pillar h3 { font-size: var(--step-2); }
.pillar p { color: var(--muted); font-size: .96rem; }
.pillar a { margin-top: 6px; font-size: .74rem; letter-spacing: .2em; text-transform: uppercase; text-decoration: none; color: var(--text); display: inline-flex; gap: 10px; align-items: center; }
.pillar a span { transition: transform .4s var(--ease); }
.pillar a:hover span { transform: translateX(5px); }
@media (max-width: 900px) { .pillars { grid-template-columns: 1fr; } }

/* ---------- Gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: clamp(120px, 15vw, 210px); gap: 14px; }
.gallery figure { margin: 0; position: relative; overflow: hidden; background: var(--stone); }
.gallery figure img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease), filter 1s var(--ease); filter: grayscale(.55) brightness(.85); }
.gallery figure:hover img { transform: scale(1.06); filter: grayscale(0) brightness(1); }
.gallery figcaption { position: absolute; inset: auto 0 0 0; padding: 40px 20px 16px; background: linear-gradient(transparent, rgba(6,8,13,.9)); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text); transform: translateY(100%); transition: transform .6s var(--ease); }
.gallery figure:hover figcaption, .gallery figure:focus-within figcaption { transform: none; }
.g1 { grid-column: span 7; grid-row: span 2; } .g2 { grid-column: span 5; grid-row: span 1; } .g3 { grid-column: span 5; grid-row: span 1; }
.g4 { grid-column: span 4; grid-row: span 2; } .g5 { grid-column: span 4; grid-row: span 2; } .g6 { grid-column: span 4; grid-row: span 2; }
@media (max-width: 720px) { .gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 160px; } .gallery figure { grid-column: span 1 !important; grid-row: span 1 !important; } .gallery .g1 { grid-column: span 2 !important; grid-row: span 2 !important; } .gallery figcaption { transform: none; } }

/* ---------- Final call ---------- */
.final-call { position: relative; overflow: hidden; isolation: isolate; }
.final-call__bg { position: absolute; inset: 0; z-index: -2; }
.final-call__bg img { width: 100%; height: 100%; object-fit: cover; opacity: .28; filter: grayscale(.6); }
.final-call::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse at center, rgba(6,8,13,.4), var(--night) 75%); }
.radio { max-width: 760px; margin-inline: auto; border: 1px solid var(--etch); background: rgba(12, 16, 24, .82); backdrop-filter: blur(6px); }
.radio__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 22px; border-bottom: 1px solid var(--etch); font-size: .7rem; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }
.radio__live { display: inline-flex; gap: 10px; align-items: center; }
.radio__live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--line); box-shadow: 0 0 10px var(--line); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.radio__wave { display: flex; gap: 3px; align-items: center; height: 18px; }
.radio__wave i { width: 2px; background: var(--line); height: 30%; animation: wave 1.1s ease-in-out infinite; }
.radio__wave i:nth-child(2n) { animation-delay: -.3s; } .radio__wave i:nth-child(3n) { animation-delay: -.6s; } .radio__wave i:nth-child(5n) { animation-delay: -.8s; }
@keyframes wave { 50% { height: 100%; } }
.radio__log { padding: 30px 28px 34px; font-family: "IBM Plex Mono", ui-monospace, Consolas, monospace; font-size: .92rem; line-height: 1.9; min-height: 300px; display: grid; gap: 4px; align-content: start; }
.radio__log p { color: var(--muted); }
.radio__log p b { color: var(--line); font-weight: 500; margin-right: 10px; }
.radio__log p.final { color: var(--text); margin-top: 14px; font-family: var(--display); font-size: var(--step-2); line-height: 1.2; font-style: italic; }
.caret::after { content: "▍"; color: var(--line); animation: pulse .9s steps(1) infinite; margin-left: 2px; }
.radio__note { text-align: center; color: var(--muted); font-size: .88rem; margin-top: 26px; }

/* ---------- Candle ---------- */
.candle-band { text-align: center; }
.candle-wrap { display: grid; justify-items: center; gap: 28px; }
.candle { width: 70px; height: 200px; position: relative; margin-top: 40px; }
.candle__body { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 46px; height: 130px; background: linear-gradient(90deg, #cfc6b3, #f1eadb 45%, #b9b09d); border-radius: 4px 4px 2px 2px; }
.candle__body::before { content: ""; position: absolute; top: -2px; left: 0; right: 0; height: 10px; border-radius: 50%; background: #e7dfcd; }
.candle__wick { position: absolute; bottom: 128px; left: 50%; width: 2px; height: 14px; background: #2a241c; transform: translateX(-50%); }
.candle__flame { position: absolute; bottom: 138px; left: 50%; width: 20px; height: 44px; margin-left: -10px; border-radius: 50% 50% 35% 35% / 60% 60% 40% 40%; background: radial-gradient(ellipse at 50% 80%, #fff 0%, #ffe7a8 25%, var(--flame) 55%, rgba(242,120,60,.0) 75%); transform-origin: 50% 100%; opacity: 0; transform: scale(.2); transition: opacity .6s, transform .8s var(--ease); filter: blur(.4px); }
.candle__glow { position: absolute; bottom: 110px; left: 50%; width: 260px; height: 260px; margin-left: -130px; border-radius: 50%; background: radial-gradient(circle, rgba(242,194,123,.35), transparent 65%); opacity: 0; transition: opacity 1.2s; pointer-events: none; }
.candle.lit .candle__flame { opacity: 1; transform: scale(1); animation: flicker 2.6s ease-in-out infinite; }
.candle.lit .candle__glow { opacity: 1; animation: glow 3s ease-in-out infinite; }
@keyframes flicker { 0%,100% { transform: scale(1) rotate(-1deg); } 25% { transform: scale(1.04, .96) rotate(2deg); } 50% { transform: scale(.97, 1.05) rotate(-2deg); } 75% { transform: scale(1.02) rotate(1deg); } }
@keyframes glow { 50% { opacity: .7; } }
.candle-msg { min-height: 1.7em; color: var(--flame); font-family: var(--display); font-style: italic; font-size: var(--step-1); }

/* ---------- Quote ---------- */
.quote { text-align: center; max-width: 900px; margin-inline: auto; display: grid; gap: 30px; justify-items: center; }
.quote blockquote { margin: 0; font-family: var(--display); font-size: var(--step-3); line-height: 1.15; font-weight: 400; font-style: italic; text-wrap: balance; }
.quote cite { font-style: normal; font-family: var(--engrave); font-size: .78rem; letter-spacing: .3em; color: var(--muted); }

/* ---------- CTA band ---------- */
.cta-band { position: relative; overflow: hidden; isolation: isolate; padding-block: clamp(110px, 14vw, 190px); }
.cta-band__bg { position: absolute; inset: -15% 0; z-index: -2; }
.cta-band__bg img { width: 100%; height: 100%; object-fit: cover; }
.cta-band::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(6,8,13,.95) 0%, rgba(6,8,13,.7) 55%, rgba(6,8,13,.4)); }
.cta-band__inner { display: grid; gap: 28px; max-width: 640px; }
.cta-band h2 { font-size: var(--step-3); }
.cta-band h2 em { color: var(--flame); }
.cta-band p { color: var(--muted); }

/* ---------- Timeline (about) ---------- */
.timeline { position: relative; display: grid; gap: 0; max-width: 900px; margin-inline: auto; }
.timeline::before { content: ""; position: absolute; left: 120px; top: 0; bottom: 0; width: 1px; background: var(--etch); }
.timeline__fill { position: absolute; left: 120px; top: 0; width: 2px; margin-left: -.5px; background: var(--line); box-shadow: 0 0 12px var(--line); height: 0; transition: height .2s linear; }
.tl-item { display: grid; grid-template-columns: 120px 1fr; gap: 44px; padding-block: 34px; position: relative; }
.tl-item::before { content: ""; position: absolute; left: 120px; top: 46px; width: 11px; height: 11px; margin-left: -5px; background: var(--night); border: 1px solid var(--line); transform: rotate(45deg); }
.tl-year { font-family: var(--display); font-size: var(--step-2); color: var(--flame); line-height: 1; font-variant-numeric: lining-nums; }
.tl-item h3 { font-size: var(--step-1); font-family: var(--body); font-weight: 600; margin-bottom: 8px; }
.tl-item p { color: var(--muted); max-width: 60ch; }
@media (max-width: 600px) { .timeline::before, .timeline__fill, .tl-item::before { left: 6px; } .tl-item { grid-template-columns: 1fr; gap: 10px; padding-left: 34px; } .tl-item::before { top: 40px; } }

/* ---------- Values grid (about) ---------- */
.values { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--etch); border: 1px solid var(--etch); }
.value { background: var(--granite); padding: 38px 30px; display: grid; gap: 14px; align-content: start; }
.value__k { font-family: var(--engrave); font-size: .72rem; letter-spacing: .3em; color: var(--line); }
.value h3 { font-size: var(--step-2); }
.value p { color: var(--muted); font-size: .95rem; }
@media (max-width: 960px) { .values { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .values { grid-template-columns: 1fr; } }

/* ---------- Forms (donate, contact) ---------- */
.panel { background: var(--granite); border: 1px solid var(--etch); padding: clamp(26px, 4vw, 48px); position: relative; min-width: 0; }
.panel::before { content: ""; position: absolute; top: -1px; left: -1px; right: -1px; height: 2px; background: var(--line); box-shadow: 0 0 16px var(--line); }
.form { display: grid; gap: 26px; }
.form h2 { font-size: var(--step-2); }
.field { display: grid; gap: 8px; min-width: 0; }
.field label, .legend { font-size: .7rem; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--stone);
  border: 1px solid var(--etch); border-radius: 0; padding: 15px 16px;
  transition: border-color .3s, box-shadow .3s;
}
.field textarea { min-height: 150px; resize: vertical; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 22px) 52%, calc(100% - 16px) 52%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 44px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--line); box-shadow: 0 0 0 3px rgba(59,123,255,.18); }
.field input::placeholder, .field textarea::placeholder { color: #5b6476; }
.field .err { color: #ff8a8a; font-size: .82rem; min-height: 0; }
.field.invalid input, .field.invalid textarea, .field.invalid select { border-color: #ff8a8a; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 560px) { .row2 { grid-template-columns: 1fr; } }

.seg { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--etch); }
.seg button { font: 600 .76rem/1 var(--body); letter-spacing: .18em; text-transform: uppercase; padding: 16px; background: transparent; color: var(--muted); border: 0; cursor: pointer; transition: background .3s, color .3s; }
.seg button[aria-pressed="true"] { background: var(--text); color: var(--night); }
.amounts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.amounts button { font-family: var(--display); font-size: 1.7rem; padding: 16px 8px; background: var(--stone); color: var(--text); border: 1px solid var(--etch); cursor: pointer; transition: border-color .3s, background .3s, transform .3s var(--ease); font-variant-numeric: lining-nums; }
.amounts button:hover { border-color: var(--muted); transform: translateY(-2px); }
.amounts button[aria-pressed="true"] { border-color: var(--line); background: rgba(59,123,255,.12); box-shadow: inset 0 0 0 1px var(--line); }
.custom-amt { position: relative; }
.custom-amt span { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); font-family: var(--display); font-size: 1.3rem; }
.custom-amt input { padding-left: 34px; }
.impact-line { color: var(--flame); font-family: var(--display); font-style: italic; font-size: 1.2rem; min-height: 1.6em; transition: opacity .3s; }
.check { display: flex; gap: 12px; align-items: flex-start; color: var(--muted); font-size: .93rem; cursor: pointer; }
.check input { accent-color: var(--line); width: 18px; height: 18px; margin-top: 4px; flex: none; }
.form .btn { justify-content: center; width: 100%; padding-block: 20px; }
.fine { color: var(--muted); font-size: .8rem; display: flex; gap: 10px; align-items: center; justify-content: center; text-align: center; }
.fine svg { width: 14px; height: 14px; stroke: currentColor; fill: none; flex: none; }

.result { display: grid; gap: 18px; text-align: center; justify-items: center; padding-block: 30px; animation: fade .8s var(--ease) both; }
.result h2 { font-size: var(--step-3); }
.result p { color: var(--muted); max-width: 46ch; }
.result .seal { width: 74px; height: 74px; border: 1px solid var(--line); display: grid; place-items: center; transform: rotate(45deg); box-shadow: 0 0 30px -6px var(--line-glow); }
.result .seal svg { transform: rotate(-45deg); width: 30px; height: 30px; stroke: var(--line); fill: none; stroke-width: 1.6; }
.copy-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center; }
.copy-row code { font-family: "IBM Plex Mono", ui-monospace, monospace; background: var(--stone); border: 1px solid var(--etch); padding: 10px 14px; user-select: all; overflow-wrap: anywhere; }
.copy-row button { font: 600 .7rem/1 var(--body); letter-spacing: .18em; text-transform: uppercase; padding: 13px 16px; background: transparent; color: var(--text); border: 1px solid var(--etch); cursor: pointer; }

.donate-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(36px, 6vw, 90px); align-items: start; }
.donate-grid > * { min-width: 0; }
@media (max-width: 920px) { .donate-grid { grid-template-columns: 1fr; } }
.impact-list { display: grid; gap: 0; border-top: 1px solid var(--etch); }
.impact-list li { list-style: none; display: grid; grid-template-columns: 96px 1fr; gap: 22px; padding-block: 24px; border-bottom: 1px solid var(--etch); }
.impact-list ul, ul.impact-list { padding: 0; margin: 0; }
.impact-list b { font-family: var(--display); font-size: 2rem; font-weight: 500; line-height: 1; font-variant-numeric: lining-nums; }
.impact-list span { color: var(--muted); }
.sticky { position: sticky; top: 110px; }

/* ---------- FAQ ---------- */
.faq { max-width: 860px; margin-inline: auto; border-top: 1px solid var(--etch); }
.faq details { border-bottom: 1px solid var(--etch); }
.faq summary { list-style: none; cursor: pointer; padding: 26px 50px 26px 0; font-family: var(--display); font-size: var(--step-1); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after, .faq summary::before { content: ""; position: absolute; right: 10px; top: 50%; width: 16px; height: 1px; background: var(--line); transition: transform .4s var(--ease); }
.faq summary::before { transform: rotate(90deg); }
.faq details[open] summary::before { transform: rotate(0); }
.faq details p { color: var(--muted); padding-bottom: 26px; max-width: 70ch; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(36px, 6vw, 90px); align-items: start; }
.contact-grid > * { min-width: 0; }
@media (max-width: 920px) { .contact-grid { grid-template-columns: 1fr; } }
.channels { display: grid; gap: 0; border-top: 1px solid var(--etch); }
.channel { display: grid; grid-template-columns: 44px 1fr; gap: 20px; padding-block: 26px; border-bottom: 1px solid var(--etch); }
.channel svg { width: 26px; height: 26px; stroke: var(--line); fill: none; stroke-width: 1.3; margin-top: 4px; }
.channel h3 { font-family: var(--engrave); font-size: .74rem; letter-spacing: .26em; color: var(--muted); font-weight: 400; margin-bottom: 6px; }
.channel p { font-size: 1.08rem; overflow-wrap: anywhere; }
.channel p small { display: block; color: var(--muted); font-size: .88rem; }
.topic-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.topic-chips button { font: 500 .82rem/1 var(--body); padding: 11px 16px; background: transparent; color: var(--muted); border: 1px solid var(--etch); border-radius: 999px; cursor: pointer; transition: all .3s var(--ease); }
.topic-chips button:hover { color: var(--text); border-color: var(--muted); }
.topic-chips button[aria-pressed="true"] { color: #fff; border-color: var(--line); background: rgba(59,123,255,.16); }

/* ---------- Remembrance roll ---------- */
.roll__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px 30px; margin-bottom: 34px; padding-bottom: 22px; border-bottom: 1px solid var(--etch); }
.roll__meta { color: var(--muted); font-size: .9rem; }
.roll { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 1px; background: var(--etch); border: 1px solid var(--etch); }
.fallen { background: var(--night); display: grid; grid-template-columns: 112px 1fr; gap: 22px; padding: 28px 26px; position: relative; transition: background .5s var(--ease); min-width: 0; }
.fallen::before { content: ""; position: absolute; left: 0; top: 0; height: 2px; width: 100%; background: var(--line); box-shadow: 0 0 14px var(--line); transform: scaleX(0); transform-origin: left; transition: transform .7s var(--ease); }
.fallen:hover, .fallen:focus-within { background: var(--stone); }
.fallen:hover::before, .fallen:focus-within::before { transform: scaleX(1); }
.fallen__photo { width: 112px; aspect-ratio: 4 / 5; background: var(--stone); border: 1px solid var(--etch); overflow: hidden; display: grid; place-items: center; }
.fallen__photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.6); transition: filter .8s var(--ease); }
.fallen:hover .fallen__photo img { filter: grayscale(0); }
.fallen__photo svg { width: 40px; height: 40px; stroke: var(--etch); fill: none; stroke-width: 1.2; }
.fallen__body { display: grid; gap: 8px; align-content: start; min-width: 0; }
.fallen__eow { font-family: var(--engrave); font-size: .68rem; letter-spacing: .26em; color: var(--flame); }
.fallen__name { font-size: var(--step-1); line-height: 1.15; }
.fallen__agency { color: var(--muted); font-size: .86rem; line-height: 1.45; }
.fallen__summary { color: var(--muted); font-size: .88rem; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.fallen__link { margin-top: 4px; font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; text-decoration: none; color: var(--text); display: inline-flex; gap: 10px; align-items: center; justify-self: start; }
.fallen__link span { transition: transform .4s var(--ease); }
.fallen__link:hover span { transform: translateX(5px); }
.fallen--ghost { min-height: 210px; background: linear-gradient(90deg, var(--night), var(--granite), var(--night)); background-size: 200% 100%; animation: shimmer 1.6s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.roll__empty { grid-column: 1 / -1; background: var(--night); padding: 50px 26px; text-align: center; color: var(--muted); }
.roll__empty a { color: var(--text); }
.roll__credit { color: var(--muted); font-size: .82rem; margin-top: 22px; }
.roll__credit a { color: var(--text); }
@media (max-width: 420px) { .fallen { grid-template-columns: 84px 1fr; gap: 16px; padding: 22px 18px; } .fallen__photo { width: 84px; } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--etch); padding-block: 80px calc(36px + env(safe-area-inset-bottom, 0px)); background: var(--night); }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px; }
.footer__grid > * { min-width: 0; }
.footer__grid h4 { font-family: var(--engrave); font-weight: 400; font-size: .72rem; letter-spacing: .3em; color: var(--muted); margin: 0 0 18px; }
.footer__grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer__grid a { text-decoration: none; color: var(--text); opacity: .8; transition: opacity .3s, color .3s; }
.footer__grid a:hover { opacity: 1; color: var(--line); }
.footer__about p { color: var(--muted); margin-top: 20px; max-width: 36ch; font-size: .95rem; }
.footer__line { height: 1px; background: linear-gradient(90deg, transparent, var(--line), transparent); margin-block: 60px 26px; box-shadow: 0 0 12px var(--line-glow); }
.footer__base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; color: var(--muted); font-size: .8rem; }
@media (max-width: 860px) { .footer__grid { grid-template-columns: 1fr 1fr; } .footer__about { grid-column: 1 / -1; } }

/* ---------- Page transition ---------- */
.veil { position: fixed; inset: 0; z-index: 150; pointer-events: none; background: var(--night); opacity: 0; transition: opacity .45s var(--ease); }
.veil::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; background: var(--line); box-shadow: 0 0 16px var(--line); transform: scaleX(0); transition: transform .45s var(--ease); }
.leaving .veil { opacity: 1; }
.leaving .veil::after { transform: scaleX(1); }

/* Cursor glow (pointer devices) */
.cursor-glow { position: fixed; left: 0; top: 0; width: 420px; height: 420px; margin: -210px 0 0 -210px; border-radius: 50%; background: radial-gradient(circle, rgba(59,123,255,.07), transparent 65%); pointer-events: none; z-index: 1; transition: opacity .4s; }
@media (hover: none) { .cursor-glow { display: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js .reveal.pending { opacity: 1; transform: none; }
  .marquee__track { animation: none; }
}
