:root {
  --bg: #08142A;
  --panel: #0E1D38;
  --field: rgba(255, 255, 255, .045);
  --line: rgba(255, 255, 255, .09);
  --line-2: rgba(255, 255, 255, .18);
  --text: #F4F2ED;
  --muted: rgba(244, 242, 237, .55);
  --gold: #C7A24B;
  --gold-2: #E3C87E;
  --ok: #5FBF8A;
  --err: #E5776F;
  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --body: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --r: 14px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden; position: relative; isolation: isolate;
}
img, video { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.top {
  display: flex; align-items: center; justify-content: space-between; max-width: 1200px; margin: 0 auto; padding: 20px 24px 0;
  font: 700 12px/1 var(--display); letter-spacing: .24em; text-transform: uppercase; color: var(--gold);
}
.top span { color: var(--muted); margin: 0 4px; }

.page {
  max-width: 1200px; min-height: calc(100vh - 56px); margin: 0 auto; padding: 4px 24px 16px;
  display: grid; grid-template-columns: minmax(0, 1fr) 480px; column-gap: 64px; row-gap: 32px;
  grid-template-areas: "intro side" "showcase side"; align-content: center; align-items: start;
}
.intro { grid-area: intro; align-self: end; }
.side { grid-area: side; align-self: center; display: flex; flex-direction: column; gap: 14px; min-width: 0; }

.showcase { grid-area: showcase; position: relative; margin: 0; border-radius: var(--r); overflow: hidden; background: #000; }
.showcase video { width: 100%; aspect-ratio: 1920 / 898; object-fit: cover; }
.showcase::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(180deg, transparent 55%, rgba(8, 20, 42, .85) 100%); box-shadow: inset 0 0 0 1px var(--line);
}
.showcase figcaption {
  position: absolute; left: 18px; bottom: 14px; z-index: 1;
  font: 700 12px/1 var(--display); letter-spacing: .2em; text-transform: uppercase; color: var(--text);
}

/* Intro */
h1 {
  margin: 0; max-width: 11ch; font: 800 clamp(40px, 5.6vw, 76px)/.92 var(--display);
  font-variation-settings: "wdth" 74; letter-spacing: -.005em; text-transform: uppercase;
}
.intro p { margin: 16px 0 0; max-width: 38ch; font-size: 16px; color: var(--muted); }


/* Panel */
.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 28px;
}
.group + .group { margin-top: 28px; }
.group__head {
  display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px;
  font: 700 12px/1 var(--display); letter-spacing: .18em; text-transform: uppercase;
}
.group__head small { font: 500 12px/1 var(--body); letter-spacing: 0; text-transform: none; color: var(--muted); font-variant-numeric: tabular-nums; }
.group__head .ok { color: var(--ok); }

/* Photos */
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.photo__label { display: flex; flex-direction: column; align-items: center; gap: 5px; margin-top: 8px; }
.photo__label b { font-size: 13px; font-weight: 600; }
.tag {
  padding: 3px 8px; border-radius: 99px; border: 1px solid var(--line);
  font: 600 10px/1 var(--body); font-style: normal; letter-spacing: .04em; color: var(--muted);
}
.tag--req { border-color: rgba(199, 162, 75, .5); background: rgba(199, 162, 75, .12); color: var(--gold-2); }
.star { font-style: normal; font-weight: 700; color: var(--gold); }
.slot--req { border-color: rgba(199, 162, 75, .45); border-style: dashed; }
.slot {
  position: relative; display: grid; place-items: center; aspect-ratio: 4 / 5; overflow: hidden; cursor: pointer;
  background: var(--field); border: 1px solid var(--line); border-radius: 12px;
  transition: border-color .2s, background .2s;
}
.slot:hover, .slot:focus-within, .slot.is-drag { border-color: var(--gold); background: rgba(199, 162, 75, .06); }
.slot svg { width: 22px; height: 22px; fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-linecap: round; transition: stroke .2s; }
.slot:hover svg { stroke: var(--gold); }
.slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .3s; }
.slot.has-img { border-color: transparent; }
.slot.has-img img { opacity: 1; }
.slot.has-img svg { opacity: 0; }
.slot__x {
  position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(8, 20, 42, .75); backdrop-filter: blur(6px); font-size: 15px; line-height: 1; display: none;
}
.slot.has-img .slot__x { display: grid; place-items: center; }

/* Age: detected from the face photo, editable */
.age {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding: 8px 8px 8px 14px;
  background: var(--field); border: 1px solid var(--line); border-radius: 12px; transition: border-color .2s, background .2s;
}
.age.is-invalid { border-color: var(--err); background: rgba(229, 119, 111, .07); }
.age__label { font-size: 13px; color: var(--muted); }
.age__label b { color: var(--text); font-weight: 600; }
.seg { display: flex; gap: 4px; padding: 3px; border-radius: 10px; background: rgba(0, 0, 0, .2); }
.seg__btn {
  height: 32px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer;
  font: 700 11px/1 var(--display); letter-spacing: .14em; text-transform: uppercase; transition: background .2s, color .2s;
}
.seg__btn:hover { color: var(--text); }
.seg__btn[aria-checked="true"] { background: var(--gold); color: #0A1530; }

/* Inputs */
.row { display: flex; gap: 10px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field--grow { flex: 1; min-width: 0; }
.field--num { flex: 0 0 84px; }
.field__label { font-size: 13px; font-weight: 600; }
.input {
  width: 100%; height: 52px; padding: 0 16px;
  background: var(--field); border: 1px solid var(--line); border-radius: 12px; outline: none;
  font: 700 16px/1 var(--display); letter-spacing: .08em; text-transform: uppercase;
  transition: border-color .2s;
}
.input::placeholder { color: var(--muted); font-weight: 500; letter-spacing: .04em; text-transform: none; font-family: var(--body); }
.input:focus { border-color: var(--gold); }
.input--num { text-align: center; font-size: 22px; font-variation-settings: "wdth" 74; letter-spacing: 0; padding: 0 8px; }

/* Missing required field after a submit attempt */
.input.is-invalid, .slot.is-invalid { border-color: var(--err); border-style: solid; background: rgba(229, 119, 111, .07); }
.cta.is-pending { opacity: .55; }

.error { min-height: 20px; margin: 16px 0 8px; font-size: 13px; color: var(--err); }
.error--big { min-height: 0; margin: 0 0 20px; font-size: 14px; line-height: 1.5; }

.cta {
  width: 100%; height: 54px; border: 0; border-radius: 12px;
  background: var(--gold); color: #0A1530;
  font: 800 13px/1 var(--display); letter-spacing: .2em; text-transform: uppercase;
  transition: background .2s, transform .1s;
}
.cta:hover { background: var(--gold-2); }
.cta:active { transform: scale(.99); }
.cta:disabled { opacity: .5; cursor: progress; }

.link {
  display: block; margin: 16px auto 0; padding: 6px; border: 0; background: none;
  font-size: 13px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px;
}
.link:hover { color: var(--text); }

/* Progress */
.bar { height: 2px; margin-bottom: 8px; background: var(--line); border-radius: 2px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--gold); transition: width .8s ease; }
.track { list-style: none; margin: 0; padding: 0; }
.track li {
  display: grid; grid-template-columns: 14px 1fr auto; align-items: center; gap: 14px;
  padding: 11px 0; border-bottom: 1px solid var(--line); color: var(--muted);
}
.track li:last-child { border-bottom: 0; }
.track i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); justify-self: center; }
.track em { font-size: 12px; font-style: normal; color: var(--muted); font-variant-numeric: tabular-nums; }
.track li.is-active { color: var(--text); }
.track li.is-active i { background: var(--gold); box-shadow: 0 0 0 4px rgba(199, 162, 75, .18); animation: pulse 1.4s ease-in-out infinite; }
.track li.is-done { color: var(--text); }
.track li.is-done i { background: var(--ok); }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(199, 162, 75, 0); } }
.sheet {
  display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 8px;
  border: 1px solid var(--line); border-radius: 12px; color: inherit; text-decoration: none; animation: fade .6s ease;
}
.sheet img { width: 72px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; flex: none; }
.sheet b { display: block; font-size: 13px; font-weight: 600; }
.sheet small { font-size: 12px; color: var(--muted); }
@keyframes fade { from { opacity: 0; } }

.cta--ready { margin-top: 14px; animation: fade .4s ease, glow 1.6s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 0 0 6px rgba(199, 162, 75, .18); } }

.link--inline { display: inline; margin: 0; padding: 0; font-size: 12px; letter-spacing: 0; text-transform: none; font-family: var(--body); font-weight: 500; }
.muted { margin: 16px 0 0; font-size: 13px; color: var(--muted); }
.muted--flush { margin: 0 0 16px; }
.input--code { text-transform: none; letter-spacing: .12em; }

/* Done */
.result { width: 100%; aspect-ratio: 16 / 9; margin-bottom: 18px; border-radius: 12px; background: #000; }
.actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.btn {
  height: 46px; border: 1px solid var(--line-2); border-radius: 12px; background: transparent;
  font: 700 11px/1 var(--display); letter-spacing: .16em; text-transform: uppercase;
  transition: border-color .2s, background .2s;
}
.btn:hover { border-color: var(--gold); background: rgba(199, 162, 75, .08); }

/* Responsive */
@media (max-width: 960px) {
  .page {
    grid-template-columns: 1fr; grid-template-areas: "intro" "showcase" "arcade" "panel"; padding-top: 24px;
    gap: 24px; padding-top: 32px; min-height: 0;
  }
  .panel { position: static; grid-area: panel; }
  .side { display: contents; }
  .arcade__stage { height: auto; aspect-ratio: 4 / 3; }
}
@media (max-width: 480px) {
  .top, .page { padding-left: 16px; padding-right: 16px; }
  .panel { padding: 20px; border-radius: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
/* Backdrop: the stadium, blurred and almost grey-blue, so the empty sides feel like a place. Crest as a quiet watermark. */
body::before {
  content: ""; position: fixed; inset: -40px; z-index: -2;
  background: url("media/showcase-4k.jpg") center 40% / cover no-repeat;
  filter: blur(22px) saturate(.4) brightness(.8); transform: scale(1.08);
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 560px at 50% 45%, rgba(8, 20, 42, .5), rgba(8, 20, 42, .55) 100%),
    linear-gradient(180deg, rgba(8, 20, 42, .55), rgba(8, 20, 42, .8));
}
.crest { width: 22px; height: 26px; margin-right: 12px; vertical-align: -7px; opacity: .85; }
.crests { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .2; filter: saturate(.55); }
.crests img { position: absolute; top: 50%; width: clamp(90px, 10vw, 170px); transform: translateY(-50%); }
.crests img:first-child { left: calc((100vw - 1120px) / 4 - clamp(45px, 5vw, 85px)); }
.crests img:last-child { right: calc((100vw - 1120px) / 4 - clamp(45px, 5vw, 85px)); }
@media (max-width: 1240px) { .crests { display: none; } }

/* Balón Rush drop-down: always there, under the form, whatever the form is doing */
.arcade { grid-area: arcade; min-width: 0; }
.arcade__bar {
  position: relative; display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 18px 12px 12px;
  border: 0; border-radius: var(--r); color: #0A1530; text-align: left; cursor: pointer;
  background: linear-gradient(135deg, var(--gold-2), var(--gold)); box-shadow: 0 8px 26px rgba(199, 162, 75, .22);
  animation: ping 2.4s ease-in-out infinite; transition: filter .2s, transform .2s;
}
.arcade__bar:hover { filter: brightness(1.06); transform: translateY(-1px); }
.arcade__bar.is-open { animation: none; background: rgba(14, 29, 56, .6); color: var(--text); box-shadow: inset 0 0 0 1px var(--gold); backdrop-filter: blur(6px); }
@keyframes ping { 50% { box-shadow: 0 8px 26px rgba(199, 162, 75, .22), 0 0 0 7px rgba(199, 162, 75, .16); } }
.arcade__ball { width: 40px; height: 40px; flex: none; border-radius: 50%; background: #0A1530; padding: 7px; }
.arcade__ball svg { display: block; width: 100%; height: 100%; }
.arcade__txt { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.arcade__txt b { font: 800 13px/1.15 var(--display); letter-spacing: .08em; text-transform: uppercase; }
.arcade__txt small { font: 500 12px/1 var(--body); opacity: .7; }
.arcade__chev { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s; }
.arcade__bar.is-open .arcade__chev { transform: rotate(180deg); }
.arcade__stage { height: clamp(150px, calc(100vh - 735px), 270px); margin-top: 12px; border-radius: var(--r); overflow: hidden; background: #0B1A33; border: 1px solid var(--line); }
.arcade__stage { position: relative; }
.arcade__stage iframe { position: absolute; top: 0; left: 0; display: block; border: 0; transform-origin: 0 0; }
@media (prefers-reduced-motion: reduce) { .arcade__bar { animation: none; } }

/* Language switch */
.lang { display: inline-flex; gap: 2px; padding: 3px; border-radius: 99px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); }
.lang button { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 8px; border: 0; border-radius: 99px; background: transparent; color: var(--muted); font: 700 11px/1 var(--display); letter-spacing: .14em; cursor: pointer; transition: background .2s, color .2s; }
.lang button:hover { color: var(--text); }
.lang button[aria-pressed="true"] { background: var(--gold); color: #0A1530; }
.lang .flag { width: 20px; height: 14px; border-radius: 3px; flex: none; box-shadow: 0 0 0 1px rgba(255, 255, 255, .22); }
.lang button:not([aria-pressed="true"]) .flag { opacity: .7; }
