:root {
  --cyan: #4fe3ff;
  --ink: #150a26;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--ink);
  overflow-x: hidden;
}

body {
  font-family: "Rajdhani", "Helvetica Neue", Arial, sans-serif;
  color: #fff;
  min-height: 100svh;
  min-height: 100dvh;
}

/* ---------- animated background ---------- */

.bg {
  position: fixed;
  inset: -6%;
  background-image: url("assets/bg-desktop.webp");
  background-size: cover;
  background-position: center 60%;
  background-repeat: no-repeat;
  z-index: 0;
  animation: drift 34s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes drift {
  0%   { transform: scale(1.06) translate(0%, 0%); }
  50%  { transform: scale(1.13) translate(-1.2%, -0.8%); }
  100% { transform: scale(1.08) translate(1%, 0.6%); }
}

@media (max-width: 760px) {
  .bg {
    background-image: url("assets/bg-mobile.webp");
    background-position: center 70%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bg { animation: none; transform: scale(1.06); }
}

/* recolors the background photo to the logo's blue -> purple -> magenta
   hue, using mix-blend-mode: color so it takes hue/saturation from this
   gradient but keeps the photo's own luminosity (palm silhouettes, sky
   glow, clouds all stay intact underneath) */
.wash {
  position: fixed;
  inset: -6%;
  z-index: 1;
  pointer-events: none;
  mix-blend-mode: color;
  background: linear-gradient(135deg, #0442c8 0%, #6e33c8 40%, #b23bc9 65%, #fb4a9a 100%);
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center 55%, rgba(21,10,38,0) 35%, rgba(21,10,38,0.55) 100%),
    linear-gradient(to bottom, rgba(21,10,38,0.35) 0%, rgba(21,10,38,0.05) 30%, rgba(21,10,38,0.15) 70%, rgba(21,10,38,0.75) 100%);
}

/* ---------- logo ---------- */

.logo {
  position: fixed;
  top: max(1.25rem, env(safe-area-inset-top));
  left: max(1.25rem, env(safe-area-inset-left));
  z-index: 5;
  width: clamp(52px, 9vw, 84px);
  height: auto;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.45), 0 0 0 1px rgba(255,255,255,0.12);
}

/* ---------- layout ---------- */

.stage {
  position: relative;
  z-index: 4;
  min-height: 100svh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6vh 5vw 8vh;
  gap: clamp(0.5rem, 2vh, 1rem);
}

/* ---------- countdown ---------- */

.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.6rem, 2.4vw, 1.4rem);
  width: 100%;
  max-width: 560px;
}

.unit {
  max-width: 140px;
  min-width: 0;
  width: 100%;
  justify-self: center;
  padding: clamp(0.75rem, 2.4vw, 1.3rem) 0.5rem;
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(255,255,255,0.12), rgba(255,255,255,0.03));
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 0 0 1px rgba(255,94,196,0.08) inset, 0 8px 30px rgba(0,0,0,0.35);
}

.value {
  display: block;
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(1.9rem, 8vw, 3.2rem);
  line-height: 1;
  letter-spacing: 0.02em;
  color: #fff;
  text-shadow: 0 0 18px rgba(79, 227, 255, 0.55);
  font-variant-numeric: tabular-nums;
}

.label {
  display: block;
  margin-top: 0.35rem;
  font-size: clamp(0.6rem, 2vw, 0.75rem);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  font-weight: 600;
}

/* small phones: two-per-row rhythm */
@media (max-width: 480px) {
  .countdown {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 320px;
    gap: 0.7rem;
  }
  .unit { max-width: none; }
}

@media (max-height: 560px) and (orientation: landscape) {
  .stage { padding: 3vh 5vw; }
}
