/* Global Christian Relief — concept relaunch (Tech Hub, powered by Tolowa Studio)
   Design system: editorial, dignified, token-driven. Light default, dark option. */

/* ---------- Tokens ---------- */
:root {
  --paper: #F7F3EC;
  --paper-2: #FFFFFF;
  --paper-3: #EFE8DC;
  --ink: #201B16;
  --ink-soft: #4B433A;
  --ink-mute: #877C6D;
  --line: #E0D6C6;
  --line-2: #D2C6B2;

  --ember: #B22B1F;
  --ember-lt: #C8402F;
  --ember-dim: rgba(178, 43, 31, .10);
  --gold: #A9822F;
  --slate: #40566A;

  --bg: var(--paper);
  --surface: var(--paper-2);
  --surface-2: var(--paper-3);

  --serif: "Spectral", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --wrap: 1140px;
  --gutter: clamp(20px, 5vw, 56px);
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 22px 55px -30px rgba(40, 28, 16, .45);
  --shadow-soft: 0 10px 30px -20px rgba(40, 28, 16, .40);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

:root[data-theme="dark"] {
  --paper: #17130F;
  --paper-2: #1F1A15;
  --paper-3: #26201A;
  --ink: #F4EEE4;
  --ink-soft: #CDC2B2;
  --ink-mute: #948877;
  --line: #352C24;
  --line-2: #45392E;
  --ember: #D4483A;
  --ember-lt: #E86C5C;
  --ember-dim: rgba(212, 72, 58, .16);
  --gold: #C9A45C;
  --slate: #7FA0B0;
  --shadow: 0 24px 60px -28px rgba(0, 0, 0, .7);
  --shadow-soft: 0 10px 30px -18px rgba(0, 0, 0, .6);
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background .4s var(--ease), color .4s var(--ease);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

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

/* ---------- Disclaimer ---------- */
.disclaimer {
  background: var(--ink);
  color: var(--paper);
  font-size: 12.5px;
  line-height: 1.5;
  text-align: center;
  padding: 9px var(--gutter);
  letter-spacing: .01em;
}
.disclaimer strong { color: #fff; }
:root[data-theme="dark"] .disclaimer { background: var(--ember); color: #fff; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.nav.is-scrolled { border-color: var(--line); box-shadow: var(--shadow-soft); }
.nav__inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--serif); font-weight: 600; }
.brand__mark {
  width: 15px; height: 15px; border-radius: 3px;
  background: var(--ember); box-shadow: 0 0 0 4px var(--ember-dim);
}
.brand__name { font-size: 16.5px; letter-spacing: -.01em; }
.brand__tag {
  font-family: var(--sans); font-size: 9.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .14em; color: var(--ember);
  border: 1px solid var(--ember); border-radius: 999px; padding: 1px 7px; margin-left: 8px;
  vertical-align: middle;
}
.nav__links { display: flex; gap: 26px; margin-left: auto; font-size: 14.5px; color: var(--ink-soft); }
.nav__links a { position: relative; transition: color .2s var(--ease); }
.nav__links a:hover { color: var(--ink); }
.nav__actions { display: flex; align-items: center; gap: 14px; }

.theme-toggle {
  width: 40px; height: 24px; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--surface-2); position: relative; cursor: pointer; padding: 0;
  transition: background .3s var(--ease);
}
.theme-toggle__dot {
  position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--gold); transition: transform .3s var(--ease);
}
:root[data-theme="dark"] .theme-toggle__dot { transform: translateX(16px); background: var(--ember-lt); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--sans); font-weight: 600; font-size: 15px;
  padding: 11px 22px; border-radius: 999px; cursor: pointer;
  background: var(--ember); color: #fff; border: 1px solid var(--ember);
  transition: transform .18s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease);
}
.btn:hover { background: var(--ember-lt); border-color: var(--ember-lt); transform: translateY(-1px); box-shadow: var(--shadow-soft); }
.btn--sm { padding: 8px 16px; font-size: 13.5px; }
.btn--lg { padding: 14px 30px; font-size: 16px; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn--ghost:hover { background: var(--surface-2); border-color: var(--ink-mute); color: var(--ink); }

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 9vw, 108px) 0; }
.section--band { background: var(--surface); border-block: 1px solid var(--line); }
.section--dark {
  background: var(--ink); color: var(--paper);
  --ink: var(--paper); --ink-soft: color-mix(in srgb, var(--paper) 78%, transparent);
  --ink-mute: color-mix(in srgb, var(--paper) 55%, transparent); --line: rgba(255,255,255,.14);
}
:root[data-theme="dark"] .section--dark { background: #0F0C09; }

.eyebrow, .section__label {
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .16em;
  color: var(--ember); margin-bottom: 18px;
}
.section__title {
  font-family: var(--serif); font-weight: 600; letter-spacing: -.015em; line-height: 1.06;
  font-size: clamp(30px, 5vw, 50px); margin-bottom: 18px;
}
.section__intro { font-size: clamp(17px, 2vw, 20px); color: var(--ink-soft); max-width: 62ch; }
.section__intro.center { margin-inline: auto; }
.body { color: var(--ink-soft); margin-top: 16px; max-width: 60ch; }
.fineprint { font-size: 12.5px; color: var(--ink-mute); margin-top: 22px; font-style: italic; }

.grid-2 { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 5vw, 64px); align-items: start; }

/* ---------- Hero ---------- */
.hero {
  padding: clamp(64px, 12vw, 140px) 0 clamp(48px, 8vw, 96px);
  background:
    radial-gradient(120% 80% at 85% -10%, var(--ember-dim), transparent 60%),
    linear-gradient(180deg, transparent, color-mix(in srgb, var(--ember) 4%, transparent));
}
.hero__title {
  font-family: var(--serif); font-weight: 700; letter-spacing: -.03em; line-height: .98;
  font-size: clamp(52px, 11vw, 128px); margin: 8px 0 26px;
}
.hero__title em { font-style: italic; color: var(--ember); }
.hero__lede { font-size: clamp(18px, 2.3vw, 23px); color: var(--ink-soft); max-width: 60ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero__cta.center { justify-content: center; }
.hero__trust { margin-top: 30px; font-size: 13.5px; color: var(--ink-mute); letter-spacing: .02em; }

/* ---------- Red List ---------- */
.redlist { list-style: none; margin-top: 40px; border-top: 1px solid var(--line); }
.redlist__row {
  display: grid;
  grid-template-columns: 54px 190px 1fr 120px;
  align-items: center; gap: 20px;
  padding: 20px 4px; border-bottom: 1px solid var(--line);
  transition: background .2s var(--ease);
}
.redlist__row:hover { background: var(--ember-dim); }
.redlist__rank { font-family: var(--serif); font-size: 26px; color: var(--ember); font-weight: 600; }
.redlist__place { font-family: var(--serif); font-size: 21px; font-weight: 600; }
.redlist__note { color: var(--ink-soft); font-size: 15px; }
.redlist__bar { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.redlist__bar i { display: block; height: 100%; width: var(--w); background: linear-gradient(90deg, var(--gold), var(--ember)); border-radius: 999px; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 40px; }
.stat { border-left: 2px solid var(--ember); padding-left: 20px; }
.stat__num { display: block; font-family: var(--serif); font-weight: 700; font-size: clamp(32px, 4.5vw, 50px); line-height: 1; letter-spacing: -.02em; }
.stat__label { display: block; margin-top: 8px; color: var(--ink-mute); font-size: 14px; }

/* ---------- Methodology panel ---------- */
.ticks { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 24px; }
.ticks li { position: relative; padding-left: 22px; font-size: 14.5px; color: var(--ink-soft); }
.ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--ember); font-weight: 700; }
.panel {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 38px); box-shadow: var(--shadow-soft);
}
.panel__kicker { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: var(--ember); margin-bottom: 14px; }
.panel__lead { color: var(--ink-soft); }
.panel__figs { display: flex; gap: 28px; margin: 26px 0 12px; flex-wrap: wrap; }
.panel__figs .big { display: block; font-family: var(--serif); font-weight: 700; font-size: 34px; color: var(--ink); line-height: 1; }
.panel__figs .cap { display: block; font-size: 12.5px; color: var(--ink-mute); margin-top: 6px; max-width: 22ch; }

/* ---------- Quote band ---------- */
.quote-band { background: var(--surface); border-block: 1px solid var(--line); text-align: center; }
.pullquote {
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: clamp(24px, 4vw, 40px); line-height: 1.25; letter-spacing: -.01em;
  max-width: 22ch; margin: 20px auto 24px;
}
.pullquote cite { display: block; font-style: normal; font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: var(--ember); margin-top: 20px; }

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 40px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(24px, 3vw, 32px); transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line-2); }
.card__title { font-family: var(--serif); font-size: 22px; font-weight: 600; margin-bottom: 12px; }
.card p { color: var(--ink-soft); font-size: 15.5px; }
.link { display: inline-block; margin-top: 18px; color: var(--ember); font-weight: 600; font-size: 15px; }
.link:hover { color: var(--ember-lt); }

/* ---------- Pillars ---------- */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 44px; }
.pillar { border-top: 2px solid var(--ember); padding-top: 20px; }
.pillar__no { font-family: var(--serif); font-size: 15px; color: var(--ember); font-weight: 600; letter-spacing: .1em; }
.pillar h3 { font-family: var(--serif); font-size: 22px; font-weight: 600; margin: 8px 0 10px; }
.pillar p { color: var(--ink-soft); font-size: 15px; }
.relaunch__by { margin-top: 48px; font-size: 14px; color: var(--ink-mute); letter-spacing: .02em; }
.relaunch__by strong { color: var(--ink); }

/* ---------- Final CTA ---------- */
.finalcta { background: radial-gradient(90% 120% at 50% 0%, var(--ember-dim), transparent 55%); }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: var(--paper); padding-top: clamp(48px, 7vw, 80px); }
:root[data-theme="dark"] .footer { background: #0F0C09; }
.footer__inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; padding-bottom: 44px; }
.footer .brand__name { font-family: var(--serif); font-size: 19px; }
.footer__brand p { color: color-mix(in srgb, var(--paper) 62%, transparent); font-size: 14.5px; margin-top: 14px; max-width: 44ch; }
.footer__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.footer__cols h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .14em; color: color-mix(in srgb, var(--paper) 55%, transparent); margin-bottom: 14px; }
.footer__cols a { display: block; color: color-mix(in srgb, var(--paper) 80%, transparent); font-size: 14.5px; padding: 4px 0; transition: color .2s var(--ease); }
.footer__cols a:hover { color: #fff; }
.footer__legal { border-top: 1px solid rgba(255,255,255,.12); padding-block: 22px 30px; }
.footer__legal p { font-size: 12.5px; color: color-mix(in srgb, var(--paper) 55%, transparent); line-height: 1.6; }
.footer__legal strong { color: color-mix(in srgb, var(--paper) 80%, transparent); }

/* ---------- Reveal animation ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav__links { display: none; }
  .grid-2 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .cards, .pillars { grid-template-columns: 1fr; }
  .redlist__row { grid-template-columns: 40px 1fr; grid-template-areas: "rank place" "rank note" "bar bar"; gap: 4px 16px; }
  .redlist__rank { grid-area: rank; align-self: start; }
  .redlist__place { grid-area: place; }
  .redlist__note { grid-area: note; }
  .redlist__bar { grid-area: bar; margin-top: 12px; }
  .footer__inner { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 520px) {
  .stats { grid-template-columns: 1fr; }
  .nav__actions .btn { display: none; }
}
