/* ============================================================
   WAITLIST HERO (VANILLA CSS ADAPTATION)
   ============================================================ */

.wl-hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  overflow: hidden;
  background-color: var(--niu-ink, #09090b);
  font-family: var(--font-body, system-ui, -apple-system, sans-serif);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
}

.wl-hero-bg-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  perspective: 1200px;
  transform: perspective(1200px) rotateX(15deg);
  transform-origin: center bottom;
  opacity: 1;
}

.wl-hero-img-wrap {
  position: absolute;
  inset: 0;
}

.wl-hero-img-inner {
  position: absolute;
  top: 50%;
  left: 50%;
}

.wl-hero-img-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.opacity-50 { opacity: 0.5; }
.opacity-60 { opacity: 0.6; }
.opacity-80 { opacity: 0.8; }

.wl-hero-gradient {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  background: linear-gradient(to top, var(--niu-ink, #09090b) 10%, rgba(9, 9, 11, 0.8) 40%, transparent 100%);
}

.wl-hero-content {
  position: relative;
  z-index: 20;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 6rem;
  gap: 1.5rem;
  padding-top: 30vh;
}

.wl-hero-icon {
  width: 4rem;
  height: 4rem;
  border-radius: 1rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  margin-bottom: 0.5rem;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1);
  background: #111;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wl-hero-title {
  font-size: clamp(3rem, 5vw, 4rem);
  font-weight: 700;
  color: #ffffff;
  text-align: center;
  letter-spacing: -0.025em;
  margin: 0;
  line-height: 1;
}

.wl-hero-subtitle {
  font-size: 1.125rem;
  font-weight: 500;
  color: #94a3b8;
  margin: 0;
  text-align: center;
}

/* Form Area */
.wl-hero-form-container {
  width: 100%;
  max-width: 28rem;
  padding: 0 1rem;
  margin-top: 1rem;
  height: 60px;
  position: relative;
  perspective: 1000px;
}

#wl-confetti-canvas {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  pointer-events: none;
  z-index: 50;
}

.wl-success-state {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background-color: var(--niu-orange, #f06000); /* Adapted from success to brand orange */
  transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  opacity: 0;
  transform: scale(0.95) rotateX(-90deg);
  pointer-events: none;
}

.wl-success-state.active {
  opacity: 1;
  transform: scale(1) rotateX(0deg);
  pointer-events: auto;
  animation: success-pulse 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards,
             success-glow 2s ease-in-out infinite;
}

.wl-celebration-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  border-radius: 9999px;
  border: 2px solid rgba(255,255,255,0.6);
  transform: translate(-50%, -50%) scale(0.8);
  opacity: 0;
}

.wl-success-state.active .wl-celebration-ring {
  animation: celebration-ring 0.8s ease-out forwards;
}

.wl-success-content {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: white;
  font-weight: 600;
  font-size: 1.125rem;
}

.wl-success-state.active .wl-success-content {
  animation: bounce-in 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.wl-success-icon {
  background: rgba(255,255,255,0.2);
  padding: 0.25rem;
  border-radius: 9999px;
  display: flex;
}

.wl-success-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.wl-success-state.active .wl-success-icon path {
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
  animation: checkmark-draw 0.4s ease-out 0.3s forwards;
}

.wl-form-state {
  position: relative;
  width: 100%;
  height: 100%;
  transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  opacity: 1;
  transform: scale(1) rotateX(0deg);
}

.wl-form-state.hidden-state {
  opacity: 0;
  transform: scale(0.95) rotateX(90deg);
  pointer-events: none;
}

#wl-email-input {
  width: 100%;
  height: 60px;
  padding-left: 1.5rem;
  padding-right: 150px;
  border-radius: 9999px;
  outline: none;
  background-color: #27272a;
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  transition: all 0.2s;
  border: none;
}

#wl-email-input::placeholder {
  color: #71717a;
}

#wl-email-input:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.wl-btn-wrap {
  position: absolute;
  top: 6px;
  right: 6px;
  bottom: 6px;
}

#wl-submit-btn {
  height: 100%;
  padding: 0 1.5rem;
  border-radius: 9999px;
  font-weight: 500;
  color: white;
  background-color: var(--niu-orange, #f06000);
  transition: all 0.2s;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 130px;
}

#wl-submit-btn:hover {
  filter: brightness(1.1);
}

#wl-submit-btn:active {
  transform: scale(0.95);
}

#wl-submit-btn:disabled {
  filter: brightness(1);
  transform: scale(1);
  cursor: wait;
}

.wl-spinner {
  height: 1.25rem;
  width: 1.25rem;
  color: white;
  animation: spin 1s linear infinite;
}

.wl-spinner.hidden {
  display: none;
}

/* Animations */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.animate-spin-slow { animation: spin-slow 60s linear infinite; }

@keyframes spin-slow-reverse {
  from { transform: rotate(0deg); }
  to { transform: rotate(-360deg); }
}
.animate-spin-slow-reverse { animation: spin-slow-reverse 60s linear infinite; }

@keyframes bounce-in {
  0% { transform: scale(0.8); opacity: 0; }
  50% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes success-pulse {
  0% { transform: scale(0.5); opacity: 0; }
  50% { transform: scale(1.1); }
  70% { transform: scale(0.95); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes success-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(240, 96, 0, 0.4); }
  50% { box-shadow: 0 0 60px rgba(240, 96, 0, 0.8), 0 0 100px rgba(240, 96, 0, 0.4); }
}

@keyframes checkmark-draw {
  0% { stroke-dashoffset: 24; }
  100% { stroke-dashoffset: 0; }
}

@keyframes celebration-ring {
  0% { transform: translate(-50%, -50%) scale(0.8); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(2); opacity: 0; }
}
