body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
}

/* Scroll-aware header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  isolation: isolate;
  transform: translateY(0);
  transition:
    transform 0.3s ease,
    background-color 0.3s ease,
    border-color 0.3s ease,
    backdrop-filter 0.3s ease;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
}

.dark .site-header {
  background: rgba(11, 15, 23, 0.9);
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.site-header--top {
  background: rgba(255, 255, 255, 0.9);
  border-bottom-color: rgba(226, 232, 240, 0.55);
}

.dark .site-header--top {
  background: rgba(11, 15, 23, 0.9);
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.site-header--hidden {
  transform: translateY(-100%);
}

body {
  padding-top: 0;
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-brand {
  min-width: 0;
}

.header-controls {
  align-items: center;
  z-index: 2;
}

.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}

/* Header audio & theme controls */
.audio-toggle,
.theme-toggle {
  -webkit-tap-highlight-color: transparent;
}

.audio-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.audio-icon-on {
  opacity: 1;
  transform: scale(1);
}

.audio-icon-off {
  opacity: 0;
  transform: scale(0.85);
}

.audio-muted .audio-icon-on,
html.audio-muted .audio-icon-on {
  opacity: 0;
  transform: scale(0.85);
}

.audio-muted .audio-icon-off,
html.audio-muted .audio-icon-off {
  opacity: 1;
  transform: scale(1);
}

.theme-toggle-track {
  margin: 0 auto;
}

.theme-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1), transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.theme-icon-sun {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.theme-icon-moon {
  opacity: 0;
  transform: rotate(-45deg) scale(0.65);
}

.dark .theme-icon-sun {
  opacity: 0;
  transform: rotate(45deg) scale(0.65);
}

.dark .theme-icon-moon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

/* Navigation */
.nav-link {
  position: relative;
  display: inline-flex;
  padding: 0.35rem 0.15rem;
}

@media (min-width: 1024px) {
  .nav-link {
    padding: 0.55rem 0;
  }
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0.15rem;
  width: 100%;
  height: 2px;
  background: #059669;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

/* Hero carousel — Apple homepage canvas */
.hero-carousel {
  position: relative;
  overflow: visible;
  min-height: 0;
  background: #f5f5f7;
  color: #0a0a0a;
  transition: background 0.5s ease, color 0.5s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

@media (min-width: 768px) {
  .hero-carousel {
    min-height: min(88vh, 880px);
  }
}

.dark .hero-carousel {
  background: #000;
  color: #f8fafc;
}

.hero-slides-stage {
  position: relative;
  width: 100%;
  max-width: 56rem;
  min-height: 520px;
  z-index: 3;
}

@media (min-width: 640px) {
  .hero-slides-stage {
    min-height: 620px;
  }
}

@media (min-width: 768px) {
  .hero-slides-stage {
    min-height: 720px;
  }
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  z-index: 0;
  opacity: 0;
  transform: translateX(1rem) scale(0.95);
  pointer-events: none;
  visibility: hidden;
  transition:
    opacity 0.7s ease-in-out,
    transform 0.7s ease-in-out,
    visibility 0s linear 0.7s;
}

.hero-slide.is-active {
  z-index: 2;
  opacity: 1;
  transform: translateX(0) scale(1);
  pointer-events: auto;
  visibility: visible;
  transition:
    opacity 0.7s ease-in-out,
    transform 0.7s ease-in-out,
    visibility 0s linear 0s;
}

.hero-slide.is-left {
  opacity: 0;
  transform: translateX(-1rem) scale(0.95);
}

.hero-slide.is-right {
  opacity: 0;
  transform: translateX(1rem) scale(0.95);
}

.hero-slide-copy {
  width: 100%;
  max-width: 48rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-slide-visual {
  position: relative;
  background: transparent !important;
}

.hero-device-float {
  max-width: 100%;
  max-height: 100%;
}

.hero-device-img {
  background: transparent !important;
  border: 0 !important;
  padding: 0;
  max-height: 100%;
}

.hero-slide.is-active .hero-device-float {
  animation: float 6s ease-in-out infinite;
}

.hero-kicker {
  text-transform: uppercase;
  font-weight: 600;
  color: #475569;
}

.dark .hero-kicker {
  color: #94a3b8;
}

.hero-title {
  margin-top: 0.5rem;
  line-height: 1.05;
  color: #0a0a0a;
  text-align: center;
}

.dark .hero-title {
  background: linear-gradient(110deg, #d2d2d7 0%, #ffffff 42%, #f5f5f7 58%, #ebebf0 100%);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: shimmer 7s linear infinite;
}

.hero-tagline {
  margin-top: 0.75rem;
  font-weight: 600;
  color: #334155;
  max-width: 28rem;
  line-height: 1.5;
  text-align: center;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.dark .hero-tagline {
  color: #cbd5e1;
}

.hero-cta {
  margin-top: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: #0a0a0a;
  color: #fff;
  padding: 0.85rem 2rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18);
  transition: all 0.3s ease;
}

.dark .hero-cta {
  background: #f8fafc;
  color: #0a0a0a;
}

.hero-cta:hover {
  transform: scale(1.05);
  background: #059669;
  color: #fff;
}

.hero-dots {
  position: relative;
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
  gap: 0.55rem;
  z-index: 10;
}

.hero-dot {
  flex-shrink: 0;
}

.hero-dot.is-active {
  width: 2rem;
  height: 0.5rem;
  background: #10b981;
  transition-duration: 500ms;
}

/* Cards */
.product-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  contain: layout paint;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  min-height: 0;
  opacity: 1;
  transform: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.dark .product-card {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}

.product-card.is-in {
  opacity: 1;
  transform: translateY(0);
}

.product-card:hover {
  border-color: #94a3b8;
  box-shadow: 0 25px 50px -12px rgb(15 23 42 / 0.18);
}

.product-media {
  position: relative;
  height: 9.5rem;
  width: 100%;
  border-radius: 0.9rem;
  background: transparent !important;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.product-media.h-44 {
  height: 11rem;
}

.product-media img {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  transition: transform 0.5s ease;
}

.product-card:hover .product-media img {
  transform: none;
}

.product-card .wa-btn:hover {
  transform: none;
}

.stock-pill {
  pointer-events: none;
}

.wa-btn {
  position: relative;
  z-index: 1;
  width: 100%;
  flex-shrink: 0;
  box-sizing: border-box;
  background: #0a0a0a;
  color: #fff;
  border-radius: 0.75rem;
  padding: 0.65rem 1rem;
  font-weight: 600;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: background 0.3s ease, color 0.3s ease;
}

.dark .wa-btn {
  background: #f8fafc;
  color: #0a0a0a;
}

.flagship-card .wa-btn:hover,
.wa-btn:hover {
  background: #059669;
  color: #fff;
}

.flagship-card {
  border: 1px solid #e2e8f0;
  border-radius: 1.25rem;
  padding: 1.4rem;
  background: #fff;
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.04);
  transition: all 0.3s ease;
}

.dark .flagship-card {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}

.flagship-card:hover {
  transform: translateY(-0.5rem);
  box-shadow: 0 25px 50px -12px rgb(15 23 42 / 0.25);
}

.flagship-media {
  background: transparent !important;
  flex-shrink: 0;
}

.storage-tab {
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #334155;
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  font-size: 12px;
  font-weight: 700;
  transition: all 0.25s ease;
}

.dark .storage-tab {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
}

.storage-tab:hover {
  border-color: #94a3b8;
}

.storage-tab.active {
  background: #0a0a0a;
  color: #fff;
  border-color: #0a0a0a;
}

.dark .storage-tab.active {
  background: #f8fafc;
  color: #0a0a0a;
  border-color: #f8fafc;
}

.flagship-price {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #0a0a0a;
}

.dark .flagship-price {
  color: #fff;
}

/* Apple homepage tiles */
.apple-tile {
  background: #f5f5f7;
  text-align: center;
  padding: 4rem 1.5rem 0;
  margin: 0.75rem 0.75rem 0;
  border-radius: 1.5rem;
  overflow: hidden;
}

.dark .apple-tile {
  background: #161617;
}

.apple-tile-inner {
  max-width: 56rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.apple-tile-title {
  margin-top: 0.5rem;
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #1d1d1f;
}

.dark .apple-tile-title {
  color: #f5f5f7;
}

.apple-tile-copy {
  margin-top: 0.65rem;
  font-size: 1.15rem;
  font-weight: 500;
  color: #6e6e73;
  max-width: 28rem;
}

.apple-tile-device {
  margin-top: 1.5rem;
  height: 280px;
  width: auto;
  max-width: 90%;
  object-fit: contain;
  background: transparent !important;
  border: 0;
  filter: drop-shadow(0 25px 40px rgba(0, 0, 0, 0.18));
}

@media (min-width: 1024px) {
  .apple-tile-device {
    height: 360px;
  }
}

.bento-split {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

@media (min-width: 768px) {
  .bento-split {
    grid-template-columns: 1fr 1fr;
  }
}

.bento-card {
  background: #f5f5f7;
  text-align: center;
  padding: 3.5rem 1.5rem 0;
  border-radius: 1.5rem;
  min-height: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
}

.dark .bento-card {
  background: #161617;
}

.bento-device {
  margin-top: auto;
  height: 240px;
  width: auto;
  max-width: 85%;
  object-fit: contain;
  background: transparent !important;
  filter: drop-shadow(0 22px 36px rgba(0, 0, 0, 0.2));
}

.accessories-tray {
  background: transparent;
}

/* Trust + footer */
.site-footer {
  background: #0b0f17;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  isolation: isolate;
}

@keyframes shimmer {
  0% {
    background-position: 0% center;
  }
  100% {
    background-position: 200% center;
  }
}

@keyframes pulseGlow {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(1);
  }
  50% {
    opacity: 0.75;
    transform: scale(1.08);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-header {
    transition: none !important;
  }

  .hero-device-img,
  .hero-slide,
  .product-card {
    animation: none !important;
  }

  .hero-slide {
    transition: none !important;
  }

  .hero-slide.is-active {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(0) scale(1) !important;
  }
}
