/* Charter of Crowns - homepage styles.
   Palette and fonts from the design handoff (Codex homepage mockup v1). */

/* The fonts are served from this site (no request to Google - the legal review, 2026-11-04). Cinzel and Source Sans 3,
   SIL Open Font License 1.1 (assets/fonts/OFL-*.txt); variable files from Google Fonts, latin and latin-ext. */
@font-face {
  font-family: "Cinzel"; font-style: normal; font-weight: 500 800; font-display: swap;
  src: url("../assets/fonts/cinzel-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Cinzel"; font-style: normal; font-weight: 500 800; font-display: swap;
  src: url("../assets/fonts/cinzel-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Sans 3"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("../assets/fonts/source-sans-3-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Source Sans 3"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("../assets/fonts/source-sans-3-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #071426;
  --surface: #0d2743;
  --blue: #123e68;
  --gold: #d9a441;
  --gold-hi: #f4c968;
  --gold-deep: #a8721f;
  --parchment: #d6b477;
  --text: #f6e8c8;
  --text-2: #b8c8d8;
  --ink: #151a20;

  --font-head: "Cinzel", "Trajan Pro", Georgia, serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;

  --header-h: 76px;
  --radius: 8px;
  --line: rgba(217, 164, 65, 0.7);
  --gold-line: linear-gradient(90deg, transparent, var(--gold) 20%, var(--gold-hi) 50%, var(--gold) 80%, transparent);
  --gold-text: linear-gradient(180deg, #fff1c4 0%, var(--gold-hi) 38%, var(--gold) 70%, var(--gold-deep) 100%);
  --card-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  /* A quiet star field: a few sparse dot layers over the navy. */
  background-image:
    radial-gradient(1px 1px at 20px 30px, rgba(255, 255, 255, 0.55), transparent 60%),
    radial-gradient(1px 1px at 140px 90px, rgba(255, 255, 255, 0.35), transparent 60%),
    radial-gradient(1.5px 1.5px at 260px 170px, rgba(255, 236, 190, 0.45), transparent 60%),
    radial-gradient(1px 1px at 330px 40px, rgba(255, 255, 255, 0.3), transparent 60%),
    radial-gradient(ellipse at 50% 0%, rgba(18, 62, 104, 0.55), transparent 60%);
  background-size: 360px 220px, 360px 220px, 360px 220px, 360px 220px, 100% 100%;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }

.container {
  width: 100%;
  max-width: 1320px;
  margin-inline: auto;
  padding-inline: 32px;
}

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

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  padding: 10px 16px; background: var(--gold); color: var(--ink);
  font-weight: 700; border-radius: var(--radius); text-decoration: none;
}
.skip-link:focus { top: 12px; }

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

.icon { width: 1.1em; height: 1.1em; fill: currentColor; flex: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  padding: 0.7em 1.5em;
  font-family: var(--font-head); font-weight: 700; font-size: 1rem; letter-spacing: 0.04em;
  text-decoration: none; white-space: nowrap;
  border-radius: 6px; border: 1px solid transparent; cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease, background-color 0.18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-gold {
  color: var(--ink);
  background: linear-gradient(180deg, #fbe08f 0%, var(--gold-hi) 30%, var(--gold) 65%, var(--gold-deep) 100%);
  border-color: #ffe6a6;
  box-shadow: 0 0 0 1px rgba(168, 114, 31, 0.6), 0 6px 18px rgba(217, 164, 65, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}
.btn-gold:hover {
  filter: brightness(1.08);
  box-shadow: 0 0 0 1px rgba(168, 114, 31, 0.6), 0 8px 28px rgba(244, 201, 104, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.btn-outline {
  color: var(--text);
  background: rgba(7, 20, 38, 0.65);
  border-color: var(--gold);
  box-shadow: inset 0 0 0 1px rgba(244, 201, 104, 0.15);
}
.btn-outline:hover { background: rgba(18, 62, 104, 0.7); box-shadow: 0 6px 22px rgba(244, 201, 104, 0.2); }

.btn-sm { padding: 0.5em 1.1em; font-size: 0.92rem; }
.btn-lg { padding: 0.8em 2em; font-size: 1.15rem; min-width: 220px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: rgba(7, 20, 38, 0.88);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(217, 164, 65, 0.35);
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}
.site-header.is-scrolled { background: rgba(7, 20, 38, 0.96); box-shadow: 0 8px 26px rgba(0, 0, 0, 0.45); }

.header-inner { height: 100%; display: flex; align-items: center; gap: 28px; }

.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; flex: none; }
.brand-emblem { width: 48px; height: 48px; filter: drop-shadow(0 0 8px rgba(244, 201, 104, 0.35)); }
.brand-word {
  display: flex; flex-direction: column; line-height: 0.95;
  font-family: var(--font-head); font-weight: 800; text-transform: uppercase;
  background: var(--gold-text); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand-word span:first-child { font-size: 0.9rem; letter-spacing: 0.08em; }
.brand-word span:last-child { font-size: 1.45rem; letter-spacing: 0.03em; }

.main-nav { margin-left: auto; }
.main-nav ul { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.main-nav ul a {
  position: relative; display: block; padding: 8px 14px;
  font-family: var(--font-head); font-weight: 600; font-size: 0.98rem; letter-spacing: 0.03em;
  color: var(--text); text-decoration: none; transition: color 0.18s ease;
}
.main-nav ul a::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 2px;
  background: var(--gold-line); transform: scaleX(0); transition: transform 0.22s ease;
}
.main-nav ul a:hover,
.main-nav ul a.is-active { color: var(--gold-hi); }
.main-nav ul a:hover::after,
.main-nav ul a.is-active::after { transform: scaleX(1); }

.main-nav .btn-nav-mobile { display: none; }

.menu-toggle {
  display: none; margin-left: auto; width: 46px; height: 46px; padding: 11px 10px;
  background: transparent; border: 1px solid rgba(217, 164, 65, 0.55); border-radius: 6px; cursor: pointer;
  flex-direction: column; justify-content: space-between;
}
.menu-toggle span { display: block; height: 2px; background: var(--gold-hi); border-radius: 2px; transition: transform 0.25s ease, opacity 0.2s ease; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; padding-bottom: 56px; }
/* The art is never wider than its pixels (1983) nor taller than the screen leaves room for - the title is in the art,
   and the studio credit, the tagline and both buttons under it (~236 px) stay in the first screen; a blurred copy of it
   fills the sides. */
.hero-art { margin: 0; position: relative; overflow: hidden; }
.hero-art::before {
  content: ""; position: absolute; inset: -48px;
  background: linear-gradient(90deg, var(--bg), transparent 30%, transparent 70%, var(--bg)),
    url("../assets/brand/hero-wide-1200.webp") center / cover;
  filter: blur(36px) brightness(0.55) saturate(1.1);
}
.hero-art img {
  position: relative; height: auto; margin-inline: auto;
  width: min(100%, 1983px, calc((100vh - var(--header-h) - 236px) * 2.5));
  width: min(100%, 1983px, calc((100svh - var(--header-h) - 236px) * 2.5));
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.hero-art::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 16%;
  background: linear-gradient(180deg, transparent, var(--bg));
  pointer-events: none;
}

/* The copy rises onto the art's faded foot so the hero reads as one piece. */
.hero-copy { position: relative; text-align: center; margin-top: -30px; }
.hero-copy::before {
  content: ""; position: absolute; z-index: -1; left: 50%; top: -40px; width: min(900px, 100%); height: 260px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at 50% 40%, rgba(18, 62, 104, 0.55), transparent 70%);
}

/* The studio's credit: a quiet line over the tagline, as a trailer's "presents" - the game stays the brand. */
.hero-credit {
  margin: 0 0 8px; font-family: var(--font-head); font-weight: 600; font-size: 0.85rem; letter-spacing: 0.32em;
  text-transform: uppercase; color: var(--gold); text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.tagline {
  display: flex; align-items: center; justify-content: center; gap: 18px;
  margin: 0 0 10px;
  font-family: var(--font-head); font-weight: 700; font-size: clamp(1.6rem, 3.4vw, 2.8rem); line-height: 1.15;
  background: var(--gold-text); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
}
.tagline-rule { display: inline-block; flex: none; width: clamp(28px, 6vw, 72px); height: 2px; background: var(--gold-line); }

.hero-sub { margin: 0 auto 28px; max-width: 640px; color: var(--text-2); font-size: 1.15rem; }

.hero-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 18px; }

/* ---------- Ornamental divider ---------- */
.divider {
  position: relative; height: 24px; max-width: 1320px; margin: 0 auto; padding-inline: 32px;
  display: flex; align-items: center;
}
.divider::before {
  content: ""; flex: 1; height: 1px; background: var(--gold-line); opacity: 0.85;
}
.divider span {
  position: absolute; left: 50%; top: 50%; width: 14px; height: 14px;
  transform: translate(-50%, -50%) rotate(45deg);
  background: linear-gradient(135deg, #fff1c4, var(--gold) 60%, var(--gold-deep));
  box-shadow: 0 0 14px rgba(244, 201, 104, 0.7);
}

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section-alt {
  background:
    linear-gradient(180deg, rgba(13, 39, 67, 0) 0%, rgba(13, 39, 67, 0.75) 18%, rgba(13, 39, 67, 0.75) 82%, rgba(13, 39, 67, 0) 100%);
}

.section-head { text-align: center; margin-bottom: 32px; }
.eyebrow {
  margin: 0 0 6px; font-family: var(--font-head); font-weight: 600; font-size: 0.85rem;
  letter-spacing: 0.32em; text-transform: uppercase; color: var(--gold);
}
h2 {
  margin: 0 0 14px; font-family: var(--font-head); font-weight: 700; line-height: 1.15;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  background: var(--gold-text); -webkit-background-clip: text; background-clip: text; color: transparent;
}
h3 { margin: 0; font-family: var(--font-head); font-weight: 700; color: var(--gold-hi); line-height: 1.2; }
.lead { max-width: 760px; margin: 0 auto; color: var(--text-2); font-size: 1.15rem; }

/* ---------- Feature cards ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }

.feature-card {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, rgba(13, 39, 67, 0.92), rgba(7, 20, 38, 0.96));
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--card-shadow), inset 0 0 0 1px rgba(244, 201, 104, 0.12);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.feature-card:hover {
  transform: translateY(-6px);
  border-color: var(--gold-hi);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.55), 0 0 26px rgba(244, 201, 104, 0.25);
}
.feature-media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface); }
.feature-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.feature-card:hover .feature-media img { transform: scale(1.06); }
.feature-body { position: relative; padding: 20px 22px 24px; text-align: center; }
.feature-body::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--gold-line);
}
.feature-body h3 { font-size: 1.35rem; margin-bottom: 6px; }
.feature-body p { margin: 0; color: var(--text-2); }

/* ---------- Ages ---------- */
.age-list {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  list-style: none; margin: 0; padding: 0;
}
.age-card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: linear-gradient(180deg, rgba(13, 39, 67, 0.92), rgba(7, 20, 38, 0.96));
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--card-shadow), inset 0 0 0 1px rgba(244, 201, 104, 0.12);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.age-card:hover {
  transform: translateY(-6px);
  border-color: var(--gold-hi);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.55), 0 0 26px rgba(244, 201, 104, 0.25);
}
/* The renders are cut out: they stand on a warm glow instead of a picture. */
.age-media {
  height: 280px; padding: 14px 18px 4px; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 50% 62%, rgba(244, 201, 104, 0.3), rgba(18, 62, 104, 0.35) 45%, transparent 75%);
}
.age-media img {
  width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain;
  filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.55));
  transition: transform 0.5s ease;
}
.age-card:hover .age-media img { transform: translateY(-4px) scale(1.04); }
.age-body { position: relative; flex: 1; padding: 18px 22px 24px; text-align: center; }
.age-body::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--gold-line);
}
.age-num {
  display: block; margin-bottom: 4px;
  font-family: var(--font-head); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--gold);
}
.age-body h3 { font-size: 1.35rem; margin-bottom: 6px; }
.age-body p { margin: 0; color: var(--text-2); }

/* The ages still to come: a glimpse of the future skyline on the top card of a stack - the cards behind it say
   "many more". The stack is drawn by box-shadows (offset copies of the card's edge), so nothing is clipped. */
.age-card-soon {
  overflow: visible;
  box-shadow: 9px -9px 0 -1px #0a1d33, 9px -9px 0 0 rgba(217, 164, 65, 0.45),
    18px -18px 0 -2px #081829, 18px -18px 0 -1px rgba(217, 164, 65, 0.25), var(--card-shadow);
}
.age-card-soon:hover {
  box-shadow: 9px -9px 0 -1px #0a1d33, 9px -9px 0 0 rgba(217, 164, 65, 0.6),
    18px -18px 0 -2px #081829, 18px -18px 0 -1px rgba(217, 164, 65, 0.35), 0 24px 50px rgba(0, 0, 0, 0.55),
    0 0 26px rgba(244, 201, 104, 0.25);
}
.age-card-soon .age-media { padding: 0; overflow: hidden; border-radius: var(--radius) var(--radius) 0 0; background: none; }
.age-card-soon .age-media img { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; filter: none; }
.age-card-soon:hover .age-media img { transform: scale(1.04); }

/* ---------- Nations ---------- */
.nation-list {
  display: grid; grid-template-columns: repeat(4, 1fr) 1.3fr; gap: 24px;
  max-width: 1080px; margin: 0 auto; padding: 0;
}
.nation-tab,
.nation-soon { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.nation-tab, .nation-soon { padding: 6px 0 10px; }
.nation-tab { background: none; border: 0; border-radius: var(--radius); cursor: pointer; }
.nation-list img {
  width: 128px; height: 128px; border-radius: 50%;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.5));
  transition: transform 0.25s ease, filter 0.25s ease, box-shadow 0.25s ease;
}
.nation-tab:hover img { transform: translateY(-4px) scale(1.05); filter: drop-shadow(0 0 14px rgba(244, 201, 104, 0.55)); }
.nation-list span { font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; color: var(--text); }
/* The open nation: its medallion ringed in light, its name gold and underlined. */
.nation-tab[aria-selected="true"] img { transform: scale(1.06); box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--gold-hi), 0 0 30px rgba(244, 201, 104, 0.5); }
.nation-tab[aria-selected="true"] span { color: var(--gold-hi); box-shadow: inset 0 -2px 0 var(--gold); }
/* Nations still to come: a fan of blank medallions with a gold plus, as wide as it needs. */
.nation-list .nation-soon img { width: 196px; height: 136px; margin-top: -8px; border-radius: 0; opacity: 0.92; }
.nation-list .nation-soon span { color: var(--text-2); font-weight: 600; letter-spacing: 0.04em; }

/* A nation's panel: its ruler's portrait, its story, its path through the ages, its wonders. --nation is its colour. */
.nation-panel {
  display: grid; grid-template-columns: 300px 1fr; gap: 40px; align-items: start;
  max-width: 1080px; margin: 40px auto 0; padding: 36px 40px;
  background:
    radial-gradient(ellipse at 0% 0%, color-mix(in srgb, var(--nation) 22%, transparent), transparent 60%),
    linear-gradient(180deg, rgba(13, 39, 67, 0.92), rgba(7, 20, 38, 0.96));
  border: 1px solid var(--line); border-top: 3px solid var(--nation); border-radius: var(--radius);
  box-shadow: var(--card-shadow), inset 0 0 0 1px rgba(244, 201, 104, 0.12);
}
.nation-panel + .nation-panel { margin-top: 28px; }  /* without JS every panel shows, one under another */
.js .nation-panel { animation: panel-in 0.35s ease; }
.nation-panel[hidden] { display: none; }
.nation-portrait { margin: 0; }
.nation-portrait img {
  width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius);
  border: 1px solid var(--line); box-shadow: 0 14px 30px rgba(0, 0, 0, 0.55), 0 0 0 4px color-mix(in srgb, var(--nation) 35%, transparent);
}
.nation-portrait figcaption {
  margin-top: 14px; text-align: center; font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; color: var(--gold-hi);
}
.nation-portrait figcaption em {
  display: block; margin-top: 2px; font-style: normal; font-size: 0.78rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--text-2);
}
.nation-info h3 { font-size: 1.7rem; margin-bottom: 12px; }
.nation-story { margin: 0 0 22px; color: var(--text); font-size: 1.08rem; }
.nation-facts { margin: 0; display: grid; gap: 14px; }
.nation-facts > div { display: grid; grid-template-columns: 168px 1fr; gap: 16px; padding-top: 14px; border-top: 1px solid rgba(217, 164, 65, 0.22); }
.nation-facts dt {
  font-family: var(--font-head); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold);
  padding-top: 3px;
}
.nation-facts dd { margin: 0; color: var(--text-2); }
/* One line per age: the age's name in its own column, the wonders wrapping under each other. */
.nation-wonders span { display: grid; grid-template-columns: 86px 1fr; }
.nation-wonders b {
  padding-top: 2px; font-family: var(--font-head); font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--text);
}
@keyframes panel-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Media ---------- */
.trailer {
  position: relative; display: block; width: 100%; padding: 0; margin: 0 0 24px; overflow: hidden;
  aspect-ratio: 16 / 9; max-height: 620px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  box-shadow: var(--card-shadow), inset 0 0 0 1px rgba(244, 201, 104, 0.12); cursor: pointer;
}
.trailer img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.5) saturate(0.9); transition: filter 0.3s ease, transform 0.6s ease; }
.trailer:hover img { filter: brightness(0.62) saturate(1); transform: scale(1.02); }
/* The play button: a gold ring on dark glass, a gold triangle; the title under it. */
.trailer-cta {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
}
.trailer-play {
  position: relative; width: 128px; height: 128px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 40%, rgba(18, 62, 104, 0.6), rgba(7, 20, 38, 0.85) 70%);
  border: 2px solid var(--gold-hi);
  box-shadow: 0 0 0 7px rgba(7, 20, 38, 0.45), 0 0 0 8px rgba(244, 201, 104, 0.4), 0 0 46px rgba(244, 201, 104, 0.35),
    inset 0 0 26px rgba(244, 201, 104, 0.22);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}
/* The pulse runs only while the trailer is hovered or focused: nothing on the page moves on its own. */
.trailer-play::after {
  content: ""; position: absolute; inset: -12px; border-radius: 50%;
  border: 1px solid rgba(244, 201, 104, 0.6); opacity: 0;
}
.trailer:hover .trailer-play::after,
.trailer:focus-visible .trailer-play::after { animation: play-pulse 2.6s ease-out infinite; }
/* The triangle's centroid sits a hair right of the centre - where the eye expects a play symbol. */
.trailer-play svg { width: 74px; height: 74px; filter: drop-shadow(0 0 10px rgba(244, 201, 104, 0.55)); }
.trailer:hover .trailer-play {
  transform: scale(1.07);
  background-color: rgba(244, 201, 104, 0.12);
  box-shadow: 0 0 0 7px rgba(7, 20, 38, 0.45), 0 0 0 8px rgba(244, 201, 104, 0.75), 0 0 70px rgba(244, 201, 104, 0.55),
    inset 0 0 34px rgba(244, 201, 104, 0.4);
}
.trailer-label {
  text-align: center; font-family: var(--font-head); font-weight: 700; font-size: 1.6rem; letter-spacing: 0.04em;
  color: var(--text); text-shadow: 0 2px 10px rgba(0, 0, 0, 0.85);
}
.trailer-label em { display: block; margin-top: 4px; font-style: normal; font-size: 0.85rem; letter-spacing: 0.25em; text-transform: uppercase; color: var(--gold-hi); }
@keyframes play-pulse { from { transform: scale(0.9); opacity: 0.9; } to { transform: scale(1.32); opacity: 0; } }

.shot-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.shot {
  position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  box-shadow: var(--card-shadow), inset 0 0 0 1px rgba(244, 201, 104, 0.12);
}
a.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
a.shot:hover img { transform: scale(1.06); }
.shot-placeholder {
  display: grid; place-items: end center; padding-bottom: 14px;
  background:
    url("../assets/brand/emblem-256.webp") center 38% / 34% no-repeat,
    repeating-linear-gradient(45deg, rgba(217, 164, 65, 0.05) 0 12px, transparent 12px 24px),
    linear-gradient(160deg, var(--blue), var(--surface) 55%, var(--bg));
  border-style: dashed;
}
.shot-placeholder::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 38%, transparent 20%, rgba(7, 20, 38, 0.55) 70%);
}
.shot-placeholder span {
  position: relative; font-family: var(--font-head); font-weight: 600; font-size: 0.82rem;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-2);
}

/* ---------- News ---------- */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.news-card {
  display: block; overflow: hidden; text-decoration: none;
  background: linear-gradient(180deg, rgba(13, 39, 67, 0.92), rgba(7, 20, 38, 0.96));
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--card-shadow), inset 0 0 0 1px rgba(244, 201, 104, 0.12);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.news-card:hover { transform: translateY(-5px); border-color: var(--gold-hi); box-shadow: 0 22px 46px rgba(0, 0, 0, 0.55), 0 0 22px rgba(244, 201, 104, 0.2); }
.news-card img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.news-body { padding: 16px 20px 18px; border-top: 1px solid rgba(217, 164, 65, 0.5); }
.news-body h3 { font-size: 1.2rem; margin-bottom: 6px; }
.news-meta { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 0.9rem; color: var(--text-2); }

/* ---------- Newsletter band ---------- */
.join {
  position: relative; margin-top: 24px; padding: 64px 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(120, 80, 30, 0.25), transparent 18%, transparent 82%, rgba(120, 80, 30, 0.3)),
    url("../assets/art/parchment-band.webp") center / cover,
    var(--parchment);
  border-top: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  box-shadow: inset 0 0 60px rgba(90, 55, 15, 0.45);
}
.join :focus-visible { outline: 3px solid var(--bg); outline-offset: 3px; }
html.a11y-contrast .join :focus-visible { outline-color: #fff; }
.join-inner { display: flex; align-items: center; justify-content: center; gap: 48px; }
.join-medal { width: 200px; height: 200px; flex: none; filter: drop-shadow(0 10px 18px rgba(60, 35, 5, 0.55)); }
.join-copy { text-align: center; max-width: 640px; }
.join h2 {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  color: var(--ink); background: none; -webkit-background-clip: border-box; background-clip: border-box;
  margin-bottom: 6px; white-space: nowrap;
}
.join h2 .tagline-rule { width: clamp(24px, 4vw, 48px); }
.join h2 .tagline-rule { background: linear-gradient(90deg, transparent, var(--ink)); }
.join h2 .tagline-rule:last-child { background: linear-gradient(90deg, var(--ink), transparent); }
.join-copy > p { margin: 0 0 20px; font-size: 1.15rem; font-weight: 600; color: #3a2a14; }

.join-form { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.join-form input[type="email"] {
  flex: 1; min-width: 0; max-width: 360px; padding: 0.8em 1em;
  font: inherit; color: var(--text);
  background: rgba(7, 20, 38, 0.92); border: 1px solid var(--gold-deep); border-radius: 6px;
}
.join-form input::placeholder { color: #8fa2b6; }
.join-form input[aria-invalid="true"] { border-color: #c0392b; box-shadow: 0 0 0 2px rgba(192, 57, 43, 0.35); }
.join-form .btn:disabled { cursor: wait; filter: saturate(0.6); transform: none; }
/* Below the email row on wide screens (order 3), between the field and the button on phones (DOM order). */
.join-consent {
  order: 3; flex-basis: 100%; display: flex; gap: 10px; align-items: flex-start; max-width: 560px; margin: 2px auto 0;
  text-align: left; font-size: 0.95rem; line-height: 1.45; color: #3a2a14; cursor: pointer;
}
.join-consent input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--bg); cursor: pointer; }
.join-trap { position: absolute; left: -10000px; width: 1px; height: 1px; opacity: 0; }
.join-status { margin: 12px 0 0; font-weight: 700; color: #3a2a14; }
.join-status:empty { display: none; }
.join-status.is-error { color: #7a1a0e; }
.join-note { margin: 12px 0 0; font-size: 0.92rem; color: #4a3820; }
.join-note a { color: #3a2a14; font-weight: 700; }

/* ---------- Footer ---------- */
.site-footer { padding: 44px 0 28px; border-top: 1px solid rgba(217, 164, 65, 0.35); background: rgba(4, 12, 24, 0.7); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.site-footer .brand-emblem { width: 56px; height: 56px; }

.social { display: flex; gap: 14px; list-style: none; margin: 0; padding: 0; }
.social a {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid rgba(217, 164, 65, 0.55); color: var(--gold-hi);
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.social a:hover { background: var(--gold); color: var(--ink); transform: translateY(-2px); }
.social svg { width: 20px; height: 20px; fill: currentColor; }

.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 26px; list-style: none; margin: 0; padding: 0; }
.footer-links a { color: var(--text-2); text-decoration: none; }
.footer-links a:hover { color: var(--gold-hi); }

.footer-contact { margin: 26px auto 0; text-align: center; font-size: 0.98rem; color: var(--text-2); }
.footer-contact a {
  color: var(--gold-hi); font-weight: 600; text-decoration: none;
  border-bottom: 1px solid rgba(244, 201, 104, 0.4); transition: border-color 0.18s ease;
}
.footer-contact a:hover { border-bottom-color: var(--gold-hi); }

.footer-base {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-top: 30px; padding-top: 22px; border-top: 1px solid rgba(217, 164, 65, 0.18);
  font-size: 0.9rem; color: var(--text-2);
}
.footer-base p { margin: 0; }
.studio { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text-2); }
.studio img { width: 160px; height: auto; }

/* ---------- Legal pages (privacy, terms) ---------- */
.btn-back { margin-left: auto; }
.footer-links a[aria-current="page"] { color: var(--gold-hi); }

.legal { padding: 56px 0 72px; line-height: 1.7; }
.legal .container { max-width: 900px; }
.legal-card {
  padding: 44px 64px 40px;
  background: linear-gradient(180deg, rgba(13, 39, 67, 0.92), rgba(7, 20, 38, 0.96));
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--card-shadow), inset 0 0 0 1px rgba(244, 201, 104, 0.12);
}
.legal h1 {
  margin: 0 0 8px; font-family: var(--font-head); font-weight: 700; line-height: 1.15;
  font-size: clamp(2rem, 4vw, 2.8rem);
  background: var(--gold-text); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.legal-date { margin: 0 0 28px; padding-bottom: 22px; border-bottom: 1px solid rgba(217, 164, 65, 0.35); color: var(--text-2); font-size: 0.95rem; }
.legal h2 { margin: 34px 0 10px; font-size: 1.35rem; }
.legal p { margin: 0 0 14px; }
.legal ul { margin: 0 0 14px; padding-left: 1.3em; }
.legal li { margin-bottom: 8px; }
.legal li::marker { color: var(--gold); }
.legal a { color: var(--gold-hi); }
.legal strong { color: var(--gold-hi); font-weight: 600; }

/* ---------- Dialogs ---------- */
.modal { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 24px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(2, 8, 16, 0.86); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.modal-box {
  position: relative; width: min(960px, 100%);
  background: var(--bg); border: 1px solid var(--gold); border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7); padding: 14px;
  animation: pop 0.25s ease;
}
.modal-title { margin: 14px 4px 4px; font-size: 1.4rem; }
.modal-frame { position: relative; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: #000; }
.modal-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.modal-soon {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; text-align: center;
  background: linear-gradient(rgba(7, 20, 38, 0.62), rgba(7, 20, 38, 0.88)), url("../assets/art/feature-ages.webp") center / cover;
}
.modal-soon img { width: 110px; height: 110px; }
.modal-soon p { margin: 0; font-family: var(--font-head); font-weight: 700; font-size: 1.5rem; color: var(--gold-hi); }
.modal-soon span { color: var(--text-2); }
.modal-close {
  position: absolute; top: -18px; right: -18px; z-index: 2; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: var(--gold); border: 2px solid #ffe6a6; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}
.modal-close svg { width: 22px; height: 22px; fill: var(--ink); }
.lightbox .modal-box { width: min(1400px, 100%); padding: 8px; }
.lightbox img { width: 100%; max-height: 82vh; object-fit: contain; border-radius: 4px; }

@keyframes pop { from { transform: scale(0.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }

body.has-modal { overflow: hidden; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 400;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  max-width: calc(100% - 32px); padding: 12px 22px;
  font-weight: 600; color: var(--text); text-align: center;
  background: rgba(13, 39, 67, 0.97); border: 1px solid var(--gold); border-radius: 999px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.toast.is-shown { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Accessibility menu (js/a11y.js) ---------- */
/* The button: a small medallion like the nations' - a gold ring round a lit navy disc, the accessibility figure in
   gold - with its name sliding out on hover / focus. */
.a11y-toggle {
  position: fixed; left: 20px; bottom: 20px; z-index: 250; width: 60px; height: 60px; padding: 0; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  border: 3px solid transparent;
  background:
    radial-gradient(circle at 50% 32%, #23598f 0%, #0e2d50 52%, #071426 100%) padding-box,
    linear-gradient(160deg, #fff1c4 0%, #f4c968 28%, #a8721f 60%, #f4c968 88%, #fff1c4 100%) border-box;
  box-shadow: inset 0 0 0 2px rgba(7, 20, 38, 0.85), inset 0 0 0 3px rgba(244, 201, 104, 0.35),
    0 10px 26px rgba(0, 0, 0, 0.55), 0 0 22px rgba(244, 201, 104, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.a11y-toggle:hover, .a11y-toggle:focus-visible, .a11y-toggle[aria-expanded="true"] {
  transform: scale(1.07);
  box-shadow: inset 0 0 0 2px rgba(7, 20, 38, 0.85), inset 0 0 0 3px rgba(244, 201, 104, 0.55),
    0 12px 30px rgba(0, 0, 0, 0.6), 0 0 34px rgba(244, 201, 104, 0.45);
}
.a11y-toggle:focus-visible { outline: 3px solid var(--gold-hi); outline-offset: 4px; }
.a11y-figure { width: 38px; height: 38px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.7)); }
.a11y-tip {
  position: absolute; left: calc(100% + 12px); top: 50%; transform: translate(-6px, -50%); opacity: 0; pointer-events: none;
  padding: 6px 14px; white-space: nowrap;
  font-family: var(--font-head); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.08em; color: var(--gold-hi);
  background: #0b2038; border: 1px solid var(--gold); border-radius: 999px; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.a11y-toggle:hover .a11y-tip, .a11y-toggle:focus-visible .a11y-tip { opacity: 1; transform: translate(0, -50%); }
.a11y-toggle[aria-expanded="true"] .a11y-tip { opacity: 0; }
.a11y-panel {
  position: fixed; left: 20px; bottom: 92px; z-index: 250; width: 310px; max-width: calc(100vw - 40px);
  max-height: calc(100vh - 120px); overflow-y: auto; padding: 16px 16px 14px;
  font-family: var(--font-body); font-size: 1rem; line-height: 1.4; color: var(--text);
  background: linear-gradient(180deg, #10304f, #081a2f);
  border: 1px solid var(--line); border-top: 3px solid var(--gold); border-radius: var(--radius);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.65), inset 0 0 0 1px rgba(244, 201, 104, 0.1);
}
.a11y-panel[hidden] { display: none; }
.a11y-panel button { font: inherit; cursor: pointer; }
.a11y-panel svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.a11y-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.a11y-title {
  display: flex; align-items: center; gap: 10px; margin: 0;
  font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; letter-spacing: 0.03em; color: var(--gold-hi);
}
.a11y-panel .a11y-title-figure { width: 30px; height: 30px; }
.a11y-close { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; color: var(--text); background: none; border: 1px solid rgba(217, 164, 65, 0.5); border-radius: 6px; }
.a11y-close:hover { border-color: var(--gold-hi); color: var(--gold-hi); }
.a11y-size {
  display: grid; grid-template-columns: 1fr 44px 56px 44px; align-items: center; gap: 6px;
  padding: 10px 0 12px; border-bottom: 1px solid rgba(217, 164, 65, 0.25);
}
.a11y-size button { height: 40px; color: var(--ink); font-weight: 700; background: var(--gold-hi); border: 0; border-radius: 6px; }
.a11y-size output { text-align: center; font-weight: 700; }
.a11y-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px 0; }
.a11y-opt {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 76px; padding: 8px;
  color: var(--text); text-align: center; background: rgba(18, 62, 104, 0.6); border: 1px solid rgba(217, 164, 65, 0.4); border-radius: 6px;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}
.a11y-opt svg { fill: var(--gold-hi); }
.a11y-opt:hover { border-color: var(--gold-hi); background: rgba(18, 62, 104, 0.9); }
.a11y-opt[aria-pressed="true"] { color: var(--ink); background: linear-gradient(180deg, #fbe08f, var(--gold-hi) 40%, var(--gold)); border-color: #fff1c4; }
.a11y-opt[aria-pressed="true"] svg { fill: var(--ink); }
.a11y-opt[aria-pressed="true"] span::after { content: " \2713"; }
.a11y-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 12px; border-top: 1px solid rgba(217, 164, 65, 0.25); }
.a11y-reset { padding: 8px 12px; color: var(--text); background: none; border: 1px solid var(--gold); border-radius: 6px; }
.a11y-foot a { color: var(--gold-hi); }

/* The menu's choices, as classes on <html>. */
html.a11y-size-1 { font-size: 112%; }
html.a11y-size-2 { font-size: 125%; }
html.a11y-size-3 { font-size: 140%; }
html.a11y-size-2 .site-header, html.a11y-size-3 .site-header { height: auto; min-height: var(--header-h); }
html.a11y-size-2 .header-inner, html.a11y-size-3 .header-inner { flex-wrap: wrap; padding-block: 8px; }
html.a11y-size-2 .main-nav ul, html.a11y-size-3 .main-nav ul { flex-wrap: wrap; }

html.a11y-contrast {
  --bg: #000; --surface: #000; --text: #fff; --text-2: #fff; --line: #ffd35a;
  --gold: #ffd35a; --gold-hi: #ffe58a; --gold-text: linear-gradient(#ffd35a, #ffd35a);
}
html.a11y-contrast body { background: #000; }
html.a11y-contrast .site-header, html.a11y-contrast .site-footer,
html.a11y-contrast .feature-card, html.a11y-contrast .age-card, html.a11y-contrast .news-card, html.a11y-contrast .legal-card,
html.a11y-contrast .nation-panel, html.a11y-contrast .shot, html.a11y-contrast .section-alt, html.a11y-contrast .a11y-panel,
html.a11y-contrast .toast, html.a11y-contrast .modal-box { background: #000; border-color: #ffd35a; }
html.a11y-contrast .join { background: #000; color: #fff; border-color: #ffd35a; box-shadow: none; }
html.a11y-contrast .join h2, html.a11y-contrast .join-copy > p, html.a11y-contrast .join-status, html.a11y-contrast .join-note,
html.a11y-contrast .join-consent,
html.a11y-contrast .join-note a { color: #fff; }
html.a11y-contrast .join h2 .tagline-rule { background: #fff; }
html.a11y-contrast .btn-gold { background: #ffd35a; color: #000; }
html.a11y-contrast .btn-outline { background: #000; color: #fff; border-color: #fff; }
html.a11y-contrast .trailer img, html.a11y-contrast .hero-art::before { filter: brightness(0.35); }
html.a11y-contrast .trailer-label, html.a11y-contrast .trailer-label em { color: #fff; }
html.a11y-contrast a:focus-visible, html.a11y-contrast button:focus-visible { outline: 3px solid #fff; }

html.a11y-links a { text-decoration: underline !important; text-underline-offset: 3px; }
html.a11y-links .btn { text-decoration: none !important; }

html.a11y-font { --font-head: "Source Sans 3", "Segoe UI", system-ui, sans-serif; }
html.a11y-font h1, html.a11y-font h2, html.a11y-font h3, html.a11y-font .eyebrow, html.a11y-font .btn,
html.a11y-font .main-nav a, html.a11y-font .age-num, html.a11y-font .nation-facts dt, html.a11y-font .nation-wonders b,
html.a11y-font .trailer-label em, html.a11y-font .nation-portrait figcaption em { letter-spacing: 0.02em; }

html.a11y-spacing body { line-height: 1.9; letter-spacing: 0.03em; word-spacing: 0.1em; }
html.a11y-spacing p, html.a11y-spacing li, html.a11y-spacing dd { line-height: 1.9; }

html.a11y-still { scroll-behavior: auto; }
html.a11y-still *, html.a11y-still *::before, html.a11y-still *::after { transition: none !important; animation: none !important; }
html.a11y-still.js .reveal { opacity: 1; transform: none; }

/* ---------- Scroll reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
/* Menu targets fade only: a shift would throw off where the menu's jump lands. */
.js .reveal[id] { transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .main-nav ul a { padding: 8px 10px; font-size: 0.92rem; }
  .header-inner { gap: 18px; }
}

@media (max-width: 960px) {
  :root { --header-h: 68px; }
  .menu-toggle { display: flex; }
  .btn-nav { display: none; }
  .main-nav {
    position: fixed; left: 0; right: 0; top: var(--header-h);
    max-height: calc(100vh - var(--header-h)); overflow-y: auto;
    padding: 12px 24px 26px;
    background: var(--bg); border-bottom: 1px solid rgba(217, 164, 65, 0.5);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    transform: translateY(-12px); opacity: 0; visibility: hidden;
    transition: transform 0.25s ease, opacity 0.25s ease, visibility 0.25s;
  }
  .main-nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav ul a { padding: 14px 4px; font-size: 1.1rem; border-bottom: 1px solid rgba(217, 164, 65, 0.15); }
  .main-nav ul a::after { left: 4px; right: auto; width: 60px; }
  .main-nav .btn-nav-mobile { display: flex; margin-top: 18px; width: 100%; }

  .feature-grid, .news-grid { grid-template-columns: 1fr 1fr; }
  .age-list { grid-template-columns: 1fr 1fr; gap: 18px; }
  .age-media { height: 220px; padding: 18px 16px 8px; }
  .nation-panel { grid-template-columns: 220px 1fr; gap: 28px; padding: 28px; }
  .nation-facts > div { grid-template-columns: 1fr; gap: 4px; }
  .shot-grid { grid-template-columns: 1fr 1fr; }
  .join-inner { gap: 28px; }
  .join-medal { width: 150px; height: 150px; }
}

@media (max-width: 700px) {
  .container { padding-inline: 16px; }
  .divider { padding-inline: 16px; }
  .section { padding: 44px 0; }
  .brand-emblem { width: 42px; height: 42px; }
  .brand-word span:first-child { font-size: 0.78rem; }
  .brand-word span:last-child { font-size: 1.25rem; }

  .hero { padding-bottom: 40px; }
  .hero-art::before { display: none; }
  .hero-art img { width: 100%; -webkit-mask-image: none; mask-image: none; }
  .hero-copy { margin-top: -8px; }
  .hero-art::after { height: 22%; }
  .hero-sub { font-size: 1.05rem; }
  .hero-credit { font-size: 0.75rem; letter-spacing: 0.24em; }
  .hero-actions .btn-lg { width: 100%; min-width: 0; }

  .feature-grid, .news-grid { grid-template-columns: 1fr; gap: 22px; }
  /* Phones: each age a row - the render beside its words. */
  .age-list { grid-template-columns: 1fr; gap: 16px; }
  .age-card { flex-direction: row; align-items: center; }
  .age-media { flex: none; width: 124px; height: 124px; padding: 12px; }
  .age-body { padding: 14px 16px 14px 4px; text-align: left; }
  .age-body::before { display: none; }
  .age-body h3 { font-size: 1.15rem; }
  .nation-list { grid-template-columns: repeat(2, 1fr); gap: 18px 12px; }
  .nation-list img { width: 104px; height: 104px; }
  .nation-list .nation-soon { grid-column: 1 / -1; }
  .nation-list .nation-soon img { width: 160px; height: 111px; }
  .nation-list span { font-size: 0.92rem; }
  .nation-panel { grid-template-columns: 1fr; gap: 20px; margin-top: 28px; padding: 22px 18px 24px; }
  .nation-portrait { max-width: 220px; margin: 0 auto; }
  .nation-info { text-align: left; }
  .nation-info h3 { font-size: 1.35rem; }
  .nation-wonders span { grid-template-columns: 1fr; }
  .nation-wonders span + span { margin-top: 6px; }
  .age-card-soon { box-shadow: 6px -6px 0 -1px #0a1d33, 6px -6px 0 0 rgba(217, 164, 65, 0.45),
    12px -12px 0 -2px #081829, 12px -12px 0 -1px rgba(217, 164, 65, 0.25), var(--card-shadow); }
  .shot-grid { gap: 12px; }
  .hide-sm { display: none; }
  .shot-placeholder { padding-bottom: 8px; background-position: center 34%, 0 0, 0 0; }
  .trailer-cta { gap: 12px; }
  .trailer-play { width: 82px; height: 82px; }
  .trailer-play::after { inset: -8px; }
  .trailer-play svg { width: 48px; height: 48px; }
  .trailer-label { font-size: 1.1rem; }

  .join { padding: 48px 0; }
  .join-inner { flex-direction: column; gap: 18px; }
  .join-medal { width: 120px; height: 120px; }
  .join h2 { gap: 10px; }
  .join-form { flex-direction: column; align-items: stretch; }
  .join-form input[type="email"] { max-width: none; }
  .join-consent { order: 0; margin: 0; }

  .footer-inner, .footer-base { flex-direction: column; text-align: center; }
  .site-footer { padding-bottom: 84px; }  /* room under the last line for the accessibility button */
  .a11y-toggle { left: 14px; bottom: 14px; width: 52px; height: 52px; }
  .a11y-figure { width: 32px; height: 32px; }
  .a11y-panel { left: 14px; bottom: 78px; max-width: calc(100vw - 28px); }

  .btn-back { padding: 0.5em 0.9em; font-size: 0.82rem; }
  .legal { padding: 28px 0 44px; }
  .legal-card { padding: 28px 20px 24px; }
  .legal h2 { margin-top: 28px; font-size: 1.2rem; }
  .modal-close { top: -14px; right: -6px; }
}

/* The smallest phones (320 px): the newsletter heading may wrap, the screenshot placeholders' emblem shrinks. */
@media (max-width: 380px) {
  .join h2 { white-space: normal; font-size: 1.6rem; }
  .shot-placeholder { background-size: 26% auto, auto, auto; background-position: center 30%, 0 0, 0 0; }
  .shot-placeholder span { font-size: 0.72rem; letter-spacing: 0.08em; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
