/* ═══════════════════════════════════════════════════════════════════
   Feudal Football: landing
   Palette pulled from the splash art: iron charcoal, engraved gold,
   rival purple, parchment sky.
   ═══════════════════════════════════════════════════════════════════ */

:root {
  --ink: #16110d;
  --ink-2: #1e1712;
  --ink-3: #29201a;
  --parchment: #e9d8ae;
  --parchment-dim: #b9a678;
  --gold-hi: #f7dd8f;
  --gold: #d9ab4a;
  --gold-lo: #8a6420;
  --purple: #8a5fd3;
  --ember: #ff9d3c;
  --blood: #a32c22;
  --rare: #5f9bdd;
  --epic: #b06ae0;
  --ward: #7fb3e8;
  --steel: #b8c4cf;
  --momentum: #ffb054;
  --conquest: #e06a4f;
  --fate: #c08df0;
  --xp: #a98ce0;
  --serif: "Alegreya", Georgia, serif;
  --display: "Cinzel", "Times New Roman", serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--parchment);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* Painterly grain over everything, very faint */
.grain {
  position: fixed; inset: 0; z-index: 60; pointer-events: none;
  opacity: 0.05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Gold engraved display text ─────────────────────────────────── */
h2 {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(2rem, 5.5vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: 0.02em;
  background: linear-gradient(175deg, var(--gold-hi) 20%, var(--gold) 55%, var(--gold-lo) 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.55));
}

/* ═══════════════ HERO ═══════════════ */

.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 540px;
  overflow: hidden;
  background: var(--ink);
}

.hero-media {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 35%;
}

.hero.hero-still .hero-media { display: none; }
.hero.hero-still {
  background: url("https://cdn.feudalfootball.com/cdn-cgi/image/format=auto/videos/splash.jpg")
    center 35% / cover no-repeat;
}

/* Slow breathe once the video has landed on the still */
.hero.hero-landed .hero-media,
.hero.hero-still::before {
  animation: kenburns 26s ease-in-out infinite alternate;
}
.hero.hero-still::before {
  content: ""; position: absolute; inset: -4%;
  background: inherit;
}
@keyframes kenburns {
  from { transform: scale(1); }
  to   { transform: scale(1.06); }
}

.hero-scrim {
  position: absolute; inset: 0; z-index: 2;
  background:
    radial-gradient(ellipse at 50% 42%, transparent 42%, rgba(10, 7, 5, 0.55) 100%),
    linear-gradient(to bottom, rgba(10, 7, 5, 0.25) 0%, transparent 22%, transparent 55%, rgba(10, 7, 5, 0.88) 96%);
}

#embers {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
}

.hero-content {
  position: absolute; left: 0; right: 0; bottom: 11%;
  z-index: 4;
  display: flex; flex-direction: column; align-items: center; gap: 1.1rem;
  padding: 0 1.5rem;
  text-align: center;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 1.4s ease, transform 1.4s ease;
}
.hero.hero-landed .hero-content,
.hero.hero-still .hero-content {
  opacity: 1; transform: none;
}

.hero-tag {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.15rem, 3vw, 1.7rem);
  line-height: 1.45;
  color: #f5ead0;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9), 0 0 40px rgba(0, 0, 0, 0.6);
}
.hero-tag em {
  font-style: normal;
  background: linear-gradient(175deg, var(--gold-hi), var(--gold) 70%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.9));
}

.hero-sub {
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(233, 216, 174, 0.75);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9);
}

/* ── CTA: a forged gold plaque ─────────────────────────────────── */
.cta {
  position: relative;
  display: inline-block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-decoration: none;
  color: #241708;
  padding: 0.95rem 2.6rem;
  background:
    linear-gradient(178deg, #f9e6a6 0%, #ecc45f 28%, #c8933a 62%, #a9762a 100%);
  border: 1px solid #5c421a;
  border-radius: 3px;
  box-shadow:
    inset 0 1px 0 rgba(255, 246, 214, 0.9),
    inset 0 -2px 3px rgba(90, 56, 12, 0.55),
    0 3px 0 #4a3410,
    0 10px 30px rgba(0, 0, 0, 0.6),
    0 0 34px rgba(217, 171, 74, 0.28);
  text-shadow: 0 1px 0 rgba(255, 240, 200, 0.65);
  transition: transform 0.12s ease, box-shadow 0.25s ease, filter 0.25s ease;
}
.cta::after {
  /* passing glint */
  content: ""; position: absolute; inset: 0; border-radius: 3px; overflow: hidden;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.55) 48%, transparent 60%);
  background-size: 260% 100%;
  background-position: 120% 0;
  animation: glint 5.5s ease-in-out infinite;
  mix-blend-mode: screen;
  pointer-events: none;
}
@keyframes glint {
  0%, 72% { background-position: 120% 0; }
  88%, 100% { background-position: -60% 0; }
}
.cta:hover {
  filter: brightness(1.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 246, 214, 0.9),
    inset 0 -2px 3px rgba(90, 56, 12, 0.55),
    0 3px 0 #4a3410,
    0 12px 36px rgba(0, 0, 0, 0.65),
    0 0 52px rgba(240, 199, 108, 0.5);
}
.cta:active { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255,246,214,.9), inset 0 -2px 3px rgba(90,56,12,.55), 0 1px 0 #4a3410, 0 6px 18px rgba(0,0,0,.6); }

.cta-large { font-size: 1.35rem; padding: 1.15rem 3.2rem; }

/* Scroll cue */
.scroll-cue {
  position: absolute; left: 50%; bottom: 1.1rem; z-index: 4;
  transform: translateX(-50%);
  background: none; border: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 0.1rem;
  color: rgba(233, 216, 174, 0.65);
  font-family: var(--display);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 1.2s ease 0.6s;
}
.hero.hero-landed .scroll-cue, .hero.hero-still .scroll-cue { opacity: 1; }
.scroll-cue-chevron {
  font-size: 1.6rem; line-height: 0.7;
  animation: bob 2.2s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translateY(0); opacity: 0.6; }
  50% { transform: translateY(7px); opacity: 1; }
}

/* Floating mini-CTA after the hero */
.float-cta {
  position: fixed; top: 1rem; right: 1rem; z-index: 55;
  font-family: var(--display); font-weight: 700; font-size: 0.82rem;
  letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none;
  color: #241708;
  padding: 0.5rem 1.1rem;
  background: linear-gradient(178deg, #f0d387 0%, #cf9c40 70%);
  border: 1px solid #5c421a; border-radius: 3px;
  box-shadow: 0 2px 0 #4a3410, 0 6px 18px rgba(0, 0, 0, 0.55);
  opacity: 0; transform: translateY(-12px); pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.float-cta.show { opacity: 1; transform: none; pointer-events: auto; }

/* ═══════════════ SHARED SECTION CHROME ═══════════════ */

main { position: relative; z-index: 1; }

.bridge {
  padding: 7rem 1.5rem 4rem;
  text-align: center;
  font-family: var(--display);
  font-size: clamp(1.2rem, 3vw, 1.65rem);
  line-height: 1.6;
  color: var(--parchment-dim);
}
.bridge strong { color: var(--parchment); font-weight: 700; }
.flourish {
  margin-top: 2.2rem;
  color: var(--gold);
  font-size: 1.4rem;
  opacity: 0.8;
}
.flourish::before, .flourish::after {
  content: ""; display: inline-block; vertical-align: middle;
  width: clamp(40px, 12vw, 130px); height: 1px; margin: 0 1rem;
  background: linear-gradient(to right, transparent, var(--gold-lo));
}
.flourish::after { background: linear-gradient(to left, transparent, var(--gold-lo)); }

.chapter {
  max-width: 1080px;
  margin: 0 auto;
  padding: 5.5rem 1.5rem;
}
.chapter-wide { max-width: none; padding-left: 0; padding-right: 0; }
.chapter-wide .chapter-head { padding: 0 1.5rem; }

.chapter-head {
  max-width: 720px;
  margin: 0 auto 3rem;
  text-align: center;
}

.chapter-numeral {
  display: inline-flex; align-items: center; justify-content: center;
  width: 3.4rem; height: 3.4rem;
  margin-bottom: 1.2rem;
  font-family: var(--display); font-weight: 900; font-size: 1.5rem;
  color: var(--gold);
  border: 1px solid var(--gold-lo);
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, rgba(247, 221, 143, 0.16), transparent 60%),
    var(--ink-2);
  box-shadow: 0 0 0 4px var(--ink), 0 0 0 5px rgba(138, 100, 32, 0.4), 0 6px 20px rgba(0, 0, 0, 0.5);
}

.chapter-lede {
  margin-top: 1.1rem;
  font-size: clamp(1.05rem, 2.2vw, 1.2rem);
  color: var(--parchment-dim);
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.in { opacity: 1; transform: none; }

/* ═══════════════ CHAPTER I: banner ═══════════════ */

.banner-figure {
  position: relative;
  width: min(320px, 70vw);
  margin: 0 auto;
  text-align: center;
  transition-delay: 0.15s;
}
.banner-hang {
  position: absolute; top: -1.4rem; left: 50%;
  width: 140%; height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(to right, transparent, #6d5936 20%, #8a744a 50%, #6d5936 80%, transparent);
}
.banner-hang::before, .banner-hang::after {
  content: ""; position: absolute; top: -3px;
  width: 7px; height: 7px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #e5c675, #7a5a22);
}
.banner-hang::before { left: 12%; }
.banner-hang::after { right: 12%; }

.banner-shell {
  margin: 0 auto;
  width: 100%;
  aspect-ratio: 236 / 232;
  border: 1px solid rgba(138, 100, 32, 0.55);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65), 0 0 60px rgba(163, 44, 34, 0.18);
  transform-origin: top center;
  animation: sway 7s ease-in-out infinite;
}
.banner-art { width: 100%; }
@keyframes sway {
  0%, 100% { transform: rotate(-1.1deg); }
  50% { transform: rotate(1.1deg); }
}
.banner-figure figcaption {
  margin-top: 1.6rem;
  font-style: italic;
  color: var(--parchment-dim);
}

/* ═══════════════ CHAPTER II: knight marquee ═══════════════ */

.marquee {
  overflow: hidden;
  padding: 1.1rem 0;
  -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}
.marquee-track {
  display: flex; gap: 1.2rem; width: max-content;
  animation: scroll-x 120s linear infinite;
}
.marquee-reverse .marquee-track { animation-direction: reverse; }
@keyframes scroll-x {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.knight-tile {
  width: clamp(120px, 16vw, 168px);
  flex-shrink: 0;
  text-align: center;
  transition: transform 0.3s ease;
}
.knight-tile:hover { transform: translateY(-6px); }
.knight-tile .img-shell {
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(138, 100, 32, 0.5);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.55);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
.knight-tile img { width: 100%; }
.knight-tile:hover .img-shell {
  border-color: var(--gold);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.65), 0 0 26px rgba(217, 171, 74, 0.35);
}
.knight-tile figcaption {
  margin-top: 0.55rem;
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--parchment-dim);
}

/* ═══════════════ CHAPTER III: matchday ═══════════════ */

/* The game's icon pack, so a landing chip and an in-app chip are the same glyph. RPGAwesome, the
   same font app/ loads (app/src/features/icons/icons.ts, app/app.config.ts) — the .woff is copied
   from node_modules/rpg-awesome/fonts/ into public/fonts/, since the landing is served as plain
   static files with no build step. Codepoints below are the registry's, verified against
   rpg-awesome/scss/_variables.scss. */
@font-face {
  font-family: "RPGAwesome";
  src: url("fonts/rpgawesome-webfont.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
.ico {
  font-family: "RPGAwesome";
  font-weight: normal;
  font-style: normal;
  line-height: 1;
  speak: none;
  -webkit-font-smoothing: antialiased;
}

/* The panel is dense enough to want the full column width, so the relic cards drop to a row
   beneath it rather than sharing the row. DOM order was already panel-then-relics. */
.matchday {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

/* dispatch panel */
.dispatch {
  background: linear-gradient(178deg, var(--ink-3), var(--ink-2));
  border: 1px solid rgba(138, 100, 32, 0.45);
  border-radius: 6px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(233, 216, 174, 0.06);
  overflow: hidden;
}
.dispatch-head {
  padding: 0.8rem 1.1rem 0.55rem;
}
.dispatch-title {
  font-family: var(--display); font-weight: 700;
  font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold);
}
.dispatch-sub {
  padding: 0 1.1rem 0.9rem;
  font-size: 0.92rem; line-height: 1.45;
  color: rgba(185, 166, 120, 0.85);
  border-bottom: 1px solid rgba(138, 100, 32, 0.35);
}
.dispatch-body { padding: 0.9rem 1.1rem 1.1rem; }

/* Scoreline tabs. The result IS the credibility claim, so it sits where a visitor reads it before
   clicking anything. Stacked over three lines rather than inline because the schema carries only a
   club's full name (teams: team_id, name, logo) — no short name, no three-letter code — and full
   names do not fit side by side at a third of the width. */
.dispatch-tabs {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem;
  padding: 0 1.1rem 0.9rem;
}
.sc-tab {
  display: flex; align-items: center; gap: 0.55rem;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(138, 100, 32, 0.35);
  border-radius: 4px;
  padding: 0.5rem 0.6rem;
  cursor: pointer;
  font-family: var(--serif);
  color: var(--parchment-dim);
  text-align: center; line-height: 1.25;
}
/* The realm's flag, fixed width so three tabs align down the strip whatever their club names do. */
.sc-flag {
  flex: none;
  width: 28px; height: 20px;
  border: 1px solid rgba(138, 100, 32, 0.4);
  border-radius: 2px;
  object-fit: cover;
}
.sc-text { flex: 1 1 auto; min-width: 0; }
.sc-tab:hover { border-color: rgba(217, 171, 74, 0.6); }
/* Both clubs and the score on ONE line, league beneath: two rows instead of four, which is a lot of
   vertical space back. The clubs flex and share whatever is left after the score, which is fixed
   width — so a long name ellipsises rather than pushing the score off-centre or wrapping the row. */
.sc-line {
  display: flex; align-items: baseline; justify-content: center; gap: 0.4em;
  min-width: 0;
}
.sc-club {
  flex: 1 1 0; min-width: 0;
  font-size: 0.82rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sc-club:first-child { text-align: right; }
.sc-club:last-child { text-align: left; }
.sc-score {
  flex: none;
  font-family: var(--display); font-weight: 700; font-size: 1.05rem;
  color: var(--parchment);
  white-space: nowrap;
}
.sc-realm {
  display: block; margin-top: 0.2rem;
  font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.6;
}
/* Never colour alone: three scorelines side by side are easy to confuse, so the active tab also
   takes a brighter border and a filled ground. */
.sc-tab[aria-selected="true"] {
  border-color: var(--gold);
  background: rgba(217, 171, 74, 0.12);
  color: var(--parchment);
}
.sc-tab[aria-selected="true"] .sc-realm { opacity: 1; color: var(--gold); }
@media (max-width: 700px) {
  .dispatch-tabs { grid-template-columns: 1fr; }
}

/* A partial off-station deed PAID, at a fraction. It must not read as struck, but it must not read
   as full credit either — this is the quiet mark that says which. */
.partial {
  font-size: 0.75rem; font-weight: 600;
  padding: 0.12rem 0.5rem;
  color: var(--parchment-dim);
  border: 1px solid rgba(185, 166, 120, 0.35);
}

/* The staged lines: hidden until playReveal() adds .in. Deliberately unhurried — this panel is
   meant to be read, not watched go by, which is the whole complaint against the old ticker. */
.dl, .requires { opacity: 0; transform: translateY(8px); transition: opacity 0.75s ease, transform 0.75s ease; }
.dl.in, .requires.in { opacity: 1; transform: none; }

/* knight rows — the lead is expanded, the siblings are collapsed headers */
.knight { border: 1px solid rgba(138, 100, 32, 0.28); border-radius: 4px; margin-bottom: 0.6rem; }
.k-head {
  display: flex; align-items: center; flex-wrap: wrap; gap: 0.6rem;
  padding: 0.6rem 0.8rem;
  background: rgba(0, 0, 0, 0.22);
}
.k-bust { width: 48px; height: 48px; border-radius: 3px; overflow: hidden; flex: none; }
.k-num {
  font-family: var(--display); font-weight: 700; font-size: 1.8rem; line-height: 1;
  color: var(--parchment); min-width: 2.2rem;
}
.k-num::before { content: "#"; font-size: 0.9rem; color: var(--parchment-dim); vertical-align: 0.5rem; }
.k-station { font-size: 0.86rem; color: var(--purple); letter-spacing: 0.04em; }
.k-totals { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-left: auto; }
.k-body { padding: 0.85rem 0.8rem 0.6rem; }

/* performance banner: rating · minutes · boosts · XP pinned right */
.banner {
  display: flex; align-items: center; flex-wrap: wrap; gap: 0.6rem;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.9rem;
  border: 1px solid rgba(138, 100, 32, 0.35);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.28);
}
.rating {
  display: inline-flex; align-items: baseline; gap: 0.35rem;
  padding: 0.15rem 0.5rem;
  border: 1px solid rgba(233, 216, 174, 0.18); border-radius: 3px;
  background: rgba(0, 0, 0, 0.3);
}
.rating b { font-family: var(--display); font-size: 1.25rem; color: var(--parchment); }
.rating i {
  font-style: normal; font-size: 0.6rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: rgba(233, 216, 174, 0.5);
}
.banner-mins { font-size: 0.85rem; color: var(--parchment-dim); }
.banner-xp {
  display: inline-flex; align-items: center; gap: 0.25em;
  margin-left: auto;
  font-family: var(--display); font-weight: 700; font-size: 1.25rem;
  color: var(--xp); white-space: nowrap;
}
.feat-glyph { color: var(--gold); font-size: 0.95rem; }

/* one feat section: the football deed as the header, its payoff rows beneath */
.feat { margin-bottom: 0.9rem; }
.feat-head { display: flex; align-items: center; gap: 0.45rem; margin-bottom: 0.4rem; }
.feat-label { font-family: var(--display); font-weight: 700; font-size: 0.95rem; color: var(--parchment); }
.feat-count, .feat-mins { font-size: 0.82rem; color: var(--parchment-dim); }
.feat-mins { color: var(--gold); }

.pay-row {
  display: flex; align-items: center; flex-wrap: wrap; gap: 0.4rem;
  padding: 0.25rem 0 0.25rem 0.9rem;
  font-size: 0.9rem;
}
.pay-row .arr { color: rgba(233, 216, 174, 0.35); }
.pay-art { width: 16px; height: 16px; flex: none; }
.pay-art img { width: 16px; height: 16px; }
.pay-source { color: var(--parchment); }
.pay-source.struck { color: rgba(185, 166, 120, 0.55); text-decoration: line-through; }
.pay-row .when { font-size: 0.82rem; padding: 0.15rem 0.5rem; }
.pay-row .then { font-size: 0.82rem; padding: 0.12rem 0.5rem; }
/* Outcome pill = magnitude + channel glyph, as the app builds it (features/stations/components/
   rule-row.tsx). On a muted pill only the MAGNITUDE strikes: the glyph stays un-struck so the
   forgone resource is still readable, which is the app's stated reason for keeping it. */
.then { display: inline-flex; align-items: center; gap: 0.28em; }
.then .ico { font-size: 1.05em; }
.then-muted { opacity: 0.5; }
.then-muted .mag { text-decoration: line-through; }

/* the origin tag that leads every payoff row, and the boost chips on the banner */
.origin {
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.1rem 0.35rem; border: 1px solid currentColor; border-radius: 2px;
}
.origin-deed { color: rgba(185, 166, 120, 0.7); }
.origin-gear { color: var(--gold); }
.origin-skill, .origin-trait { color: var(--fate); }
.origin-house { color: var(--ember); }

/* the struck row's warning — the honest beat, so it lands on its own */
.requires {
  font-size: 0.75rem; font-weight: 600;
  padding: 0.12rem 0.5rem;
  color: #e8c65a;
  border: 1px solid rgba(232, 198, 90, 0.4);
  background: rgba(232, 198, 90, 0.08);
}

.also { display: flex; align-items: center; flex-wrap: wrap; gap: 0.45rem; padding-left: 0.9rem; }
.sub-head {
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(185, 166, 120, 0.6);
}
.also-chip {
  display: inline-flex; align-items: center; gap: 0.35em;
  font-size: 0.8rem; padding: 0.15rem 0.55rem; border-radius: 3px;
  background: rgba(0, 0, 0, 0.3); color: var(--parchment-dim);
}
.also-chip .ico { color: #e8c65a; font-size: 1.05em; } /* booking yellow, as the app tints yellowCard */

/* relic cards */
.relics {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem;
  align-items: start;
  transition-delay: 0.15s;
}
@media (max-width: 900px) {
  .relics { grid-template-columns: 1fr; }
}
.relic-card {
  position: relative;
  background: linear-gradient(178deg, var(--ink-3), var(--ink-2));
  border: 1px solid rgba(138, 100, 32, 0.45);
  border-radius: 6px;
  padding: 1.1rem 1.2rem 1rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  transform-style: preserve-3d;
  will-change: transform;
}
.relic-card[data-rarity="rare"] { box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 34px rgba(95, 155, 221, 0.12); }
.relic-card[data-rarity="epic"] { box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 40px rgba(176, 106, 224, 0.16); }
.relic-card[data-rarity="legendary"] { box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 46px rgba(217, 171, 74, 0.18); }

/* Rarity accent bar, as the in-game ItemCard wears it: rarity reads from this strip, never a subline. */
.relic-accent {
  position: absolute; top: -1px; left: -1px; right: -1px; height: 2px;
  border-radius: 6px 6px 0 0;
}
[data-rarity="rare"] .relic-accent { background: var(--rare); }
[data-rarity="epic"] .relic-accent { background: var(--epic); }
[data-rarity="legendary"] .relic-accent { background: var(--gold); }

.relic-card header {
  display: flex; align-items: center; gap: 0.9rem;
  margin-bottom: 0.85rem;
}
.relic-card header img {
  width: 64px; height: 64px;
  border-radius: 4px;
  border: 1px solid rgba(138, 100, 32, 0.6);
}
.relic-card h3 {
  font-family: var(--display); font-weight: 700;
  font-size: 1.08rem; color: var(--parchment);
}
.rarity {
  font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase;
  font-family: var(--display); font-weight: 700;
}
.rarity-rare { color: var(--rare); }
.rarity-epic { color: var(--epic); }
.rarity-legendary { color: var(--gold-hi); }

/* One rule per item (legendaries roll a second): flavour label, then the WHEN pill → outcome pills.
   `.then` is shared with the matchday feed, the way the app shares one OutcomePill between the
   ItemCard and the Keep's payout breakdown. */
.rules { list-style: none; display: flex; flex-direction: column; gap: 0.7rem; }
.rules li { display: flex; flex-direction: column; gap: 0.3rem; }
.rule-label {
  font-size: 0.82rem; font-weight: 600;
  color: rgba(233, 216, 174, 0.92);
}
.rule-line { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.when, .then {
  padding: 0.22rem 0.65rem;
  border-radius: 2px;
  font-size: 0.88rem;
  line-height: 1.35;
}
.when {
  background: rgba(233, 216, 174, 0.08);
  border: 1px solid rgba(233, 216, 174, 0.14);
  color: var(--parchment-dim);
}
.rules .arr { color: var(--gold); font-weight: 700; }
.then {
  border: 1px solid currentColor;
  background: rgba(0, 0, 0, 0.3);
  font-weight: 500;
}
.then-ward { color: var(--ward); }
.then-steel { color: var(--steel); }
.then-gold { color: var(--gold-hi); }
.then-fate { color: var(--fate); }
.then-momentum { color: var(--momentum); }
.then-conquest { color: var(--conquest); }
.then-xp { color: var(--xp); }

.relic-card footer {
  margin-top: 0.85rem;
  font-style: italic;
  font-size: 0.92rem;
  color: rgba(185, 166, 120, 0.85);
}

/* ═══════════════ CHAPTER IV: keep rise ═══════════════ */

.keep-scroll { height: 420vh; position: relative; }
.keep-sticky {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 1rem;
  padding: 2rem 1.5rem;
  overflow: hidden;
}
.keep-sticky .chapter-head { margin-bottom: 0.5rem; }

.keep-stage { text-align: center; }
.keep-frame {
  position: relative;
  width: min(380px, 62vw, 44vh);
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(138, 100, 32, 0.55);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.7), 0 0 60px rgba(217, 171, 74, 0.14);
}
.keep-frame img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  transition: opacity 0.55s ease;
}

.keep-caption {
  margin-top: 1.1rem;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--parchment-dim);
  min-height: 1.7em;
}
.keep-progress {
  width: min(380px, 62vw);
  height: 7px;
  margin: 0.9rem auto 0;
  border: 1px solid rgba(138, 100, 32, 0.55);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
.keep-progress-fill {
  height: 100%; width: 0%;
  background: linear-gradient(to right, var(--gold-lo), var(--gold), var(--gold-hi));
  box-shadow: 0 0 12px rgba(247, 221, 143, 0.55);
  transition: width 0.2s ease-out;
}
.keep-hint {
  margin-top: 0.8rem;
  font-family: var(--display);
  font-size: 0.7rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: rgba(185, 166, 120, 0.55);
}

/* ═══════════════ FINALE ═══════════════ */

.finale {
  position: relative;
  padding: 10rem 1.5rem;
  text-align: center;
  overflow: hidden;
}
.finale-bg {
  position: absolute; inset: -6%;
  background: url("https://cdn.feudalfootball.com/cdn-cgi/image/format=auto/videos/splash.jpg")
    center 30% / cover no-repeat;
  filter: blur(6px) brightness(0.38) saturate(1.1);
}
.finale::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, var(--ink) 0%, transparent 22%, transparent 78%, var(--ink) 100%),
    radial-gradient(ellipse at center, transparent 30%, rgba(22, 17, 13, 0.6) 100%);
}
.finale-content {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 1.6rem;
}
.finale-line {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(1.7rem, 4.6vw, 2.9rem);
  line-height: 1.25;
  color: #f5ead0;
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.9);
}
.finale-sub {
  font-size: 0.95rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(233, 216, 174, 0.7);
}

/* ═══════════════ FOOTER ═══════════════ */

.site-footer {
  padding: 2.6rem 1.5rem 3rem;
  text-align: center;
  font-size: 0.88rem;
  color: rgba(185, 166, 120, 0.6);
  border-top: 1px solid rgba(138, 100, 32, 0.25);
}
.footer-legal { margin-top: 0.35rem; font-size: 0.78rem; }

/* ═══════════════ SHARED: highlights + CDN image shells ═══════════════ */

/* Strategic gold brush-stroke on the words that carry the pitch */
.hl {
  color: var(--gold-hi);
  background: linear-gradient(
    transparent 64%,
    rgba(217, 171, 74, 0.22) 64%,
    rgba(217, 171, 74, 0.22) 92%,
    transparent 92%
  );
  padding: 0 0.12em;
}

/* CdnImage-style shell: gold spinner ring until the image lands */
.img-shell { position: relative; display: block; }
.img-shell::before {
  content: "";
  position: absolute; inset: 0; margin: auto;
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 2px solid rgba(217, 171, 74, 0.22);
  border-top-color: var(--gold);
  animation: spin 0.9s linear infinite;
  transition: opacity 0.3s ease;
}
.img-shell.loaded::before { opacity: 0; animation: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.relic-shell, .banner-shell, .knight-tile .img-shell { background: rgba(0, 0, 0, 0.3); }
.relic-shell img, .banner-art, .knight-tile img {
  opacity: 0;
  transition: opacity 0.4s ease;
}
.img-shell.loaded img { opacity: 1; }
.relic-shell { width: 64px; height: 64px; flex-shrink: 0; }

/* ═══════════════ REDUCED MOTION ═══════════════ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  /* playReveal() also short-circuits, but the panel must never depend on JS timing to be legible. */
  .dl, .requires { opacity: 1; transform: none; transition: none; }
  .hero.hero-landed .hero-media,
  .hero.hero-still::before,
  .banner-shell,
  .cta::after,
  .scroll-cue-chevron { animation: none; }
  .marquee-track { animation-duration: 160s; }
  .hero-content, .scroll-cue { transition: none; }
}
