/* The landing page of Spark & Siege, the game (spark-and-siege/index.html),
   "The Muster Roll" (owner pick, 2026-10-16): the key art opens and launches
   the trailer, then the page is
   built from the game's own interface: the ink-blue deck, plates with a
   gold hairline, the HUD rail, the gem art, the "joins the battle" banner.
   Two families: Alegreya for headlines and banners, Alegreya Sans for copy,
   labels and controls. Gold only for the main action and hairlines. */
@font-face {
  font-family: "Alegreya";
  src: url("fonts/Alegreya-Variable.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}
@font-face {
  font-family: "Alegreya Sans";
  src: url("fonts/AlegreyaSans-Medium.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --night: #0c1322;
  --deck: #11172c;
  --rail: #0a1020;
  --hair: #c9a24a;
  --line: rgba(233, 227, 212, 0.12);
  --cream: #f3ead6;
  --ink: #e6dfcf;
  --muted: #a9b2c6;
  --gold: #f2c14e;
  --gutter: 20px;
  --section: 48px;
  --max: 1120px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--night); color: var(--ink);
  font: 500 1.125rem/1.55 "Alegreya Sans", system-ui, sans-serif;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
ul, ol { list-style: none; margin: 0; padding: 0; }
figure { margin: 0; }

.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }

h1, h2, h3 { font-family: "Alegreya", Georgia, serif; color: var(--cream); margin: 0; font-weight: 800; line-height: 1.12; }
h2 { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.75rem); text-wrap: balance; }
p { margin: 0; }

/* The HUD's small-caps voice, for labels. */
.label, .rail i, .acts i {
  font: 700 0.8125rem/1.2 "Alegreya Sans", system-ui, sans-serif; letter-spacing: 0.1em; text-transform: uppercase; font-style: normal;
}

/* A panel on the deck, as the game draws them: square, ink blue, a gold
   hairline with a faint second line inside it. */
.plate {
  background: var(--deck); border: 1px solid var(--hair); border-radius: 3px;
  box-shadow: inset 0 0 0 3px var(--deck), inset 0 0 0 4px rgba(201, 162, 74, 0.28), 0 14px 40px rgba(0, 0, 0, 0.35);
}

/* The one action. */
.play {
  display: inline-flex; align-items: center; gap: 10px; border: 0; cursor: pointer;
  background: var(--gold); color: #1b1408; border-radius: 999px; padding: 13px 22px 13px 16px;
  font: 700 1.0625rem/1 "Alegreya Sans", system-ui, sans-serif;
  box-shadow: 0 6px 24px rgba(242, 193, 78, 0.25);
}
.play:hover { background: #ffd36b; }
.play:focus-visible { outline: 3px solid var(--cream); outline-offset: 3px; }
.play .tri { width: 28px; height: 28px; border-radius: 50%; background: #1b1408; display: grid; place-items: center; }
.play .tri::before { content: ""; border-left: 9px solid var(--gold); border-top: 6px solid transparent; border-bottom: 6px solid transparent; margin-left: 3px; }
.play small { font-weight: 500; opacity: 0.75; }

/* Plain words: Apple's marks belong only in the official badge, once the
   game is on the App Store. */
.soon {
  display: inline-flex; align-items: center; gap: 10px; color: var(--cream);
  font: 700 0.95rem/1 "Alegreya Sans", system-ui, sans-serif; letter-spacing: 0.06em; text-transform: uppercase;
}
.soon::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px var(--gold); }

/* Real game footage. */
.shot { position: relative; overflow: hidden; background: #000; border-radius: 6px; }
.shot img, .shot video { width: 100%; height: auto; }
.shot video[data-intro] { display: block; aspect-ratio: 720 / 900; object-fit: cover; }

/* The game's "joins the battle" banner: a navy band ruled in gold across
   the lower picture, the name in capitals. */
.banner {
  position: absolute; left: 0; right: 0; bottom: 16px; padding: 9px 12px 8px; text-align: center;
  background: rgba(10, 16, 32, 0.88); border-block: 1px solid var(--hair);
  font: 700 1.0625rem/1.1 "Alegreya Sans", system-ui, sans-serif; letter-spacing: 0.1em; text-transform: uppercase; color: var(--cream);
}

/* The poster. Phone: the portrait key art at full height, the heroes
   standing on the wall at its foot, the logo and the words in its sky. */
.poster {
  position: relative; display: grid; overflow: hidden;
  background: linear-gradient(#5d8fd0 0%, #9fc2e8 38%, #f3cf9a 62%, #c58d5a 100%);
}
.poster picture, .poster .art { position: absolute; inset: 0; width: 100%; height: 100%; }
.poster { min-height: min(100svh - var(--site-head-px) - env(safe-area-inset-top), 980px); }   /* the site's header (site-frame.css) stands above it */
.poster .art { object-fit: cover; object-position: 50% 100%; }
.poster .copy {
  position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: flex-start; align-items: center;
  gap: 12px; padding: 16px var(--gutter) 0;
}
.poster .logo { width: min(31vw, 120px); height: auto; filter: drop-shadow(0 8px 18px rgba(20, 30, 60, 0.45)); }
/* The words sit straight on the painted sky, in the deck's ink, with a
   soft cream halo so a cloud behind a letter never swallows it. On a phone
   a feathered pool of cream light also lies behind the whole block, calming
   the clouds there: it reaches past the words by --glow-reach-x/-y, as
   padding the negative margin takes back, so the layout does not move. */
.callout {
  --glow-reach-x: 60px; --glow-reach-y: 42px;
  display: grid; justify-items: center; gap: 12px; text-align: center; width: min(100% + 2 * var(--glow-reach-x), 420px + 2 * var(--glow-reach-x));
  padding: var(--glow-reach-y) var(--glow-reach-x); margin: calc(-1 * var(--glow-reach-y)) calc(-1 * var(--glow-reach-x));
  background: radial-gradient(closest-side, rgba(255, 248, 232, 0.92), rgba(255, 248, 232, 0.8) 45%, rgba(255, 248, 232, 0.45) 75%, rgba(255, 248, 232, 0));
}
.callout h1 { font-size: 1.75rem; line-height: 1.1; color: #121a33; text-shadow: 0 0 2px rgba(255, 248, 232, 0.9), 0 0 22px rgba(255, 248, 232, 0.75); }
.callout .soon { color: #121a33; text-shadow: 0 0 12px rgba(255, 248, 232, 0.9); }
.callout .soon::before { background: #121a33; box-shadow: none; }
.callout h1 span { white-space: nowrap; }
.callout h1 span:last-child { display: block; }

/* The HUD rail: the bridge from the poster to the deck, drawn as the game
   draws its top bar. Decorative. */
.rail {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--rail); border-block: 1px solid var(--hair); padding: 10px var(--gutter);
  color: var(--cream); font: 600 0.9375rem/1 "Alegreya Sans", system-ui, sans-serif;
}
.rail i { color: var(--muted); margin-right: 4px; }
.rail b { font: 800 1.25rem/1 "Alegreya", Georgia, serif; color: var(--gold); }
.rail .keep { display: grid; grid-template-columns: auto auto 1fr; align-items: baseline; column-gap: 4px; }
.rail .bar { grid-column: 1 / -1; height: 4px; margin-top: 6px; background: rgba(242, 193, 78, 0.18); border-radius: 2px; overflow: hidden; }
.rail .bar span { display: block; height: 100%; width: 100%; background: var(--gold); transform-origin: left; }
.rail.armed .bar span { transform: scaleX(0); }
.rail.armed.on .bar span { transform: scaleX(1); transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); }
.rail .field i:nth-of-type(2) { margin-left: 12px; }

/* The board: the real phone screen, big, beside the three schools. */
.board { padding: var(--section) 0 0; }
.board .intro { display: grid; gap: 14px; margin-bottom: 8px; }

/* One Screen. Without script or with reduced motion: three stills in a row
   (.stage-still). With script: the phone screen pins for three scroll steps
   (.stage-step sentinels under it); landing.js marks the active step on
   [data-active], plays that clip once and lets it hold its last frame. */
.stage { display: none; position: relative; }
html.staged .stage { display: block; }
/* Staged, the list stays for screen readers (each step's cause, effect and
   picture together) but leaves the screen. */
html.staged .stage-still { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.stage-pin {
  position: sticky; top: 0; height: 100svh; display: grid; place-content: center; justify-items: center;
  grid-template-rows: auto auto; row-gap: 12px;
}
.stage-screen {
  position: relative; grid-area: 1 / 1; aspect-ratio: 600 / 1300;
  /* Phone: short enough that the step's words fit under it, off the board. */
  width: min(calc(100vw - 2 * var(--gutter)), calc((100svh - 150px) * 600 / 1300));
  border-radius: 22px; overflow: hidden; background: #000;
  border: 1px solid rgba(201, 162, 74, 0.55); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
.step-clip { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.3s; }
.step-clip.on { opacity: 1; }
/* Phone: the words under the screen, the game's callout plate. */
.stage-words {
  grid-area: 2 / 1; width: min(calc(100vw - 2 * var(--gutter)), 360px); padding: 10px 14px 12px; text-align: center;
  background: rgba(10, 16, 32, 0.9); border-block: 1px solid var(--hair);
}
.stage-kickers, .stage-lines { display: grid; }
.stage-kicker, .stage-line { grid-area: 1 / 1; opacity: 0; transition: opacity 0.3s; }
.stage[data-active="0"] [data-step="0"], .stage[data-active="1"] [data-step="1"], .stage[data-active="2"] [data-step="2"] { opacity: 1; }
.stage-kicker { font: 800 1.35rem/1.15 "Alegreya", Georgia, serif; color: var(--cream); }
.stage-kicker .count { display: block; margin-bottom: 4px; font: 700 0.8125rem/1 "Alegreya Sans", system-ui, sans-serif; letter-spacing: 0.12em; color: var(--gold); }
.stage-line { margin-top: 4px; color: var(--ink); font-size: 1rem; }
.stage-steps { margin-top: -100svh; }
.stage-step { height: 90svh; }
/* The last step holds longest: its clip (the champion landing) runs 4 s. */
.stage-step:last-child { height: 140svh; }
.stage-still { list-style: none; margin: 0; padding: 0 var(--gutter); display: grid; gap: 28px; justify-items: center; }
.stage-still li { display: grid; gap: 12px; width: min(100%, 360px); }
.stage-still img { width: 100%; height: auto; border-radius: 18px; border: 1px solid rgba(201, 162, 74, 0.45); }
.stage-still b { color: var(--cream); font-family: "Alegreya", Georgia, serif; font-size: 1.25rem; }
.board .schools { margin-top: 36px; }
.lede { color: var(--ink); max-width: 40ch; }
.schools { padding: 18px 18px 20px; display: grid; gap: 14px; margin-top: 6px; }
.schools .label { color: var(--gold); font-family: "Alegreya Sans", system-ui, sans-serif; }
.schools ul { display: grid; gap: 10px; }
/* One label column for the three schools, so their lines start together. */
.schools li { display: grid; grid-template-columns: 44px 5.25rem 1fr; align-items: center; column-gap: 12px; }
.schools .runes li { grid-template-columns: 44px auto 1fr; }
.schools li img { width: 44px; height: 44px; }
.schools li b { font: 800 1.25rem/1.1 "Alegreya", Georgia, serif; color: var(--cream); }
.schools li span { color: var(--ink); font-size: 1rem; }
.schools .runes { border-top: 1px solid rgba(201, 162, 74, 0.3); padding-top: 14px; }
.schools .runes li b { font-size: 1.0625rem; }

/* Champions: one roll, three cells, names on the banner. Phone swipes
   (the next one peeks in); desktop shows all three. */
.champions { padding: var(--section) 0 0; }
.champions .wrap { display: grid; gap: 22px; }
.roll {
  margin: 0 calc(-1 * var(--gutter)); padding: 12px var(--gutter);
  display: grid; grid-auto-flow: column; grid-auto-columns: 78%; gap: 12px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); scrollbar-width: none;
  border-inline: 0; border-radius: 0;
}
.roll::-webkit-scrollbar { display: none; }
.roll:focus-visible { outline: 2px solid var(--cream); outline-offset: 4px; }
.roll li { scroll-snap-align: start; }

/* Hold and take: the defend and assault halves of the game, side by side. */
/* Two staged battles under the champions: the same framed shots as Hold and Take. */
.clash { display: grid; gap: 28px; margin-top: 8px; }
/* Their name strips sit under the picture, so no fighter is covered. */
.clash .banner { position: static; display: block; }
.fronts { padding: var(--section) 0 0; }
/* The assault: its own pinned stage, the Regent's ground under it. */
.assault { padding: var(--section) 0 0; }
.assault .intro { display: grid; gap: 14px; margin-bottom: 8px; }
/* One continuous clip of the last battle: plays from the start each time it
   comes into view and holds its last frame (reduced motion: controls, no autoplay). */
.battle-clip { margin: 28px auto 0; padding: 0 var(--gutter); display: grid; gap: 14px; justify-items: center; }
.clip-screen {
  width: min(100%, 360px, calc((100svh - 160px) * 600 / 1300)); aspect-ratio: 600 / 1300;
  border-radius: 22px; overflow: hidden; background: #000;
  border: 1px solid rgba(201, 162, 74, 0.55); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
.clip-screen video { display: block; width: 100%; height: 100%; object-fit: cover; }
.battle-clip figcaption { max-width: 360px; text-align: center; color: var(--ink); }
.battle-clip figcaption b { display: block; color: var(--cream); font: 800 1.25rem/1.2 "Alegreya", Georgia, serif; }
.fronts .wrap { display: grid; gap: 28px; }
.front { display: grid; gap: 12px; align-content: start; }
.front figcaption { color: var(--ink); max-width: 44ch; }

/* The campaign: the whole island, beside the three acts. */
.campaign { padding: var(--section) 0 0; }
.campaign .wrap { display: grid; gap: 22px; }
.campaign .map { width: min(100%, 420px); margin-inline: auto; border-radius: 10px; }
.acts { padding: 20px 20px 22px; display: grid; gap: 16px; }
.acts ol { display: grid; gap: 0; }
.acts li { display: grid; gap: 2px; padding: 12px 0; border-top: 1px solid rgba(201, 162, 74, 0.3); }
.acts li:first-child { border-top: 0; padding-top: 4px; }
.acts i { color: var(--gold); }
.acts b { font: 800 1.375rem/1.15 "Alegreya", Georgia, serif; color: var(--cream); }

/* The other Spark & Siege game (spellscript/), one plate that links to its page. */
.sibling { padding: var(--section) 0 0; }
.sibling-card { display: flex; align-items: center; gap: 16px; padding: 16px 18px; text-decoration: none; max-width: 560px; }
/* 22.37%: iOS's icon corner radius, as a share of the side. */
.sibling-card img { width: 72px; height: 72px; border-radius: 22.37%; flex: none; }
.sibling-card span { display: grid; gap: 2px; color: var(--ink); font-size: 1rem; }
.sibling-card .label { color: var(--gold); }
.sibling-card b { font: 800 1.5rem/1.1 "Alegreya", Georgia, serif; color: var(--cream); }
.sibling-card:hover, .sibling-card:focus-visible { border-color: var(--gold); }

/* The finale is the rail again, carrying the one action. */
.finale { background: var(--rail); border-block: 1px solid var(--hair); padding: 28px 0 32px; margin-top: var(--section); }
.finale .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px 28px; }

/* The trailer opens over the page, fitted to the screen both ways. */
.trailer-dialog { border: 0; padding: 0; background: transparent; max-width: none; max-height: none; }
.trailer-dialog::backdrop { background: rgba(5, 8, 15, 0.92); }
.trailer-dialog video {
  height: min(92vh, calc((100vw - 32px) * 2340 / 1080)); width: auto; aspect-ratio: 1080 / 2340;
  height: min(92dvh, calc((100vw - 32px) * 2340 / 1080));
  border-radius: 14px; background: #000;
}
.trailer-dialog .close {
  position: fixed; top: 14px; right: 14px; width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(243, 234, 214, 0.14); color: var(--cream); font: 700 1.4rem/1 "Alegreya Sans", system-ui, sans-serif;
}

@media (min-width: 900px) {
  :root { --section: 64px; }
  /* Desktop: the wide painting fills the poster; the logo and the plate
     sit over its open sky on the left. */
  .poster { min-height: clamp(520px, 50vw, 100vh); background: #6f9bd6; }
  .poster .art { object-position: 70% 50%; }
  .poster .copy {
    justify-content: center; align-items: flex-start; gap: 20px; padding: 40px 0;
    margin-left: clamp(var(--gutter), calc((100vw - var(--max)) / 2), 360px); width: min(38vw, 560px);
  }
  .poster .logo { width: clamp(180px, 15vw, 290px); }
  .callout { justify-items: start; text-align: left; width: 100%; gap: 18px; padding: 0; margin: 0; background: none; }   /* the wide painting's open sky needs no pool of light */
  .callout h1 { font-size: clamp(2.25rem, 1rem + 2.2vw, 3.5rem); }
  .callout h1 span { display: block; }

  .rail { padding-inline: max(var(--gutter), calc((100vw - var(--max)) / 2)); }
  .rail .keep { min-width: 220px; }

  /* Desktop: the screen in the middle, the step's call on its left and the
     result on its right, the game's callout voice at full size. */
  .stage-pin { grid-template-columns: 1fr auto 1fr; grid-template-rows: auto; place-content: stretch; align-items: center; column-gap: 56px; padding-inline: var(--gutter); }
  .stage-screen { grid-area: 1 / 2; width: calc((100svh - 64px) * 600 / 1300); }
  .stage-words { display: contents; }
  .stage-kickers { grid-area: 1 / 1; justify-self: end; text-align: right; }
  .stage-lines { grid-area: 1 / 3; justify-self: start; max-width: 18ch; text-align: left; }
  .stage-kicker { font-size: clamp(2rem, 1rem + 1.6vw, 2.75rem); }
  .stage-line { margin-top: 0; font: 500 clamp(1.25rem, 0.8rem + 0.8vw, 1.6rem)/1.35 "Alegreya Sans", system-ui, sans-serif; }
  .stage-still { grid-template-columns: repeat(3, minmax(0, 300px)); justify-content: center; }
  .board .schools { max-width: 720px; margin-inline: auto; }
  .schools { padding: 22px 26px 24px; }
  .schools li, .schools .runes li { grid-template-columns: 52px 150px 1fr; }
  .schools li img { width: 52px; height: 52px; }

  .roll { margin: 0; padding: 14px; grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; overflow: visible; border: 1px solid var(--hair); border-radius: 3px; }

  .fronts .wrap { max-width: 760px; }
  .clash { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }

  .campaign .wrap { grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 64px; align-items: center; }
  .campaign .map { width: 100%; }
  .acts { padding: 28px 32px 30px; gap: 20px; }
  .acts b { font-size: 1.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  .rail.armed .bar span, .rail.armed.on .bar span { transform: none; transition: none; }
}
