/* Gala Fight holding page: an arena before the doors open. Warm graded ring photo, GALA gold,
   anacoroletchi glass for the countdown, Roboto Flex compressed for the voice. */

@font-face { font-family: 'Roboto Flex'; font-style: oblique 0deg 10deg; font-weight: 100 1000; font-stretch: 25% 151%; font-display: swap; src: url(/assets/fonts/roboto-flex-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Roboto Flex'; font-style: oblique 0deg 10deg; font-weight: 100 1000; font-stretch: 25% 151%; font-display: swap; src: url(/assets/fonts/roboto-flex-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Onest'; font-weight: 100 900; font-display: swap; src: url(/assets/fonts/onest-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Onest'; font-weight: 100 900; font-display: swap; src: url(/assets/fonts/onest-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --ground: #07080b;
  --ink: #f2eee8;
  --ink-2: #c9c4bd;
  --muted: #a8a39d;
  --red: #d42b21;
  --red-hi: #ff5a47;
  --blue: #2e6bff;
  --blue-hi: #7aa2ff;
  --gold: #e8c36a;
  --gold-deep: #b98a2c;
  --display: 'Roboto Flex', 'Arial Narrow', sans-serif;
  --text: 'Onest', system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { background: var(--ground); color-scheme: dark; }
body {
  min-height: 100svh; background: var(--ground); color: var(--ink);
  font-family: var(--text); font-size: 17px; line-height: 1.5; -webkit-font-smoothing: antialiased;
  overflow-x: clip; display: grid; place-items: center;
}
::selection { background: var(--gold); color: #07080b; }

.bg, .shade { position: fixed; inset: -24px; pointer-events: none; }
.bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 38%; transform-origin: 50% 40%; filter: brightness(0.78); will-change: transform; }
.shade {
  background:
    radial-gradient(70% 62% at 50% 48%, rgba(7, 8, 11, 0.38), rgba(7, 8, 11, 0.9) 100%),
    linear-gradient(0deg, rgba(7, 8, 11, 0.96) 0%, rgba(7, 8, 11, 0.5) 30%, rgba(7, 8, 11, 0) 58%);
}

.glass {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.024));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 30px 70px -30px rgba(0, 0, 0, 0.7);
  -webkit-backdrop-filter: blur(22px) saturate(1.6);
  backdrop-filter: blur(22px) saturate(1.6);
}

.stage {
  position: relative; z-index: 2;
  display: grid; justify-items: center; gap: clamp(18px, 3.4vh, 34px);
  padding: clamp(28px, 6vh, 64px) 16px; text-align: center;
}
.logo {
  width: min(560px, 80vw); height: auto;
  filter: drop-shadow(0 14px 44px rgba(0, 0, 0, 0.7));
}
.title {
  font-family: var(--display); font-weight: 900; font-variation-settings: 'wdth' 30, 'slnt' -10;
  text-transform: uppercase; font-size: clamp(2.8rem, 9vw, 6.5rem); line-height: 1; letter-spacing: -0.01em;
  text-shadow: 0 10px 60px rgba(0, 0, 0, 0.6);
}

.slab { max-width: calc(100vw - 24px); border-radius: 28px; padding: clamp(18px, 3vw, 30px) clamp(18px, 4vw, 44px); }
.cd {
  --cd: min(112px, 15vw);
  display: flex; justify-content: center;
  font-family: var(--display); font-weight: 800; font-variation-settings: 'wdth' 60, 'slnt' 0;
  font-size: var(--cd); line-height: 0.9; font-variant-numeric: tabular-nums; color: var(--ink);
}
.cd-unit { display: grid; justify-items: center; }
.cd-num { display: inline-flex; align-items: baseline; }
.cd-sep { padding: 0 0.12em; opacity: 0.35; }
.cd-label {
  margin-top: max(8px, calc(var(--cd) * 0.08)); padding-right: 0.6em;
  font-family: var(--text); font-size: max(11px, calc(var(--cd) * 0.11)); font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); line-height: 1.2;
  font-variation-settings: normal;
}
.cd-unit:last-child .cd-label { padding-right: 0; }
.started { display: none; font-family: var(--display); font-weight: 900; font-variation-settings: 'wdth' 35, 'slnt' -10; text-transform: uppercase; font-size: clamp(2rem, 6vw, 3.5rem); }
.is-started .cd { display: none; }
.is-started .started { display: block; }

.meta { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 16px; color: var(--ink-2); font-size: 1.05rem; letter-spacing: 0.02em; }
.meta time { color: var(--ink); font-weight: 600; }
.meta i { width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }

/* The entrance is GSAP's (src/main.js). Hide only what it will reveal, so there is no flash. */
@media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
  .bg img, .logo, .title, .slab, .meta { opacity: 0; animation: failsafe 0.6s 3.5s forwards; }
}
/* If the script never runs (blocked, throttled tab), show everything anyway after 3.5 s. */
@keyframes failsafe { to { opacity: 1; } }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .slab { padding: 16px 14px 14px; border-radius: 22px; }
  .cd { --cd: min(54px, 13vw); }
  .cd-sep { padding: 0 0.06em; }
  .cd-label { font-size: 11px; letter-spacing: 0.04em; padding-right: 0.3em; }
}
@media (max-height: 720px) and (min-width: 641px) {
  .stage { gap: 14px; padding-block: 20px; }
  .logo { width: min(380px, 60vw); }
  .title { font-size: clamp(2.4rem, 6.5vw, 4.4rem); }
  .cd { --cd: min(76px, 11vw); }
}
@media (prefers-reduced-motion: reduce) {
  .bg img { transform: scale(1.06); }
}
