/* ==========================================================================
   Heavy is the Crown — Pitch Site
   Parchment + oxblood + ink. Literary. Cinematic.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&family=Cormorant+SC:wght@300;400;500;600;700&family=EB+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500&family=IM+Fell+English:ital@0;1&family=IM+Fell+English+SC&family=IM+Fell+DW+Pica:ital@0;1&display=swap');

:root {
  /* parchment ladder */
  --parchment-50: #f3ead4;
  --parchment-100: #ede2c6;
  --parchment-200: #e3d4b1;
  --parchment-300: #d3c19a;
  --parchment-shadow: rgba(60, 35, 15, 0.08);

  /* ink + warm darks */
  --ink: #1c140d;
  --ink-soft: #3a2a1d;
  --ink-muted: #6b5742;
  --ink-faded: #8a7558;

  /* blood / oxblood */
  --oxblood: #6e1414;
  --oxblood-deep: #4a0808;
  --oxblood-dark: #2d0404;
  --blood: #8a1d1d;
  --rust: #a83a26;

  /* metals */
  --gold: #a8884a;
  --gold-faded: #c4a973;
  --gold-deep: #7a5e2e;

  --serif-display: 'Cormorant Garamond', 'EB Garamond', Georgia, serif;
  --serif-body: 'EB Garamond', Georgia, serif;
  --serif-caps: 'Cormorant SC', 'Cormorant Garamond', serif;

  --max: 1280px;
  --gutter: clamp(20px, 4vw, 56px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--parchment-100);
  color: var(--ink);
  font-family: var(--serif-body);
  font-size: 18px;
  line-height: 1.55;
  font-weight: 400;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* aged paper texture overlay — subtle */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image:
    radial-gradient(ellipse at 20% 10%, rgba(110, 20, 20, 0.04), transparent 60%),
    radial-gradient(ellipse at 80% 90%, rgba(60, 35, 15, 0.06), transparent 55%),
    radial-gradient(ellipse at 50% 50%, transparent 0%, rgba(60, 35, 15, 0.12) 100%);
  mix-blend-mode: multiply;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: 0.35;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240' viewBox='0 0 240 240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' seed='5'/><feColorMatrix values='0 0 0 0 0.4  0 0 0 0 0.25  0 0 0 0 0.1  0 0 0 0.5 0'/></filter><rect width='240' height='240' filter='url(%23n)' opacity='0.5'/></svg>");
  mix-blend-mode: multiply;
}

main, section, header, footer, nav { position: relative; z-index: 3; }

/* ---------- typography ---------- */

h1, h2, h3, h4 {
  font-family: var(--serif-display);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.05;
  text-wrap: balance;
}

p { text-wrap: pretty; }

.eyebrow {
  font-family: var(--serif-caps);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.32em;
  color: var(--oxblood);
  text-transform: uppercase;
}

.eyebrow .dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--oxblood);
  margin: 0 0.6em 2px;
  transform: rotate(45deg);
  vertical-align: middle;
}

.rule {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--oxblood);
  margin: 0;
}
.rule::before, .rule::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, currentColor 30%, currentColor 70%, transparent);
  opacity: 0.5;
}
.rule .glyph {
  width: 12px; height: 12px;
  background: currentColor;
  transform: rotate(45deg);
  flex: 0 0 auto;
}

/* ---------- layout ---------- */

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

section {
  padding: clamp(80px, 12vw, 160px) 0;
}

/* ---------- top bar ---------- */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 18px var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--serif-caps);
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-soft);
  pointer-events: none;
  transition: background 0.3s ease, backdrop-filter 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}
.topbar.scrolled {
  background: rgba(237, 226, 198, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom-color: rgba(110, 20, 20, 0.15);
}
.topbar > * { pointer-events: auto; }
.topbar .mark {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--oxblood);
}
.topbar .mark svg { width: 18px; height: 18px; }
.topbar .meta { color: var(--ink-muted); }

/* ---------- hero ---------- */
.hero {
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 120px var(--gutter) 80px;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 40%, rgba(255, 240, 200, 0.4), transparent 70%),
    radial-gradient(ellipse 100% 100% at 50% 100%, rgba(110, 20, 20, 0.18), transparent 60%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1100px;
}

.hero .sigil {
  width: clamp(90px, 12vw, 140px);
  height: clamp(90px, 12vw, 140px);
  margin: 0 auto 36px;
  color: var(--oxblood);
}

.hero h1 {
  font-family: var(--serif-display);
  font-weight: 500;
  font-size: clamp(58px, 11vw, 168px);
  line-height: 0.92;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 0;
}
.hero h1 .of {
  font-style: italic;
  font-weight: 400;
  color: var(--oxblood);
  font-size: 0.7em;
  display: inline-block;
  transform: translateY(-0.05em);
}
.hero h1 .lhs { display: block; }
.hero h1 .rhs { display: block; font-family: var(--serif-display); font-style: italic; font-weight: 400; }

/* ---------- CUSTOM TITLE MARK ---------- */
.title-mark {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin-bottom: 40px;
}

.title-crown-sigil {
  width: clamp(72px, 8vw, 110px);
  height: auto;
  color: var(--oxblood);
  margin-bottom: clamp(16px, 2vw, 28px);
}

h1.title {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: 'IM Fell English SC', 'Cormorant Garamond', serif;
  font-weight: 400;
  margin: 0;
  width: 100%;
  text-align: center;
  letter-spacing: 0;
  text-transform: none; /* SC font handles caps */
  line-height: 0.85;
}

.title-word {
  display: block;
  color: var(--ink);
  letter-spacing: 0.04em;
  /* engraved red-edge: subtle dual text-shadow */
  text-shadow:
    0 0 1px rgba(110, 20, 20, 0.18),
    0 2px 0 rgba(60, 35, 15, 0.05);
  position: relative;
}

.title-heavy {
  font-size: clamp(64px, 12vw, 168px);
  margin-right: 0.04em; /* visual centering */
}

.title-crown {
  font-size: clamp(72px, 13.5vw, 196px);
  letter-spacing: 0.08em;
  color: var(--ink);
  /* slight gradient fill — gold inside the strokes (progressive enhancement) */
  background: linear-gradient(180deg,
    var(--ink) 0%,
    var(--ink) 40%,
    var(--ink-soft) 55%,
    var(--ink) 80%,
    var(--ink) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  margin-left: 0.04em;
}
@supports (-webkit-background-clip: text) or (background-clip: text) {
  .title-crown { -webkit-text-fill-color: transparent; }
}

/* ornamental divider between HEAVY and CROWN */
.title-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 1.2vw, 18px);
  width: clamp(280px, 50vw, 620px);
  margin: clamp(14px, 2vw, 26px) 0;
}
.title-divider .dline {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--oxblood) 40%, var(--oxblood) 60%, transparent);
  position: relative;
}
.title-divider .dline::before,
.title-divider .dline::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 1px;
  height: 6px;
  background: var(--oxblood);
  transform: translateY(-50%);
}
.title-divider .dline::before { left: 30%; height: 4px; opacity: 0.4; }
.title-divider .dline::after  { left: 70%; height: 4px; opacity: 0.4; }
.title-divider .dpip {
  width: 7px;
  height: 7px;
  background: var(--oxblood);
  transform: rotate(45deg);
  flex-shrink: 0;
}
.title-divider em {
  font-family: 'IM Fell English', 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(15px, 1.8vw, 24px);
  color: var(--oxblood);
  letter-spacing: 0.04em;
  flex-shrink: 0;
  white-space: nowrap;
}

/* horizontal sword + blood drip beneath */
.title-sword {
  width: clamp(280px, 48vw, 580px);
  height: clamp(28px, 4vw, 44px);
  margin-top: clamp(20px, 2.5vw, 36px);
  color: var(--ink);
  overflow: visible;
}

/* blood drip animation */
@keyframes bloodDrip {
  0%   { transform: translateY(-8px); opacity: 0; }
  10%  { opacity: 1; }
  60%  { transform: translateY(28px); opacity: 1; }
  90%  { opacity: 0.4; }
  100% { transform: translateY(48px); opacity: 0; }
}
.title-sword .drip {
  animation: bloodDrip 5s ease-in 1.5s infinite;
  transform-origin: center;
}

/* stinger */
.title-stinger {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 2vw, 28px);
  margin-top: clamp(20px, 2.5vw, 32px);
  width: 100%;
  max-width: 700px;
}
.title-stinger .b {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--ink-faded) 60%, transparent);
  max-width: 100px;
}
.title-stinger > span:nth-child(2) {
  font-family: 'IM Fell English SC', 'Cormorant SC', serif;
  font-size: clamp(11px, 1.2vw, 15px);
  letter-spacing: 0.42em;
  color: var(--ink-soft);
  text-transform: uppercase;
  flex-shrink: 0;
  padding: 0 4px;
}
.title-stinger strong {
  font-weight: 400;
  color: var(--oxblood);
  font-style: italic;
  font-family: 'IM Fell English', serif;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.hero .ampersand {
  font-family: var(--serif-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(20px, 2.4vw, 32px);
  color: var(--oxblood);
  letter-spacing: 0.45em;
  text-transform: uppercase;
  margin: 36px 0 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}
.hero .ampersand .l, .hero .ampersand .r {
  height: 1px;
  width: 80px;
  background: linear-gradient(90deg, transparent, var(--oxblood) 50%, transparent);
}

.hero .logline-line {
  font-family: var(--serif-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(18px, 2vw, 26px);
  color: var(--ink-soft);
  max-width: 780px;
  margin: 0 auto;
  line-height: 1.45;
}

.hero .meta-row {
  display: flex;
  justify-content: center;
  gap: clamp(20px, 4vw, 56px);
  margin-top: 56px;
  font-family: var(--serif-caps);
  font-size: 11px;
  letter-spacing: 0.32em;
  color: var(--ink-muted);
  text-transform: uppercase;
}
.hero .meta-row span { display: flex; align-items: center; gap: 14px; }
.hero .meta-row span + span::before {
  content: '';
  width: 4px; height: 4px;
  background: var(--oxblood);
  transform: rotate(45deg);
  display: inline-block;
}

.scroll-cue {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--serif-caps);
  font-size: 10px;
  letter-spacing: 0.4em;
  color: var(--ink-muted);
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.scroll-cue .line {
  width: 1px;
  height: 40px;
  background: linear-gradient(180deg, transparent, var(--oxblood));
  animation: scrollLine 2.4s ease-in-out infinite;
  transform-origin: top;
}
@keyframes scrollLine {
  0%, 100% { transform: scaleY(0.3); opacity: 0.4; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* ---------- section header ---------- */
.section-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 64px;
  max-width: 880px;
}
.section-head h2 {
  font-size: clamp(40px, 6vw, 88px);
  line-height: 1;
  font-weight: 500;
}
.section-head h2 em {
  font-style: italic;
  font-weight: 400;
  color: var(--oxblood);
}
.section-head .num {
  font-family: var(--serif-caps);
  font-size: 12px;
  letter-spacing: 0.32em;
  color: var(--oxblood);
  display: flex;
  align-items: center;
  gap: 14px;
}
.section-head .num::after {
  content: '';
  width: 80px;
  height: 1px;
  background: var(--oxblood);
}

/* ---------- logline ---------- */
.logline-section {
  text-align: center;
  padding: clamp(100px, 14vw, 180px) 0;
  background: linear-gradient(180deg, var(--parchment-100) 0%, var(--parchment-50) 50%, var(--parchment-100) 100%);
}
.logline-section .quote-marks {
  font-family: var(--serif-display);
  font-style: italic;
  font-size: clamp(80px, 12vw, 160px);
  color: var(--oxblood);
  opacity: 0.35;
  line-height: 0.5;
  margin-bottom: 16px;
}
.logline-section .logline {
  font-family: var(--serif-display);
  font-weight: 400;
  font-size: clamp(28px, 4.4vw, 58px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
  max-width: 1100px;
  margin: 0 auto;
}
.logline-section .logline em {
  font-style: italic;
  color: var(--oxblood);
}
.logline-section .attrib {
  margin-top: 56px;
  font-family: var(--serif-caps);
  font-size: 11px;
  letter-spacing: 0.4em;
  color: var(--ink-muted);
}

/* ---------- mission / why now ---------- */
.mission {
  background: var(--ink);
  color: var(--parchment-50);
  position: relative;
  overflow: hidden;
}
.mission::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 40% at 30% 20%, rgba(168, 58, 38, 0.18), transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(110, 20, 20, 0.2), transparent 60%);
  pointer-events: none;
  z-index: 2;
}
/* drop-in background photo for the whole letter section */
.mission-bg {
  position: absolute !important;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  background: transparent;
}
/* dark scrim — fades in only when an image is dropped, keeping the inky / oxblood mood */
.mission-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 50% 40% at 30% 20%, rgba(110, 20, 20, 0.45), transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(74, 8, 8, 0.5), transparent 60%),
    linear-gradient(180deg, rgba(28, 20, 13, 0.82), rgba(28, 20, 13, 0.9));
  opacity: 0;
  transition: opacity 0.6s ease;
}
.mission:has(.mission-bg[data-filled]) .mission-scrim { opacity: 1; }
.mission .wrap { position: relative; z-index: 3; }
.mission .eyebrow { color: var(--rust); }
.mission .section-head h2 { color: var(--parchment-50); }
.mission .section-head h2 em { color: var(--rust); }
.mission .section-head .num { color: var(--rust); }
.mission .section-head .num::after { background: var(--rust); }

.mission-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.mission-grid .col p {
  font-size: clamp(17px, 1.4vw, 19px);
  line-height: 1.65;
  margin-bottom: 1.2em;
  color: var(--parchment-100);
}
.mission-grid .col p:first-letter {
  font-family: var(--serif-display);
  font-size: 4em;
  float: left;
  line-height: 0.85;
  margin: 6px 10px -4px 0;
  color: var(--rust);
  font-weight: 500;
}
.mission-grid .col + .col p:first-letter {
  font-size: 1em;
  float: none;
  margin: 0;
  color: inherit;
  font-family: inherit;
  font-weight: inherit;
}

.mission .pullquote {
  margin: 96px auto 0;
  max-width: 1000px;
  text-align: center;
  font-family: var(--serif-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.25;
  color: var(--parchment-50);
  position: relative;
  padding: 48px 0;
}
.mission .pullquote::before,
.mission .pullquote::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 1px;
  background: var(--rust);
}
.mission .pullquote::before { top: 0; }
.mission .pullquote::after { bottom: 0; }
.mission .pullquote em { color: var(--rust); }

.mission .need-list {
  margin: 96px auto 0;
  max-width: 980px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  text-align: center;
}
.mission .need-list .item {
  padding: 28px 18px;
  border: 1px solid rgba(212, 175, 116, 0.22);
  font-family: var(--serif-caps);
  font-size: 12px;
  letter-spacing: 0.32em;
  color: var(--parchment-200);
}
.mission .need-list .item strong {
  display: block;
  font-family: var(--serif-display);
  font-style: italic;
  font-weight: 400;
  font-size: 28px;
  letter-spacing: -0.01em;
  color: var(--rust);
  margin-bottom: 8px;
  text-transform: none;
}

/* ---------- world / Hiraeth ---------- */
.world {
  background: var(--parchment-50);
  position: relative;
  overflow: hidden;
}
/* drop-in background photo for the whole section */
.world-bg {
  position: absolute !important;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  background: transparent;
}
/* parchment scrim — fades in only when an image is dropped, keeping ink-on-parchment text legible */
.world-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255, 240, 200, 0.35), transparent 65%),
    radial-gradient(ellipse at 75% 80%, rgba(110, 20, 20, 0.06), transparent 60%),
    linear-gradient(180deg, rgba(243, 234, 212, 0.88), rgba(237, 226, 198, 0.92));
  opacity: 0;
  transition: opacity 0.6s ease;
}
.world:has(.world-bg[data-filled]) .world-scrim { opacity: 1; }
.world > .wrap { position: relative; z-index: 2; }

.world-intro {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
  margin-bottom: 96px;
}
.world-intro p {
  font-size: 19px;
  line-height: 1.65;
  margin-bottom: 1.2em;
  color: var(--ink-soft);
}
.world-intro .glyph-card {
  border: 1px solid rgba(110, 20, 20, 0.25);
  padding: 36px;
  background:
    linear-gradient(180deg, rgba(255, 240, 200, 0.4), transparent),
    var(--parchment-100);
  position: relative;
}
.world-intro .glyph-card::before,
.world-intro .glyph-card::after {
  content: '';
  position: absolute;
  width: 14px; height: 14px;
  border: 1px solid var(--oxblood);
  z-index: 3;
}
.world-intro .glyph-card::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.world-intro .glyph-card::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }
.world-intro .glyph-card .label {
  font-family: var(--serif-caps);
  font-size: 11px;
  letter-spacing: 0.32em;
  color: var(--oxblood);
  margin-bottom: 24px;
}
.world-intro .glyph-card .pron {
  font-family: var(--serif-display);
  font-size: clamp(36px, 4vw, 56px);
  line-height: 1;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.world-intro .glyph-card .pron .phon {
  font-style: italic;
  color: var(--ink-muted);
  font-size: 0.5em;
  font-weight: 400;
  margin-left: 0.5em;
}
.world-intro .glyph-card .def {
  font-family: var(--serif-display);
  font-style: italic;
  font-size: 22px;
  color: var(--oxblood);
  margin-bottom: 24px;
  border-top: 1px solid rgba(110, 20, 20, 0.2);
  padding-top: 24px;
}
.world-intro .glyph-card .def-en {
  font-size: 16px;
  color: var(--ink-soft);
  font-style: normal;
  margin-top: 6px;
}

/* provinces */
.provinces-head {
  margin: 96px 0 32px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.provinces-head h3 {
  font-size: clamp(32px, 4vw, 48px);
  font-style: italic;
  font-weight: 400;
}
.provinces-head h3 em { color: var(--oxblood); font-style: normal; }
.provinces-head .caption {
  font-family: var(--serif-caps);
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--ink-muted);
}

.provinces {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(110, 20, 20, 0.22);
  border: 1px solid rgba(110, 20, 20, 0.22);
}
.province {
  background: var(--parchment-50);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 240px;
  transition: background 0.3s ease;
}
.province:hover { background: var(--parchment-100); }
.province .crest {
  width: 44px; height: 44px;
  color: var(--oxblood);
}
.province .name {
  font-family: var(--serif-display);
  font-size: 32px;
  font-weight: 500;
  line-height: 1;
}
.province .meaning {
  font-family: var(--serif-display);
  font-style: italic;
  font-size: 14px;
  color: var(--oxblood);
  margin-top: -8px;
}
.province .desc {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin-top: auto;
}

/* factions */
.factions {
  margin-top: 96px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 32px;
}
.faction {
  padding: 40px 32px;
  border-top: 2px solid var(--oxblood);
  background: linear-gradient(180deg, rgba(110, 20, 20, 0.04), transparent 60%);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.faction .label {
  font-family: var(--serif-caps);
  font-size: 11px;
  letter-spacing: 0.32em;
  color: var(--oxblood);
}
.faction h4 {
  font-size: 28px;
  font-weight: 500;
  font-style: italic;
}
.faction p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* ---------- pilot ---------- */
.pilot {
  background: var(--parchment-100);
}
.pilot-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.pilot-aside {
  position: sticky;
  top: 100px;
  padding: 32px 24px;
  border-left: 2px solid var(--oxblood);
  background: linear-gradient(90deg, rgba(110, 20, 20, 0.05), transparent);
}
.pilot-aside .label {
  font-family: var(--serif-caps);
  font-size: 11px;
  letter-spacing: 0.32em;
  color: var(--oxblood);
  margin-bottom: 12px;
}
.pilot-aside h3 {
  font-family: var(--serif-display);
  font-size: 36px;
  font-style: italic;
  font-weight: 400;
  line-height: 1;
  margin-bottom: 16px;
}
.pilot-aside .ep {
  font-family: var(--serif-display);
  font-size: 14px;
  color: var(--ink-muted);
  font-style: italic;
}
.pilot-aside .runtime {
  margin-top: 24px;
  font-family: var(--serif-caps);
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--ink-muted);
  border-top: 1px solid rgba(110, 20, 20, 0.2);
  padding-top: 16px;
}

.pilot-body .beat {
  padding: 28px 0;
  border-bottom: 1px solid rgba(110, 20, 20, 0.15);
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 24px;
}
.pilot-body .beat:last-child { border-bottom: none; }
.pilot-body .beat .num {
  font-family: var(--serif-display);
  font-style: italic;
  font-size: 32px;
  color: var(--oxblood);
  line-height: 1;
}
.pilot-body .beat h4 {
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 10px;
}
.pilot-body .beat p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* ---------- characters ---------- */
.characters {
  background: var(--ink);
  color: var(--parchment-50);
  position: relative;
  overflow: hidden;
}
.characters::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 50% 0%, rgba(168, 58, 38, 0.16), transparent 60%);
  pointer-events: none;
}
.characters .wrap { position: relative; z-index: 2; }
.characters .eyebrow { color: var(--rust); }
.characters .section-head h2 { color: var(--parchment-50); }
.characters .section-head h2 em { color: var(--rust); }
.characters .section-head .num { color: var(--rust); }
.characters .section-head .num::after { background: var(--rust); }

.char-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.char-card {
  background: rgba(243, 234, 212, 0.04);
  border: 1px solid rgba(212, 175, 116, 0.18);
  padding: 0;
  display: flex;
  flex-direction: column;
  transition: background 0.4s ease, border-color 0.4s ease, transform 0.4s ease;
  overflow: hidden;
}
.char-card:hover {
  background: rgba(243, 234, 212, 0.07);
  border-color: rgba(168, 58, 38, 0.5);
  transform: translateY(-4px);
}
.char-card .portrait {
  aspect-ratio: 4/5;
  background:
    linear-gradient(180deg, rgba(28, 20, 13, 0.0) 40%, rgba(28, 20, 13, 0.95) 100%),
    var(--portrait-bg, linear-gradient(135deg, #2a1f18, #4a0808));
  position: relative;
  /* overflow handled by image-slot's internal frame so reframe handles + ctl buttons aren't clipped */
}
.char-card .portrait::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='2'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 1 0'/></filter><rect width='200' height='200' filter='url(%23n)' opacity='0.2'/></svg>");
  mix-blend-mode: overlay;
  opacity: 0.5;
}
.char-card .portrait .silhouette {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: end center;
  z-index: 1;
}
.char-card .portrait .silhouette svg {
  width: 70%;
  height: 90%;
  color: rgba(0, 0, 0, 0.55);
  filter: blur(0.3px);
}
.char-card .portrait .role-tag {
  position: absolute;
  top: 20px; left: 20px;
  z-index: 2;
  font-family: var(--serif-caps);
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--rust);
  padding: 6px 10px;
  border: 1px solid rgba(168, 58, 38, 0.5);
  background: rgba(28, 20, 13, 0.7);
  backdrop-filter: blur(4px);
}
.char-card .portrait .name-block {
  position: absolute;
  bottom: 20px; left: 24px; right: 24px;
  z-index: 2;
}
.char-card .portrait .name-block .name {
  font-family: var(--serif-display);
  font-size: 28px;
  font-weight: 500;
  color: var(--parchment-50);
  line-height: 1;
  margin-bottom: 4px;
}
.char-card .portrait .name-block .name em { font-style: italic; color: var(--gold-faded); }
.char-card .portrait .name-block .age {
  font-family: var(--serif-display);
  font-style: italic;
  font-size: 14px;
  color: var(--parchment-200);
  opacity: 0.7;
}

.char-card .bio {
  padding: 24px 24px 28px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--parchment-200);
  flex: 1;
}
.char-card .bio .title {
  font-family: var(--serif-caps);
  font-size: 10px;
  letter-spacing: 0.28em;
  color: var(--gold-faded);
  margin-bottom: 12px;
  display: block;
}

/* ---------- video / proof of concept ---------- */
.poc {
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(110, 20, 20, 0.15), transparent 70%),
    var(--ink);
  color: var(--parchment-50);
}
.poc .eyebrow { color: var(--rust); }
.poc .section-head h2 { color: var(--parchment-50); }
.poc .section-head h2 em { color: var(--rust); }
.poc .section-head .num { color: var(--rust); }
.poc .section-head .num::after { background: var(--rust); }
.poc .section-head p {
  font-size: 19px;
  color: var(--parchment-200);
  line-height: 1.55;
  max-width: 680px;
  margin-top: 16px;
}

.video-frame {
  position: relative;
  aspect-ratio: 16/9;
  border: 1px solid rgba(212, 175, 116, 0.25);
  background: #000;
  overflow: hidden;
  box-shadow:
    0 40px 120px rgba(0, 0, 0, 0.5),
    0 0 0 12px rgba(243, 234, 212, 0.04);
}
.video-frame::before,
.video-frame::after,
.video-frame .corner-tr,
.video-frame .corner-bl {
  content: '';
  position: absolute;
  width: 24px; height: 24px;
  border: 1px solid var(--rust);
  z-index: 5;
  pointer-events: none;
}
.video-frame::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.video-frame::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }
.video-frame .corner-tr { top: -1px; right: -1px; border-left: none; border-bottom: none; }
.video-frame .corner-bl { bottom: -1px; left: -1px; border-right: none; border-top: none; }

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-frame .placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--parchment-200);
  font-family: var(--serif-caps);
  font-size: 11px;
  letter-spacing: 0.32em;
  text-align: center;
  padding: 24px;
  background:
    radial-gradient(ellipse 60% 50% at 50% 50%, rgba(110, 20, 20, 0.3), transparent 70%),
    linear-gradient(135deg, #1a0808, #000);
}
.video-frame .placeholder .play {
  width: 84px; height: 84px;
  border: 1px solid var(--rust);
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-bottom: 24px;
  color: var(--rust);
}
.video-frame .placeholder .play svg { width: 28px; height: 28px; }
.video-frame .placeholder strong {
  display: block;
  font-family: var(--serif-display);
  font-size: 24px;
  font-style: italic;
  color: var(--parchment-50);
  letter-spacing: -0.01em;
  text-transform: none;
  margin-bottom: 6px;
}

.video-caption {
  margin-top: 32px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  font-family: var(--serif-caps);
  font-size: 11px;
  letter-spacing: 0.32em;
  color: var(--parchment-200);
}
.video-caption .l { color: var(--rust); }
.video-caption .r {
  font-family: var(--serif-display);
  font-style: italic;
  text-transform: none;
  letter-spacing: 0;
  font-size: 15px;
  color: var(--parchment-200);
}

.unmute-btn {
  position: absolute;
  bottom: 20px; right: 20px;
  z-index: 10;
  background: rgba(28, 20, 13, 0.85);
  color: var(--parchment-50);
  border: 1px solid var(--rust);
  padding: 10px 16px;
  font-family: var(--serif-caps);
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  backdrop-filter: blur(8px);
  transition: background 0.2s ease, transform 0.2s ease;
  opacity: 0;
  pointer-events: none;
}
.unmute-btn.show { opacity: 1; pointer-events: auto; }
.unmute-btn:hover { background: var(--oxblood); transform: translateY(-2px); }
.unmute-btn svg { width: 14px; height: 14px; }

/* ---------- tone & comparables ---------- */
.tone-section {
  background: var(--parchment-100);
}
.tone-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.tone-text p {
  font-size: 19px;
  line-height: 1.65;
  margin-bottom: 1.2em;
  color: var(--ink-soft);
}
.tone-text p em { color: var(--oxblood); font-style: italic; }
.tone-text .feel {
  font-family: var(--serif-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.2;
  color: var(--ink);
  margin: 32px 0;
  padding-left: 24px;
  border-left: 2px solid var(--oxblood);
}

.comps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: rgba(110, 20, 20, 0.25);
  border: 1px solid rgba(110, 20, 20, 0.25);
}
.comp {
  background: var(--parchment-50);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 200px;
}
.comp .label {
  font-family: var(--serif-caps);
  font-size: 10px;
  letter-spacing: 0.32em;
  color: var(--oxblood);
}
.comp .title {
  font-family: var(--serif-display);
  font-style: italic;
  font-weight: 500;
  font-size: 28px;
  line-height: 1.05;
  margin-bottom: 4px;
}
.comp .meta {
  font-family: var(--serif-caps);
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--ink-muted);
}
.comp .note {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-soft);
  margin-top: auto;
  font-style: italic;
}

/* moodboard */
.moodboard {
  margin-top: 96px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 200px 200px;
  gap: 16px;
}
.mood {
  background: var(--ink);
  border: 1px solid rgba(110, 20, 20, 0.4);
  position: relative;
  /* overflow handled by image-slot's internal frame */
  display: grid;
  place-items: end start;
  padding: 16px;
  color: var(--parchment-200);
  font-family: var(--serif-caps);
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}
.mood:nth-child(1) {
  grid-row: 1 / 3;
  background:
    radial-gradient(ellipse 80% 60% at 30% 30%, rgba(168, 58, 38, 0.35), transparent 60%),
    linear-gradient(135deg, #1a0808 0%, #0a0303 50%, #2a1f18 100%);
}
.mood:nth-child(2) {
  background:
    radial-gradient(ellipse 60% 80% at 50% 40%, rgba(212, 175, 116, 0.18), transparent 60%),
    linear-gradient(180deg, #2a1f18, #1c140d);
}
.mood:nth-child(3) {
  background:
    radial-gradient(circle at 80% 20%, rgba(110, 20, 20, 0.55), transparent 50%),
    linear-gradient(135deg, #0a0303, #1c140d);
}
.mood:nth-child(4) {
  background:
    radial-gradient(ellipse 70% 50% at 50% 100%, rgba(74, 8, 8, 0.6), transparent 60%),
    linear-gradient(180deg, #1c140d, #0a0303);
}
.mood:nth-child(5) {
  background:
    radial-gradient(circle at 30% 70%, rgba(168, 58, 38, 0.3), transparent 50%),
    linear-gradient(135deg, #2a1f18, #1a0808);
}
.mood::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='300' height='300'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 1 0'/></filter><rect width='300' height='300' filter='url(%23n)' opacity='0.4'/></svg>");
  mix-blend-mode: overlay;
  pointer-events: none;
}
.mood .caption { position: relative; z-index: 1; }

/* ---------- creator ---------- */
.creator-section {
  background: var(--parchment-50);
  position: relative;
}
.creator-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.creator-portrait {
  aspect-ratio: 4/5;
  background:
    linear-gradient(180deg, rgba(28, 20, 13, 0) 60%, rgba(28, 20, 13, 0.7) 100%),
    linear-gradient(135deg, #2a1f18, #1a0808);
  border: 1px solid rgba(110, 20, 20, 0.25);
  position: relative;
  /* overflow handled by image-slot's internal frame */
}
.creator-portrait::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='2'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 1 0'/></filter><rect width='200' height='200' filter='url(%23n)' opacity='0.25'/></svg>");
  mix-blend-mode: overlay;
}
.creator-portrait .silhouette {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: end center;
}
.creator-portrait .silhouette svg {
  width: 70%; height: 92%;
  color: rgba(0, 0, 0, 0.55);
}
.creator-portrait .tag {
  position: absolute;
  bottom: 24px; left: 24px;
  font-family: var(--serif-caps);
  font-size: 11px;
  letter-spacing: 0.32em;
  color: var(--gold-faded);
  z-index: 2;
}

.creator-bio h2 {
  font-size: clamp(40px, 5vw, 72px);
  line-height: 1;
  margin-bottom: 8px;
}
.creator-bio h2 em { font-style: italic; color: var(--oxblood); }
.creator-bio .roles {
  font-family: var(--serif-caps);
  font-size: 12px;
  letter-spacing: 0.32em;
  color: var(--oxblood);
  margin-bottom: 32px;
}
.creator-bio p {
  font-size: 18px;
  line-height: 1.7;
  margin-bottom: 1.2em;
  color: var(--ink-soft);
}
.creator-bio p em { font-style: italic; color: var(--ink); }

/* ---------- footer / contact ---------- */
.footer {
  background: var(--ink);
  color: var(--parchment-100);
  padding: 120px 0 64px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.footer::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(168, 58, 38, 0.18), transparent 60%);
}
.footer .wrap { position: relative; z-index: 2; }
.footer .sigil {
  width: 56px; height: 56px;
  color: var(--rust);
  margin: 0 auto 32px;
}
.footer h2 {
  font-family: var(--serif-display);
  font-size: clamp(48px, 7vw, 96px);
  font-weight: 500;
  color: var(--parchment-50);
  line-height: 1;
  margin-bottom: 24px;
}
.footer h2 em { font-style: italic; color: var(--rust); }
.footer .tagline {
  font-family: var(--serif-display);
  font-style: italic;
  font-size: clamp(18px, 2vw, 24px);
  color: var(--parchment-200);
  margin-bottom: 56px;
}
.footer .contact-line {
  font-family: var(--serif-caps);
  font-size: 12px;
  letter-spacing: 0.4em;
  color: var(--gold-faded);
  margin-bottom: 56px;
}
.footer .contact-line a {
  color: var(--parchment-50);
  text-decoration: none;
  border-bottom: 1px solid var(--rust);
  padding-bottom: 2px;
  transition: color 0.2s ease;
}
.footer .contact-line a:hover { color: var(--rust); }
.footer .colophon {
  font-family: var(--serif-caps);
  font-size: 10px;
  letter-spacing: 0.32em;
  color: var(--ink-muted);
  padding-top: 40px;
  border-top: 1px solid rgba(212, 175, 116, 0.15);
}

/* ---------- audio toggle ---------- */
.audio-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px 10px 12px;
  background: rgba(28, 20, 13, 0.85);
  color: var(--parchment-100);
  border: 1px solid rgba(168, 58, 38, 0.5);
  font-family: var(--serif-caps);
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 0.25s ease, transform 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}
.audio-toggle:hover {
  background: var(--oxblood);
  border-color: var(--rust);
  transform: translateY(-2px);
  color: var(--parchment-50);
}
.audio-toggle .audio-icon {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  color: var(--rust);
}
.audio-toggle .audio-icon svg { width: 18px; height: 18px; position: absolute; }
.audio-toggle .audio-icon .i-on { display: none; }
.audio-toggle.playing .audio-icon .i-on { display: block; }
.audio-toggle.playing .audio-icon .i-off { display: none; }
.audio-toggle.muted .audio-icon .i-on { display: none; }
.audio-toggle.muted .audio-icon .i-off { display: block; }

.audio-toggle .audio-eq {
  display: inline-flex;
  align-items: end;
  gap: 2px;
  height: 14px;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.audio-toggle.playing .audio-eq { opacity: 1; }
.audio-toggle .audio-eq i {
  display: block;
  width: 2px;
  background: var(--rust);
  animation: eq 1.2s ease-in-out infinite;
  height: 6px;
}
.audio-toggle .audio-eq i:nth-child(1) { animation-delay: 0s; }
.audio-toggle .audio-eq i:nth-child(2) { animation-delay: 0.18s; }
.audio-toggle .audio-eq i:nth-child(3) { animation-delay: 0.36s; }
.audio-toggle .audio-eq i:nth-child(4) { animation-delay: 0.54s; }
@keyframes eq {
  0%, 100% { height: 4px; }
  50%      { height: 12px; }
}

@media (max-width: 640px) {
  .audio-toggle { bottom: 16px; right: 16px; padding: 8px 12px 8px 10px; font-size: 10px; gap: 8px; }
  .audio-toggle .audio-label { display: none; }
}

/* ---------- supporting cast strip ---------- */
.support-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.support-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.support-portrait {
  aspect-ratio: 4/5;
  background:
    linear-gradient(180deg, rgba(28, 20, 13, 0) 50%, rgba(28, 20, 13, 0.85) 100%),
    linear-gradient(135deg, #2a1f18, #1a0808);
  border: 1px solid rgba(212, 175, 116, 0.15);
  position: relative;
  margin-bottom: 14px;
}
.support-card h4 {
  font-family: var(--serif-display);
  font-size: 20px;
  font-weight: 500;
  color: var(--parchment-50);
  line-height: 1.05;
  margin-bottom: 2px;
}
.support-card h4 em {
  font-style: italic;
  color: var(--rust);
}
.support-card .support-role {
  font-family: var(--serif-caps);
  font-size: 10px;
  letter-spacing: 0.28em;
  color: var(--gold-faded);
  margin-bottom: 6px;
}
.support-card p {
  font-size: 14px;
  line-height: 1.55;
  color: var(--parchment-200);
}

@media (max-width: 1024px) {
  .support-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .support-grid { grid-template-columns: 1fr; }
}

/* ---------- image-slot integration ---------- */
/* portrait slots inside character cards + creator section */
.portrait-slot {
  position: absolute !important;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  /* let the parent's background gradient show through when empty */
  background: transparent;
}
.portrait-slot::part(frame) {
  background: transparent;
}
/* the silhouette is gone — make sure role-tag + name-block sit above the slot */
.char-card .role-tag,
.char-card .name-block {
  z-index: 4;
}
.creator-portrait .tag { z-index: 4; }

/* keep the dark-bottom gradient overlay visible above the image so the
   name-block is legible. Add it as a separate ::after on the portrait. */
.char-card .portrait::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(28,20,13,0) 45%, rgba(28,20,13,0.85) 100%);
}
.creator-portrait::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(28,20,13,0) 55%, rgba(28,20,13,0.7) 100%);
}

/* mood slots fill their tile, caption overlays on top */
.mood-slot {
  position: absolute !important;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: transparent;
}
.mood {
  position: relative;
}
.mood .caption {
  position: relative;
  z-index: 4;
  background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,0.55) 80%);
  padding: 18px 16px 12px;
  margin: -16px;
  width: calc(100% + 32px);
  align-self: end;
  display: block;
}
/* darken-overlay on mood for legibility when image is dropped */
.mood::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,0) 50%, rgba(0,0,0,0.45) 100%);
}

/* ---------- reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 1.1s cubic-bezier(.22,.61,.36,1), transform 1.1s cubic-bezier(.22,.61,.36,1);
  will-change: opacity, transform;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
.reveal[data-d="1"] { transition-delay: 0.08s; }
.reveal[data-d="2"] { transition-delay: 0.16s; }
.reveal[data-d="3"] { transition-delay: 0.24s; }
.reveal[data-d="4"] { transition-delay: 0.32s; }
.reveal[data-d="5"] { transition-delay: 0.4s; }
.reveal[data-d="6"] { transition-delay: 0.48s; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.in { opacity: 1; transform: none; transition: none; }
  .scroll-cue .line { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .mission-grid { grid-template-columns: 1fr; }
  .world-intro { grid-template-columns: 1fr; }
  .provinces { grid-template-columns: repeat(2, 1fr); }
  .factions { grid-template-columns: 1fr; }
  .pilot-grid { grid-template-columns: 1fr; }
  .pilot-aside { position: relative; top: auto; }
  .char-grid { grid-template-columns: repeat(2, 1fr); }
  .tone-grid { grid-template-columns: 1fr; }
  .creator-grid { grid-template-columns: 1fr; max-width: 600px; }
  .creator-portrait { max-width: 320px; }
  .moodboard { grid-template-columns: 1fr 1fr; grid-template-rows: repeat(3, 180px); }
  .moodboard .mood:nth-child(1) { grid-row: 1 / 3; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .topbar { font-size: 10px; padding: 14px 20px; }
  .topbar .meta { display: none; }
  .hero { padding: 100px 20px 80px; }
  .hero .meta-row { flex-wrap: wrap; gap: 12px; }
  .hero .meta-row span + span::before { display: none; }
  .provinces { grid-template-columns: 1fr; }
  .char-grid { grid-template-columns: 1fr; }
  .comps { grid-template-columns: 1fr; }
  .moodboard { grid-template-columns: 1fr; grid-template-rows: repeat(5, 160px); }
  .moodboard .mood:nth-child(1) { grid-row: auto; }
  .mission .need-list { grid-template-columns: 1fr; }
  .pilot-body .beat { grid-template-columns: 1fr; gap: 8px; }
  .video-caption { flex-direction: column; }
}

/* ====================================================================
   UNIVERSAL DROP-IN BACKGROUNDS
   Every <section> can host a drag-and-droppable backdrop. Place an
   <image-slot class="drop-bg"> and a <div class="drop-scrim dark|light">
   as the first children of any section tagged .has-drop-bg.
   ==================================================================== */
.has-drop-bg { position: relative; overflow: hidden; }
.drop-bg {
  position: absolute !important;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  background: transparent;
}
.drop-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.drop-scrim.dark {
  background:
    radial-gradient(ellipse 50% 40% at 30% 20%, rgba(110, 20, 20, 0.45), transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(74, 8, 8, 0.5), transparent 60%),
    linear-gradient(180deg, rgba(28, 20, 13, 0.82), rgba(28, 20, 13, 0.9));
}
.drop-scrim.light {
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255, 240, 200, 0.35), transparent 65%),
    radial-gradient(ellipse at 75% 80%, rgba(110, 20, 20, 0.06), transparent 60%),
    linear-gradient(180deg, rgba(243, 234, 212, 0.88), rgba(237, 226, 198, 0.92));
}
.has-drop-bg:has(> .drop-bg[data-filled]) > .drop-scrim { opacity: 1; }
/* keep any decorative ::before / ::after gradient layer above the drop image
   but below the scrim so the inky / parchment mood holds even when filled */
.has-drop-bg::before { z-index: 0; }
/* lift the section's primary content above bg + scrim */
.has-drop-bg > .wrap,
.has-drop-bg > .hero-inner { position: relative; z-index: 3; }
