:root {
  --bg: #08080a;
  --bg-2: #0e0e12;
  --gold: #f5c451;
  --gold-deep: #b8862f;
  --red: #e23b4e;
  --text: #f4f4f6;
  --muted: #8a8a96;
  --ring: rgba(245, 196, 81, 0.14);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  position: relative;
  padding: calc(64px + env(safe-area-inset-top)) 20px max(28px, env(safe-area-inset-bottom));
}

/* Fundo */
.bg-glow {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(60% 50% at 50% 38%, rgba(245, 196, 81, 0.10), transparent 70%),
    radial-gradient(80% 60% at 50% 50%, var(--bg-2), var(--bg) 75%);
  z-index: 0;
  animation: glowPulse 8s ease-in-out infinite;
}
@keyframes glowPulse {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; }
}
.bg-grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.stage {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 640px;
  width: 100%;
}

/* Logo / coins */
.logo {
  position: relative;
  width: 168px;
  height: 168px;
  margin-bottom: 28px;
  display: grid;
  place-items: center;
}
.logo-halo {
  position: absolute;
  inset: -18%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 196, 81, 0.22), transparent 65%);
  filter: blur(6px);
  animation: halo 4s ease-in-out infinite;
}
@keyframes halo {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.08); opacity: 1; }
}
.coins {
  position: relative;
  width: 100%;
  height: 100%;
  animation: float 5s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}
.coin {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transform: scale(0.9) rotateY(40deg);
  transition: opacity 0.9s ease, transform 0.9s ease;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.55));
  will-change: opacity, transform;
}
.coin.is-active {
  opacity: 1;
  transform: scale(1) rotateY(0deg);
}

/* Textos */
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.42em;
  font-size: 0.72rem;
  color: var(--gold);
  margin-bottom: 14px;
  padding-left: 0.42em;
}
.title {
  font-family: "Sora", sans-serif;
  font-weight: 800;
  font-size: clamp(2.8rem, 12vw, 5.2rem);
  letter-spacing: 0.04em;
  line-height: 1;
  background: linear-gradient(180deg, #ffffff 0%, #d8d8de 55%, #9a9aa4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.title-accent {
  background: linear-gradient(180deg, var(--gold) 0%, var(--gold-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.tagline {
  margin-top: 14px;
  font-size: clamp(0.95rem, 3.4vw, 1.15rem);
  color: var(--muted);
  font-style: italic;
}

/* Countdown */
.countdown {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(8px, 2.5vw, 18px);
  margin-top: 38px;
}
.unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: clamp(58px, 17vw, 84px);
  padding: 14px 6px 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
}
.num {
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: clamp(1.7rem, 7vw, 2.6rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.lbl {
  margin-top: 8px;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
}
.sep {
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: clamp(1.4rem, 5vw, 2rem);
  color: var(--gold-deep);
  padding-top: 16px;
  opacity: 0.7;
  animation: blink 1s steps(2, start) infinite;
}
@keyframes blink { 50% { opacity: 0.2; } }

.launch-note {
  margin-top: 26px;
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* Estado "lançado" */
.countdown.done { gap: 0; }
.launched .title-accent { animation: pop 0.6s ease; }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.18); } 100% { transform: scale(1); } }

.foot {
  position: fixed;
  left: 0;
  right: 0;
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 2;
  font-size: 0.72rem;
  color: rgba(138, 138, 150, 0.5);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

@media (max-width: 360px) {
  .lbl { font-size: 0.55rem; letter-spacing: 0.12em; }
  .sep { padding-top: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .coins, .logo-halo, .bg-glow, .sep { animation: none; }
  .coin { transition: opacity 0.5s ease; transform: none; }
  .coin.is-active { transform: none; }
}
