/* ============================================
   Merrydays — 7 Day Countdown
   Brand palette: deep violet, electric blue, cyan
   ============================================ */

:root {
  --bg-0: #07061a;
  --bg-1: #0d0a2e;
  --violet: #5b1bff;
  --violet-deep: #3a0ca3;
  --blue: #4361ee;
  --cyan: #4cc9f0;
  --aqua: #7ee8ff;
  --ink: #f5f3ff;
  --muted: #b9b6d6;
  --card: rgba(255, 255, 255, 0.04);
  --card-brd: rgba(255, 255, 255, 0.08);
  --grad: linear-gradient(135deg, #7ee8ff 0%, #4cc9f0 30%, #5b1bff 100%);
  --grad-text: linear-gradient(135deg, #7ee8ff 0%, #5b1bff 100%);
  --shadow-glow: 0 20px 60px -20px rgba(91, 27, 255, 0.6),
                 0 0 40px -10px rgba(76, 201, 240, 0.4);
}

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

html, body {
  min-height: 100vh;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  color: var(--ink);
  background: radial-gradient(ellipse at top, var(--bg-1) 0%, var(--bg-0) 70%);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ===== Animated background ===== */
.bg-orbs {
  position: fixed; inset: 0; z-index: 0;
  overflow: hidden; pointer-events: none;
}
.orb {
  position: absolute; border-radius: 50%;
  filter: blur(90px); opacity: 0.55;
  animation: float 18s ease-in-out infinite;
}
.orb-1 { width: 520px; height: 520px; background: var(--violet); top: -120px; left: -120px; }
.orb-2 { width: 460px; height: 460px; background: var(--cyan); bottom: -120px; right: -100px; animation-delay: -6s; }
.orb-3 { width: 380px; height: 380px; background: var(--blue); top: 40%; left: 50%; transform: translate(-50%, -50%); animation-delay: -12s; opacity: 0.35; }

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(40px, -30px) scale(1.08); }
  66%      { transform: translate(-30px, 40px) scale(0.95); }
}

.grid-overlay {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

/* ===== Layout ===== */
.shell {
  position: relative; z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 60px;
  display: flex; flex-direction: column;
  align-items: center; gap: 48px;
  min-height: 100vh;
}

.brand { display: flex; justify-content: center; }
.logo {
  height: 72px; width: auto;
  display: block;
  filter: drop-shadow(0 8px 30px rgba(91, 27, 255, 0.5));
  animation: fadeDown 0.9s ease both;
}

/* ===== Hero ===== */
.hero { text-align: center; max-width: 760px; animation: fadeUp 1s ease 0.1s both; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 18px;
  border: 1px solid var(--card-brd);
  background: var(--card);
  backdrop-filter: blur(12px);
  border-radius: 999px;
  font-size: 13px; letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--aqua);
  margin-bottom: 24px;
}
.pulse-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 0 var(--cyan);
  animation: pulse 2s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(76, 201, 240, 0.7); }
  70%  { box-shadow: 0 0 0 14px rgba(76, 201, 240, 0); }
  100% { box-shadow: 0 0 0 0 rgba(76, 201, 240, 0); }
}

.title {
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: clamp(2.2rem, 5.5vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}
.grad {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  background-size: 200% 200%;
  animation: shimmer 6s ease infinite;
}
@keyframes shimmer {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

.subtitle {
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  line-height: 1.65;
  color: var(--muted);
  max-width: 580px;
  margin: 0 auto;
}

/* ===== Countdown ===== */
.countdown {
  display: flex; align-items: center; justify-content: center;
  gap: 14px; flex-wrap: wrap;
  animation: fadeUp 1s ease 0.25s both;
}
.unit { display: flex; flex-direction: column; align-items: center; gap: 16px; }

.card {
  position: relative;
  width: clamp(110px, 14vw, 165px);
  height: clamp(110px, 14vw, 165px);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  border: 1px solid var(--card-brd);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-glow), inset 0 1px 0 rgba(255,255,255,0.1);
  display: grid; place-items: center;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.card::before {
  content: ''; position: absolute; inset: 0;
  background: var(--grad);
  opacity: 0.08;
  z-index: 0;
}
.card:hover { transform: translateY(-6px) scale(1.02); }

.flip {
  position: relative; z-index: 2;
  perspective: 600px;
}
.value {
  display: inline-block;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s;
}
.value.tick {
  animation: flipIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes flipIn {
  0%   { transform: rotateX(-90deg); opacity: 0; }
  100% { transform: rotateX(0); opacity: 1; }
}

.ring {
  position: absolute; inset: 0; z-index: 1;
}
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle {
  fill: none;
  stroke: rgba(255,255,255,0.06);
  stroke-width: 2;
}
.ring circle.progress {
  stroke: url(#none);
  stroke: var(--cyan);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 339.292;
  stroke-dashoffset: 339.292;
  transition: stroke-dashoffset 0.9s ease;
  filter: drop-shadow(0 0 6px var(--cyan));
}

.label {
  font-size: 12px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

.sep {
  font-family: 'Sora', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 300;
  color: var(--violet);
  opacity: 0.5;
  align-self: flex-start;
  margin-top: clamp(35px, 5vw, 55px);
  animation: blink 1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0.15; } }

/* ===== Notify form ===== */
.notify { width: 100%; max-width: 520px; animation: fadeUp 1s ease 0.4s both; }
.notify-form {
  display: flex; gap: 8px;
  padding: 8px;
  background: var(--card);
  border: 1px solid var(--card-brd);
  border-radius: 999px;
  backdrop-filter: blur(20px);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.notify-form:focus-within {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(76, 201, 240, 0.15);
}
.notify-form input {
  flex: 1; min-width: 0;
  background: transparent; border: none; outline: none;
  padding: 12px 20px;
  color: var(--ink);
  font-family: inherit; font-size: 15px;
}
.notify-form input::placeholder { color: var(--muted); }
.notify-form button {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px;
  border: none; cursor: pointer;
  border-radius: 999px;
  background: var(--grad);
  color: white; font-family: inherit; font-weight: 600; font-size: 14px;
  letter-spacing: 0.02em;
  transition: transform 0.2s, box-shadow 0.3s;
  box-shadow: 0 8px 24px -8px rgba(91, 27, 255, 0.6);
}
.notify-form button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 32px -8px rgba(91, 27, 255, 0.8);
}
.notify-form button:active { transform: translateY(0); }

.form-msg {
  margin-top: 14px;
  text-align: center;
  font-size: 14px;
  min-height: 20px;
  color: var(--aqua);
  opacity: 0; transition: opacity 0.3s;
}
.form-msg.show { opacity: 1; }
.form-msg.error { color: #ff6b9d; }

/* ===== Footer ===== */
.foot {
  margin-top: auto;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  opacity: 0.7;
}

/* ===== Animations ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .sep { display: none; }
  .countdown { gap: 12px; }
  .card { width: 38vw; height: 38vw; max-width: 150px; max-height: 150px; }
  .notify-form { flex-direction: column; border-radius: 24px; padding: 10px; }
  .notify-form button { justify-content: center; }
  .logo { height: 56px; }
}
