/* ============================================
   HERO — Apple-Grade Minimalist Studio Stage
   ============================================ */

.storefront-layout {
  padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(4rem, 8vw, 6.5rem);
}

.hero {
  max-width: 980px;
  margin: 0 auto;
  padding: clamp(2.5rem, 5vw, 4rem) var(--sp-5) clamp(5rem, 9vw, 7.5rem);
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: var(--sp-10);
  align-items: center;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
  max-width: 30rem;
}

/* Apple-style restrained typography */
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.2vw, 3.1rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: var(--text-primary);
  margin-bottom: 0;
  text-wrap: balance;
  opacity: 0;
  animation: heroTextReveal 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.12s forwards;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  opacity: 0;
  animation: heroTextReveal 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.22s forwards;
}

/* Single unified Apple-grade CTA */
.hero-store-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 20px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  border-radius: 999px;
  color: var(--text-primary);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all var(--transition-fast);
}

.hero-store-btn img {
  width: 15px;
  height: 15px;
}

.hero-store-btn:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-strong);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
}

.hero-browse-link {
  color: var(--text-secondary);
  font-size: var(--text-xs);
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color var(--transition-fast);
}

.hero-browse-link:hover {
  color: var(--text-primary);
}

.hero-browse-link:hover .btn-icon-arrow {
  transform: translateY(2px);
}

/* Phone Stage Container */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  min-height: 440px;
}

/* Soft ambient lighting */
.hero-visual::before {
  content: '';
  position: absolute;
  width: 240px;
  height: 380px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  filter: blur(40px);
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  animation: heroAuraFade 0.8s var(--ease-out) 0.15s forwards;
}

[data-theme="light"] .hero-visual::before {
  background: radial-gradient(circle, rgba(0, 104, 67, 0.1) 0%, transparent 72%);
}

.hero-visual.hero-carousel {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 290px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  opacity: 0;
  animation: heroDeviceEntrance 0.7s var(--ease-out) 0.18s forwards;
}

/* Flagship Hardware Precision Chassis */
.hero-phone-frame {
  position: relative;
  width: 236px;
  height: 480px;
  border-radius: 38px;
  background: #0c0d12;
  border: 3.5px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    0 24px 60px -12px rgba(0, 0, 0, 0.65),
    0 8px 24px -6px rgba(0, 0, 0, 0.4),
    inset 0 1px 1px rgba(255, 255, 255, 0.35);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

[data-theme="light"] .hero-phone-frame {
  background: #ffffff;
  border: 3.5px solid rgba(15, 20, 35, 0.16);
  box-shadow:
    0 24px 50px -12px rgba(15, 25, 45, 0.18),
    0 8px 20px -6px rgba(15, 25, 45, 0.1),
    inset 0 1px 1px rgba(255, 255, 255, 0.8);
}

/* Punch-hole Camera Sensor */
.hero-camera-dot {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.12);
  z-index: 10;
  box-shadow: inset 0 0 2px rgba(255, 255, 255, 0.25);
  pointer-events: none;
}

[data-theme="light"] .hero-camera-dot {
  border-color: rgba(0, 0, 0, 0.3);
}

.hero-shots {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
}

.hero-visual.hero-carousel .hero-shot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  opacity: 0;
  transform: scale(0.98);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.hero-visual.hero-carousel .hero-shot.is-active {
  opacity: 1;
  transform: scale(1);
  z-index: 2;
}

/* Pagination Dots */
.hero-visual.hero-carousel .hero-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: var(--sp-3);
  z-index: 2;
}

.hero-visual.hero-carousel .hero-dot {
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  border: none;
  background: var(--text-muted);
  opacity: 0.35;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s var(--ease-out);
}

.hero-visual.hero-carousel .hero-dot.is-active {
  background: var(--accent);
  opacity: 1;
  width: 16px;
}

/* Animations */
@keyframes heroTextReveal {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroDeviceEntrance {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes heroAuraFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-title,
  .hero-actions,
  .hero-visual::before,
  .hero-visual.hero-carousel,
  .device-floating {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
    gap: var(--sp-6);
    padding: var(--sp-8) var(--sp-4) var(--sp-10);
  }
  .hero-copy {
    align-items: center;
    text-align: center;
  }
  .hero-actions {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.95rem;
  }
  .hero-phone-frame {
    width: 200px;
    height: 410px;
  }
}