:root {
  --bg-0: #07070d;
  --bg-1: #0d0d18;
  --fg: #f4f4f8;
  --fg-muted: #9a9aaa;
  --accent: #7c5cff;
  --accent-2: #ff5cf2;
  --accent-3: #5cf2ff;
  --border: rgba(255, 255, 255, 0.08);
  --glass: rgba(255, 255, 255, 0.04);
}

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

html, body {
  height: 100%;
}

body {
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-0);
  color: var(--fg);
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at top, rgba(124, 92, 255, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(255, 92, 242, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse at bottom left, rgba(92, 242, 255, 0.08) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* Floating gradient orbs */
.gradient-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
  will-change: transform;
}

.orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #7c5cff 0%, transparent 70%);
  top: -200px;
  left: -150px;
  animation: float-1 20s ease-in-out infinite;
}

.orb-2 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #ff5cf2 0%, transparent 70%);
  bottom: -250px;
  right: -200px;
  animation: float-2 25s ease-in-out infinite;
}

.orb-3 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #5cf2ff 0%, transparent 70%);
  top: 40%;
  left: 50%;
  animation: float-3 30s ease-in-out infinite;
}

@keyframes float-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(120px, 80px) scale(1.1); }
  66% { transform: translate(-60px, 140px) scale(0.95); }
}

@keyframes float-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-100px, -60px) scale(1.05); }
  66% { transform: translate(80px, -120px) scale(1.1); }
}

@keyframes float-3 {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-40%, -55%) scale(1.15); }
}

/* Noise overlay */
.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%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");
}

#particles {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.container {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 2.5rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Nav */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  animation: fade-down 0.8s ease-out both;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  font-size: 1rem;
}

.logo-mark {
  display: inline-block;
  color: var(--accent);
  font-size: 1.1rem;
  animation: spin 8s linear infinite;
  text-shadow: 0 0 20px rgba(124, 92, 255, 0.6);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.social {
  display: flex;
  gap: 0.75rem;
}

.social-link {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  color: var(--fg-muted);
  text-decoration: none;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.social-link svg {
  width: 16px;
  height: 16px;
}

.social-link:hover {
  color: var(--fg);
  background: rgba(124, 92, 255, 0.15);
  border-color: rgba(124, 92, 255, 0.4);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px -10px rgba(124, 92, 255, 0.5);
}

/* Hero */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 4rem 0;
  gap: 2rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-muted);
  animation: fade-up 0.8s 0.1s ease-out both;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00ff88;
  box-shadow: 0 0 10px #00ff88;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.title {
  font-size: clamp(2.5rem, 8vw, 6rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.04em;
  max-width: 14ch;
}

.title-line {
  display: block;
  opacity: 0;
  transform: translateY(40px);
  animation: reveal 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.title-line:nth-child(1) { animation-delay: 0.3s; }
.title-line:nth-child(2) { animation-delay: 0.5s; }
.title-line:nth-child(3) { animation-delay: 0.7s; }

.title-line.accent {
  background: linear-gradient(135deg, #7c5cff 0%, #ff5cf2 50%, #5cf2ff 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-style: italic;
  font-weight: 600;
  animation: reveal 0.9s 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards,
             gradient-shift 6s 0.5s ease-in-out infinite;
}

@keyframes reveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.subtitle {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  color: var(--fg-muted);
  max-width: 50ch;
  line-height: 1.6;
  animation: fade-up 0.9s 0.9s ease-out both;
}

/* Countdown */
.countdown {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1rem;
  animation: fade-up 0.9s 1.1s ease-out both;
}

.count-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  min-width: 80px;
  padding: 1rem 1.25rem;
  border-radius: 16px;
  background: var(--glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.count-block::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.1), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.count-block:hover::before {
  opacity: 1;
}

.count-block:hover {
  transform: translateY(-4px);
  border-color: rgba(124, 92, 255, 0.3);
}

.count-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #ffffff 0%, #c8c8d8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
  z-index: 1;
}

.count-label {
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--fg-muted);
  position: relative;
  z-index: 1;
}

.count-sep {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.5rem;
  color: var(--fg-muted);
  opacity: 0.4;
  animation: blink 1s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.1; }
}

/* Subscribe */
.subscribe {
  width: 100%;
  max-width: 460px;
  margin-top: 1rem;
  animation: fade-up 0.9s 1.3s ease-out both;
}

.input-wrap {
  display: flex;
  align-items: center;
  padding: 0.4rem 0.4rem 0.4rem 1.25rem;
  background: var(--glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: all 0.35s ease;
  position: relative;
  overflow: hidden;
}

.input-wrap::before {
  content: '';
  position: absolute;
  inset: -1px;
  background: linear-gradient(135deg, #7c5cff, #ff5cf2, #5cf2ff);
  border-radius: 999px;
  opacity: 0;
  z-index: -1;
  transition: opacity 0.35s ease;
}

.input-wrap:focus-within {
  border-color: transparent;
  box-shadow: 0 20px 60px -20px rgba(124, 92, 255, 0.5);
}

.input-wrap:focus-within::before {
  opacity: 1;
}

.input-wrap input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--fg);
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.6rem 0;
}

.input-wrap input::placeholder {
  color: var(--fg-muted);
}

.input-wrap button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  background: linear-gradient(135deg, #7c5cff 0%, #ff5cf2 100%);
  border: none;
  border-radius: 999px;
  color: white;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.input-wrap button::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #ff5cf2 0%, #7c5cff 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.input-wrap button:hover {
  transform: scale(1.03);
  box-shadow: 0 10px 30px -10px rgba(255, 92, 242, 0.6);
}

.input-wrap button:hover::before {
  opacity: 1;
}

.input-wrap button:active {
  transform: scale(0.98);
}

.btn-text, .input-wrap button svg {
  position: relative;
  z-index: 1;
}

.input-wrap button svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
}

.input-wrap button:hover svg {
  transform: translateX(3px);
}

.form-message {
  min-height: 1.5rem;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--fg-muted);
  transition: color 0.3s ease;
}

.form-message.success { color: #00ff88; }
.form-message.error { color: #ff5c7c; }

/* Footer */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  font-size: 0.8rem;
  color: var(--fg-muted);
  animation: fade-up 0.9s 1.5s ease-out both;
}

.footer-meta {
  font-style: italic;
  opacity: 0.7;
}

/* Animations */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-down {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 640px) {
  .container {
    padding: 1.5rem;
  }

  .count-block {
    min-width: 64px;
    padding: 0.75rem 0.85rem;
  }

  .count-sep {
    display: none;
  }

  .countdown {
    gap: 0.5rem;
  }

  .footer {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

  .input-wrap button {
    padding: 0.6rem 1rem;
  }

  .btn-text {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
