/* =============================================================
   SPLASH COUNTDOWN — foglio di stile
   Non serve modificare questo file: colori, immagine e testi
   si cambiano da assets/js/config.js
   ============================================================= */

:root {
  --accent: #ffffff;
  --text: #ffffff;
  --muted: rgba(255, 255, 255, .82);
  --bg-position: center center;
  --overlay: .18;
  --scrim: .8;

  --font-display: 'Anton', 'Oswald', Impact, 'Arial Narrow', sans-serif;
  --font-body: 'Barlow Semi Condensed', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

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

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #1a0206;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- Sfondo a tutto schermo ---------------------------
   position:fixed + background-size:cover copre sempre l'intera
   finestra, su desktop e su mobile, anche quando la barra degli
   indirizzi di Safari/Chrome si apre e si chiude.
   ------------------------------------------------------------- */
.bg,
.bg-overlay,
.bg-scrim {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.bg {
  background-size: cover;
  background-position: var(--bg-position);
  background-repeat: no-repeat;
  background-color: #1a0206;
}

/* Velo uniforme: abbassa un filo la foto senza spegnerla */
.bg-overlay {
  background: #120003;
  opacity: var(--overlay);
  z-index: 1;
}

/* Ombra sfumata in basso: e' quella che rende leggibile il bianco
   sopra la maglia, senza toccare la parte alta della foto. */
.bg-scrim {
  top: auto;
  height: 62%;
  background: linear-gradient(to bottom,
              rgba(10, 0, 2, 0) 0%,
              rgba(10, 0, 2, .55) 55%,
              rgba(10, 0, 2, .92) 100%);
  opacity: var(--scrim);
  z-index: 2;
}

/* ---------- Contenuto ---------------------------------------- */
.stage {
  position: relative;
  z-index: 3;

  /* 100dvh segue la viewport reale su mobile; 100vh e' il fallback */
  min-height: 100vh;
  min-height: 100dvh;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;           /* contenuti in basso */
  gap: clamp(12px, 2.4vh, 24px);

  padding: max(28px, env(safe-area-inset-top))
           clamp(18px, 5vw, 48px)
           calc(clamp(28px, 7vh, 72px) + env(safe-area-inset-bottom));
  text-align: center;
}

/* Variante: tutto centrato verticalmente */
.stage.is-center { justify-content: center; }

/* ---------- Testi --------------------------------------------- */
.kicker {
  margin: 0;
  font-weight: 700;
  font-size: clamp(11px, 1.5vw, 15px);
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--text);
  opacity: .9;
  text-shadow: 0 2px 14px rgba(0, 0, 0, .6);
}

.claim {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(26px, 5.2vw, 54px);
  line-height: 1.06;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--text);
  text-shadow: 0 4px 24px rgba(0, 0, 0, .65);
}

.footer {
  margin: 0;
  font-size: clamp(11px, 1.4vw, 14px);
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  text-shadow: 0 2px 14px rgba(0, 0, 0, .6);
}

/* ---------- Countdown ----------------------------------------- */
.countdown {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(6px, 1.6vw, 22px);
  width: 100%;
  max-width: 880px;
}

.unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1 1 0;
}

.num {
  font-family: var(--font-display);
  font-size: clamp(38px, 11vw, 96px);
  line-height: .92;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
  text-shadow: 0 6px 34px rgba(0, 0, 0, .7);
}

.lbl {
  font-size: clamp(9px, 1.8vw, 13px);
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .7);
}

.sep {
  font-family: var(--font-display);
  font-size: clamp(28px, 7vw, 64px);
  line-height: .92;
  color: var(--text);
  opacity: .3;
  transform: translateY(-2px);
}

/* ---------- Mobile stretto ------------------------------------ */
@media (max-width: 560px) {
  .countdown { gap: 2px; }
  .sep { display: none; }          /* piu' spazio ai numeri */
  .unit { gap: 4px; }
}

/* Schermi bassi in orizzontale */
@media (max-height: 480px) and (orientation: landscape) {
  .stage { gap: 8px; padding-bottom: max(18px, env(safe-area-inset-bottom)); }
  .num { font-size: clamp(30px, 8vh, 56px); }
  .claim { font-size: clamp(18px, 4vh, 28px); }
}

@media (prefers-reduced-motion: no-preference) {
  .stage > * { animation: fade-in .7s ease both; }
  .countdown { animation-delay: .15s; }
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
