/* The Finale – LEG 4. Palette and textures are taken from the official posters. */
:root {
  --coal: #120d08;
  --smoke: #1d150d;
  --bronze: #3b2a15;
  --line: rgba(232, 182, 76, .22);
  --gold: #e8b64c;
  --gold-pale: #f8e3a0;
  --gold-deep: #9a6a1f;
  --edge: #86663a; /* form control borders: 3:1 against the form panel (WCAG 1.4.11) */
  --oxblood: #7d1f1a;
  --parchment: #efe3c8;
  --ink: #2a2118;
  --text: #f1e6cf;
  --muted: #b4a487;
  --error: #ff9b8a;

  --display: Anton, Impact, "Arial Narrow", sans-serif;
  --cond: "Fira Sans Condensed", "Arial Narrow", sans-serif;
  --body: "Fira Sans", system-ui, sans-serif;

  --foil: linear-gradient(176deg, #fff6c9 0%, #f7d06a 28%, #c98a22 52%, #f3c65a 68%, #8a5712 100%);
  /* Speckle mask: SVG noise thresholded into holes, like the posters' distressed type. */
  --distress: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.045 .06' numOctaves='5' seed='11'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -30 0 0 0 20.5'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .85 0 0 0 0 .6 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--coal) var(--grain);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
}
/* Images keep their own proportions everywhere: never set both width and height. */
img { display: block; max-width: 100%; height: auto; }
a { color: var(--gold); }
h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; padding: 8px 14px; background: var(--gold); color: var(--coal); }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--gold-pale); outline-offset: 3px; }

/* ---------- Type ---------- */
.display {
  font: 400 clamp(2.25rem, 1.6rem + 2.6vw, 3.5rem)/1 var(--display);
  text-transform: uppercase;
  letter-spacing: .01em;
  color: var(--gold);
}
.foil {
  background: var(--foil);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 28px;
  font: 600 1.05rem/1 var(--cond); letter-spacing: .04em; text-transform: uppercase; text-decoration: none;
  color: #241703;
  background: linear-gradient(180deg, #f8dc8a, #e2a93c 55%, #c88a24);
  border: 1px solid #f9e3a3; border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(0,0,0,.6), 0 8px 18px -8px rgba(0,0,0,.8);
  cursor: pointer;
  transition: filter .15s ease, transform .15s ease;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn:disabled { filter: grayscale(.5) brightness(.8); cursor: progress; }
.btn--ghost { color: var(--gold-pale); background: transparent; border-color: var(--gold-deep); box-shadow: none; }
.btn--ghost:hover { background: rgba(232, 182, 76, .08); filter: none; }
.btn--small { min-height: 44px; padding: 0 18px; font-size: .95rem; }

/* ---------- Top bar ---------- */
.topbar {
  position: fixed; inset: 0 0 auto; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: max(10px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
  background: linear-gradient(180deg, rgba(18, 13, 8, .92), rgba(18, 13, 8, 0));
}
.topbar__logo { flex: none; width: clamp(84px, 26vw, 112px); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: 100svh;
  display: grid; align-items: center;
  padding: 96px 0 64px;
  background:
    radial-gradient(60% 55% at 78% 45%, rgba(201, 138, 34, .22), transparent 70%),
    radial-gradient(80% 60% at 10% 100%, rgba(125, 31, 26, .25), transparent 70%),
    linear-gradient(180deg, #17100a, var(--coal));
}
.hero::after { /* fade the hero into the page below */
  content: ""; position: absolute; inset: auto 0 0; height: 28%; z-index: -1;
  background: linear-gradient(180deg, transparent, var(--coal));
}
.hero__lion {
  position: absolute; z-index: -1; right: 0; top: 0;
  height: min(100%, 840px); width: auto; max-width: none; /* height-driven so the ratio holds; capped to limit upscaling */
  opacity: .5;
  -webkit-mask: linear-gradient(90deg, transparent, #000 45%), linear-gradient(0deg, transparent, #000 30%);
  -webkit-mask-composite: source-in;
  mask: linear-gradient(90deg, transparent, #000 45%) intersect, linear-gradient(0deg, transparent, #000 30%);
}
.hero__inner {
  width: min(1120px, 100% - 32px); margin-inline: auto;
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 32px; align-items: center;
}
.hero__series {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  font: 600 clamp(.85rem, .8rem + .3vw, 1.05rem)/1.2 var(--cond); letter-spacing: .08em; text-transform: uppercase;
  color: var(--gold);
}
.hero__series i { width: 28px; height: 1px; background: var(--gold-deep); }
/* Phones: keep "Run Baguio Series — and — Cordillera Series" on one line by scaling with the width. */
@media (max-width: 600px) {
  .hero__series { flex-wrap: nowrap; gap: 8px; white-space: nowrap; font-size: clamp(.6rem, 3.1vw, .95rem); letter-spacing: .05em; }
  .hero__series i { flex: 0 1 18px; min-width: 8px; }
}
.hero__title { margin-top: 18px; font-weight: 400; line-height: .86; filter: drop-shadow(0 3px 0 #3a2306) drop-shadow(0 18px 40px rgba(232, 160, 40, .25)); }
.foil--title {
  display: block;
  -webkit-mask: var(--distress);
  mask: var(--distress);
  font: 400 clamp(4.4rem, 2rem + 11vw, 10.5rem)/.86 var(--display);
  text-transform: uppercase; letter-spacing: .005em;
}
.hero__leg {
  display: block; margin-top: 14px;
  font: 400 clamp(1.9rem, 1.1rem + 3.2vw, 3.6rem)/1 var(--display); text-transform: uppercase;
}
.hero__leg-num { color: #f4efe6; }
.hero__format {
  margin-top: 16px; padding: 10px 0;
  border-block: 1px solid var(--gold-deep);
  font: 500 clamp(.85rem, .75rem + .4vw, 1.1rem)/1 var(--cond); letter-spacing: .42em; text-transform: uppercase;
  color: var(--text); max-width: 34rem;
}
.hero__lead { margin-top: 20px; font: italic 500 clamp(1.1rem, 1rem + .5vw, 1.4rem)/1.35 var(--cond); color: var(--gold-pale); }
.hero__facts {
  display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 0;
  margin-top: 28px;
}
.hero__facts div { padding: 0 22px; border-left: 1px solid var(--line); }
.hero__facts div:first-child { padding-left: 0; border-left: 0; }
.hero__facts dt { font: 600 .8rem/1.3 var(--cond); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.hero__facts dd { margin-top: 4px; font-weight: 500; line-height: 1.35; max-width: 15ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.hero__ring { position: relative; justify-self: center; text-align: center; }
.hero__ring::before { /* soft halo behind the ring */
  content: ""; position: absolute; inset: -30% -40%; z-index: -1;
  background: radial-gradient(closest-side, rgba(248, 210, 110, .35), rgba(201, 138, 34, .12) 55%, transparent);
}
.hero__ring img {
  width: clamp(190px, 22vw, 290px);
  -webkit-mask: radial-gradient(closest-side, #000 72%, transparent);
  mask: radial-gradient(closest-side, #000 72%, transparent);
  filter: drop-shadow(0 30px 40px rgba(0,0,0,.6));
}
.hero__ring figcaption { margin-top: 6px; font: italic 500 1rem/1 var(--cond); color: var(--muted); }

/* One orchestrated entrance: the foil catches light, the ring rises in. */
@media (prefers-reduced-motion: no-preference) {
  .foil--title { animation: sheen 2.2s .3s cubic-bezier(.2, .7, .2, 1) both; background-size: 100% 260%; }
  .hero__ring img { animation: rise 1.1s .5s cubic-bezier(.2, .8, .2, 1) both; }
  @keyframes sheen { from { background-position: 0 100%; } to { background-position: 0 0; } }
  @keyframes rise { from { opacity: 0; transform: translateY(24px) scale(.96); } }
}

/* ---------- Sections ---------- */
.section { padding: clamp(72px, 9vw, 120px) 0; border-top: 1px solid var(--line); }
.section--smoke { background: linear-gradient(180deg, var(--smoke), var(--coal)); }
.section__head { max-width: 44rem; margin-bottom: clamp(36px, 5vw, 56px); }
.section__head p { margin-top: 14px; color: var(--muted); font-size: 1.1rem; }

/* Qualify: legs are a real sequence, so they get numbered rungs. */
.series { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); }
.series__col h3 { font: 600 1.5rem/1.2 var(--cond); color: var(--gold-pale); padding-bottom: 14px; border-bottom: 1px solid var(--gold-deep); }
.ladder li { border-bottom: 1px solid var(--line); }
.rung {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 18px 0;
}
.ladder__leg { font: 600 .85rem/1 var(--cond); letter-spacing: .06em; text-transform: uppercase; color: var(--gold); }
.rung__text { display: grid; gap: 4px; }
/* Leg logos: fixed box, contain, so every logo keeps its own proportions. */
.rung__logo { width: 64px; height: 52px; object-fit: contain; }
.series__photo { margin-bottom: 20px; overflow: hidden; border-radius: 4px; border: 1px solid var(--line); }
.series__photo img { width: 100%; transition: transform 1.2s cubic-bezier(.2, .8, .2, 1); }
.series__col:hover .series__photo img { transform: scale(1.04); }

/* Race photo strip: a slow, endless marquee. Duplicated items are added by motion.js. */
.strip { padding: clamp(64px, 8vw, 104px) 0; border-top: 1px solid var(--line); overflow: hidden; }
.strip__head { margin-bottom: 32px; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 32px; }

/* Inline field errors, shown under the question that needs fixing */
.field__error { display: flex; gap: 8px; align-items: baseline; margin-top: 8px; color: var(--error); font-weight: 500; font-size: .95rem; }
.field__error::before { content: "!"; display: inline-grid; place-items: center; flex: none; width: 18px; height: 18px; border-radius: 50%; background: var(--error); color: var(--coal); font: 700 .75rem/1 var(--body); }
[aria-invalid="true"]:not([type=radio]):not([type=checkbox]) { border-color: var(--error) !important; }
.strip__head p { margin-top: 12px; color: var(--muted); font-size: 1.1rem; }
.strip__viewport { overflow-x: auto; scrollbar-width: none; -webkit-mask: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.strip__viewport::-webkit-scrollbar { display: none; }
.strip__track { display: flex; gap: 14px; width: max-content; padding: 0 16px; }
.strip__track img { height: clamp(200px, 26vw, 280px); width: auto; max-width: none; border-radius: 4px; border: 1px solid var(--line); }
@media (prefers-reduced-motion: no-preference) {
  .strip__viewport.is-marquee { overflow: hidden; }
  .strip__viewport.is-marquee .strip__track { animation: marquee 70s linear infinite; }
  @media (hover: hover) and (pointer: fine) { .strip__viewport.is-marquee:hover .strip__track { animation-play-state: paused; } }
  @keyframes marquee { to { transform: translateX(-50%); } }
}
.ladder__name { font-weight: 500; overflow-wrap: anywhere; }
.ladder__km { font: 400 1.5rem/1 var(--display); color: var(--gold-pale); }
.series__total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 18px; color: var(--muted); }
.series__total strong { font: 400 2.4rem/1 var(--display); color: var(--gold); letter-spacing: .01em; }

/* Options: a decision list, read left to right as "if this, then that". */
.options { border-top: 1px solid var(--gold-deep); }
.option {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, .9fr); gap: 24px; align-items: center;
  padding: 28px 0; border-bottom: 1px solid var(--line);
}
.option__if { color: var(--muted); }
.option__name { font: 400 clamp(1.6rem, 1.2rem + 1.4vw, 2.3rem)/1 var(--display); text-transform: uppercase; color: var(--text); }
.option__price { font: 400 2rem/1 var(--display); color: var(--gold); text-align: right; }
.option__price--split { display: grid; gap: 8px; font: 400 .95rem/1.4 var(--body); color: var(--muted); text-align: right; }
.option__price--split b { font: 400 1.5rem/1 var(--display); color: var(--gold); margin-right: 6px; }

/* Inclusions: the keepsakes, arranged like a display case. */
.inclusions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.inclusions__showcase { position: relative; aspect-ratio: 1 / .92; }
.inclusions__showcase::before {
  content: ""; position: absolute; inset: 8%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(232, 182, 76, .22), transparent);
}
.inc { position: absolute; filter: drop-shadow(0 24px 30px rgba(0,0,0,.7)); }
.inc--plate { width: 74%; left: 22%; top: 4%; -webkit-mask: radial-gradient(closest-side, #000 80%, transparent); mask: radial-gradient(closest-side, #000 80%, transparent); }
.inc--ring { width: 44%; left: 0; top: 30%; -webkit-mask: radial-gradient(closest-side, #000 74%, transparent); mask: radial-gradient(closest-side, #000 74%, transparent); }
.inc--ticket { width: 50%; right: 4%; bottom: 0; transform: rotate(-4deg); -webkit-mask: radial-gradient(closest-side, #000 82%, transparent); mask: radial-gradient(closest-side, #000 82%, transparent); }
.inc-list { margin-top: 28px; border-top: 1px solid var(--gold-deep); }
.inc-list li { padding: 18px 0; border-bottom: 1px solid var(--line); }
.inc-list h3 { font: 600 1.25rem/1.25 var(--cond); color: var(--gold-pale); }
.inc-list p { margin-top: 4px; color: var(--muted); }

/* Timeline */
.timeline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; counter-reset: t; }
.timeline li { position: relative; padding-top: 34px; border-top: 1px solid var(--gold-deep); }
.timeline li::before {
  content: ""; position: absolute; top: -7px; left: 0; width: 13px; height: 13px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 0 4px var(--coal), 0 0 18px rgba(232, 182, 76, .6);
}
.timeline li:last-child::before { background: var(--oxblood); box-shadow: 0 0 0 4px var(--coal), 0 0 0 5px var(--gold); }
.timeline time { font: 400 1.6rem/1 var(--display); color: var(--gold); text-transform: uppercase; }
.timeline h3 { margin-top: 10px; font: 600 1.2rem/1.3 var(--cond); }
.timeline p { margin-top: 6px; color: var(--muted); }

/* ---------- Register ---------- */
.js .register:not(.is-open) { display: none; } /* motion.js opens it from any Register button */
.register { background: radial-gradient(70% 50% at 50% 0%, rgba(125, 31, 26, .22), transparent 70%); }
.register__grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(28px, 4vw, 56px); align-items: start; }

.wizard {
  padding: clamp(22px, 3vw, 40px);
  background: linear-gradient(180deg, rgba(59, 42, 21, .35), rgba(29, 21, 13, .6));
  border: 1px solid var(--line); border-radius: 6px;
}
.step { margin: 0; padding: 0; border: 0; min-width: 0; }
.step + .step { margin-top: 40px; padding-top: 36px; border-top: 1px solid var(--line); }
.step__num { display: inline-grid; place-items: center; width: 1.3em; height: 1.3em; margin-right: .3em; border: 2px solid var(--gold); border-radius: 50%; font-size: .75em; vertical-align: .1em; }
.step__lead { margin: -12px 0 18px; }
.choices.choices--chips { display: flex; flex-wrap: wrap; }
.choices--chips .choice { flex: 0 1 auto; min-width: 96px; }
.choice--skip span { color: var(--muted); }
.choices--two { grid-template-columns: repeat(2, 1fr); }
.result { margin-top: 6px; padding: 18px 20px; border: 1px dashed var(--bronze); border-radius: 4px; }
.result.is-set { border-style: solid; border-color: var(--gold-deep); background: rgba(232, 182, 76, .06); }
.result__label { font: 600 .85rem var(--cond); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.result__name { margin-top: 4px; font: 400 1.6rem/1.1 var(--display); text-transform: uppercase; color: var(--muted); }
.result.is-set .result__name { color: var(--gold); }
.result__note { margin-top: 6px; color: var(--text); }
.result__note:empty { display: none; }
.result__owed { margin-top: 10px; padding: 10px 12px; border-radius: 4px; background: rgba(10, 7, 4, .4); color: var(--text); }
.result__owed b { color: var(--gold); }
.result__owed a { color: var(--gold-pale); }
.result__total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.result__total span { font: 600 1rem var(--cond); text-transform: uppercase; letter-spacing: .06em; color: var(--text); }
.result__total strong { font: 400 clamp(2.4rem, 1.8rem + 2vw, 3.2rem)/1 var(--display); color: var(--gold); }
.notice { margin: -6px 0 22px; padding: 12px 16px; border-left: 3px solid var(--gold); background: rgba(232, 182, 76, .08); color: var(--text); }

/* ---------- Submit your run ---------- */
.run-page { border-top: 0; padding-top: 120px; }
.run-grid, .run-closed { max-width: 720px; }
.run-done { margin: 0 0 24px; }
.runner-card { margin: 0 0 24px; }
.run-progress { margin-top: 14px; color: var(--muted); }
.run-progress__bar { height: 8px; border-radius: 999px; background: rgba(10, 7, 4, .5); overflow: hidden; margin-bottom: 8px; }
.run-progress__bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold-deep), var(--gold)); }
.run-progress b { color: var(--text); }
.linkbtn { padding: 0; font: inherit; color: var(--gold-pale); background: none; border: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.topbar a:has(.topbar__logo) { display: flex; }
.terms { margin: 0 0 12px; color: var(--text); }
/* float takes the legend out of the fieldset border so the divider above sits clear of it */
.step__title { float: left; width: 100%; padding: 0; margin-bottom: 22px; font: 400 clamp(1.7rem, 1.3rem + 1.2vw, 2.3rem)/1 var(--display); text-transform: uppercase; color: var(--gold); }
.step__title + * { clear: both; }
.field { margin: 0 0 22px; padding: 0; border: 0; min-width: 0; }
.field:last-child { margin-bottom: 0; }
.field > label, .field__label { display: block; margin-bottom: 8px; padding: 0; font: 600 1.05rem/1.35 var(--cond); color: var(--text); }
.field__hint { margin-top: 8px; font-size: .92rem; font-style: italic; color: var(--muted); }
.optional { font-weight: 500; color: var(--muted); }

input[type=text], input[type=email], input[type=tel], input[type=number], input[type=url], select {
  width: 100%; min-height: 52px; padding: 12px 14px;
  font: 400 1rem var(--body); color: var(--text);
  background: rgba(10, 7, 4, .7); border: 1px solid var(--edge); border-radius: 4px;
  transition: border-color .15s ease;
}
input::placeholder { color: #93846b; }
input:hover, select:hover { border-color: var(--gold); }
input:focus, select:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px rgba(232, 182, 76, .2); }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
select option { background: var(--smoke); }

.choices { display: grid; gap: 8px; }
.choices--row { grid-template-columns: repeat(3, 1fr); }
.choice {
  position: relative; display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; cursor: pointer;
  background: rgba(10, 7, 4, .45); border: 1px solid var(--edge); border-radius: 4px;
  transition: border-color .15s ease, background-color .15s ease;
}
.choice:hover { border-color: var(--gold); }
.choice:has(input:checked) { border-color: var(--gold); background: rgba(232, 182, 76, .09); }
.choice input { flex: none; width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--gold); }
.choice b { display: block; font: 600 1.05rem/1.3 var(--cond); }
.choice small { display: block; margin-top: 2px; font-size: .92rem; line-height: 1.45; color: var(--muted); }

.chart { margin-top: 4px; border-top: 1px solid var(--line); overflow-x: auto; }
.chart th, .chart td { overflow-wrap: anywhere; }
.chart summary { padding: 14px 0; cursor: pointer; font: 600 1rem var(--cond); color: var(--gold); }
.chart table { width: 100%; border-collapse: collapse; font-size: .95rem; font-variant-numeric: tabular-nums; }
.chart th, .chart td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line); }
.chart th { font: 600 .85rem var(--cond); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.example summary { padding: 10px 0 0; cursor: pointer; font: 600 1rem var(--cond); color: var(--gold); min-height: 44px; }
.example figure { margin: 10px 0 0; max-width: 240px; }
.example img { width: 100%; height: auto; border: 1px solid var(--edge); border-radius: 6px; }
.example figcaption { margin-top: 6px; font-size: .9rem; color: var(--muted); }
.measure { margin-top: 14px; padding-left: 20px; list-style: decimal; color: var(--muted); font-size: .95rem; }
.measure li { margin-top: 4px; }

.amount { display: flex; justify-content: space-between; align-items: baseline; padding: 18px 20px; border: 1px solid var(--gold-deep); border-radius: 4px; background: rgba(232, 182, 76, .06); }
.amount span { font: 600 1rem var(--cond); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.amount strong { font: 400 2.4rem/1 var(--display); color: var(--gold); }
.paybox { white-space: pre-line; margin: 18px 0 22px; padding: 14px 18px; border: 1px solid var(--bronze); border-radius: 4px; background: rgba(125, 31, 26, .14); }

.field > .upload { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; padding: 18px; cursor: pointer; border: 1px dashed var(--gold-deep); border-radius: 4px; background: rgba(10, 7, 4, .45); }
.upload:hover { border-color: var(--gold); }
.upload__cta { font: 600 1rem var(--cond); color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.upload__name { color: var(--muted); font-size: .92rem; word-break: break-all; }
.upload__input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload__input:focus-visible + * , .upload:focus-within { outline: 2px solid var(--gold-pale); outline-offset: 3px; }

.wizard__error { min-height: 1.5em; margin-top: 18px; color: var(--error); font-weight: 500; }
.wizard__error:empty { min-height: 0; margin: 0; }
.wizard__nav { display: flex; justify-content: flex-end; gap: 12px; margin-top: 24px; }

/* Summary ticket: parchment stock with a perforated stub, after the poster's admission ticket. */
.ticket {
  position: sticky; top: 88px;
  display: grid; grid-template-columns: 1fr 44px;
  color: var(--ink);
  background: var(--parchment) var(--grain);
  border-radius: 6px;
  box-shadow: 0 0 0 1px #c9b78f inset, 0 30px 50px -20px rgba(0,0,0,.8);
  transform: rotate(-1.2deg);
}
.ticket__body { padding: 22px 20px; border-right: 2px dotted #a8956d; }
.ticket__event { font: 400 1.5rem/1 var(--display); text-transform: uppercase; color: var(--ink); padding-bottom: 12px; border-bottom: 2px solid var(--ink); }
.ticket dl div { padding: 10px 0; border-bottom: 1px solid #cdbd99; }
.ticket dt { font: 600 .75rem/1 var(--cond); letter-spacing: .08em; text-transform: uppercase; color: #5f5139; }
.ticket dd { margin-top: 4px; font: 600 1rem/1.3 var(--cond); overflow-wrap: anywhere; }
.ticket__total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 14px; font: 600 .9rem var(--cond); text-transform: uppercase; letter-spacing: .06em; }
.ticket__total strong { font: 400 2rem/1 var(--display); color: var(--oxblood); letter-spacing: 0; }
.ticket__stub { display: grid; place-items: center; }
.ticket__stub span { writing-mode: vertical-rl; font: 400 1.05rem/1 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--ink); }

.success { max-width: 36rem; margin: 0 auto; padding: 40px 24px; text-align: center; border: 1px solid var(--gold-deep); border-radius: 6px; background: rgba(29, 21, 13, .7); }
.success:focus { outline: none; }
.success > p { margin-top: 12px; color: var(--muted); }
.success__again { margin-top: 28px; }

/* Loading overlay while the registration uploads */
.loading {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-content: center; justify-items: center; gap: 10px;
  padding: 24px; text-align: center;
  background: radial-gradient(45% 40% at 50% 42%, rgba(201, 138, 34, .16), transparent 70%), rgba(14, 10, 6, .97);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  animation: fade-in .25s ease;
}
.loading__mark { position: relative; width: 168px; height: 168px; display: grid; place-items: center; margin-bottom: 14px; }
.loading__track { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.loading__track circle { fill: none; stroke: var(--bronze); stroke-width: 2; }
.loading__track .loading__arc { stroke: var(--gold); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 90 262; }
.loading__mark img { width: 104px; -webkit-mask: radial-gradient(closest-side, #000 70%, transparent); mask: radial-gradient(closest-side, #000 70%, transparent); }
.loading__title { font: 400 clamp(1.6rem, 1.3rem + 1.2vw, 2.2rem)/1.1 var(--display); text-transform: uppercase; color: var(--gold); }
.loading__text { max-width: 30rem; color: var(--muted); }
@keyframes fade-in { from { opacity: 0; } }
@keyframes spin { to { transform: rotate(270deg); } }
@keyframes breathe { 50% { transform: scale(1.05); } }
@media (prefers-reduced-motion: no-preference) {
  .loading__track { animation: spin 1.2s linear infinite; }
  .loading__mark img { animation: breathe 2.4s ease-in-out infinite; }
}

/* Posters: square originals shown square, so nothing is cropped or stretched. */
.posters { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.posters a { display: block; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; transition: border-color .15s ease; }
.posters a:hover { border-color: var(--gold); }
.posters img { width: 100%; aspect-ratio: 1; object-fit: contain; background: var(--coal); }

.footer { padding: 40px 0 calc(40px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.footer__inner { display: flex; align-items: center; gap: 20px; color: var(--muted); font-size: .92rem; }
.footer a { color: var(--gold); text-decoration: underline; text-decoration-color: var(--gold-deep); text-underline-offset: 3px; }
.footer a:hover { color: var(--gold-pale); text-decoration-color: currentColor; }
.footer img { width: 104px; }
.footer__row { display: flex; align-items: center; justify-content: space-between; gap: 24px 40px; }
.footer__credit { display: flex; align-items: center; gap: 12px; flex: none; color: var(--muted); font-size: .88rem; }
.footer__credit img { width: 40px; height: auto; flex: none; }
.footer__credit b { font-weight: 600; color: var(--text); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__ring { order: -1; margin-top: 8px; }
  /* One column: size the ring and title by screen height so both buttons land in the first screen. */
  .hero { padding: 76px 0 36px; }
  .hero__inner { gap: 12px; }
  .hero__ring img { width: clamp(96px, 20svh, 230px); }
  .foil--title { font-size: min(clamp(4.4rem, 2rem + 11vw, 10.5rem), 12svh); }
  .hero__actions { flex-wrap: nowrap; margin-top: 22px; }
  .hero__actions .btn { flex: 1 1 0; max-width: 260px; padding: 0 14px; }
  .hero__lion { opacity: .3; }
  .register__grid { grid-template-columns: 1fr; }
  .ticket { position: static; transform: none; max-width: 420px; }
  .posters { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
  .series, .inclusions, .timeline { grid-template-columns: minmax(0, 1fr); }
  .option { grid-template-columns: 1fr; gap: 8px; }
  .option__price, .option__price--split { text-align: left; }
  .inclusions__showcase { max-width: 460px; width: 100%; margin-inline: auto; }
  .hero__facts { grid-template-columns: 1fr; gap: 12px; }
  .hero__facts div { padding: 0 0 0 14px; border-left: 2px solid var(--gold-deep); }
  .hero__facts div:first-child { padding-left: 14px; border-left: 2px solid var(--gold-deep); }
  .hero__facts dd { max-width: none; }
  .choices--row { grid-template-columns: 1fr; }
  .choices--two { grid-template-columns: 1fr; }
  .posters { grid-template-columns: repeat(2, 1fr); }
  .footer__inner { flex-direction: column; text-align: center; }
  .footer__row { flex-direction: column; }
  .footer__credit { justify-content: center; text-align: center; width: 100%; padding-top: 20px; border-top: 1px solid var(--line); }
  /* Buttons centered and thumb-wide on phones; the main action stays on top. */
  .wizard__nav { flex-direction: column; align-items: center; }
  .wizard__nav .btn, .success__again { width: 100%; max-width: 420px; }
  .wizard__nav .btn--ghost { order: 1; }
  .hero__actions { justify-content: center; }
}
@media (max-width: 960px) and (max-height: 720px) {
  .hero__ring figcaption { display: none; }
  .hero__title { margin-top: 12px; }
  .hero__format { margin-top: 12px; }
  .hero__lead { margin-top: 12px; }
}
@media (max-width: 360px) {
  .hero__actions { gap: 8px; }
  .hero__actions .btn, .topbar__nav .btn { padding: 0 8px; font-size: .82rem; }
}
/* Phones in landscape: short and wide, so keep title and ring side by side. */
@media (min-width: 600px) and (max-width: 960px) and (max-height: 520px) {
  .hero { min-height: 100svh; padding: 68px 0 16px; }
  .hero__inner { grid-template-columns: minmax(0, 1.4fr) minmax(0, .6fr); }
  .hero__ring { order: 0; margin-top: 0; }
  .hero__ring img { width: clamp(120px, 36svh, 200px); }
  .foil--title { font-size: min(clamp(3.4rem, 1rem + 8vw, 5.6rem), 17svh); }
  .hero__leg { margin-top: 6px; font-size: min(clamp(1.9rem, 1.1rem + 3.2vw, 3.6rem), 9svh); }
  .hero__series, .hero__lead { display: none; } /* the title, format line and buttons carry the screen */
  .hero__title { margin-top: 0; }
  .hero__actions { margin-top: 14px; }
}
@media (max-width: 420px) {
  .hero__actions .btn { font-size: .95rem; letter-spacing: .02em; }
  .hero__format { letter-spacing: .26em; }
  .topbar__nav .btn { padding: 0 12px; }
  .rung { grid-template-columns: 48px minmax(0, 1fr) auto; gap: 10px; }
  .rung__logo { width: 48px; height: 42px; }
}

/* ---------- Motion & interaction ---------- */
.topbar { transition: background-color .3s ease, box-shadow .3s ease; }
.topbar.is-solid { background: rgba(18, 13, 8, .94); box-shadow: 0 1px 0 var(--line); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.topbar__nav { display: flex; gap: 8px; }
.topbar__nav .btn, .hero__actions .btn { white-space: nowrap; }
.success > p a { color: var(--gold-pale); }
.topbar__progress { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; transform-origin: 0 50%; transform: scaleX(var(--progress, 0)); background: linear-gradient(90deg, var(--gold-deep), var(--gold-pale)); }

.hero__dust { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }
.hero__tilt { position: relative; transform: perspective(700px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.hero__glint { /* light sweep across the ring face */
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 38%, rgba(255, 244, 205, .32) 50%, transparent 62%) no-repeat;
  background-size: 250% 100%; background-position: 130% 0;
  -webkit-mask: radial-gradient(closest-side, #000 60%, transparent); mask: radial-gradient(closest-side, #000 60%, transparent);
}

/* Gold buttons catch light on hover. */
.btn { position: relative; overflow: hidden; }
.btn:not(.btn--ghost)::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%);
  transform: translateX(-120%);
}
.btn:not(.btn--ghost):hover::after { transform: translateX(120%); transition: transform .7s ease; }

/* Qualifier result */

.option { transition: background-color .25s ease; }
.option:hover { background: linear-gradient(90deg, transparent, rgba(232, 182, 76, .06), transparent); }
.option__end { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.option__pick { min-height: 44px; padding: 6px 20px; font: 600 .9rem var(--cond); letter-spacing: .06em; text-transform: uppercase; color: var(--gold); background: none; border: 1px solid var(--gold-deep); border-radius: 999px; cursor: pointer; transition: background-color .2s ease, color .2s ease; }
.option__pick:hover { background: var(--gold); color: var(--coal); }

/* Inclusions: list and showcase light each other up. */
.inc { transition: transform .5s cubic-bezier(.2, .8, .2, 1), filter .4s ease, opacity .4s ease; translate: var(--px, 0) var(--py, 0); }
.inclusions__showcase.has-focus .inc { opacity: .35; filter: drop-shadow(0 24px 30px rgba(0,0,0,.7)) saturate(.6); }
.inclusions__showcase.has-focus .inc.is-lit { opacity: 1; filter: drop-shadow(0 0 30px rgba(232, 182, 76, .45)) drop-shadow(0 24px 30px rgba(0,0,0,.7)); z-index: 2; }
.inc--ring.is-lit { transform: scale(1.06); }
.inc--plate.is-lit { transform: scale(1.04); }
.inc--ticket.is-lit { transform: rotate(-1deg) scale(1.06); }
.inc-list li { transition: padding .25s ease, background-color .25s ease; }
.inc-list li[data-inc-for]:hover, .inc-list li[data-inc-for]:focus-visible { padding-left: 12px; background: linear-gradient(90deg, rgba(232, 182, 76, .08), transparent); }

/* Wizard */
[data-amount].is-bump { display: inline-block; animation: pop .45s cubic-bezier(.3, 1.4, .5, 1); }
.result__name.is-bump { animation: pop .45s cubic-bezier(.3, 1.4, .5, 1); }
.ticket dd.is-bump { animation: ink .5s ease; }

.success__ticket { position: relative; max-width: 340px; margin: 0 auto 28px; text-align: left; }
.success__ticket .ticket { position: static; }
/* sits on the empty right side of the Ring row, clear of the details */
.success__ticket .stamp { left: 66%; top: 68%; }
.stamp {
  position: absolute; left: 50%; top: 50%;
  padding: 6px 14px; font: 400 1.6rem/1 var(--display); letter-spacing: .08em; text-transform: uppercase;
  color: var(--oxblood); border: 3px solid var(--oxblood); border-radius: 4px; background: rgba(239, 227, 200, .85);
  transform: translate(-50%, -50%) rotate(-12deg);
}

/* Lightbox */
.posters a { cursor: zoom-in; }
.posters img { transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.posters a:hover img { transform: scale(1.04); }
.lightbox { width: min(92vw, 86vh); max-width: none; padding: 0; border: 1px solid var(--gold-deep); border-radius: 6px; background: var(--coal); overflow: visible; }
.lightbox::backdrop { background: rgba(8, 5, 2, .88); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.lightbox img { width: 100%; height: auto; border-radius: 6px; }
.lightbox[open] { animation: zoom-in .3s cubic-bezier(.2, .8, .2, 1); }

/* "Submit run" pop-up on the main page */
.modal { width: min(440px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: clamp(22px, 5vw, 32px); color: var(--text); background: var(--smoke); border: 1px solid var(--gold-deep); border-radius: 6px; }
.modal::backdrop { background: rgba(8, 5, 2, .88); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.modal[open] { animation: zoom-in .3s cubic-bezier(.2, .8, .2, 1); }
.modal__title { margin-bottom: 6px; font: 400 clamp(1.7rem, 1.3rem + 1.2vw, 2.1rem)/1 var(--display); text-transform: uppercase; color: var(--gold); }
.modal .field__hint { margin: 0 0 18px; }
.modal .wizard__nav { flex-wrap: wrap; }
.lightbox__btn { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; font: 400 2rem/1 var(--body); color: var(--gold-pale); background: rgba(18, 13, 8, .8); border: 1px solid var(--gold-deep); border-radius: 50%; cursor: pointer; }
.lightbox__btn:hover { background: var(--gold); color: var(--coal); }
.lightbox__prev { left: -24px; top: 50%; translate: 0 -50%; }
.lightbox__next { right: -24px; top: 50%; translate: 0 -50%; }
.lightbox__close { right: -18px; top: -18px; width: 44px; height: 44px; font-size: 1.6rem; }
@media (max-width: 760px) {
  .lightbox__prev { left: 8px; } .lightbox__next { right: 8px; } .lightbox__close { right: 8px; top: 8px; }
  .option__end { align-items: center; flex-direction: row; justify-content: center; gap: 20px; width: 100%; }
}

@keyframes pop { 0% { transform: scale(.85); opacity: .4; } 100% { transform: none; opacity: 1; } }
@keyframes ink { from { color: var(--oxblood); } }
@keyframes zoom-in { from { opacity: 0; transform: scale(.94); } }
@keyframes stamp { 0% { opacity: 0; transform: translate(-50%, -50%) rotate(-12deg) scale(2.4); } 60% { opacity: 1; transform: translate(-50%, -50%) rotate(-12deg) scale(.92); } 100% { transform: translate(-50%, -50%) rotate(-12deg) scale(1); } }
@keyframes glint { to { background-position: -130% 0; } }
@keyframes rise-in { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; } }

/* Scroll-triggered pieces: only hidden when motion is allowed and JS is running. */
@media (prefers-reduced-motion: no-preference) {
  .js .ladder[data-reveal] li { opacity: 0; transform: translateX(-18px); transition: opacity .5s ease, transform .6s cubic-bezier(.2, .8, .2, 1); }
  .js .ladder[data-reveal].is-in li { opacity: 1; transform: none; }
  .js .ladder[data-reveal].is-in li:nth-child(2) { transition-delay: .12s; }
  .js .ladder[data-reveal].is-in li:nth-child(3) { transition-delay: .24s; }
  .js .timeline[data-reveal] li { border-top-color: transparent; }
  .js .timeline[data-reveal] li::after { content: ""; position: absolute; top: -1px; left: 0; height: 1px; width: 100%; background: var(--gold-deep); transform-origin: 0 50%; transform: scaleX(0); transition: transform .9s cubic-bezier(.2, .8, .2, 1); }
  .js .timeline[data-reveal] li::before { transform: scale(0); transition: transform .4s cubic-bezier(.3, 1.6, .5, 1); }
  .js .timeline[data-reveal].is-in li::after { transform: scaleX(1); }
  .js .timeline[data-reveal].is-in li::before { transform: scale(1); }
  .js .timeline[data-reveal].is-in li:nth-child(2)::after, .js .timeline[data-reveal].is-in li:nth-child(2)::before { transition-delay: .35s; }
  .js .timeline[data-reveal].is-in li:nth-child(3)::after, .js .timeline[data-reveal].is-in li:nth-child(3)::before { transition-delay: .7s; }
  .js .option[data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .8, .2, 1), background-color .25s ease; }
  .js .option[data-reveal].is-in { opacity: 1; transform: none; }
  .js .inclusions__showcase[data-reveal] .inc { opacity: 0; }
  .js .inclusions__showcase[data-reveal].is-in .inc { opacity: 1; animation: rise-in .9s cubic-bezier(.2, .8, .2, 1) backwards; }
  .js .inclusions__showcase[data-reveal].is-in .inc--ring { animation-delay: .15s; }
  .js .inclusions__showcase[data-reveal].is-in .inc--ticket { animation-delay: .3s; }
  .js .inclusions__showcase[data-reveal].is-in.has-focus .inc { opacity: .35; }
  .js .inclusions__showcase[data-reveal].is-in.has-focus .inc.is-lit { opacity: 1; }
  .hero__glint { animation: glint 1.6s 1.4s ease-in-out both; }
  .hero__ring:hover .hero__glint { animation: glint 1.1s ease-in-out; }
  .stamp { animation: stamp .6s .35s cubic-bezier(.3, 1.2, .5, 1) both; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .hero__dust { display: none; }
}
