/* ========================================
   Launch Screen Styles
   Standalone dark-themed launch/splash screen
   ======================================== */

/* ========================================
   Launch Screen Layout
   ======================================== */
.launch-screen {
  /* Colors - Dark Theme */
  --launch-bg-page: #0a0f1a;
  --launch-bg-card: #151c2c;
  --launch-bg-elevated: #1e293b;
  --launch-primary: #10b981;
  --launch-primary-hover: #059669;
  --launch-text-primary: #f8fafc;
  --launch-text-secondary: #94a3b8;
  --launch-text-tertiary: #64748b;

  /* Typography */
  --launch-text-sm: 0.875rem;
  --launch-text-base: 1rem;
  --launch-text-lg: 1.125rem;
  --launch-text-xl: 1.25rem;
  --launch-text-2xl: 1.5rem;
  --launch-text-3xl: 1.875rem;
  --launch-text-4xl: 2.25rem;
  --launch-text-5xl: 3rem;
  --launch-weight-normal: 400;
  --launch-weight-medium: 500;
  --launch-weight-semibold: 600;
  --launch-weight-bold: 700;
  --launch-leading-tight: 1.25;
  --launch-leading-normal: 1.5;
  --launch-leading-relaxed: 1.625;

  /* Spacing */
  --launch-space-1: 0.25rem;
  --launch-space-2: 0.5rem;
  --launch-space-3: 0.75rem;
  --launch-space-4: 1rem;
  --launch-space-5: 1.25rem;
  --launch-space-6: 1.5rem;
  --launch-space-8: 2rem;
  --launch-space-10: 2.5rem;
  --launch-space-12: 3rem;
  --launch-space-16: 4rem;
  --launch-space-20: 5rem;

  /* Transitions */
  --launch-transition-base: 150ms ease;
  --launch-transition-slow: 300ms ease;

  /* Border radius */
  --launch-radius-md: 0.5rem;
  --launch-radius-lg: 0.75rem;
  --launch-radius-xl: 1rem;
  --launch-radius-full: 9999px;

  /* Layout - Overlay mode */
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--launch-space-6);
  padding-top: var(--launch-space-10);
  padding-bottom: var(--launch-space-10);
  overflow-x: hidden;
  background: rgb(10 15 26 / 95%);
  backdrop-filter: blur(12px);
  font-family: var(--font-sans);
  font-size: var(--launch-text-base);
  line-height: var(--launch-leading-normal);
  color: var(--launch-text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  /* Animation */
  opacity: 1;
  transition: opacity var(--launch-transition-slow);
}

/* Hidden state for dismissing */
.launch-screen.is-hidden {
  opacity: 0;
  pointer-events: none;
}

/* Hide feedback button when launch overlay is active */
body.launch-overlay-active .feedback-sticky {
  display: none !important;
}

/* Decorative gradient orb */
.launch-screen::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(
    circle,
    rgb(16 185 129 / 15%) 0%,
    rgb(16 185 129 / 5%) 40%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
}

.launch-content {
  position: relative;
  z-index: 1;
  max-width: 480px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--launch-space-6);

  /* Fade-in animation */
  animation: launch-fade-up 600ms ease-out forwards;
}

@keyframes launch-fade-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

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

/* ========================================
   Typography
   ======================================== */
.launch-eyebrow {
  font-size: var(--launch-text-sm);
  font-weight: var(--launch-weight-medium);
  color: var(--launch-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0;
}

.launch-title {
  font-size: var(--launch-text-3xl);
  font-weight: var(--launch-weight-bold);
  line-height: var(--launch-leading-tight);
  color: var(--launch-text-primary);
  max-width: 400px;
  margin: 0;
}

.launch-body {
  font-size: var(--launch-text-base);
  line-height: var(--launch-leading-relaxed);
  color: var(--launch-text-secondary);
  max-width: 380px;
}

.launch-body p {
  margin: 0 0 var(--launch-space-4);
}

.launch-body p:last-child {
  margin-bottom: 0;
}

.launch-highlight {
  display: block;
  color: var(--launch-text-primary);
  font-weight: var(--launch-weight-medium);
  font-style: italic;
  background: var(--launch-bg-elevated);
  padding: var(--launch-space-4) var(--launch-space-5);
  border-radius: var(--launch-radius-lg);
  margin-top: var(--launch-space-2);
}

.launch-location {
  display: inline-flex;
  align-items: center;
  gap: var(--launch-space-2);
  font-size: var(--launch-text-lg);
  font-weight: var(--launch-weight-semibold);
  color: #fff;
  margin-top: var(--launch-space-2);
}

/* ========================================
   Decorative Card (Visual Interest)
   ======================================== */
.launch-visual {
  position: relative;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 16 / 10;
  background: linear-gradient(
    145deg,
    var(--launch-bg-card) 0%,
    var(--launch-bg-elevated) 100%
  );
  border-radius: var(--launch-radius-xl);
  display: flex;
  align-items: flex-end;
  padding: var(--launch-space-5);
  overflow: hidden;
  box-shadow:
    0 25px 50px -12px rgb(0 0 0 / 50%),
    0 0 0 1px rgb(255 255 255 / 5%);
}

.launch-visual::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle,
    rgb(16 185 129 / 10%) 0%,
    transparent 60%
  );
  pointer-events: none;
}

.visual-brand {
  font-size: var(--launch-text-lg);
  font-weight: var(--launch-weight-bold);
  color: var(--launch-text-primary);
  letter-spacing: -0.02em;
}

.visual-icon {
  position: absolute;
  bottom: var(--launch-space-5);
  right: var(--launch-space-5);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.visual-icon svg {
  width: 100%;
  height: 100%;
}

/* ========================================
   CTA Button
   ======================================== */
.launch-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--launch-space-2);
  width: auto;
  padding: var(--launch-space-3) var(--launch-space-6);
  font-size: var(--launch-text-lg);
  font-weight: var(--launch-weight-semibold);
  color: var(--launch-bg-page);
  background: white;
  border: none;
  border-radius: var(--launch-radius-lg);
  cursor: pointer;
  text-decoration: none;
  min-height: 44px;

  /* iOS Safari touch fixes */
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
}

/* Only apply hover effects on devices with fine pointer (mouse) - not touch */
@media (pointer: fine) {
  .launch-cta {
    transition:
      background var(--launch-transition-base),
      transform var(--launch-transition-base);
  }

  .launch-cta:hover {
    background: rgb(255 255 255 / 90%);
  }

  .launch-cta:hover svg {
    transform: translateX(4px);
  }
}

.launch-cta:active {
  transform: scale(0.98);
}

.launch-cta svg {
  width: 20px;
  height: 20px;
  transition: transform var(--launch-transition-base);
}

/* ========================================
   Desktop Enhancements (640px+)
   ======================================== */
@media (width >= 640px) {
  .launch-screen {
    padding: var(--launch-space-10);
  }

  .launch-content {
    max-width: 560px;
    gap: var(--launch-space-10);
  }

  .launch-title {
    font-size: var(--launch-text-5xl);
    max-width: 520px;
  }

  .launch-body {
    font-size: var(--launch-text-lg);
    max-width: 440px;
  }

  .launch-visual {
    max-width: 380px;
  }

  .launch-cta {
    padding: var(--launch-space-4) var(--launch-space-8);
    font-size: var(--launch-text-base);
  }
}

/* ========================================
   Large Desktop (1024px+)
   ======================================== */
@media (width >= 1024px) {
  .launch-screen::before {
    width: 800px;
    height: 800px;
  }

  .launch-content {
    max-width: 640px;
  }

  .launch-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
  }
}

/* ========================================
   Personalization Flow
   Multi-step onboarding flow for first-time visitors
   ======================================== */

/* Flow container - holds all steps */
.launch-flow {
  position: relative;
  width: 100%;
  max-width: 480px;
  min-height: 400px;
}

/* Each step slides in/out */
.launch-step {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--launch-space-6);
  opacity: 0;
  transform: translateX(30px);
  pointer-events: none;
  transition:
    opacity 300ms ease,
    transform 300ms ease;
}

.launch-step.is-active {
  position: relative;
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.launch-step.is-exiting {
  transform: translateX(-30px);
}

/* Progress indicator */
.launch-progress {
  display: flex;
  gap: var(--launch-space-2);
  margin-bottom: var(--launch-space-4);
}

.progress-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--launch-text-tertiary);
  transition: background 200ms ease;
}

.progress-dot.is-active,
.progress-dot.is-completed {
  background: var(--launch-primary);
}

/* Step title - smaller than main launch title */
.step-title {
  font-size: var(--launch-text-2xl);
  font-weight: var(--launch-weight-bold);
  line-height: var(--launch-leading-tight);
  color: var(--launch-text-primary);
  margin: 0;
}

/* Option cards grid */
.options-grid {
  display: grid;
  gap: var(--launch-space-3);
  width: 100%;
}

/* Single-column for level selection */
.options-grid--levels {
  grid-template-columns: 1fr;
  max-width: 320px;
}

/* Single-column for event types */
.options-grid--types {
  grid-template-columns: 1fr;
  max-width: 320px;
}

/* Two-column for availability */
.options-grid--times {
  grid-template-columns: repeat(2, 1fr);
  max-width: 360px;
}

/* Option card button */
.option-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--launch-space-2);
  padding: var(--launch-space-4) var(--launch-space-5);
  min-height: 72px;
  background: var(--launch-bg-card);
  border: 2px solid transparent;
  border-radius: var(--launch-radius-lg);
  color: var(--launch-text-primary);
  font-size: var(--launch-text-base);
  font-weight: var(--launch-weight-medium);
  cursor: pointer;
  transition:
    border-color 150ms ease,
    background 150ms ease,
    transform 150ms ease;

  /* iOS Safari touch fixes */
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.option-card:hover {
  background: var(--launch-bg-elevated);
}

.option-card:active {
  transform: scale(0.98);
}

.option-card.is-selected {
  border-color: var(--launch-primary);
  background: rgb(16 185 129 / 10%);
}

.option-card__label {
  font-weight: var(--launch-weight-semibold);
}

.option-card__hint {
  font-size: var(--launch-text-sm);
  color: var(--launch-text-secondary);
}

/* CTA group (primary + secondary buttons) */
.cta-group {
  display: flex;
  flex-direction: column;
  gap: var(--launch-space-3);
  width: 100%;
  max-width: 320px;
}

/* Secondary CTA (outlined) */
.launch-cta--secondary {
  background: transparent;
  color: var(--launch-text-primary);
  border: 2px solid var(--launch-text-tertiary);
}

.launch-cta--secondary:hover {
  border-color: var(--launch-text-secondary);
  background: rgb(255 255 255 / 5%);
}

/* Skip link */
.skip-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--launch-space-1);
  padding: var(--launch-space-2) var(--launch-space-4);
  font-size: var(--launch-text-sm);
  color: var(--launch-text-tertiary);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: color 150ms ease;
  width: 100%;
  text-align: center;
}

.skip-link:hover {
  color: var(--launch-text-secondary);
}

/* Continue button - appears after selection */
.continue-btn {
  margin-top: var(--launch-space-4);
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 200ms ease,
    transform 200ms ease;
  pointer-events: none;
}

.continue-btn.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Multi-select hint */
.selection-hint {
  font-size: var(--launch-text-sm);
  color: var(--launch-text-tertiary);
  margin-top: var(--launch-space-2);
}

/* Personalization flow responsive adjustments */
@media (width >= 640px) {
  .launch-flow {
    max-width: 560px;
  }

  .step-title {
    font-size: var(--launch-text-3xl);
  }

  .options-grid--levels {
    max-width: 380px;
  }

  .options-grid--types,
  .options-grid--times {
    max-width: 420px;
  }

  .option-card {
    padding: var(--launch-space-5) var(--launch-space-6);
    min-height: 80px;
  }
}
