/* ==========================================================================
   Xtream Masters — Coming Soon
   ========================================================================== */

@font-face {
  font-family: "Manrope";
  src: url("../assets/fonts/manrope-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Approved palette */
  --bg: #080A0F;
  --surface-1: #12151D;
  --surface-2: #191D27;
  --gold: #D4AF37;
  --gold-bright: #F0C75E;
  --text: #F5F7FA;
  --text-2: #A9B0BD;
  --border: #2A303B;
  --focus: #E4B84A;

  --font: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, p { margin: 0; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
  border-radius: 6px;
}

::selection { background: rgba(212, 175, 55, 0.3); color: var(--text); }

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

[hidden] { display: none !important; }

/* ---------- Background ---------- */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% 110%, rgba(25, 29, 39, 0.9) 0%, transparent 60%),
    var(--bg);
}

.backdrop__glow {
  position: absolute;
  left: 50%;
  top: 38%;
  width: min(1100px, 160vw);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(212, 175, 55, 0.13), rgba(212, 175, 55, 0.04) 45%, transparent 75%);
  animation: glow-breathe 12s ease-in-out infinite;
}

.backdrop__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(245, 247, 250, 0.028) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(245, 247, 250, 0.028) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: center center;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
}

.backdrop__rings {
  position: absolute;
  left: 50%;
  top: 40%;
  width: max(1000px, 125vmax);
  height: max(1000px, 125vmax);
  transform: translate(-50%, -50%);
  fill: none;
  stroke: var(--border);
  stroke-width: 1;
  opacity: 0.55;
}

.backdrop__orbit {
  transform-origin: 500px 500px;
  animation: orbit 60s linear infinite;
}

.backdrop__orbit--slow {
  animation-duration: 110s;
  animation-direction: reverse;
}

.backdrop__arc {
  stroke: url(#arc-fade);
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-dasharray: 16 84;
}

.backdrop__arc--faint {
  stroke-dasharray: 9 91;
  opacity: 0.5;
}

.backdrop__vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 90% 80% at 50% 45%, transparent 55%, rgba(8, 10, 15, 0.85) 100%);
}

/* ---------- Layout ---------- */

.page,
.footer {
  position: relative;
  z-index: 1;
}

.page {
  flex: 1 0 auto;
  display: grid;
  place-items: center;
  padding:
    calc(clamp(2.5rem, 7vh, 5.5rem) + env(safe-area-inset-top))
    calc(var(--gutter) + env(safe-area-inset-right))
    clamp(2rem, 5vh, 3.5rem)
    calc(var(--gutter) + env(safe-area-inset-left));
}

.hero {
  width: 100%;
  max-width: 60rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* ---------- Logo ---------- */

.brand-mark {
  width: min(100%, clamp(280px, 66vw, 640px));
  margin-bottom: clamp(1.5rem, 4vh, 2.25rem);
  filter: drop-shadow(0 18px 36px rgba(212, 175, 55, 0.18));
}

.brand-mark img {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------- Typography ---------- */

.brand-name {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: 0.28em;
  font-size: clamp(2.5rem, 1.1rem + 5.4vw, 5.25rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.025em;
  text-transform: uppercase;
  color: var(--text);
}

.brand-name__word--accent {
  background: linear-gradient(180deg, var(--gold-bright) 0%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: var(--gold);
  -webkit-text-fill-color: transparent;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: clamp(1.25rem, 3vh, 1.75rem);
  padding: 0.45rem 0.95rem 0.45rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(18, 21, 29, 0.7);
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  line-height: 1.2;
}

.status__dot {
  position: relative;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold-bright);
  flex: none;
}

.status__dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--gold-bright);
  opacity: 0;
  animation: pulse 2.6s var(--ease-out) infinite;
}

.lead {
  margin-top: clamp(1.75rem, 4.5vh, 2.5rem);
  font-size: clamp(1.25rem, 0.95rem + 1.2vw, 1.75rem);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text);
}

.sub {
  margin-top: 0.75rem;
  max-width: 32rem;
  font-size: clamp(0.95rem, 0.9rem + 0.2vw, 1.05rem);
  color: var(--text-2);
  text-wrap: balance;
}

/* ---------- Countdown ---------- */

.countdown {
  width: 100%;
  max-width: 36rem;
  margin-top: clamp(2.25rem, 6vh, 3.5rem);
}

.countdown__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.5rem, 2vw, 1rem);
}

.countdown__unit,
.countdown__fallback {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(25, 29, 39, 0.85), rgba(18, 21, 29, 0.85));
  box-shadow: inset 0 1px 0 rgba(245, 247, 250, 0.05), 0 20px 40px -24px rgba(0, 0, 0, 0.8);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

/* Thin gold highlight along the top edge */
.countdown__unit::before,
.countdown__fallback::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 22%;
  right: 22%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(240, 199, 94, 0.7), transparent);
}

.countdown__unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: clamp(0.9rem, 2.6vw, 1.4rem) 0.25rem clamp(0.8rem, 2.2vw, 1.15rem);
  transition: border-color 0.3s ease, transform 0.3s var(--ease-out);
}

.countdown__unit:hover {
  border-color: rgba(212, 175, 55, 0.45);
  transform: translateY(-2px);
}

.countdown__value {
  display: block;
  min-width: 2ch;
  font-size: clamp(1.75rem, 1rem + 3.2vw, 3rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  color: var(--text);
}

.countdown__value.is-tick {
  animation: tick 0.5s var(--ease-out);
}

.countdown__label {
  font-size: clamp(0.625rem, 0.56rem + 0.3vw, 0.75rem);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-2);
}

.countdown__fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: clamp(1.1rem, 3vw, 1.5rem) 1rem;
}

.countdown__fallback-title {
  font-size: clamp(1.25rem, 1rem + 1.2vw, 1.75rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  line-height: 1.2;
}

.countdown__fallback-note {
  font-size: 0.8125rem;
  color: var(--text-2);
}

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

.footer {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding:
    1.5rem
    calc(var(--gutter) + env(safe-area-inset-right))
    calc(1.5rem + env(safe-area-inset-bottom))
    calc(var(--gutter) + env(safe-area-inset-left));
  border-top: 1px solid rgba(42, 48, 59, 0.6);
  font-size: 0.8125rem;
  color: var(--text-2);
}

.footer__contact {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.footer__label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-2);
  opacity: 0.75;
}

.footer__link {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  background-image: linear-gradient(var(--gold), var(--gold));
  background-size: 0 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  padding-bottom: 2px;
  transition: color 0.2s ease, background-size 0.3s var(--ease-out);
}

.footer__link:hover {
  color: var(--gold-bright);
  background-size: 100% 1px;
}

/* ---------- Entrance ---------- */

.reveal {
  animation: reveal 0.9s var(--ease-out) both;
  animation-delay: var(--d, 0ms);
}

/* The logo slot has both entrance and float animations */
.brand-mark.reveal {
  animation:
    reveal 0.9s var(--ease-out) both,
    float 7s ease-in-out 1s infinite;
}

/* ---------- Keyframes ---------- */

@keyframes reveal {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@keyframes float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -6px; }
}

@keyframes orbit {
  to { transform: rotate(360deg); }
}

@keyframes glow-breathe {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; }
}

@keyframes pulse {
  0% { opacity: 0.7; transform: scale(0.6); }
  100% { opacity: 0; transform: scale(1.8); }
}

@keyframes tick {
  from { opacity: 0.35; transform: translateY(-5px); }
  to { opacity: 1; transform: none; }
}

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

@media (max-width: 560px) {
  /* Stack the wordmark intentionally on small screens */
  .brand-name {
    flex-direction: column;
    align-items: center;
    row-gap: 0.06em;
    font-size: clamp(2.75rem, 14vw, 3.5rem);
  }

  .countdown__unit { border-radius: 12px; }
  .countdown__fallback { border-radius: 14px; }

  .footer {
    flex-direction: column;
    justify-content: center;
    text-align: center;
    gap: 0.5rem;
  }

  .backdrop__grid { background-size: 44px 44px; }
}

@media (max-height: 640px) and (min-width: 561px) {
  .page { padding-top: 2.5rem; }
  .brand-mark { margin-bottom: 1.25rem; }
}

/* ---------- Reduced motion ---------- */

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

  .countdown__unit:hover { transform: none; }
}
