/* =============================================================================
   STAGEHQ PREMIUM LANDING PAGE STYLES
   Premium visual upgrades for reduced friction and better conversions
   ============================================================================= */

/* -----------------------------------------------------------------------------
   PREMIUM DESIGN TOKENS
   ----------------------------------------------------------------------------- */
:root {
  /* Premium Typography Scale */
  --text-hero: clamp(2.25rem, 5vw, 3.5rem);
  --text-hero-sub: clamp(1.1rem, 2vw, 1.35rem);
  --text-section: clamp(1.75rem, 3vw, 2.25rem);
  --text-card-title: clamp(1.1rem, 1.5vw, 1.25rem);
  --text-body-lg: 1.125rem;
  --text-body: 1rem;
  --text-small: 0.875rem;
  --text-micro: 0.75rem;

  /* Premium Spacing */
  --space-section: clamp(60px, 8vw, 100px);
  --space-block: clamp(32px, 4vw, 48px);
  --space-element: clamp(16px, 2vw, 24px);

  /* Premium Shadows (with fallbacks) */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.02);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.08), 0 4px 8px rgba(0,0,0,0.04);
  --shadow-xl: 0 16px 48px rgba(0,0,0,0.10), 0 8px 16px rgba(0,0,0,0.06);

  /* Premium Colors (fallbacks for if app.css doesn't load) */
  --premium-accent: #d36b48;
  --premium-accent-dark: #c45a38;
  --premium-accent-darker: #b34a28;
  --premium-star-color: #f59e0b;
  --premium-bg-light: #fdf8f5;
  --premium-bg-alt: #fdf6f0;
  --premium-bg-alt-end: #fff9f5;

  /* Premium Gradients */
  --gradient-hero-bg: linear-gradient(180deg, var(--color-body, #fffefc) 0%, var(--premium-bg-light) 100%);
  --gradient-section-alt: linear-gradient(180deg, var(--premium-bg-alt) 0%, var(--premium-bg-alt-end) 100%);
  --gradient-cta: linear-gradient(135deg, var(--premium-accent) 0%, var(--premium-accent-dark) 100%);
  --gradient-cta-hover: linear-gradient(135deg, var(--premium-accent-dark) 0%, var(--premium-accent-darker) 100%);

  /* Animation Timing */
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;

  /* Content widths (consistent) */
  --content-narrow: 600px;
  --content-medium: 720px;
  --content-wide: 800px;
  --content-max: 900px;
}

/* Dark mode premium tokens */
body.dark-mode {
  --premium-bg-light: #1a1520;
  --premium-bg-alt: #181512;
  --premium-bg-alt-end: #1f1a16;
  --gradient-hero-bg: linear-gradient(180deg, var(--color-body, #110f19) 0%, var(--premium-bg-light) 100%);
  --gradient-section-alt: linear-gradient(180deg, var(--premium-bg-alt) 0%, var(--premium-bg-alt-end) 100%);
  --gradient-cta: linear-gradient(135deg, #9d5a3d 0%, #8a4a2d 100%);
  --gradient-cta-hover: linear-gradient(135deg, #b06a4d 0%, #9d5a3d 100%);
  --shadow-xs: none;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.4);
  --shadow-xl: 0 16px 48px rgba(0,0,0,0.5);
}

/* -----------------------------------------------------------------------------
   PREMIUM HERO SECTION
   ----------------------------------------------------------------------------- */
.premium-hero {
  background: var(--gradient-hero-bg);
  padding: var(--space-section) 0;
  position: relative;
  overflow: hidden;
}

.premium-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(circle at 20% 50%, rgba(211, 107, 72, 0.03) 0%, transparent 50%),
                    radial-gradient(circle at 80% 50%, rgba(211, 107, 72, 0.02) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  max-width: var(--content-medium);
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}

/* Trust Badge */
.hero-trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(211, 107, 72, 0.08);
  border: 1px solid rgba(211, 107, 72, 0.15);
  border-radius: 50px;
  padding: 8px 16px;
  font-size: var(--text-small);
  font-weight: 500;
  color: var(--color-accent, var(--premium-accent));
  margin-bottom: var(--space-element);
  animation: fadeInDown 0.6s var(--ease-smooth);
}

.hero-trust-badge svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex-shrink: 0;
}

/* Hero Headline */
.hero-headline {
  font-size: var(--text-hero);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-element) 0;
  color: var(--color-900, #171717);
  animation: fadeInUp 0.6s var(--ease-smooth);
}

.hero-headline .accent {
  color: var(--color-accent, var(--premium-accent));
  display: block;
}

/* Hero Subheadline */
.hero-subheadline {
  font-size: var(--text-hero-sub);
  line-height: 1.6;
  color: var(--color-700, #404040);
  margin: 0 0 var(--space-block) 0;
  animation: fadeInUp 0.6s var(--ease-smooth) 0.1s both;
}

.hero-subheadline strong {
  color: var(--color-900, #171717);
  font-weight: 600;
}

/* Hero CTA Group */
.hero-cta-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: var(--space-block);
  animation: fadeInUp 0.6s var(--ease-smooth) 0.2s both;
}

.hero-cta-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Primary CTA Button */
.btn-premium-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gradient-cta);
  color: #fff !important;
  font-size: 1.05rem;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-smooth);
  box-shadow: var(--shadow-md), 0 0 0 0 rgba(211, 107, 72, 0);
  text-decoration: none;
}

.btn-premium-primary:hover {
  background: var(--gradient-cta-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), 0 0 0 4px rgba(211, 107, 72, 0.15);
  color: #fff !important;
}

.btn-premium-primary:focus-visible {
  outline: 2px solid var(--color-accent, var(--premium-accent));
  outline-offset: 2px;
  box-shadow: var(--shadow-lg), 0 0 0 4px rgba(211, 107, 72, 0.25);
}

.btn-premium-primary:active {
  transform: translateY(0);
}

.btn-premium-primary i {
  transition: transform var(--duration-fast) var(--ease-smooth);
}

.btn-premium-primary:hover i {
  transform: translateX(3px);
}

/* Secondary CTA Button */
.btn-premium-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--color-700, #404040) !important;
  font-size: 1rem;
  font-weight: 500;
  padding: 14px 24px;
  border-radius: 12px;
  border: 1px solid var(--color-200, #d4d4d4);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-smooth);
  text-decoration: none;
}

.btn-premium-secondary:hover {
  background: var(--color-100, #f5f5f5);
  border-color: var(--color-400, #737373);
  color: var(--color-900, #171717) !important;
}

.btn-premium-secondary:focus-visible {
  outline: 2px solid var(--color-accent, var(--premium-accent));
  outline-offset: 2px;
}

/* CTA Micro-copy */
.hero-cta-micro {
  font-size: var(--text-small);
  color: var(--color-500, #525252);
  margin: 0;
}

.hero-cta-micro span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Hero Rating */
.hero-rating {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: var(--text-small);
  color: var(--color-600, #525252);
  animation: fadeInUp 0.6s var(--ease-smooth) 0.3s both;
}

.hero-rating-stars {
  color: var(--premium-star-color);
  letter-spacing: -1px;
}

/* Hero Visual */
.hero-visual {
  margin-top: var(--space-block);
  animation: fadeInUp 0.8s var(--ease-smooth) 0.4s both;
}

.hero-visual .juxtapose-wrapper {
  max-width: var(--content-max);
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

/* -----------------------------------------------------------------------------
   SOCIAL PROOF BAR
   ----------------------------------------------------------------------------- */
.social-proof-bar {
  background: var(--color-white, #fff);
  border-top: 1px solid var(--color-150, #e4e4e4);
  border-bottom: 1px solid var(--color-150, #e4e4e4);
  padding: 24px 0;
}

.social-proof-stats {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 48px;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
}

.stat-value {
  display: block;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--color-accent, var(--premium-accent));
  line-height: 1.2;
}

.stat-label {
  font-size: var(--text-small);
  color: var(--color-500, #525252);
  font-weight: 500;
}

@media (max-width: 768px) {
  .social-proof-stats {
    gap: 24px;
  }
  .stat-item {
    flex: 1 1 40%;
  }
}

/* -----------------------------------------------------------------------------
   PREMIUM SECTION STYLING
   ----------------------------------------------------------------------------- */
.premium-section {
  padding: var(--space-section) 0;
}

.premium-section-alt {
  background: var(--gradient-section-alt);
}

.section-header {
  text-align: center;
  max-width: var(--content-medium);
  margin: 0 auto var(--space-block) auto;
}

.section-header h2 {
  font-size: var(--text-section);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--color-900, #171717);
  margin-bottom: 12px;
}

.section-header p {
  font-size: var(--text-body-lg);
  color: var(--color-600, #525252);
  line-height: 1.6;
  margin: 0;
}

/* -----------------------------------------------------------------------------
   PREMIUM CARDS
   ----------------------------------------------------------------------------- */
.premium-card {
  background: var(--color-white, #fff);
  border-radius: 16px;
  padding: 28px;
  border: 1px solid var(--color-150, #e4e4e4);
  box-shadow: var(--shadow-sm);
  transition: all var(--duration-normal) var(--ease-smooth);
}

.premium-card:hover {
  border-color: var(--color-200, #d4d4d4);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* Card as link */
.premium-card-link {
  text-decoration: none;
  display: block;
}

.premium-card-link:focus-visible {
  outline: 2px solid var(--color-accent, var(--premium-accent));
  outline-offset: 2px;
}

.premium-card-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(211, 107, 72, 0.1);
  border-radius: 12px;
  margin-bottom: 16px;
  font-size: 1.5rem;
}

.premium-card h3 {
  font-size: var(--text-card-title);
  font-weight: 600;
  color: var(--color-900, #171717);
  margin: 0 0 8px 0;
}

.premium-card p {
  font-size: var(--text-body);
  color: var(--color-600, #525252);
  line-height: 1.6;
  margin: 0;
}

/* Step Cards with Numbers */
.step-card-premium {
  position: relative;
  padding-top: 36px;
}

.step-number-badge {
  position: absolute;
  top: 0;
  left: 28px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-cta);
  color: #fff;
  font-size: var(--text-small);
  font-weight: 700;
  border-radius: 50%;
  transform: translateY(-50%);
}

/* Premium Grid */
.premium-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.premium-grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

/* -----------------------------------------------------------------------------
   BEFORE/AFTER GALLERY
   ----------------------------------------------------------------------------- */
.gallery-item {
  margin-bottom: var(--space-block);
}

.gallery-item:last-child {
  margin-bottom: 0;
}

.gallery-item .juxtapose-wrapper {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  max-width: var(--content-max);
  margin: 0 auto;
}

.gallery-caption {
  text-align: center;
  font-size: var(--text-body);
  color: var(--color-500, #525252);
  margin-top: 16px;
  font-style: italic;
}

/* -----------------------------------------------------------------------------
   TESTIMONIALS PREMIUM
   ----------------------------------------------------------------------------- */
.testimonials-premium {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.testimonial-premium {
  background: var(--color-white, #fff);
  border-radius: 16px;
  padding: 28px;
  border: 1px solid var(--color-150, #e4e4e4);
  box-shadow: var(--shadow-sm);
}

.testimonial-premium-content {
  margin-bottom: 20px;
}

.testimonial-premium-text {
  font-size: var(--text-body-lg);
  line-height: 1.7;
  color: var(--color-700, #404040);
  margin: 0;
  font-style: italic;
}

.testimonial-premium-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.testimonial-premium-author img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.testimonial-author-info {
  display: flex;
  flex-direction: column;
}

.testimonial-author-name {
  font-weight: 600;
  color: var(--color-900, #171717);
  font-size: var(--text-body);
}

.testimonial-author-role {
  font-size: var(--text-small);
  color: var(--color-500, #525252);
}

/* -----------------------------------------------------------------------------
   FAQ PREMIUM
   ----------------------------------------------------------------------------- */
.faq-premium {
  max-width: var(--content-wide);
  margin: 0 auto;
}

.faq-item-premium {
  border-bottom: 1px solid var(--color-150, #e4e4e4);
}

.faq-item-premium:last-child {
  border-bottom: none;
}

.faq-question-premium {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 20px 0;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  font-size: var(--text-body-lg);
  font-weight: 600;
  color: var(--color-900, #171717);
  transition: color var(--duration-fast) var(--ease-smooth);
  font-family: inherit;
}

.faq-question-premium:hover {
  color: var(--color-accent, var(--premium-accent));
}

.faq-question-premium:focus-visible {
  outline: 2px solid var(--color-accent, var(--premium-accent));
  outline-offset: 2px;
}

.faq-question-premium .faq-icon {
  font-size: 1.25rem;
  color: var(--color-400, #737373);
  transition: transform var(--duration-normal) var(--ease-smooth);
  flex-shrink: 0;
  margin-left: 16px;
}

.faq-item-premium.open .faq-question-premium .faq-icon {
  transform: rotate(180deg);
}

.faq-answer-premium {
  display: none;
  padding-bottom: 20px;
  font-size: var(--text-body);
  line-height: 1.7;
  color: var(--color-600, #525252);
}

.faq-item-premium.open .faq-answer-premium {
  display: block;
}

/* -----------------------------------------------------------------------------
   FINAL CTA SECTION
   ----------------------------------------------------------------------------- */
.final-cta-section {
  background: var(--gradient-section-alt);
  padding: var(--space-section) 0;
  text-align: center;
}

.final-cta-content {
  max-width: var(--content-narrow);
  margin: 0 auto;
}

.final-cta-content h2 {
  font-size: var(--text-section);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--color-900, #171717);
  margin-bottom: 16px;
}

.final-cta-content p {
  font-size: var(--text-body-lg);
  color: var(--color-600, #525252);
  margin-bottom: var(--space-element);
}

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

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scroll-triggered animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s var(--ease-smooth), transform 0.6s var(--ease-smooth);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-on-scroll.delay-1 { transition-delay: 0.1s; }
.animate-on-scroll.delay-2 { transition-delay: 0.2s; }
.animate-on-scroll.delay-3 { transition-delay: 0.3s; }
.animate-on-scroll.delay-4 { transition-delay: 0.4s; }

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .animate-on-scroll {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-trust-badge,
  .hero-headline,
  .hero-subheadline,
  .hero-cta-group,
  .hero-rating,
  .hero-visual {
    animation: none;
  }

  .btn-premium-primary:hover,
  .btn-premium-secondary:hover,
  .premium-card:hover {
    transform: none;
  }
}

/* -----------------------------------------------------------------------------
   RESPONSIVE ADJUSTMENTS
   ----------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .hero-headline {
    font-size: clamp(1.75rem, 6vw, 2.5rem);
  }

  .hero-cta-buttons {
    flex-direction: column;
    width: 100%;
    max-width: 320px;
  }

  .btn-premium-primary,
  .btn-premium-secondary {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 600px) {
  .premium-hero {
    padding: 40px 0;
  }

  .section-header h2 {
    font-size: clamp(1.5rem, 5vw, 1.75rem);
  }

  .premium-card {
    padding: 20px;
  }

  .social-proof-stats {
    gap: 16px;
  }

  .stat-value {
    font-size: 1.25rem;
  }

  .faq-question-premium {
    font-size: var(--text-body);
  }
}

/* -----------------------------------------------------------------------------
   UTILITY CLASSES
   ----------------------------------------------------------------------------- */
.text-center { text-align: center; }
.text-accent { color: var(--color-accent, var(--premium-accent)); }
.text-muted { color: var(--color-500, #525252); }
.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: 8px; }
.mb-md { margin-bottom: 16px; }
.mb-lg { margin-bottom: 32px; }
