/* ========== Animated background & layout ========== */
html, body { height: 100%; overflow: hidden; overscroll-behavior: none; }
body {
  margin: 0;
  color: #fff;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica Neue, Arial;
  background: linear-gradient(270deg, #1e3a8a, #3730a3, #1d4ed8);
  background-size: 600% 600%;
  animation: backgroundShift 30s ease infinite;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  text-align: center;
}
@keyframes backgroundShift {
  0% { background-position: 0% 50% }
  50% { background-position: 100% 50% }
  100% { background-position: 0% 50% }
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;  /* vertical centering */
  align-items: center;
  gap: 0.5rem;              /* tighter spacing */
  max-height: 100vh;        /* never exceed viewport */
  overflow: hidden;
  padding: 1rem;  
  position: relative;
  z-index: 5;
}


/* ========== Mini headline ========== */
.mini-headline {
  font-size: 0.9rem;
  color: #a5b4fc;
  margin-bottom: 0.5rem;
}

/* ========== Logo shimmer ========== */
.logo-animated {
  max-width: 180px;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(99,102,241,.45);
  position: relative;
  overflow: hidden;
}
@keyframes shimmer { 0% { background-position: -200% 0 } 100% { background-position: 200% 0 } }
.logo-animated::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,.35), transparent);
  background-size: 200% 100%;
  animation: shimmer 3s infinite;
  pointer-events: none;
}

/* ========== Wordmark pulse glow ========== */
.stagger-wordmark { font-weight: 800; font-size: 1.6rem; }
@keyframes pulseGlow { 0%,100% { text-shadow: 0 0 8px rgba(99,102,241,.5) } 50% { text-shadow: 0 0 16px rgba(99,102,241,.9) } }
.animate-pulse-glow { animation: pulseGlow 2.2s ease-in-out infinite; }

/* ========== Tagline (animated words) ========== */
.stagger-tagline { font-size: 1rem; }
.gradient-text {
  background: linear-gradient(90deg, #06b6d4, #6366f1, #f43f5e);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  color: #06b6d4;
}
@keyframes bounceIn {
  0% { transform: scale(0.8); opacity: 0 }
  60% { transform: scale(1.1); opacity: 1 }
  100% { transform: scale(1) }
}
.tagline-word {
  display: inline-block;
  margin: 0 0.2rem;
  font-weight: 600;
  background: linear-gradient(90deg, #06b6d4, #6366f1, #f43f5e);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: bounceIn 0.6s ease forwards;
}
.tagline-word:nth-child(1) { animation-delay: 0.10s; }
.tagline-word:nth-child(2) { animation-delay: 0.30s; }
.tagline-word:nth-child(3) { animation-delay: 0.50s; }
.tagline-word:nth-child(4) { animation-delay: 0.70s; }

@supports not (-webkit-background-clip: text) {
  .tagline-word {
    color: #06b6d4;
  }
}

/* ========== Value text helper ========== */
.text-lg { font-size: 0.95rem; color: #e5e7eb; }

/* ========== Countdown ========== */
.countdown {
  font-size: 1rem;
  color: #facc15;
  margin-top: 0.5rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  animation: pulseGlow 2s ease-in-out infinite;
}

/* ========== Form (input + button) ========== */
.cta-button {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
}
.cta-button, input[type="email"], button {
  position: relative;
  z-index: 6;
  pointer-events: auto; /* guarantee clicks go through */
}
input[type="email"]:focus {
  box-shadow: 0 0 12px rgba(99,102,241,0.8), 0 0 20px rgba(250,204,21,0.6);
}
@media (min-width: 640px) { .cta-button { flex-direction: row; } }

input[type="email"] {
  padding: 0.6rem 1rem;
  border-radius: 0.5rem;
  border: none;
  background: #1f2937;
  color: #fff;
  width: 18rem;
  font-size: 0.95rem;
  outline: none;
  transition: box-shadow .2s ease;
}
input[type="email"]::placeholder { color: #9ca3af; }
input[type="email"]:hover { box-shadow: 0 0 6px rgba(99,102,241,0.4); }
input[type="email"]:focus { box-shadow: 0 0 0 2px #6366f1; }

.button-gradient {
  border: none;
  cursor: pointer;
  border-radius: 0.5rem;
  padding: 0.6rem 1.25rem;
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  background: linear-gradient(90deg, #06b6d4, #6366f1, #f43f5e);
  background-size: 200% 200%;
  transition: background-position .4s ease, transform .2s ease, box-shadow .2s ease;
}
.button-gradient:hover {
  background-position: 100% 0;
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 6px 18px rgba(99,102,241,.25);
}

/* ========== Microcopy & social proof ========== */
.form-note { font-size: 0.8rem; color: #9ca3af; margin-top: 0.5rem; }
.social-proof { font-size: 0.85rem; color: #a5b4fc; margin-top: 0.25rem; }
.social-proof strong { font-weight: 700; }

/* ========== Thank-you state ========== */
#thankyou {
  margin-top: 1rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  background: #1f2937;
  color: #a7f3d0;
}
.hidden { display: none; }

.success-check {
  display: inline-block;
  margin-left: 8px;
  color: #34d399;
  font-size: 1.2rem;
  opacity: 0;
  border-radius: 50%;
}
@keyframes checkBounce {
  0% { transform: scale(0); opacity: 0 }
  50% { transform: scale(1.28); opacity: 1 }
  75% { transform: scale(.92) }
  100% { transform: scale(1); opacity: 1 }
}
.success-check.show { animation: checkBounce .6s ease forwards; }
@keyframes fadeOut { 0% { opacity: 1 } 100% { opacity: 0 } }
.success-check.fade { animation: fadeOut .6s ease forwards; }

/* ========== Confetti & sparkles ========== */
#confetti-container {
  position: absolute;
  inset: 0;
  overflow: visible;
  pointer-events: none;
}
@keyframes confettiDrift {
  0%   { transform: translate(0, 0) rotate(0deg); opacity: 1; }
  50%  { transform: translate(var(--x), calc(var(--y) * 0.5)) rotate(180deg); opacity: 1; }
  100% { transform: translate(calc(var(--x) * 0.7), var(--y)) rotate(360deg); opacity: 0; }
}
@keyframes horizontalSway {
  0%   { margin-left: 0 }
  50%  { margin-left: var(--swayAmp) }
  100% { margin-left: 0 }
}
.confetti-piece {
  position: absolute;
  width: 8px; height: 14px;
  border-radius: 2px;
  opacity: 0.95;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.3));
  animation: confettiDrift 1.8s ease-out forwards, horizontalSway var(--swayDur) ease-in-out infinite;
}

@keyframes sparkleFade {
  0%   { transform: scale(.6); opacity: 1 }
  50%  { transform: scale(1.2); opacity: 1 }
  100% { transform: scale(.85); opacity: 0 }
}
.sparkle-piece {
  position: absolute;
  width: 6px; height: 6px;
  border-radius: 50%;
  opacity: 0.96;
  box-shadow: 0 0 8px rgba(255,255,255,.55);
  animation: sparkleFade 1.6s ease-out forwards;
}

/* ========== Footer shimmer ========== */
footer {
  margin-top: 0.5rem;       /* smaller spacing */
  margin-bottom: 0.5rem;
}

.footer-brand {
  display: inline-block;
  font-weight: 600;
  background: linear-gradient(90deg, #06b6d4, #6366f1, #f43f5e);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: footerShimmer 6s linear infinite;
}
@keyframes footerShimmer { 0% { background-position: 0% } 100% { background-position: 200% } }

/* ========== Responsive tweaks ========== */
@media (max-height: 700px) { .stagger-intro { display: none; } }
@media (max-height: 640px) {
  .logo-animated { max-width: 160px; }
  .stagger-wordmark { font-size: 1.4rem; }
  .stagger-tagline  { font-size: 0.95rem; }
  .text-lg          { font-size: 0.9rem; }
  footer { margin-top: 1rem; }
}
@media (max-width: 400px) {
  .stagger-wordmark { font-size: 1.4rem; }
  .stagger-tagline  { font-size: 0.9rem; }
  .text-lg          { font-size: 0.85rem; }
  input[type="email"] { width: 16rem; }
}

/* ========== Optional stagger entrance ========== */
@keyframes fadeSlideUp {
  0% { opacity: 0; transform: translateY(12px) }
  100% { opacity: 1; transform: translateY(0) }
}
.stagger-intro {
  max-width: 36rem;
  color: #e5e7eb;
  line-height: 1.4;
  opacity: 0;
  animation: fadeSlideUp .7s ease-out .8s forwards;
}

/* Hero entrance */
@keyframes fadeSlideUp { 0%{opacity:0;transform:translateY(20px)}100%{opacity:1;transform:translateY(0)} }
.fade-slide { opacity:0; animation:fadeSlideUp .8s ease forwards; }

/* Gradient shimmer for tagline */
.gradient-text {
  background: linear-gradient(90deg,#06b6d4,#6366f1,#f43f5e);
  background-size:200% 200%;
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
  animation: gradientMove 6s ease infinite;
}
@keyframes gradientMove { 0%{background-position:0% 50%}50%{background-position:100% 50%}100%{background-position:0% 50%} }

/* CTA ripple effect */
.ripple { position:relative; overflow:hidden; }
.ripple::after {
  content:""; position:absolute; border-radius:50%;
  width:100%; height:100%; top:0; left:0;
  background:rgba(255,255,255,.3);
  transform:scale(0); opacity:0;
  transition:transform .4s,opacity .8s;
}
.ripple:active::after { transform:scale(2); opacity:1; }

/* Error state for invalid email */
input:invalid { box-shadow:0 0 6px rgba(244,63,94,.6); animation:shake .3s; }
@keyframes shake { 0%,100%{transform:translateX(0)}25%{transform:translateX(-4px)}75%{transform:translateX(4px)} }

/* Testimonial styling */
.testimonial { font-style:italic; color:#e0e7ff; margin-top:1rem; }

/* === Starfield Canvas === */
#background-stars {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* === Glow Orbs === */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.35;
  animation: floatOrb 16s ease-in-out infinite; /* faster */
  mix-blend-mode: screen; /* dynamic blending */
  z-index: 0;
}

.orb-1 { width: 180px; height: 180px; background: #06b6d4; top: 10%; left: 15%; }
.orb-2 { width: 140px; height: 140px; background: #f43f5e; bottom: 20%; right: 10%; }
.orb-3 { width: 120px; height: 120px; background: #6366f1; top: 50%; right: 30%; }

@keyframes floatOrb {
  0% { transform: translateY(0) scale(1) }
  50% { transform: translateY(-20px) scale(1.05) }
  100% { transform: translateY(0) scale(1) }
}

/* === Wave Overlay === */
.wave-layer {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 160px;
  z-index: 1;
  pointer-events: none;
}
.wave-layer svg { width: 100%; height: 100%; }


/* Coming Soon headline */
.coming-soon {
  font-size: 1.4rem;
  font-weight: 800;
  margin-top: 0.5rem;
  letter-spacing: 0.5px;
  position: relative;
  display: inline-block;

  /* Always visible base color */
  color: #facc15; /* golden yellow */

  /* Glow effect */
  text-shadow: 0 0 8px rgba(250, 204, 21, 0.7);

  /* Entrance + shimmer */
  animation: pulseGlow 2s ease-in-out infinite;
}

/* Optional shimmer sweep overlay */
.coming-soon.shimmer {
  background: linear-gradient(90deg, #facc15, #fff, #facc15);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: pulseGlow 2s ease-in-out infinite, shimmerText 6s linear infinite;
}

@keyframes shimmerText {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Sparkle burst on entrance */
.coming-soon::after {
  content: "✨";
  position: absolute;
  right: -1.2rem;
  top: -0.2rem;
  opacity: 0;
  transform: scale(0.5);
  animation: sparkleEntrance 1.8s ease-out forwards;
  animation-delay: 1s; /* sync with fade-slide entrance */
}

@keyframes sparkleEntrance {
  0% { opacity: 0; transform: scale(0.5) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.3) rotate(45deg); }
  100% { opacity: 0; transform: scale(0.5) rotate(90deg); }
}

/* Hover sparkle */
.coming-soon:hover::after {
  opacity: 1;
  transform: scale(1.2) rotate(20deg);
  transition: opacity 0.3s ease, transform 0.3s ease;
}