/* Xenithal — Season One sign-up */

@font-face {
  font-family: 'Friz Quadrata';
  src: url(assets/Fonts/friz-quadrata-regular.woff2) format('woff2'),
       url(assets/Fonts/friz-quadrata-regular.woff) format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0a0806;
  --bg-alt: #0e0b07;
  --bg-gallery: #080604;
  --bg-card: #110d08;
  --bg-card-hi: #15110a;
  --bg-footer: #060504;

  --yellow: #fdc505;
  --yellow-hover: #fff1a8;
  --gold: #cfae6b;
  --rule-20: rgba(207, 174, 107, .2);
  --rule-25: rgba(207, 174, 107, .25);
  --rule-30: rgba(207, 174, 107, .3);
  --rule-35: rgba(207, 174, 107, .35);
  --rule-45: rgba(207, 174, 107, .45);

  --text: #f1ead9;
  --text-2: #d8cdb6;
  --muted: #b9ab90;
  --placeholder: #8f8470;

  --serif: 'Friz Quadrata', 'Friz Quadrata Std', 'Marcellus', serif;
  --sans: 'Open Sans', system-ui, sans-serif;

  --gutter: clamp(20px, 4vw, 48px);
  --pad-y: clamp(72px, 10vw, 120px);
  --max: 1200px;
  --nav-h: 63px;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

/* Film grain over the whole page, to break up the too-clean finish on the renders.
   A static noise tile with plain opacity (no blend mode) so scrolling doesn't repaint it. */
body::after {
  content: ''; position: fixed; inset: 0; z-index: 9999; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n' color-interpolation-filters='sRGB'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='4 0 0 0 -1.8 4 0 0 0 -1.8 4 0 0 0 -1.8 0 0 0 0 1'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: .07;
}

img { display: block; max-width: 100%; }
/* <picture> only picks the AVIF; the <img> inside stays the layout box (grid order, widths, borders) */
picture { display: contents; }
/* …which would otherwise promote <source> to a grid/flex item and take the first cell */
picture > source { display: none; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
strong { color: var(--text); font-weight: 700; }

a { color: var(--yellow); text-decoration: none; transition: color .18s; }
a:hover { color: var(--yellow-hover); }

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

.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 {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--yellow); color: var(--bg); padding: 10px 16px;
  font: 700 13px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase;
}
.skip:focus { top: 12px; color: var(--bg); }

/* ---------- Shared pieces ---------- */

.eyebrow {
  font: 700 13px/1 var(--sans);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
}

.numeral { font: 400 30px/1 var(--serif); color: var(--yellow); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; background: var(--yellow); color: var(--bg);
  font: 800 15px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase;
  cursor: pointer; transition: background-color .18s;
}
.btn:hover { background: var(--yellow-hover); color: var(--bg); }
/* Pressed like a seal into wax: it sinks and the face shades from the top */
.btn:not(.btn-ghost) { transition: background-color .18s, transform .08s, box-shadow .08s; }
.btn:not(.btn-ghost):active:not(:disabled) { transform: translateY(2px); box-shadow: inset 0 3px 7px rgba(74, 52, 0, .45); }

/* Gold diamonds sat on the left and right edges */
.diamonds { position: relative; }
.diamonds::before, .diamonds::after {
  content: ''; position: absolute; top: 50%;
  width: 9px; height: 9px; margin-top: -4.5px;
  background: var(--gold); transform: rotate(45deg);
}
.diamonds::before { left: -5px; }
.diamonds::after { right: -5px; }

.wreath { position: relative; display: grid; place-items: center; }
.wreath img { position: absolute; inset: 0; width: 100%; height: 100%; }
.wreath > span { position: relative; }
.wreath--pale img { filter: grayscale(1) brightness(1.9); }
.wreath--dark img { filter: brightness(0); }

/* ---------- Section frame ---------- */

.section { padding: var(--pad-y) var(--gutter); }
.section--alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--rule-20);
  border-bottom: 1px solid var(--rule-20);
}
.section--no-bottom-rule { border-bottom: 0; }
.section--gold-bottom { border-bottom-color: var(--gold); }
.container { max-width: var(--max); margin: 0 auto; }

.section-head {
  display: flex; flex-direction: column; align-items: center;
  gap: 16px; text-align: center; margin-bottom: 56px;
}
.section-head-wreath { width: 44px; height: auto; opacity: .9; }
.section-head h2 {
  font: 400 clamp(38px, 3.2vw + 20px, 54px)/1.05 var(--serif);
  font-variant: small-caps;
  color: var(--text);
  text-wrap: balance;
}
/* Inside the Tournament structure super-section: chapter heads, no wreath or divider */
.section-head--sub { gap: 12px; }
.section-head--sub h3 {
  font: 400 clamp(30px, 1.4vw + 20px, 38px)/1.1 var(--serif);
  font-variant: small-caps;
  color: var(--text);
  text-wrap: balance;
}
/* The super-section's own title: sits between the photo band and the tiers */
.super-head { padding-bottom: clamp(40px, 5vw, 64px); }
.super-head .section-head { margin-bottom: 0; }
.divider { display: flex; align-items: center; gap: 10px; width: 260px; max-width: 100%; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--gold); }
.divider span { width: 8px; height: 8px; background: var(--yellow); transform: rotate(45deg); }
.section-sub {
  font-size: 19px; color: var(--muted);
  max-width: 680px; text-wrap: pretty;
}

/* ---------- Nav ---------- */

.nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 18px var(--gutter);
  background: rgba(10, 8, 6, .92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule-25);
}
.nav-logo img { height: 26px; width: auto; }
.nav-links {
  display: flex; align-items: center; gap: 32px;
  font: 700 13px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase;
}
.nav-links a:not(.btn) { color: var(--text); }
.nav-links a:not(.btn):hover { color: var(--yellow); }
.nav-menu { display: flex; align-items: center; gap: 28px; white-space: nowrap; }
.nav-top { white-space: nowrap; }
/* Pipe between the section links and How it works; dropped once the section links fold into the menu */
.nav-top { padding: 3px 0 3px 32px; border-left: 1px solid var(--rule-45); }
@media (max-width: 1180px) { .nav-top { padding-left: 0; border-left: 0; } }
/* How it works is a top-level link, but on phones there's no room for it in the bar, so it moves into the menu */
.nav-menu-only { display: none; }
@media (max-width: 600px) {
  .nav-top { display: none; }
  .nav-menu .nav-menu-only { display: block; }
}
.btn-nav { padding: 12px 18px; font: inherit; letter-spacing: inherit; white-space: nowrap; }

/* Below 1181px the section links fold behind a menu button and drop down under the bar */
.nav-toggle {
  display: none; place-items: center;
  width: 44px; height: 44px; padding: 0;
  background: none; border: 1px solid var(--rule-45); color: var(--text); cursor: pointer;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 18px; height: 1.5px; background: currentColor;
}
.nav-toggle span { position: relative; }
.nav-toggle span::before, .nav-toggle span::after { content: ''; position: absolute; left: 0; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); background: var(--yellow); }
.nav-toggle[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); background: var(--yellow); }
.nav-toggle:hover { border-color: var(--yellow); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 820px;
  display: flex; align-items: center;
  padding: 80px var(--gutter);
  background: var(--bg) url(assets/hero-wide.jpg) 72% center / cover no-repeat;
  background-image: image-set(url(assets/hero-wide.avif) type("image/avif"), url(assets/hero-wide.jpg) type("image/jpeg"));
  isolation: isolate;
}
.hero::before, .hero::after { content: ''; position: absolute; z-index: -1; pointer-events: none; }
.hero::before {
  inset: 0;
  background: linear-gradient(90deg, rgba(10,8,6,.96) 0%, rgba(10,8,6,.85) 38%, rgba(10,8,6,.1) 70%, rgba(10,8,6,0) 100%);
}
.hero::after {
  left: 0; right: 0; bottom: 0; height: 160px;
  background: linear-gradient(0deg, var(--bg), rgba(10,8,6,0));
}
/* home-new: the hero fills the first screen minus enough room for the next section's laurel to show
   (main.js measures that room into --hero-peek). If the hero's content is taller, the content wins. */
.hero--peek { min-height: calc(100svh - var(--hero-peek, 0px)); }
/* Short desktop screens (768px laptops): tighter hero padding and a shorter gap above the next
   section, so the laurel still makes it onto the first screen */
@media (min-width: 901px) and (max-height: 880px) {
  .hero--peek { padding-block: 40px; }
  .hero--peek + .section { padding-top: 64px; }
}
/* The laurel under the hero pulses until the visitor reaches its section (main.js adds and removes the class) */
.section-head-wreath.is-beckoning { animation: laurel-beckon 2.4s cubic-bezier(.45, 0, .55, 1) infinite; }
@keyframes laurel-beckon {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(253, 197, 5, 0)); }
  50% { transform: scale(1.14); filter: drop-shadow(0 0 10px rgba(253, 197, 5, .55)); }
}
@media (prefers-reduced-motion: reduce) {
  .section-head-wreath.is-beckoning { animation: none; }
}
.hero-inner { width: 100%; max-width: var(--max); margin: 0 auto; }
.hero-content { max-width: 660px; display: flex; flex-direction: column; gap: 22px; }
.hero-logo img { width: 520px; max-width: 100%; height: auto; }
.hero-tagline {
  font: 400 26px/1.4 var(--serif);
  font-variant: small-caps; letter-spacing: .04em;
  color: var(--text);
}

.stats {
  margin-top: 10px;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px;
}
.stat {
  border: 1.5px solid var(--gold);
  background: rgba(10, 8, 6, .7);
  padding: 18px 8px 14px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.stat::before, .stat::after { width: 8px; height: 8px; margin-top: -4px; }
.stat--wreath { padding-top: 12px; }
.stat-num { font: 700 36px/1 var(--serif); color: #fff; }
.stat--wreath .stat-num { font-size: 30px; top: -5px; }
.stat-num--gold { color: var(--yellow); }
.stat .wreath { width: 62px; height: 56px; }

/* ---------- Gold catching the light ----------
   A band of light crosses a mark, masked to its shape so only the gold lights up.
   The Winner laurel glints once after load; typing "prime" gilds the wordmarks (main.js). */
.glint::after, .hero-logo::after, .nav-logo::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 249, 222, .95) 50%, transparent 62%) 100% 0 / 250% 100% no-repeat;
  -webkit-mask: var(--mark) left center / auto 100% no-repeat;
  mask: var(--mark) left center / auto 100% no-repeat;
  opacity: 0;
}
.glint { --mark: url(assets/icon_wreath.svg); }
.glint::after { -webkit-mask-size: 100% 100%; mask-size: 100% 100%; animation: light-passes 1.3s 1.4s cubic-bezier(.45, 0, .2, 1) both; }
.hero-logo, .nav-logo { position: relative; --mark: url(assets/Xenithal-Logo-Yellow.svg); }
.is-gilded::after { animation: light-passes 1.6s cubic-bezier(.45, 0, .2, 1) both; }
@keyframes light-passes {
  0% { opacity: 1; background-position: 100% 0; }
  90% { opacity: 1; }
  100% { opacity: 0; background-position: 0 0; }
}
@keyframes gilded-still { 0%, 100% { opacity: 0; } 40% { opacity: .5; } }
@media (prefers-reduced-motion: reduce) {
  .glint::after { animation: none; }
  .is-gilded::after { background: rgba(255, 249, 222, .9); animation: gilded-still 1.2s ease both; }
}
.stat-label {
  font: 700 13px/1 var(--sans); letter-spacing: .08em;
  text-transform: uppercase; color: #fff;
}
/* home-new: taller boxes with the number and label centred in them */
.stats--tall .stat { height: 140px; padding: 0 8px; justify-content: center; gap: 10px; }

.signup {
  display: flex;
  border: 1.5px solid var(--gold);
  background: rgba(10, 8, 6, .8);
  margin-top: 10px;
  transition: border-color .18s;
}
.signup:focus-within { border-color: var(--yellow); }
/* The input drops its own outline, so the whole row carries the site's focus ring */
.signup:has(input:focus) { outline: 2px solid var(--yellow); outline-offset: 3px; }
.signup input {
  flex: 1; min-width: 0; height: 58px;
  padding: 0 18px;
  background: transparent; border: 0; outline: 0;
  font: 400 17px var(--sans); color: var(--text);
}
/* Honeypot: off-screen for people, still in the form for bots */
.signup .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.signup input::placeholder { color: var(--placeholder); }
.signup .btn { padding: 0 28px; }
.hero-note { font-size: 15px; color: var(--muted); text-wrap: pretty; }

/* A button that reads as an inline link (opens the privacy notice) */
.link-btn {
  padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; color: var(--yellow);
  text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px;
  transition: color .18s;
}
.link-btn:hover { color: var(--yellow-hover); }
.footer-links .link-btn { text-decoration: none; }

.signup .btn:disabled { cursor: progress; background: var(--gold); }
.signup-error { font-size: 15px; color: var(--text); text-wrap: pretty; }
.signup-error::before {
  content: ''; display: inline-block; vertical-align: 2px;
  width: 7px; height: 7px; margin-right: 10px;
  background: var(--yellow); transform: rotate(45deg);
}

/* Success: the form is struck from the page and a roll entry takes its place */
.enlisted {
  display: grid; grid-template-columns: 58px minmax(0, 1fr);
  gap: 18px; align-items: center;
  margin-top: 10px; padding: 18px 22px;
  border: 1.5px solid var(--yellow);
  background: rgba(10, 8, 6, .85);
  text-align: left;
  animation: roll-inked .6s var(--ease) both;
}
.enlisted:focus { outline: 0; }
.enlisted:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; }
.enlisted--cta { width: 680px; max-width: 100%; margin-top: 0; }
.enlisted-seal { width: 58px; height: auto; animation: seal-pressed .7s .15s var(--ease) both; }
.enlisted-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.enlisted-title { font: 400 26px/1.1 var(--serif); font-variant: small-caps; color: var(--yellow); }
.enlisted-text p:not(.enlisted-title) { font-size: 15px; color: var(--text-2); }
.enlisted-email { color: var(--text); font-weight: 700; overflow-wrap: anywhere; }

/* ---------- Sharing ----------
   Each network sits in a gold diamond (the site's card-edge motif); the icon stays upright inside it. */
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; }
.share-label { font-size: 15px; color: var(--muted); text-wrap: pretty; }
.share-buttons { display: flex; gap: 4px; margin: 0 -4px; }
.share-btn {
  position: relative; isolation: isolate;
  display: grid; place-items: center;
  width: 48px; height: 48px; padding: 0;
  border: 0; background: none; cursor: pointer;
  color: var(--gold);
  transition: color .18s, transform .12s;
}
.share-btn::before {
  content: ''; position: absolute; inset: 8px; z-index: -1;
  transform: rotate(45deg);
  box-shadow: inset 0 0 0 1.5px var(--rule-45);
  transition: background .18s, box-shadow .18s, transform .25s var(--ease);
}
.share-btn svg { width: 16px; height: 16px; fill: currentColor; }
.share-btn:hover { color: var(--bg); }
.share-btn:hover::before { background: var(--yellow); box-shadow: inset 0 0 0 1.5px var(--yellow); transform: rotate(45deg) scale(1.08); }
.share-btn:active { transform: translateY(1px); }
.share-btn:focus-visible { outline: 0; }
.share-btn:focus-visible::before { box-shadow: inset 0 0 0 1.5px var(--yellow), 0 0 0 2px var(--bg), 0 0 0 4px var(--yellow); }
.share-status { flex-basis: 100%; font-size: 14px; color: var(--text-2); overflow-wrap: anywhere; }
.share-status:empty { display: none; }

/* In the roll entry: a recruiting line under a hairline */
.enlisted .share { gap: 6px 18px; margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--rule-25); }
.enlisted .share-label { flex: 1 1 260px; color: var(--text-2); }

.share--cta { justify-content: center; text-align: center; margin-top: -8px; }
.share--cta .share-label { text-wrap: balance; }
.share--footer { gap: 8px 14px; }
.share--footer .share-label { font-size: 14px; }

@keyframes roll-inked {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0); }
}
@keyframes seal-pressed {
  0% { opacity: 0; transform: scale(1.7) rotate(-10deg); }
  70% { opacity: 1; transform: scale(.94) rotate(0); }
  100% { opacity: 1; transform: scale(1); }
}

/* ---------- Journey ---------- */

.journey { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.phase {
  position: relative;
  border: 1px solid var(--rule-45);
  background: var(--bg-card);
  padding: 36px 32px;
  display: flex; flex-direction: column; gap: 22px;
}
.phase::before {
  content: ''; position: absolute; left: 50%; top: -5px;
  width: 9px; height: 9px; margin-left: -4.5px;
  background: var(--gold); transform: rotate(45deg);
}
.phase-head {
  display: flex; align-items: baseline; gap: 14px;
  padding-bottom: 18px; border-bottom: 1px solid var(--rule-30);
  font-weight: 400;
}
.phase-num { font: 400 44px/1 var(--serif); color: var(--yellow); }
.phase-name { font: 400 34px/1 var(--serif); font-variant: small-caps; }
.phase p { color: var(--muted); }

/* The parcel photo hangs off Phase II: a gold thread drops from that card to a diamond on the frame */
.arrival {
  grid-column: 1 / -1;
  position: relative;
  margin: 0;
  border: 1px solid var(--rule-45);
  background: var(--bg);
}
.arrival::before {
  content: ''; position: absolute; left: 50%; bottom: calc(100% - 5px);
  width: 9px; height: 33px; margin-left: -4.5px; z-index: 1;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 33'%3E%3Cpath d='M4.5 0v24' stroke='%23cfae6b'/%3E%3Cpath d='M4.5 23.5 9 28l-4.5 4.5L0 28z' fill='%23cfae6b'/%3E%3C/svg%3E") no-repeat;
}
.arrival img {
  display: block; width: 100%; height: auto;
  aspect-ratio: 21 / 9; object-fit: cover; object-position: 42% 96%;
}
.arrival figcaption {
  padding: 20px 32px 22px;
  background: var(--bg-card); border-top: 1px solid var(--rule-30);
  font: 400 18px/1.45 var(--serif); color: var(--text);
  text-wrap: balance;
}
.arrival-num { color: var(--yellow); margin-right: 8px; }

/* ---------- Journey trail (home-new) ---------- */
/* Nine steps hung off a dashed gold path. main.js draws the path through the numbered nodes and
   inks it in as the visitor scrolls; without JS a straight dashed spine stands in. */

.trail-wrap { position: relative; max-width: 1080px; margin-inline: auto; }
.trail { position: relative; list-style: none; margin: 0; padding: 0; }
.trail-wrap:not(.has-line)::before {
  content: ''; position: absolute; top: 0; bottom: 0; left: 50%;
  border-left: 2px dashed var(--gold); margin-left: -1px;
}
.trail-line { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.trail-route, .trail-path { fill: none; stroke-width: 2; stroke-dasharray: 8 9; }
.trail-route { stroke: var(--rule-25); }
.trail-path { stroke: var(--gold); }
.trail-reveal { fill: none; stroke: #fff; stroke-width: 32; }
.trail-spark { fill: var(--yellow); }

.trail-step {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px minmax(0, 1fr);
  align-items: center;
}
.trail-step + .trail-step { margin-top: 12px; }

.trail-node {
  grid-column: 2; grid-row: 1; justify-self: center;
  position: relative; z-index: 1;
  display: grid; place-items: center;
  width: 50px; height: 50px; border-radius: 50%;
  border: 1.5px solid var(--yellow);
  background: var(--bg);
  font: 400 19px/1 var(--serif); color: var(--yellow);
  translate: var(--x, 0) var(--y, 0);
  transition: border-color .5s var(--ease), color .5s var(--ease);
}
.trail-wrap.is-scrubbing .trail-node:not(.is-lit) { border-color: var(--rule-45); color: var(--placeholder); }

.trail-text { grid-column: 1; grid-row: 1; justify-self: end; width: min(330px, 100%); padding-block: 20px; }
.trail-text h3 { font: 400 28px/1.1 var(--serif); font-variant: small-caps; color: var(--text); margin-bottom: 10px; text-wrap: balance; }
.trail-text p { color: var(--text-2); font-size: 16px; text-wrap: pretty; }

.trail-art { grid-column: 3; grid-row: 1; justify-self: start; width: min(400px, 100%); aspect-ratio: 3 / 2; margin: 0; }
.trail-art img { display: block; width: 100%; height: 100%; object-fit: cover;
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 62%, transparent 100%);
          mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 62%, transparent 100%);
}

/* Diagrams that already sit on black and run to the edges keep their full frame */
.trail-art--full img { -webkit-mask-image: none; mask-image: none; }

.trail-step:nth-child(even) .trail-text { grid-column: 3; justify-self: start; }
.trail-step:nth-child(even) .trail-art { grid-column: 1; justify-self: end; }

/* Stand-in until the illustrations arrive: the frame names the picture that goes in it */
.trail-art--todo {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 20px; text-align: center;
  border: 1px dashed var(--rule-35);
  background: radial-gradient(closest-side, rgba(207, 174, 107, .08), transparent);
}
.trail-art--todo span:first-child { font: 400 15px/1 var(--serif); letter-spacing: .12em; color: var(--gold); }
.trail-art--todo span:last-child { font-size: 13px; color: var(--muted); }

@media (max-width: 900px) {
  .trail-wrap:not(.has-line)::before { left: 28px; }
  .trail-step { grid-template-columns: 56px minmax(0, 1fr); column-gap: 16px; align-items: start; }
  .trail-step + .trail-step { margin-top: 44px; }
  .trail-node { grid-column: 1; translate: none; width: 44px; height: 44px; margin-left: 6px; font-size: 17px; }
  .trail-text,
  .trail-step:nth-child(even) .trail-text { grid-column: 2; grid-row: 1; justify-self: stretch; width: auto; padding-block: 6px 0; }
  .trail-text h3 { font-size: 25px; }
  .trail-art,
  .trail-step:nth-child(even) .trail-art { grid-column: 2; grid-row: 2; justify-self: stretch; width: 100%; max-width: 480px; margin-top: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .trail-node { transition: none; }
}

/* ---------- Tier pyramid ---------- */

.pyramid { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.tier {
  width: var(--w);
  height: 52px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px;
  background: var(--tier-bg);
  color: var(--tier-fg);
}
.tier-num { font: 800 12px/1 var(--sans); color: var(--gold); }
.tier--low .tier-num { color: var(--muted); }
.tier-name { font: 400 24px/1 var(--serif); font-variant: small-caps; }
.tier-count { font: 800 14px/1 var(--sans); }
.tier--base { border: 1px solid #6e5a3a; }
.tier--apex {
  height: 60px;
  display: grid; grid-template-columns: 40px minmax(0, 1fr) 40px;
  padding: 0 30px;
  background: var(--yellow);
  color: var(--bg);
  clip-path: polygon(8% 0, 92% 0, 100% 100%, 0 100%);
}
.tier--apex .tier-num { color: var(--bg); }
.tier--apex .tier-name { text-align: center; font-size: 26px; }
.tier--apex .tier-count { width: 40px; height: 36px; }
.tier--apex .tier-count > span { top: -3px; }

/* The pyramid is laid from the base up once main.js sees it: Legionary first, Xenithal last.
   Bars are visible by default; only .is-pending (set by JS) hides them. ~2.9s end to end. */
.pyramid.is-pending .tier { opacity: 0; }
.pyramid.is-built .tier {
  animation: tier-laid .9s var(--ease) both;
  animation-delay: calc((7 - var(--i)) * 260ms);
}
.pyramid.is-built .tier--apex { animation: apex-crowned 1.1s var(--ease) 1.9s both; }
@keyframes tier-laid {
  from { opacity: 0; transform: translateY(-28px); }
}
/* The capstone drops from higher and settles a beat after the last bar */
@keyframes apex-crowned {
  0% { opacity: 0; transform: translateY(-56px); }
  60% { opacity: 1; }
  100% { transform: translateY(0); }
}

/* ---------- Why enter ---------- */

.reasons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.reason {
  border: 1px solid var(--rule-45);
  padding: 34px 30px;
  display: flex; flex-direction: column; gap: 14px;
}
.reason h3 {
  font: 400 28px/1.15 var(--serif); font-variant: small-caps;
  color: var(--yellow); text-wrap: balance;
}
.reason p { color: var(--text-2); }
.benefits {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px;
  margin-top: 40px; padding-top: 28px;
  border-top: 1px solid var(--rule-30);
  font-size: 15px; color: var(--muted);
}
.benefits--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Three vows: icon-led replacement for the reason cards */
.vows { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 16px; }
.vow {
  display: flex; flex-direction: column; align-items: center; gap: 22px;
  padding: 0 48px; text-align: center;
}
.vow + .vow { border-left: 1px solid var(--rule-25); }
.vow-icon { position: relative; display: grid; place-items: center; width: 88px; height: 88px; }
.vow-icon::before {
  content: ''; position: absolute; inset: 14px;
  border: 1px solid rgba(207, 174, 107, .55); background: var(--bg-card-hi);
  transform: rotate(45deg);
}
.vow-icon svg {
  position: relative; width: 40px; height: 40px;
  fill: none; stroke: var(--yellow); stroke-width: 1.75;
  stroke-linecap: round; stroke-linejoin: round;
}
.vow h3 {
  margin-top: 8px;
  font: 400 32px/1.1 var(--serif); font-variant: small-caps;
  color: var(--yellow); text-wrap: balance;
}
.vow p { max-width: 300px; font-size: 18px; line-height: 1.55; color: var(--text-2); }
.vows-foot { display: flex; flex-direction: column; align-items: center; gap: 40px; margin-top: 72px; }
.perks {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 16px 56px;
  width: 100%; padding-top: 28px; list-style: none;
  border-top: 1px solid var(--rule-30);
  font-size: 15px; color: var(--muted);
}
.perks li { display: flex; align-items: center; gap: 12px; }
.perks svg {
  flex: none; width: 22px; height: 22px;
  fill: none; stroke: var(--gold); stroke-width: 2.5; stroke-linejoin: round;
}
.vows-cta { display: flex; align-items: center; gap: 24px; }
.vows-cta .btn { height: 56px; padding: 0 32px; flex: none; }
.vows-cta p { font-size: 15px; color: var(--muted); }

@media (max-width: 1100px) {
  .vows { grid-template-columns: minmax(0, 1fr); max-width: 560px; margin-inline: auto; }
  .vow { padding: 40px 0; }
  .vow:first-child { padding-top: 0; }
  .vow:last-child { padding-bottom: 0; }
  .vow + .vow { border-left: 0; border-top: 1px solid var(--rule-25); }
  .vows-foot { margin-top: 56px; }
  .perks { flex-direction: column; align-items: flex-start; width: auto; max-width: 560px; }
  .vows-cta { flex-direction: column; gap: 16px; text-align: center; }
}

@media (max-width: 520px) {
  .vow h3 { font-size: 28px; }
  .vow p { font-size: 17px; }
  .vows-cta .btn { height: 54px; width: 100%; }
}

/* ---------- Photo band (between Why enter and Costs) ---------- */

.photo-band {
  /* Scales with width because the photo does: the figure sits 19–85% down the frame */
  height: clamp(420px, 44vw, 720px);
  background: var(--bg) url(assets/judged-in-hand-real.jpg) center 46% / cover;
  background-image: image-set(url(assets/judged-in-hand-real.avif) type("image/avif"), url(assets/judged-in-hand-real.jpg) type("image/jpeg"));
  border-top: 1.5px solid var(--gold);
  border-bottom: 1.5px solid var(--gold);
}
.photo-band-caption {
  width: fit-content; max-width: calc(100% - 24px);
  margin: 0 12px 0 auto;
  padding: 4px 8px;
  background: #000; color: #fff;
  font-size: 12px; line-height: 1.4;
}

/* ---------- Numbered rules (home Community) ---------- */

.rules li {
  display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 8px;
  padding: 24px 0;
  border-top: 1px solid var(--rule-30);
}
.rules li:last-child { border-bottom: 1px solid var(--rule-30); }
.rules p { color: var(--muted); }

/* ---------- Costs ---------- */

.costs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.cost {
  display: flex; flex-direction: column; gap: 14px;
  padding: 30px 24px;
  border: 1px solid var(--rule-35);
  text-align: center;
}
.cost--hi { border: 1.5px solid var(--yellow); background: var(--bg-card-hi); }
.cost-label {
  font: 700 12px/1 var(--sans); letter-spacing: .2em;
  text-transform: uppercase; color: var(--gold);
}
.cost-value { font: 400 44px/1 var(--serif); color: var(--yellow); }
.cost p:not(.cost-value) { font-size: 15px; color: var(--text-2); }
.costs-note { max-width: 62ch; margin: 28px auto 0; text-align: center; color: var(--muted); text-wrap: balance; }

/* ---------- Tournament structure ---------- */

/* The cut bar is drawn to scale: the whole bar is the tier, the yellow head (--k, default 16) is who goes through.
   Knockout pips are a run of filled gold diamonds, var(--n) wide, halving each round. The last 16 stack as two rows of eight. */
.ladder { width: 100%; border-collapse: collapse; text-align: left; }
.ladder thead th {
  padding: 0 24px 16px 0;
  font: 700 12px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--gold);
  border-bottom: 1px solid var(--rule-30);
  white-space: nowrap;
}
.ladder th[scope="row"], .ladder td { padding: 16px 24px 16px 0; vertical-align: middle; border-bottom: 1px solid var(--rule-20); }
.ladder tr > :first-child { padding-left: 18px; }
.ladder tr > :last-child { padding-right: 18px; text-align: center; }
.ladder tbody tr:last-child > * { border-bottom-color: var(--rule-30); }
.ladder th[scope="row"] { width: 23%; font-weight: 400; white-space: nowrap; }
.ladder-num { display: inline-block; width: 44px; font: 800 12px/1 var(--sans); color: var(--gold); }
.ladder-name { font: 400 24px/1 var(--serif); font-variant: small-caps; color: var(--text); }
.ladder-cut { width: 36%; white-space: nowrap; }
.cut {
  display: inline-block; vertical-align: middle;
  width: calc(var(--n) * .72%); height: 12px;
  background: linear-gradient(90deg, #4a3c1f, #261e10);
  box-shadow: inset 0 0 0 1px var(--rule-45);
}
.cut > span { display: block; height: 100%; width: calc(100% * var(--k, 16) / var(--n)); background: var(--yellow); }
.cut-label { margin-left: 14px; vertical-align: middle; font: 700 14px/1 var(--sans); color: var(--text-2); }
.pips {
  display: inline-block; vertical-align: middle;
  width: calc(var(--n) * 14px); height: 12px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='12' viewBox='0 0 14 12'%3E%3Cpath d='M6 1 11 6 6 11 1 6Z' fill='%23cfae6b'/%3E%3C/svg%3E") left center / 14px 12px repeat-x;
}
.pips--16 { width: calc(8 * 14px); height: 24px; background-position: left top; background-repeat: repeat; }
.bye { font: 700 12px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--yellow); }
.ladder-crown img { display: inline-block; width: 34px; height: auto; vertical-align: middle; opacity: .55; }
.ladder-apex .ladder-crown img { opacity: 1; }
/* The top tier: lifted band, yellow name, its champion is Xenithal Prime */
.ladder-apex > * { background: var(--bg-card-hi); }
.ladder-apex .ladder-name { color: var(--yellow); }

/* Tracing a tier: hover (or tap) a row and it lights round by round, from the cut to the laurel.
   Delays only apply on the way in, so leaving the row clears it at once. */
.ladder tbody tr { cursor: default; }
.ladder tbody tr > * { transition: background-color .25s; }
.ladder tbody tr:is(:hover, .is-traced) > * { background-color: var(--bg-card); }
.ladder-apex:is(:hover, .is-traced) > * { background-color: #1b150c; }
.ladder .pips { position: relative; }
.ladder .pips::after {
  content: ''; position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='12' viewBox='0 0 14 12'%3E%3Cpath d='M6 1 11 6 6 11 1 6Z' fill='%23fdc505'/%3E%3C/svg%3E");
  background-position: inherit; background-size: inherit; background-repeat: inherit;
  opacity: 0; transition: opacity .2s;
}
.ladder-name, .ladder-crown img { transition: color .2s, opacity .3s, transform .45s var(--ease); }
.ladder tr:is(:hover, .is-traced) .ladder-name { color: var(--yellow); }
.ladder tr:is(:hover, .is-traced) .pips::after { opacity: 1; transition-delay: var(--step); }
.ladder tr:is(:hover, .is-traced) .ladder-crown img { opacity: 1; transform: scale(1.18); transition-delay: var(--step); }
.ladder td:nth-child(3) { --step: .08s; }
.ladder td:nth-child(4) { --step: .2s; }
.ladder td:nth-child(5) { --step: .32s; }
.ladder td:nth-child(6) { --step: .44s; }
.ladder td:nth-child(7) { --step: .6s; }
@media (prefers-reduced-motion: reduce) {
  .ladder td { --step: 0s !important; }
  .ladder tr:is(:hover, .is-traced) .ladder-crown img { transform: none; }
}

.ladder-notes {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px;
  margin-top: 32px; font-size: 15px; color: var(--muted); text-wrap: pretty;
}

/* ---------- Prizes ---------- */

.purse { display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center; }
.purse-sum {
  width: clamp(260px, 30vw, 360px); aspect-ratio: 446 / 416;
  font: 400 clamp(52px, 4vw + 30px, 84px)/1 var(--serif);
  letter-spacing: -.01em; color: var(--yellow);
}
.purse-sum > span { top: -.08em; }
.wreath--faint img { opacity: .22; }
.purse-line { max-width: 34ch; font-size: 19px; color: var(--text-2); text-wrap: balance; }

/* The pool is a shared total, not a prize: it follows the honours, set in the running text */
.pool { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 44px; text-align: center; }
.pool-label { font: 700 12px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.pool-line { max-width: 44ch; font-size: 19px; color: var(--text-2); text-wrap: balance; }
.pool-sum { font: 400 1.5em/1 var(--serif); color: var(--yellow); white-space: nowrap; }

.honours {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 64px;
  border-top: 1px solid var(--rule-30); border-bottom: 1px solid var(--rule-30);
}
.honours li {
  position: relative;
  display: flex; flex-direction: column; gap: 10px;
  padding: 32px 36px; text-align: center;
}
.honours li + li { border-left: 1px solid var(--rule-30); }
/* A gold diamond pinned where each divider meets the top rule */
.honours li + li::before {
  content: ''; position: absolute; left: -5px; top: -5px;
  width: 9px; height: 9px; background: var(--gold); transform: rotate(45deg);
}
.honours h3, .honours h4 { font: 400 28px/1.15 var(--serif); font-variant: small-caps; color: var(--yellow); }
.honours p { font-size: 15px; color: var(--text-2); text-wrap: pretty; }
.section-head + .honours { margin-top: 0; }
.honours-note { max-width: 62ch; margin: 28px auto 0; text-align: center; color: var(--muted); text-wrap: balance; }

/* ---------- Judgement ---------- */

.edict { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; margin-bottom: 64px; }
.edict-line { font: 400 clamp(22px, .5vw + 18px, 26px)/1.3 var(--serif); color: var(--text); text-wrap: balance; }
.edict p:not(.edict-line) { max-width: 52ch; color: var(--muted); text-wrap: balance; }

.ledger { --cols: minmax(0, 3fr) minmax(0, 5fr) minmax(0, 4fr); }
.ledger-head, .ledger-row { display: grid; grid-template-columns: var(--cols); gap: 40px; }
.ledger-head {
  padding-bottom: 14px;
  font: 700 12px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--gold);
}
.ledger-row { padding: 30px 0; border-top: 1px solid var(--rule-30); }
.ledger-row:last-child { border-bottom: 1px solid var(--rule-30); }
.ledger-round { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: baseline; row-gap: 6px; }
.ledger-round h4 { font: 400 30px/1 var(--serif); font-variant: small-caps; }
.ledger-round p { grid-column: 2; font-size: 15px; color: var(--muted); }
.ledger-cell { display: flex; flex-direction: column; gap: 14px; }
.ledger-cell p { color: var(--text-2); }
.ledger-label { display: none; }

/* Who holds a vote: a filled diamond for each judge, an open one for the competitors' vote */
.votes { display: flex; align-items: center; gap: 9px; height: 14px; }
.votes i { width: 10px; height: 10px; background: var(--yellow); transform: rotate(45deg); }
.votes i.open { background: none; box-shadow: inset 0 0 0 1.5px var(--gold); }
/* The many-hands rows: a run of open diamonds that fades out, read as "everyone" */
.votes--crowd {
  width: min(100%, 240px);
  -webkit-mask: linear-gradient(90deg, #000 30%, transparent);
          mask: linear-gradient(90deg, #000 30%, transparent);
}
.votes--crowd::before {
  content: ''; flex: 1; height: 12px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='19' height='12'%3E%3Cpath d='M6 1.4 10.6 6 6 10.6 1.4 6Z' fill='none' stroke='%23cfae6b' stroke-width='1.4'/%3E%3C/svg%3E") left center / 19px 12px repeat-x;
}

.ledger-notes {
  margin-top: 32px; font-size: 15px; color: var(--muted);
}

.phase-link a { font-weight: 700; border-bottom: 1px solid var(--rule-45); }
.phase-link a:hover { border-color: var(--yellow-hover); }
/* A centred onward link under a section, to the How it works page */
.section-more { margin-top: 40px; text-align: center; }

/* ---------- Story ---------- */

.story {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 64px; align-items: start;
}
.story-img {
  width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover;
  border: 1.5px solid var(--gold);
  background: var(--bg);
}
.story-body { display: flex; flex-direction: column; gap: 18px; color: var(--text-2); }
.story-body h3 {
  margin-top: 8px;
  font: 400 30px/1.15 var(--serif); font-variant: small-caps;
  color: var(--yellow);
}
.story-body h3:first-child { margin-top: 0; }
.story-close { font-family: var(--serif); color: var(--text); }
.story-close span { color: var(--yellow); }


/* ---------- Community ---------- */

.community {
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: 64px; align-items: center;
}
/* Map sits right of the text on wide screens, but stays above it once stacked */
.community-map { order: 2; }
.community-map {
  width: 100%; height: auto;
  /* The render's black ground is cooler and lighter than ours: warm it down, then fade its edges into the band */
  filter: sepia(.25) brightness(.86) saturate(1.1);
  mask-image:
    linear-gradient(to right, transparent, #000 10%, #000 90%, transparent),
    linear-gradient(to bottom, transparent, #000 8%, #000 92%, transparent);
  mask-composite: intersect;
}
.community-body { display: flex; flex-direction: column; gap: 28px; }
.community-turn {
  font: 400 clamp(26px, 1.4vw + 16px, 34px)/1.15 var(--serif);
  font-variant: small-caps;
  color: var(--yellow);
  text-wrap: balance;
}
.community .rules p { color: var(--text-2); }
.community .rules li:last-child { border-bottom: 0; }

.community-next {
  margin-top: 48px;
  display: flex; flex-direction: column; align-items: center; gap: 20px;
  text-align: center;
}
.community-next > p { font-size: 19px; color: var(--muted); text-wrap: balance; }
.community-next ul {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 14px 32px;
  font: 400 22px/1.2 var(--serif); font-variant: small-caps;
  color: var(--text);
}
.community-next li { display: flex; align-items: center; gap: 12px; }
/* A diamond leads every item, so a wrapped line never starts or ends on a stray one */
.community-next li::before {
  content: ''; width: 7px; height: 7px; flex: none;
  background: var(--gold); transform: rotate(45deg);
}

.founders {
  display: flex; justify-content: center; flex-wrap: wrap;
  gap: 40px 64px; margin-top: 72px;
}
.founders li { width: 220px; }
.founders figure { display: flex; flex-direction: column; align-items: center; gap: 16px; }
/* Real photo on the front, the render on the back. Hover turns it on pointer devices; a tap,
   click, Enter or Space pins it (main.js, shared with The Miniatures). */
.founder-card { position: relative; width: 200px; height: 200px; border-radius: 50%; perspective: 800px; cursor: pointer; }
/* Hint that it turns: a small gold rotate badge on the portrait's lower-right edge */
.founder-card::after {
  content: ''; position: absolute; right: 13px; bottom: 13px; z-index: 1;
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--gold);
  background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23cfae6b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8'/%3E%3Cpath d='M21 3v5h-5'/%3E%3C/svg%3E") center / 18px no-repeat;
  pointer-events: none;
}
.founder-card:focus-visible { outline-offset: 4px; }
.founder-flip {
  position: relative; width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform .7s cubic-bezier(.2, .7, .2, 1);
}
.founder-card.is-render .founder-flip { transform: rotateY(180deg); }
@media (hover: hover) {
  .founder-card:hover .founder-flip { transform: rotateY(180deg); }
}
.founder-face { display: block; position: absolute; inset: 0; backface-visibility: hidden; }
.founder-face--render { transform: rotateY(180deg); }
@media (prefers-reduced-motion: reduce) {
  .founder-flip { transition: none; }
}
.founders img {
  width: 100%; height: 100%; border-radius: 50%;
  object-fit: cover; object-position: center top;
  border: 2px solid var(--gold);
  background: var(--bg);
}
.founders figcaption { font: 400 22px/1.2 var(--serif); font-variant: small-caps; text-align: center; }
.founder-title { display: block; font-size: 17px; color: var(--gold); }

/* ---------- Miniatures ---------- */

.minis { display: flex; flex-direction: column; gap: 14px; }
.minis [data-reveal], .panorama {
  background-color: var(--bg);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}
.panorama {
  aspect-ratio: 5 / 1;
  background-image: url(assets/img-04.jpg);
  border: 1.5px solid var(--gold);
}
.composite {
  position: relative;
  height: 460px;
  background: var(--gold);
  border: 1.5px solid var(--gold);
}
.seg { position: absolute; }
/* Each segment is boxed to its own bounds, so the photo covers its slice at any width */
.seg-a { left: 0; top: 0; bottom: 0; width: 58%; clip-path: polygon(0 0, 100% 0, 86.2% 100%, 0 100%); }
.seg-b {
  left: 54.4%; right: 0; top: 0; height: 49.6%;
  background-position: right top !important;
  clip-path: polygon(8.77% 0, 100% 0, 100% 100%, 0 100%);
}
.seg-c {
  left: 50.4%; right: 0; bottom: 0; height: 49.6%;
  background-position: right bottom !important;
  clip-path: polygon(7.86% 0, 100% 0, 100% 100%, 0 100%);
}
.seg-circle {
  position: absolute; left: 54.2%; top: 30%;
  width: 210px; height: 210px; margin: -105px 0 0 -105px;
  border-radius: 50%;
  border: 3px solid var(--gold);
}
.thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.thumbs div { aspect-ratio: 4 / 3; border: 1.5px solid var(--gold); }
.thumbs div { position: relative; }

/* Real photo → render. The render sits on ::after with the tile's own crop (same pixel sizes as the
   photos), so clip-paths and the circle carry over. Hover on pointer devices; tap/Enter pins it. */
.minis-hint { font-size: 15px; color: var(--muted); text-align: center; }
[data-reveal] { cursor: pointer; background-image: var(--real-jpg); }
[data-reveal]::after {
  content: ''; position: absolute; inset: 0;
  background-image: var(--img-jpg); background-repeat: no-repeat;
  background-size: cover; background-position: inherit;
  border-radius: inherit;
  opacity: 0; transition: opacity .45s var(--ease);
}
[data-reveal].is-render::after { opacity: 1; }
@media (hover: hover) {
  [data-reveal]:hover::after { opacity: 1; }
}
[data-reveal]:focus-visible { outline-offset: -4px; z-index: 2; }
.minis-copy {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px; margin-top: 40px; color: var(--text-2);
}

/* ---------- Gallery ---------- */

.gallery {
  background: var(--bg-gallery);
  border-top: 1px solid var(--rule-20);
  border-bottom: 1px solid var(--rule-20);
  overflow: hidden;
}
.gallery-tag { display: flex; justify-content: flex-end; margin: -32px 0 16px; }
.gallery-tag span {
  font: 700 12px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase;
  color: var(--bg); background: var(--gold); padding: 8px 12px;
}
.gallery-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  margin-bottom: 20px;
}
.gallery-bar p { font-size: 15px; color: var(--muted); }
.gallery-bar.is-static .gallery-drag,
.gallery-bar.is-static .arrows { display: none; }
.arrows, .lb-nav { display: flex; gap: 8px; }
.arrow {
  width: 52px; height: 52px; flex: none;
  display: grid; place-items: center;
  border: 1.5px solid var(--gold);
  background: rgba(10, 8, 6, .85);
  color: var(--yellow);
  cursor: pointer;
  transition: background-color .18s, color .18s;
}
.arrow:hover { background: var(--yellow); color: var(--bg); }
.arrow svg, .lb-close svg {
  width: 22px; height: 22px;
  fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: square;
}

/* Track sits outside .container and cancels the section's gutter, so it runs edge to edge */
.track {
  display: flex; gap: 18px;
  overflow-x: auto;
  scrollbar-width: none;
  margin-inline: calc(-1 * var(--gutter));
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  scroll-snap-type: x proximity;
}
.track::-webkit-scrollbar { display: none; }
.track.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.track li { flex: 0 0 280px; scroll-snap-align: start; }
.entry {
  width: 100%; padding: 0; border: 0; background: transparent;
  text-align: left; cursor: inherit; color: var(--text);
  display: flex; flex-direction: column; gap: 12px;
}
.entry img {
  width: 100%; aspect-ratio: 3 / 4; object-fit: cover;
  background: #4a4945;
  border: 1.5px solid var(--gold);
  pointer-events: none;
  transition: border-color .18s;
}
.entry:hover img { border-color: var(--yellow); }
/* The track clips overflow, so pull the ring inside the card */
.entry:focus-visible { outline-offset: -4px; }
.entry-meta {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  width: 100%;
}
.entry-id { font: 800 14px/1 var(--sans); letter-spacing: .1em; color: var(--yellow); }

/* ---------- Lightbox ---------- */

.lightbox {
  width: 100%; max-width: 100%; height: 100%; max-height: 100%;
  margin: 0; padding: 48px;
  border: 0;
  background: transparent;
  color: var(--text);
  place-items: center;
}
.lightbox[open] { display: grid; }
body:has(.lightbox[open]) { overflow: hidden; }
.lightbox::backdrop { background: rgba(6, 5, 4, .94); }
.lb-inner {
  position: relative;
  display: grid; grid-template-columns: auto minmax(260px, 340px);
  gap: 40px; align-items: center;
  max-width: 1100px;
}
.lb-img {
  height: min(78vh, 760px); width: auto; aspect-ratio: 3 / 4;
  max-width: 100%; object-fit: cover;
  background: #4a4945;
  border: 1.5px solid var(--gold);
}
.lb-panel { display: flex; flex-direction: column; gap: 22px; }
.lb-field {
  display: flex; flex-direction: column; gap: 6px;
  padding-bottom: 18px; border-bottom: 1px solid var(--rule-35);
}
.lb-id { font: 400 44px/1 var(--serif); color: var(--yellow); }
.lb-pos { align-self: center; margin-left: 8px; font-size: 14px; color: var(--muted); }
.lb-close {
  position: absolute; top: -36px; right: 0;
  display: inline-flex; align-items: center; gap: 6px;
  border: 0; background: transparent; color: var(--text); cursor: pointer;
  font: 700 12px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase;
  padding: 4px 0;
  transition: color .18s;
}
.lb-close:hover { color: var(--yellow); }
.lb-close svg { width: 14px; height: 14px; stroke-width: 2; }

/* ---------- Privacy notice ---------- */

.privacy {
  width: 100%; max-width: 100%; height: 100%; max-height: 100%;
  margin: 0; padding: 48px var(--gutter);
  border: 0; background: transparent; color: var(--text);
  place-items: center;
}
.privacy[open] { display: grid; }
body:has(.privacy[open]) { overflow: hidden; }
.privacy::backdrop { background: rgba(6, 5, 4, .9); }
.privacy-inner {
  position: relative;
  width: min(640px, 100%); max-height: calc(100dvh - 96px); overflow-y: auto;
  padding: 44px 40px 40px;
  background: var(--bg-card); border: 1.5px solid var(--gold);
  display: flex; flex-direction: column; gap: 12px;
}
.privacy-close { position: absolute; top: 18px; right: 20px; }
.privacy h2 { font: 400 36px/1.1 var(--serif); font-variant: small-caps; color: var(--yellow); }
.privacy-lead { color: var(--text); margin-bottom: 8px; }
.privacy h3 {
  margin-top: 14px;
  font: 700 12px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--gold);
}
.privacy p { font-size: 16px; color: var(--text-2); }

/* ---------- Cookie bar ---------- */

.cookie-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  padding: 18px var(--gutter);
  background: var(--bg-card); border-top: 1.5px solid var(--gold);
  box-shadow: 0 -12px 32px rgba(0, 0, 0, .5);
}
.cookie-bar[hidden] { display: none; }
.cookie-inner {
  max-width: var(--max); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 16px 32px;
}
.cookie-inner p { max-width: 70ch; font-size: 15px; color: var(--text-2); text-wrap: pretty; }
.cookie-actions { display: flex; gap: 12px; flex-shrink: 0; }
.cookie-actions .btn { height: 46px; padding: 0 24px; }
/* Reject carries the same weight as Accept, just unfilled */
.btn-ghost { background: transparent; color: var(--yellow); box-shadow: inset 0 0 0 1.5px var(--yellow); }
.btn-ghost:hover { background: var(--yellow); color: var(--bg); }

/* ---------- FAQ ---------- */

.faq { max-width: 860px; margin: 0 auto; border-bottom: 1px solid var(--rule-30); }
.faq details { border-top: 1px solid var(--rule-30); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 22px 0;
  cursor: pointer; list-style: none;
  font: 700 18px/1.3 var(--sans);
  transition: color .18s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--yellow-hover); }
/* Drawn plus/minus: the vertical bar folds away when open */
.faq summary::after {
  content: ''; flex: none; width: 14px; height: 14px;
  background:
    linear-gradient(var(--yellow), var(--yellow)) center / 14px 1.5px no-repeat,
    linear-gradient(var(--yellow), var(--yellow)) center / 1.5px 14px no-repeat;
  transition: background-size .25s var(--ease);
}
.faq details[open] summary::after {
  background-size: 14px 1.5px, 1.5px 0;
}
.faq details p { max-width: 68ch; padding: 0 40px 24px 0; color: var(--muted); }
.faq details p:not(:last-child) { padding-bottom: 12px; }
.faq-more { max-width: 860px; margin: 28px auto 0; font-size: 15px; color: var(--muted); text-wrap: pretty; }
.faq-more a { font-weight: 700; }

/* ---------- Final CTA ---------- */

.cta {
  position: relative;
  padding: clamp(96px, 12vw, 140px) var(--gutter);
  text-align: center;
  background: var(--bg) url(assets/banner-footer-1.jpg) center 60% / cover no-repeat;
  border-top: 1px solid var(--rule-30);
  isolation: isolate;
}
.cta::before { content: ''; position: absolute; inset: 0; z-index: -1; background: rgba(10, 8, 6, .86); }
.cta-inner {
  max-width: 860px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 28px;
}
.cta-wreath { width: 72px; }
.cta h2 {
  font: 400 clamp(36px, 3.6vw + 18px, 58px)/1.08 var(--serif);
  font-variant: small-caps; text-wrap: balance;
}
.cta h2 span { color: var(--yellow); }
.cta p { color: var(--muted); }
.signup--cta { width: 680px; max-width: 100%; margin-top: 0; background: rgba(10, 8, 6, .85); }
.signup--cta input { height: 62px; }
.signup--cta .btn { padding: 0 26px; }

/* ---------- Footer ---------- */

.footer {
  padding: 48px var(--gutter) 120px;
  border-top: 1px solid var(--rule-25);
  background: var(--bg-footer);
}
.footer-inner {
  max-width: var(--max); margin: 0 auto;
  display: flex; flex-direction: column; gap: 18px;
  font-size: 14px; color: var(--muted);
}
.footer-inner img { height: 22px; width: auto; align-self: flex-start; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.footer-inner > p { max-width: 70ch; }

/* ================= Responsive ================= */

/* Desktop: the nav waits off canvas until the hero has scrolled away, then slides down.
   main.js adds .is-auto (so without JS it stays as a normal sticky bar) and toggles .is-shown. */
@media (min-width: 901px) {
  .nav.is-auto {
    position: fixed; left: 0; right: 0;
    transform: translateY(-100%); visibility: hidden;
    transition: transform .5s var(--ease), visibility 0s .5s;
  }
  .nav.is-auto.is-shown {
    transform: none; visibility: visible;
    transition: transform .5s var(--ease), visibility 0s;
  }
}

@media (max-width: 1180px) {
  .nav-links { gap: 12px; }
  .nav-toggle { display: grid; }
  .nav-menu {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px var(--gutter) 16px;
    background: var(--bg-card); border-bottom: 1.5px solid var(--gold);
    box-shadow: 0 16px 32px rgba(0, 0, 0, .5);
    font-size: 14px;
  }
  .nav.is-open .nav-menu { display: flex; }
  .nav-menu li + li { border-top: 1px solid var(--rule-20); }
  .nav-menu a { display: block; padding: 16px 0; }
}

@media (max-width: 1100px) {
  .journey, .reasons { grid-template-columns: minmax(0, 1fr); max-width: 720px; margin-inline: auto; }
  .journey .phase:nth-of-type(3) { order: 1; } /* keeps the parcel photo directly under Phase II */
  .arrival img { aspect-ratio: 3 / 2; object-position: 40% 60%; }
  .benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .benefits--3 { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .ladder-notes { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .ladder th[scope="row"], .ladder td, .ladder thead th { padding-right: 16px; }
  .ledger-head { display: none; }
  .ledger-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 32px; }
  .ledger-round { grid-column: 1 / -1; }
  .ledger-label { display: block; font: 700 12px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
  .composite { height: 400px; }
  .seg-circle { width: 180px; height: 180px; margin: -90px 0 0 -90px; }
}

@media (max-width: 900px) {
  .hero::before {
    background: linear-gradient(90deg, rgba(10,8,6,.95) 0%, rgba(10,8,6,.88) 70%, rgba(10,8,6,.55) 100%);
  }
  .story { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .story-img { max-width: 720px; }
  .community { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .community-map { order: 0; width: min(340px, 80%); margin-inline: auto; }
  .community-next ul { font-size: 19px; gap: 12px 22px; }
  .tier { width: calc(58% + var(--i) * 6%); padding: 0 22px; }

  /* The ladder becomes one card per tier: name, the cut, then the four knockout cells in a row */
  .ladder, .ladder tbody { display: block; }
  .ladder thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .ladder tr {
    display: grid; grid-template-columns: auto auto auto minmax(0, 1fr); gap: 14px 18px; align-items: start;
    padding: 18px 14px; border-bottom: 1px solid var(--rule-20);
  }
  .ladder tbody tr:first-child { border-top: 1px solid var(--rule-30); }
  .ladder tbody tr:last-child { border-bottom-color: var(--rule-30); }
  .ladder-apex { background: var(--bg-card-hi); }
  .ladder-apex > * { background: none; }
  .ladder th[scope="row"], .ladder td { display: block; width: auto; padding: 0; border: 0; }
  .ladder tr > :first-child, .ladder tr > :last-child { padding: 0; }
  .ladder tr > :last-child { text-align: left; }
  .ladder-cut { grid-column: 1 / -1; }
  .ladder th[scope="row"] { grid-column: 1 / -2; }
  /* Five knockout cells won't fit a phone row, so the champion wreath sits beside the tier name */
  .ladder tr > .ladder-crown { grid-row: 1; grid-column: -2; justify-self: end; text-align: right; }
  .ladder td::before {
    content: attr(data-label); display: block; margin-bottom: 8px;
    font: 700 11px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--gold);
  }
  .ladder-num { width: 36px; }
  .ladder-name { font-size: 22px; }
  .pips { width: calc(var(--n) * 11px); background-size: 11px 10px; height: 10px; }
  .pips--16 { width: calc(8 * 11px); height: 20px; }
  .ladder-crown img { width: 30px; }
}

@media (max-width: 700px) {
  body { font-size: 16px; }
  .nav { padding-block: 14px; }
  .nav-logo img { height: 22px; }
  .btn-nav { padding: 11px 14px; font-size: 12px; }
  .nav-toggle { width: 38px; height: 38px; }
  .nav-links { gap: 10px; }

  .hero {
    min-height: 0;
    align-items: flex-end;
    padding-top: 42vh;
    padding-bottom: 56px;
    /* Portrait crop for phones: at least 58vh tall (48vh wide at 1200:1448) and never narrower than the screen */
    background-image: url(assets/hero-phone.jpg);
    background-image: image-set(url(assets/hero-phone.avif) type("image/avif"), url(assets/hero-phone.jpg) type("image/jpeg"));
    background-position: 70% top;
    background-size: max(100%, 48vh) auto;
  }
  .hero::before {
    background: linear-gradient(180deg, rgba(10,8,6,0) 0%, rgba(10,8,6,.2) 30vh, rgba(10,8,6,.92) 52vh, var(--bg) 60vh);
  }
  .hero::after { display: none; }
  .hero-content { gap: 18px; }
  .hero-tagline { font-size: 22px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
  /* The form comes before the stats on a phone so it lands on the first screen */
  .hero-content > .stats { order: 1; margin-top: 18px; }

  .section-head { margin-bottom: 40px; }
  .section-sub { font-size: 17px; }
  .phase { padding: 30px 22px; }
  .phase-num { font-size: 38px; }
  .phase-name { font-size: 30px; }

  .tier { height: 48px; padding: 0 16px; }
  .tier-name { font-size: 21px; }
  .tier--apex { grid-template-columns: 24px minmax(0, 1fr) 36px; padding: 0 20px; min-width: 220px; }
  .tier--apex .tier-name { font-size: 22px; }
  .tier--apex .tier-count { width: 36px; height: 32px; }

  .reason { padding: 30px 24px; }
  .reason h3 { font-size: 26px; }
  .benefits { grid-template-columns: minmax(0, 1fr); gap: 16px; }

  .photo-band { height: 260px; }
  .rules li { grid-template-columns: 48px minmax(0, 1fr); padding: 20px 0; }

  .honours { grid-template-columns: minmax(0, 1fr); margin-top: 48px; }
  .section-head + .honours { margin-top: 0; }
  .honours li { padding: 26px 8px; }
  .honours li + li { border-left: 0; border-top: 1px solid var(--rule-30); }
  .honours li + li::before { left: 50%; margin-left: -4.5px; }
  .purse-line, .pool-line { font-size: 17px; }
  .edict { margin-bottom: 44px; }
  .ledger-row { grid-template-columns: minmax(0, 1fr); padding: 26px 0; }
  .ledger-round { grid-template-columns: 48px minmax(0, 1fr); }

  .costs { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .cost { padding: 26px 22px; }
  .cost-value { font-size: 40px; }

  .founders { gap: 32px 28px; margin-top: 56px; }
  .founder-card { width: 140px; height: 140px; }
  .founder-card::after { right: 6px; bottom: 6px; width: 28px; height: 28px; background-size: 16px; }
  .founders li { width: 150px; }
  .founders figcaption { font-size: 20px; }
  .founder-title { font-size: 15px; }

  .panorama { aspect-ratio: 3 / 1; }
  /* The angled composite becomes a simple stacked mosaic with the circle on the seam */
  .composite {
    height: auto;
    display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
    border-width: 1.5px;
  }
  .seg, .seg-circle { position: relative; inset: auto; clip-path: none; margin: 0; }
  .seg-a { grid-column: 1 / -1; width: auto; aspect-ratio: 4 / 3; }
  .seg-b, .seg-c { width: auto; height: auto; aspect-ratio: 4 / 3; }
  .seg-b { background-position: center !important; }
  .seg-c { background-position: center !important; }
  .seg-circle {
    grid-column: 1 / -1; grid-row: 2;
    justify-self: center; z-index: 1;
    width: 132px; height: 132px;
    margin: -66px 0 -66px;
    left: auto; top: auto;
  }
  .seg-b, .seg-c { grid-row: 3; }
  .thumbs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .minis-copy { grid-template-columns: minmax(0, 1fr); gap: 18px; margin-top: 32px; }

  .gallery-tag { margin-top: -20px; }
  .gallery-bar p { font-size: 14px; }
  .track li { flex-basis: 232px; }

  .privacy { padding: 20px 16px; }
  .privacy-inner { padding: 56px 22px 28px; max-height: calc(100dvh - 40px); }
  .privacy h2 { font-size: 30px; }

  .lightbox { padding: 56px 20px 24px; }
  .lb-inner { grid-template-columns: minmax(0, 1fr); gap: 20px; justify-items: center; }
  .lb-img { height: auto; width: min(100%, 52vh * .75); }
  .lb-panel { width: min(100%, 52vh * .75); gap: 14px; }
  .lb-field { flex-direction: row; justify-content: space-between; align-items: baseline; padding-bottom: 12px; }
  .lb-id { font-size: 32px; }

  .faq summary { font-size: 17px; padding: 20px 0; }
  .faq details p { padding-right: 0; }

  .arrival figcaption { padding: 18px 20px 20px; }

  .footer { padding-bottom: 72px; }
}

@media (max-width: 520px) {
  .cookie-bar { padding: 12px var(--gutter); }
  .cookie-inner { flex-direction: column; align-items: stretch; gap: 10px; }
  .cookie-inner p { font-size: 14px; line-height: 1.45; }
  .cookie-actions { gap: 10px; }
  .cookie-actions .btn { flex: 1; height: 42px; }
  .signup { flex-direction: column; }
  .signup input { flex: none; width: 100%; height: 54px; }
  .signup .btn { height: 54px; padding: 0 20px; }
  .signup--cta input { height: 56px; }
}

@media (max-width: 380px) {
  .btn-nav { padding: 10px 11px; letter-spacing: .08em; }
  .stat-label { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .enlisted, .enlisted-seal { animation: none; }
}


/* ---------- Section textures (under review) ----------
   Add `tex tex--NN` to a section to lay a texture behind it; remove both to go back to flat black.
   Sits last so it layers over the background shorthands on .section--alt and .gallery. */

.tex {
  background-image: var(--tex-jpg);
  background-position: center top;
  background-repeat: no-repeat;
}
.tex--01 { --tex-jpg: url(assets/bgtexture-01-ember-paper.jpg);    --tex-avif: url(assets/bgtexture-01-ember-paper.avif); }
.tex--02 { --tex-jpg: url(assets/bgtexture-02-smoked-plaster.jpg); --tex-avif: url(assets/bgtexture-02-smoked-plaster.avif); }
.tex--03 { --tex-jpg: url(assets/bgtexture-03-deco-fan.jpg);       --tex-avif: url(assets/bgtexture-03-deco-fan.avif); }
.tex--04 { --tex-jpg: url(assets/bgtexture-04-bronze-silk.jpg);    --tex-avif: url(assets/bgtexture-04-bronze-silk.avif); }
.tex--05 { --tex-jpg: url(assets/bgtexture-05-deco-steps.jpg);     --tex-avif: url(assets/bgtexture-05-deco-steps.avif); }
.tex--06 { --tex-jpg: url(assets/bgtexture-06-zenith-ember.jpg);   --tex-avif: url(assets/bgtexture-06-zenith-ember.avif); }
.tex--07 { --tex-jpg: url(assets/bgtexture-07-zenith-haze.jpg);    --tex-avif: url(assets/bgtexture-07-zenith-haze.avif); }
.tex--08 { --tex-jpg: url(assets/bgtexture-08-zenith-deco.jpg);    --tex-avif: url(assets/bgtexture-08-zenith-deco.avif); }

/* ---------- AVIF and lazy backgrounds ----------
   Background URLs live in custom properties (texture classes above, inline on the Miniatures tiles), so the
   JPEG is the baseline and browsers that understand typed image-set() take the AVIF instead.
   With JS on, nothing loads until main.js marks the section .is-near (600px out). Without JS, everything loads. */
@supports (background-image: image-set(url("x.avif") type("image/avif"))) {
  .tex { background-image: image-set(var(--tex-avif) type("image/avif"), var(--tex-jpg) type("image/jpeg")); }
  [data-reveal] { background-image: image-set(var(--real-avif) type("image/avif"), var(--real-jpg) type("image/jpeg")); }
  [data-reveal]::after { background-image: image-set(var(--img-avif) type("image/avif"), var(--img-jpg) type("image/jpeg")); }
}
.js .tex:not(.is-near),
.js .photo-band:not(.is-near),
.js .minis:not(.is-near) [data-reveal],
.js .minis:not(.is-near) [data-reveal]::after { background-image: none; }

/* ---------- How it works promo (home) ----------
   A narrow framed strip under Your Journey pointing to the rules page. */

.promo {
  /* Bottom matches Your Journey's bottom padding plus the top, so the box sits centred in the dark band */
  padding: clamp(28px, 3vw, 40px) var(--gutter) calc(var(--pad-y) + clamp(28px, 3vw, 40px));
  background: var(--bg);
}
/* Art deco frame: a gold rule with a hairline set inside it, and a diamond pinned to each side */
.promo-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 20px 48px;
  padding: clamp(24px, 2.5vw, 32px) clamp(24px, 3vw, 44px);
  border: 1.5px solid var(--gold);
  box-shadow: inset 0 0 0 5px var(--bg), inset 0 0 0 6px var(--rule-45);
}
.promo-copy { display: flex; flex-direction: column; gap: 6px; max-width: 720px; }
.promo-copy h2 {
  font: 400 clamp(26px, 1.2vw + 18px, 32px)/1.1 var(--serif);
  font-variant: small-caps; color: var(--yellow);
}
.promo-copy p { font-size: 17px; color: var(--text-2); text-wrap: pretty; }
.promo-btn { flex: none; height: 54px; padding: 0 28px; }

@media (max-width: 900px) {
  .promo-inner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 700px) {
  .promo-copy p { font-size: 16px; }
  .promo-btn { align-self: stretch; }
}

/* ================= How it works page ================= */
/* Everything below is scoped to how-it-works.html. It reuses the shared pieces above
   (section heads, ladder, vote diamonds, CTA) and adds the chapter frame. */

.nav-links a[aria-current="page"] { color: var(--yellow); }

/* ---------- Page head ---------- */

.hiw-head { padding-bottom: clamp(56px, 7vw, 88px); border-bottom: 1px solid var(--rule-20); }
.hiw-title h1 {
  font: 400 clamp(44px, 4vw + 22px, 72px)/1 var(--serif);
  font-variant: small-caps;
  text-wrap: balance;
}

/* The season at a glance: six stations on one gold line, each a link to its chapter */
.glance ol {
  position: relative;
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
}
.glance ol::before {
  content: ''; position: absolute; left: 0; right: 0; top: 4px;
  height: 1px; background: var(--rule-45);
}
.glance a {
  position: relative;
  display: flex; flex-direction: column; gap: 8px;
  height: 100%;
  padding: 30px 20px 4px 0;
  color: var(--text);
}
.glance a::before {
  content: ''; position: absolute; left: 0; top: 0;
  width: 9px; height: 9px;
  background: var(--gold); transform: rotate(45deg);
  transition: background-color .18s, transform .3s var(--ease);
}
.glance-num { font: 400 22px/1 var(--serif); color: var(--yellow); }
.glance-name { font: 400 24px/1.1 var(--serif); font-variant: small-caps; transition: color .18s; }
.glance-line { font-size: 15px; line-height: 1.45; color: var(--muted); text-wrap: pretty; }
.glance a:hover { color: var(--text); }
.glance a:hover .glance-name { color: var(--yellow); }
.glance a:hover::before { background: var(--yellow); transform: rotate(45deg) scale(1.35); }

/* ---------- Chapters ---------- */

.chapter { padding: var(--pad-y) var(--gutter); }
.chapter--alt { background: var(--bg-alt); border-top: 1px solid var(--rule-20); border-bottom: 1px solid var(--rule-20); }
.chapter-grid {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 32px 64px; align-items: start;
}
/* The chapter title rides along while its rules scroll past */
.chapter-head {
  position: sticky; top: calc(var(--nav-h) + 40px);
  display: flex; flex-direction: column; gap: 16px;
}
.chapter-head h2 {
  display: flex; align-items: baseline; gap: 16px;
  padding-bottom: 18px; border-bottom: 1px solid var(--rule-30);
  font: 400 clamp(36px, 1.6vw + 24px, 46px)/1 var(--serif);
  font-variant: small-caps;
}
.chapter-num { font-size: 1.15em; color: var(--yellow); font-variant: normal; }
.chapter-lede { font: 400 20px/1.4 var(--serif); color: var(--text-2); text-wrap: pretty; }

.chapter-body { display: flex; flex-direction: column; gap: 40px; min-width: 0; }
.clauses { display: flex; flex-direction: column; gap: 18px; max-width: 68ch; }
.clauses p { color: var(--text-2); text-wrap: pretty; }

/* Who votes / if it's tied / what you pay: the round's terms, set in a ruled strip */
.terms {
  margin: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  border-top: 1.5px solid var(--gold);
}
.terms > div {
  position: relative;
  display: flex; flex-direction: column; gap: 12px;
  padding: 22px 28px 4px 0;
}
.terms > div + div { padding-left: 28px; border-left: 1px solid var(--rule-30); }
/* A diamond pinned where each divider meets the gold rule */
.terms > div + div::before {
  content: ''; position: absolute; left: -5px; top: -5.5px;
  width: 9px; height: 9px; background: var(--gold); transform: rotate(45deg);
}
.terms dt {
  font: 700 12px/1 var(--sans); letter-spacing: .2em;
  text-transform: uppercase; color: var(--gold);
}
.terms dd { margin: 0; display: flex; flex-direction: column; gap: 12px; font-size: 15px; color: var(--text-2); text-wrap: pretty; }
.terms-big { font: 400 40px/1 var(--serif); color: var(--yellow); }
.terms dd a { font-weight: 700; align-self: flex-start; border-bottom: 1px solid var(--rule-45); }
.terms dd a:hover { border-color: var(--yellow-hover); }

/* Figures and the ladder sit under the rules, in the right-hand column */
.chapter-figure, .chapter-ladder { grid-column: 2; min-width: 0; }
.chapter-figure { border: 1px solid var(--rule-45); background: var(--bg); }
.chapter-figure img { width: 100%; height: auto; aspect-ratio: 21 / 10; object-fit: cover; object-position: 42% 90%; }
.chapter-figure figcaption {
  padding: 18px 24px 20px;
  background: var(--bg-card); border-top: 1px solid var(--rule-30);
  font: 400 18px/1.45 var(--serif); color: var(--text);
}

/* Placement and Knockouts: the pyramid and the ladder take the full width */
.chapter--wide .chapter-ladder { grid-column: 1 / -1; margin-top: 32px; }
/* The graphic spans both columns, so this chapter's head can't ride over it */
.chapter--wide .chapter-head { position: static; }
.ladder-title {
  margin-bottom: 24px;
  font: 400 26px/1.2 var(--serif); font-variant: small-caps; text-align: center;
  text-wrap: balance;
}
.ladder-foot { margin-top: 24px; font-size: 15px; color: var(--muted); text-align: center; text-wrap: balance; }

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  .glance ol { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 32px; }
  .glance ol::before { display: none; }
  .glance a { border-top: 1px solid var(--rule-45); }
  .glance a::before { top: -5px; }
  .chapter-grid { grid-template-columns: minmax(0, 1fr); max-width: 760px; margin-inline: auto; }
  .chapter-head { position: static; }
  .chapter-figure, .chapter-ladder, .chapter--wide .chapter-ladder { grid-column: 1; }
  .chapter--wide .chapter-grid { max-width: var(--max); }
  .chapter--wide .chapter-head, .chapter--wide .chapter-body { max-width: 760px; width: 100%; margin-inline: auto; }
}

@media (max-width: 900px) {
  .ladder-title { font-size: 22px; text-align: left; }
  .ladder-foot { text-align: left; }
}

@media (max-width: 700px) {
  /* The stations run down a gold line on a phone */
  .glance ol { grid-template-columns: minmax(0, 1fr); row-gap: 0; padding-left: 4px; }
  .glance ol::before { display: block; left: 8px; right: auto; top: 10px; bottom: 10px; width: 1px; height: auto; }
  .glance a {
    display: grid; grid-template-columns: 34px minmax(0, 1fr); column-gap: 8px; row-gap: 4px;
    padding: 14px 0 14px 28px; border-top: 0;
  }
  .glance a::before { top: 22px; left: 0; }
  .glance-num { font-size: 18px; padding-top: 3px; }
  .glance-line { grid-column: 2; }
  .glance-name { font-size: 22px; }

  .chapter-head h2 { gap: 14px; }
  .chapter-lede { font-size: 18px; }
  .chapter-body { gap: 32px; }
  .terms { grid-template-columns: minmax(0, 1fr); }
  .terms > div, .terms > div + div { padding: 18px 0; border-left: 0; }
  .terms > div + div { border-top: 1px solid var(--rule-30); }
  .terms > div + div::before { left: 50%; margin-left: -4.5px; }
  .terms-big { font-size: 34px; }
  .chapter-figure img { aspect-ratio: 3 / 2; object-position: 40% 60%; }
  .chapter-figure figcaption { padding: 16px 18px 18px; font-size: 17px; }

}

@media (prefers-reduced-motion: reduce) {
  .glance a::before { transition: none; }
}
