/* Fireball. [FIRE] — Type and nothing else, redrawn in ember.
   Palette + type tokens per DESIGN.md. */

:root {
  --bg: #0e0705;
  --surface: #1b0e09;
  --ink: #fff6ef;
  --muted: #a8988e;
  --accent: #ff4d1c;
  --accent-ink: #1a0a05;
  --field: #4a1005;
  --field-2: #fff6ef;
  --field-2-ink: #140906;
  --focus: #ffb38a;

  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2.5rem, 1.2rem + 5vw, 5.5rem);
  --step-display: clamp(72px, 9vw, 140px);

  --margin: clamp(16px, 3vw, 32px);
  --section-gap: clamp(40px, 6vw, 96px);

  color-scheme: dark;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Cabinet Grotesk", "Archivo", "Helvetica Neue", Arial, sans-serif;
  font-size: var(--step-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---- Ember canvas sits behind everything, never above content ---- */
#embers {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

::selection { background: var(--accent); color: var(--accent-ink); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 12px 20px;
  font-weight: 700;
  z-index: 10;
}
.skip-link:focus { left: var(--margin); top: var(--margin); }

/* ---- Type helpers ---- */
.display {
  font-size: var(--step-display);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.9;
}

h1, h2, h3 { font-weight: 800; letter-spacing: -0.035em; line-height: 0.95; }
h2 { font-size: var(--step-head); }
h3 { font-size: var(--step-lead); letter-spacing: -0.01em; line-height: 1.2; }

p { max-width: 68ch; }
.muted { color: var(--muted); }
.small { font-size: var(--step-small); }

/* ---- Layout frame: one pair of equal margins everywhere ---- */
.frame {
  padding-left: var(--margin);
  padding-right: var(--margin);
  max-width: 1440px;
  margin-inline: auto;
}

section { margin-bottom: var(--section-gap); }

/* ---- Top corner nav (no bar chrome) ---- */
.site-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 28px;
  margin-bottom: clamp(48px, 8vw, 96px);
}

.wordmark {
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}
.wordmark b { color: var(--accent); }

.site-nav { display: flex; gap: 28px; }
.site-nav a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--ink) 35%, transparent);
  text-underline-offset: 5px;
  font-weight: 500;
  font-size: var(--step-small);
}
.site-nav a:hover { text-decoration-color: var(--accent); color: var(--accent); }

/* ---- Buttons: flat, one fill, square ---- */
.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 800;
  font-size: var(--step-body);
  letter-spacing: -0.01em;
  text-decoration: none;
  padding: 18px 34px;
  border: 0;
  transition: transform 120ms ease, background 120ms ease;
}
.btn:hover { background: #ff6a3d; }
.btn:active { transform: translateY(2px); }
.btn-big { padding: 24px 48px; font-size: var(--step-lead); }

.btn-ghost {
  display: inline-block;
  border: 2px solid var(--ink);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  padding: 15px 30px;
  transition: border-color 120ms ease, color 120ms ease;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---- Hero: waterline. Two flat fields with a hard seam at 58% of the
       viewport; two stacked copies of the headline clipped to each field. ---- */
.hero {
  position: relative;
  min-height: calc(100svh - 140px);
  margin-bottom: var(--section-gap);
  padding-top: 0;
  padding-bottom: 32px;
}
/* the ember field, flat, hard seam at 58% — no gradient */
.hero {
  display: flex;
  flex-direction: column;
}
.waterline { flex: 1; }
.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: var(--seam, 58%);
  bottom: 0;
  background: var(--field);
  z-index: -1;
}

.waterline {
  position: relative;
  display: grid;
  place-items: start center;
  padding-top: 8px;
}
.wl-copy { grid-area: 1 / 1; text-align: center; }
.wl-top {
  color: var(--accent);                       /* over the void-black field */
  clip-path: inset(0 0 42% 0);
}
.wl-bottom {
  color: var(--ink);                          /* over the ember field */
  clip-path: inset(58% 0 0 0);
}
.waterline .line { display: block; }

.hero-copy {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-top: clamp(48px, 9vh, 120px);
}
.hero-copy p {
  max-width: 34ch;
  font-size: var(--step-lead);
  line-height: 1.4;
}

@media (max-width: 700px) {
  .hero { min-height: 88svh; }
  .hero-copy { flex-direction: column; align-items: flex-start; }
}

/* ---- Intro: heading left, note right ---- */
.intro-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}
.intro-grid h2 {
  grid-column: 1 / 7;
  font-weight: 500;
}
.intro-grid .note {
  grid-column: 10 / 13;
  align-self: end;
  font-size: var(--step-body);
}
@media (max-width: 900px) {
  .intro-grid { grid-template-columns: 1fr; }
  .intro-grid h2, .intro-grid .note { grid-column: auto; }
  .intro-grid .note { max-width: 46ch; }
}

/* ---- Facts row: like a printed programme line ---- */
.facts {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  margin-top: clamp(64px, 10vw, 120px);
}
.facts div { max-width: 220px; }
.facts dt {
  font-size: clamp(28px, 3vw, 44px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.05;
}
.facts dd { margin-top: 6px; color: var(--muted); font-size: var(--step-small); }

/* ---- Capability lines: type as picture ---- */
.capability-list { list-style: none; }
.capability-list li {
  font-size: clamp(34px, 5vw, 76px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.08;
}
.capability-list li span {
  color: var(--muted);
  font-weight: 400;
  font-size: var(--step-body);
  letter-spacing: 0;
  display: block;
  margin-bottom: 10px;
}
/* big label first, description tucked under it (was reversed: hard to pair on mobile) */
.capability-list li span { margin-bottom: 0; margin-top: 8px; }
.capability-list li { display: flex; flex-direction: column-reverse; }
.capability-list li + li { margin-top: 34px; }
.capability-list li:hover { color: var(--accent); }

/* ---- Doctrine section ---- */
.slot {
  background: var(--surface);
  padding: clamp(28px, 5vw, 64px);
  display: grid;
  gap: 16px;
}
.slot + .slot { margin-top: 24px; }
.slot-tag {
  font-weight: 800;
  color: var(--accent);
  font-size: var(--step-body);
}
.slot-art {
  min-height: 180px;
  border: 2px dashed color-mix(in srgb, var(--muted) 45%, transparent);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 500;
}
.slot p { color: var(--muted); max-width: 52ch; }
.slot .note { color: var(--ink); font-weight: 500; }

/* ---- Inverted ember CTA field ---- */
.cta-field {
  background: var(--accent);
  color: var(--accent-ink);
  padding: clamp(72px, 12vw, 160px) 0;
  margin-bottom: 0;
}
.cta-field .frame { display: grid; gap: 40px; }
.cta-field h2 { max-width: 12ch; }
.cta-field p { max-width: 44ch; font-size: var(--step-lead); font-weight: 500; }
.cta-field .btn {
  background: var(--accent-ink);
  color: var(--field-2);
}
.cta-field .btn:hover { background: #000; }

/* ---- Roster table (real table keeps its lines) ---- */
.roster-wrap { overflow-x: auto; }
table.roster {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--step-body);
  min-width: 640px;
}
.roster th, .roster td {
  text-align: left;
  padding: 14px 16px 14px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--muted) 28%, transparent);
}
.roster th {
  color: var(--muted);
  font-size: var(--step-small);
  font-weight: 700;
  border-bottom: 1px solid var(--muted);
}
.roster td.num, .roster th.num { text-align: right; font-variant-numeric: tabular-nums; padding-right: 0; }
.roster .ticker { color: var(--muted); }
.roster tr.total td { font-weight: 800; border-bottom: 0; border-top: 2px solid var(--ink); }
.roster tr:hover td { background: color-mix(in srgb, var(--surface) 70%, transparent); }

.executor-note {
  margin-top: 32px;
  font-size: var(--step-body);
  color: var(--muted);
  max-width: 52ch;
}
.executor-note strong { color: var(--ink); }

/* ---- Partners ---- */
.partners { display: grid; gap: 24px; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .partners { grid-template-columns: 1fr; } }

/* ---- Footer: name returns at full width ---- */
.site-footer {
  background: var(--surface);
  padding: 56px 0 48px;
  margin-top: var(--section-gap);
}
.footer-word {
  font-size: clamp(48px, 11vw, 160px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.9;
  color: var(--ink);
}
.footer-word b { color: var(--accent); }
.footer-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 40px;
  color: var(--muted);
  font-size: var(--step-small);
}
.footer-meta a { color: var(--muted); }
.footer-meta a:hover { color: var(--accent); }

/* ---- Motion ---- */
@keyframes rise {
  from { transform: translateY(110%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes fadeUp {
  from { transform: translateY(24px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.masked .line-inner {
  display: block;
  animation: rise 900ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
.masked .line:nth-child(2) .line-inner { animation-delay: 110ms; }
.hero-copy { animation: fadeUp 700ms ease 500ms both; }

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 640ms ease, transform 640ms ease;
}
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .masked .line-inner, .hero-copy { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .btn-ghost { transition: none; }
}

/* ?static=1 render mode: everything visible, nothing moves, hero pinned
   to a normal height so full-page captures don't inflate with svh */
.no-anim .line-inner, .no-anim .hero-copy { animation: none !important; }
.no-anim .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
.no-anim .hero { min-height: 760px; }
.no-anim .has-hero-logo .wordmark-logo, html.no-anim .wordmark-logo { opacity: 1 !important; transform: none !important; }

/* Wordmark logo: on the landing page it stays hidden until the hero
   logo (the big fireball) has scrolled past; always visible elsewhere. */
.wordmark-logo {
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.has-hero-logo .wordmark-logo {
  opacity: 0;
  transform: scale(0.5);
  max-width: 0;
  margin-right: 0;
  overflow: hidden;
}
.has-hero-logo.header-past-hero .wordmark-logo {
  opacity: 1;
  transform: scale(1);
  max-width: 40px;
  margin-right: 10px;
}

/* Hero logo parallax: drifts up slower than the page, gently scaling down */
.hero-logo { will-change: transform; }

@media (prefers-reduced-motion: reduce) {
  .fireball-swarm { display: none; }
}
.hero-logo, .wordmark-logo { transform: scaleX(-1) rotate(45deg); }

.wordmark-logo {
  display: inline-block;
  width: 34px;
  height: 34px;
  vertical-align: -9px;
  margin-right: 10px;
}
@media (max-width: 640px) {
  .wordmark-logo { width: 28px; height: 28px; vertical-align: -7px; margin-right: 8px; }
}

/* Hero logo */
.hero-logo {
  display: block;
  width: 120px;
  height: 120px;
  margin: 0 auto 16px;
  position: relative;
  z-index: 2;
}
@media (max-width: 640px) {
  .hero-logo { width: 88px; height: 88px; margin-bottom: 20px; }
}

/* Founder: King Ammarian */
.founder-grid {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}
.founder-portrait {
  width: 200px;
  height: 200px;
  border-radius: 0;
  flex-shrink: 0;
}
@media (max-width: 640px) {
  .founder-grid { flex-direction: column; gap: 24px; }
  .founder-portrait { width: 140px; height: 140px; }
}

/* Edict of the Amarr Faith: imperial proclamation, set apart */
.edict {
  margin: 24px 0 0;
  padding: 28px 0 0;
  border-top: 4px solid var(--accent);
}
.edict p {
  margin: 0 0 18px;
  font-size: var(--step-lead, 22px);
  line-height: 1.45;
  max-width: 58ch;
}
.edict strong { color: var(--accent); }

/* The Fireball Manifesto */
.manifesto { margin-top: 24px; max-width: 62ch; }
.manifesto p { margin: 0 0 18px; font-size: 19px; line-height: 1.55; }
.manifesto-lead { font-size: var(--step-lead, 26px) !important; line-height: 1.3 !important; }
.manifesto h3 {
  margin: 40px 0 14px;
  font-size: var(--step-head, 32px);
}
.manifesto-list {
  margin: 0 0 18px;
  padding-left: 0;
  list-style: none;
}
.manifesto-list li {
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 246, 239, 0.12);
  font-size: 19px;
}

html, body { overflow-x: clip; }
