/* Base and design tokens */
:root {
  --bg: #0b1020;
  --surface: rgba(255, 255, 255, 0.06);
  --surface-2: rgba(255, 255, 255, 0.12);
  --text: #e6e8f0;
  --text-muted: #a5acc4;
  --primary: #0ea5e9; /* sky-500 */
  --primary-2: #22d3ee; /* cyan-400 */
  --ring: rgba(14, 165, 233, 0.35);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --radius: 16px;
}

/* Light theme overrides (auto) */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f8ff;
    --surface: rgba(255, 255, 255, 0.9);
    --surface-2: rgba(2, 6, 23, 0.06);
    --text: #0b1020;
    --text-muted: #50566f;
    --ring: rgba(14, 165, 233, 0.35);
    --shadow: 0 10px 30px rgba(2, 6, 23, 0.08);
  }
}

/* Explicit dark theme via class for toggle */
.theme-dark {
  --bg: #0b1020;
  --surface: rgba(255, 255, 255, 0.06);
  --surface-2: rgba(255, 255, 255, 0.12);
  --text: #e6e8f0;
  --text-muted: #a5acc4;
  --ring: rgba(14, 165, 233, 0.35);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

/* Reset */
*,
*::before,
*::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }

.container {
  width: 100%;
  max-width: 1000px;
  padding: 0 20px;
  margin: 0 auto;
}

/* Background FX */
.bg.fx-grid {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,0.06) 1px, transparent 1px) 0 0/24px 24px;
  mask-image: radial-gradient(100% 100% at 50% 20%, #000 40%, transparent 100%);
  pointer-events: none;
}
.bg.fx-blob {
  position: fixed;
  filter: blur(60px);
  opacity: 0.5;
  pointer-events: none;
  transform: translateZ(0);
}
.bg.fx-blob-1 {
  width: 480px; height: 480px; top: -120px; right: -120px;
  background: radial-gradient(circle at 30% 30%, var(--primary), transparent 60%),
              radial-gradient(circle at 70% 70%, var(--primary-2), transparent 60%);
  animation: float1 18s ease-in-out infinite;
}
.bg.fx-blob-2 {
  width: 420px; height: 420px; bottom: -120px; left: -120px;
  background: radial-gradient(circle at 60% 40%, #8b5cf6, transparent 60%),
              radial-gradient(circle at 40% 60%, #22d3ee, transparent 60%);
  animation: float2 22s ease-in-out infinite;
}
@keyframes float1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-20px, 10px) scale(1.05); }
}
@keyframes float2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(10px, -20px) scale(1.08); }
}

/* Header */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 20px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.brand-mark { width: 28px; height: 28px; }
.brand-text { font-size: 18px; text-transform: lowercase; }

/* Buttons */
.btn {
  appearance: none;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: white;
  padding: 12px 16px;
  border-radius: 12px;
  font-weight: 600;
  transition: transform 0.1s ease, box-shadow 0.2s ease, filter 0.2s ease;
  box-shadow: 0 8px 24px rgba(14, 165, 233, 0.25);
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.btn-icon {
  width: 42px; height: 42px;
  display: inline-grid; place-items: center;
  background: var(--surface);
  color: var(--text);
  box-shadow: none;
}
.btn-icon:hover { background: var(--surface-2); }
.icon-sun, .icon-moon {
  width: 18px; height: 18px; display: block; position: relative;
}
.icon-sun::before {
  content: "☀️"; position: absolute; inset: 0; display: grid; place-items: center;
}
.icon-moon { display: none; }
html.theme-dark .icon-sun { display: none; }
html.theme-dark .icon-moon { display: block; }
.icon-moon::before {
  content: "🌙"; position: absolute; inset: 0; display: grid; place-items: center;
}

/* Main card */
.main {
  padding: 20px;
  display: grid;
  place-items: center;
  min-height: 70vh;
}
.card {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--surface-2);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  backdrop-filter: saturate(140%) blur(12px);
}
.hero {
  padding: 36px 28px;
}
.h1 {
  margin: 0 0 10px;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.grad {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.muted { color: var(--text-muted); margin: 0 0 22px; }

/* Countdown */
.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 8px;
}
.cd-item {
  background: radial-gradient(120% 120% at 0% 0%, rgba(255,255,255,0.08), transparent 60%);
  border: 1px solid var(--surface-2);
  border-radius: 14px;
  padding: 14px 10px;
  text-align: center;
}
.cd-number {
  font-size: clamp(18px, 5vw, 28px);
  font-weight: 700;
}
.cd-label { color: var(--text-muted); font-size: 12px; margin-top: 4px; }

/* Progress */
.progress-wrap { margin-top: 22px; }
.progress-head {
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 600;
  margin-bottom: 8px;
}
.progress {
  width: 100%;
  height: 12px;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  box-shadow: inset 0 0 12px rgba(255,255,255,0.2);
  transition: width 0.8s cubic-bezier(.2,.9,.2,1);
}
.checklist {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 12px;
  color: var(--text-muted);
}
.check { display: inline-block; width: 1.25em; }
.is-done { color: #22c55e; }

/* Notify form */
.notify {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}
.notify input[type="email"] {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--surface-2);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.notify input::placeholder {
  color: var(--text-muted);
  font-family: inherit;
  font-weight: 500;
  letter-spacing: 0;
  opacity: 1;
}
.notify input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--ring);
  background: rgba(255,255,255,0.1);
}
.form-msg {
  grid-column: 1 / -1;
  margin: 0;
  min-height: 20px;
  color: var(--text-muted);
}

/* Links row */
.links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}
.link {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px dashed rgba(255,255,255,0.25);
}
.link:hover { border-bottom-style: solid; }
.dot { color: var(--text-muted); }

/* Footer */
.footer {
  display: flex; justify-content: center; padding: 34px 20px 50px;
  color: var(--text-muted);
}

/* A11y */
.sr-only {
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

/* Status indicator */
.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--surface-2);
  margin: 4px 0 2px;
}
.dot-pulse {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 0 0 0 rgba(14,165,233,0.6);
  animation: pulse 1.8s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(14,165,233,0.6); }
  70% { box-shadow: 0 0 0 12px rgba(14,165,233,0); }
  100% { box-shadow: 0 0 0 0 rgba(14,165,233,0); }
}

/* Responsive */
@media (max-width: 640px) {
  .checklist { grid-template-columns: 1fr; }
  .notify { grid-template-columns: 1fr; }
  .header { padding: 22px 16px; }
  .hero { padding: 26px 20px; }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .fx-blob { animation: none !important; }
  .dot-pulse { animation: none !important; }
}


