/**
 * Mobile Hero Styles
 * Natural flow layout without pinning
 * Only loaded on mobile devices (< 768px)
 */

/* ===== Mobile Hero - Minimal Overrides ===== */
/* Only change what's needed, don't break desktop scroll animations */

@media (max-width: 767px) {
  /* Ensure body background is correct on mobile */
  body {
    background: var(--bg-primary) !important;
  }

  /* Hero container should blend with body */
  .hero-container {
    background: transparent !important;
  }

  /* Add dark overlay to hero image for better text readability */
  .image-frame {
    --overlay-opacity: 1;
  }

  .image-frame::after {
    content: '' !important;
    position: absolute !important;
    inset: 0 !important;
    background: linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.3) 0%,
      rgba(0, 0, 0, 0.5) 100%
    ) !important;
    z-index: 2 !important;
    pointer-events: none !important;
    opacity: var(--overlay-opacity, 1) !important;
    will-change: opacity !important;
    transition: none !important;
  }

  /* Ensure hero content is above overlay */
  .hero-content-overlay {
    position: relative !important;
    z-index: 10 !important;
  }
}


/* ===== Hero Content Overlay ===== */
@media (max-width: 767px) {
  .hero-content-overlay {
    /* Flexbox to reorder children */
    display: flex !important;
    flex-direction: column !important;
  }

  .hero-content-overlay h1,
  .hero-container .hero-content-overlay h1 {
    color: var(--pure-white) !important;
    font-size: clamp(3.25rem, 10vw, 4rem) !important;
    font-weight: 700 !important;
    line-height: 1.05 !important;
    margin-top: 3rem !important;
    margin-bottom: var(--space-lg) !important;
    text-shadow: none !important;
    letter-spacing: -0.02em !important;
    order: 1 !important;
  }

  .hero-content-overlay > p {
    color: rgba(255, 255, 255, 0.95) !important;
    font-size: clamp(1rem, 4vw, 1.125rem) !important;
    line-height: 1.6 !important;
    margin-bottom: var(--space-xl) !important;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    order: 2 !important;
  }
}


/* ===== Proof Text (below subtitle, above buttons) ===== */
@media (max-width: 767px) {
  .hero-proof-inline {
    font-size: 14px !important;
    color: rgba(255, 255, 255, 0.85) !important;
    margin-bottom: var(--space-3xl) !important;
    margin-top: 0 !important;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    order: 3 !important; /* h1=1, p=2, proof=3, buttons=4 */
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 0.5rem !important;
  }

  .hero-proof-inline .separator {
    opacity: 0.5;
  }
}

/* ===== CTA Buttons (appear after proof) ===== */
@media (max-width: 767px) {
  .hero-ctas-inline {
    display: flex !important;
    flex-direction: column !important;
    gap: var(--space-md) !important;
    width: 100% !important;
    margin: 0 auto !important;
    order: 4 !important; /* After proof text */
  }

  .hero-ctas-inline .btn {
    width: 100% !important;
    min-height: 56px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    justify-content: center !important;
    padding: 16px 24px !important;
    /* Sharp top corners, rounded bottom */
    border-radius: 0 0 8px 8px !important;
    box-shadow: none !important;
  }

  .hero-ctas-inline .btn-primary {
    background: var(--signal-orange) !important;
    color: var(--pure-white) !important;
    border: none !important;
  }

  .hero-ctas-inline .btn-secondary {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    color: var(--pure-white) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.4) !important;
  }
}

/* ===== Scroll Indicator ===== */
.hero-scroll-indicator {
  position: absolute;
  bottom: var(--space-xl);
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);

  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  font-weight: 500;

  /* Subtle animation */
  animation: bounce 2s ease-in-out infinite;
}

.scroll-icon {
  width: 24px;
  height: 36px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  position: relative;
}

.scroll-icon::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 2px;
  animation: scrollDot 1.5s ease-in-out infinite;
}

/* ===== Animations ===== */
@keyframes bounce {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-8px);
  }
}

@keyframes scrollDot {
  0% {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
  100% {
    transform: translateX(-50%) translateY(16px);
    opacity: 0;
  }
}

/* ===== Safe Area Support (iOS) ===== */
@supports (padding: max(0px)) {
  .hero-content-overlay {
    padding-left: max(var(--space-lg), env(safe-area-inset-left));
    padding-right: max(var(--space-lg), env(safe-area-inset-right));
    padding-bottom: max(var(--space-xl), env(safe-area-inset-bottom));
  }

  .hero-scroll-indicator {
    bottom: max(var(--space-xl), calc(env(safe-area-inset-bottom) + var(--space-md)));
  }
}

/* ===== Landscape Orientation ===== */
@media (max-height: 500px) and (orientation: landscape) {
  .hero-container {
    min-height: 100vh;
  }

  .hero-content-overlay {
    padding-top: var(--space-lg);
    padding-bottom: var(--space-lg);
  }

  .hero-headline {
    font-size: clamp(1.5rem, 6vw, 2rem);
    margin-bottom: var(--space-sm);
  }

  .hero-subheadline {
    font-size: clamp(0.9375rem, 3vw, 1rem);
    margin-bottom: var(--space-lg);
  }

  .hero-cta-group {
    flex-direction: row;
    max-width: 100%;
  }

  .hero-scroll-indicator {
    display: none;
  }
}

/* ===== Small Devices (iPhone SE) ===== */
@media (max-width: 374px) {
  .hero-headline {
    font-size: 1.75rem;
  }

  .hero-subheadline {
    font-size: 0.9375rem;
    margin-bottom: var(--space-lg);
  }
}

/* ===== Products Section Headline - Mobile ===== */
@media (max-width: 767px) {
  .products-headline {
    font-size: clamp(1.875rem, 7vw, 2.25rem) !important;
    line-height: 1.25 !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    display: block !important;
  }

  .products-headline .headline-line {
    display: block !important;
  }

  .products-eyebrow {
    font-size: 12px !important;
    letter-spacing: 0.08em !important;
  }
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
  .hero-content-overlay {
    transition: none;
  }

  .hero-scroll-indicator,
  .scroll-icon::before {
    animation: none;
  }
}

/* ===== Dark Theme Adjustments ===== */
:root[data-theme="dark"] .hero-container {
  background: #000000;
}

:root[data-theme="dark"] .video-viewport video {
  opacity: 0.3;
}
