/* ── App Showcase / Screenshot Carousel ───────────────────────── */

.app-showcase {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  color: var(--white);
  padding: 3.5rem 1.5rem 3rem;
}

.app-showcase h2 {
  color: var(--white);
  position: relative;
  z-index: 2;
}

.app-showcase .text-muted {
  color: rgba(255,255,255,.6);
  position: relative;
  z-index: 2;
}

/* ── Subtle Background Pattern ──────────────────────────────── */

.showcase-bg-pattern {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: .07;
  background:
    radial-gradient(ellipse 600px 400px at 15% 20%, #2a7de1, transparent),
    radial-gradient(ellipse 500px 350px at 85% 70%, #28a745, transparent),
    radial-gradient(ellipse 400px 300px at 50% 50%, #d4a843, transparent);
  pointer-events: none;
}

/* ── Theme Toggle (3-state: light / auto / dark) ───────────── */

.theme-toggle-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 1.75rem;
  position: relative;
  z-index: 2;
}

.theme-toggle {
  display: flex;
  align-items: center;
  gap: .6rem;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 99px;
  padding: .35rem .85rem;
  cursor: pointer;
  color: var(--white);
  font-family: var(--font);
  font-size: .85rem;
  font-weight: 500;
  transition: background .2s;
}
.theme-toggle:hover { background: rgba(255,255,255,.15); }

.toggle-track {
  position: relative;
  width: 52px;
  height: 20px;
  background: rgba(255,255,255,.2);
  border-radius: 99px;
  transition: background .2s;
}

.toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: var(--gold);
  border-radius: 50%;
  transition: transform .25s cubic-bezier(.4,.0,.2,1);
}

/* Three thumb positions: left=light, center=auto, right=dark */
.theme-toggle[data-mode="light"] .toggle-thumb { transform: translateX(0); }
.theme-toggle[data-mode="auto"]  .toggle-thumb { transform: translateX(16px); }
.theme-toggle[data-mode="dark"]  .toggle-thumb { transform: translateX(32px); }

.theme-toggle[data-mode="dark"] .toggle-track {
  background: rgba(255,255,255,.35);
}
.theme-toggle[data-mode="auto"] .toggle-track {
  background: rgba(255,255,255,.28);
}

.toggle-label { transition: opacity .15s; }
.toggle-label--light { opacity: .5; }
.toggle-label--dark  { opacity: .5; }

.theme-toggle[data-mode="light"] .toggle-label--light { opacity: 1; }
.theme-toggle[data-mode="dark"]  .toggle-label--dark  { opacity: 1; }
.theme-toggle[data-mode="auto"]  .toggle-label--light { opacity: .7; }
.theme-toggle[data-mode="auto"]  .toggle-label--dark  { opacity: .7; }

/* ── Phone Frame / Carousel ─────────────────────────────────── */

.carousel-viewport {
  position: relative;
  z-index: 2;
  max-width: 460px;
  margin: 0 auto;
  overflow: hidden;
  /* Phone frame bezel */
  background: #1a1a1a;
  border-radius: 40px;
  padding: 14px 10px;
  box-shadow:
    0 0 0 2px #333,
    0 0 0 4px #111,
    0 20px 60px rgba(0,0,0,.5),
    inset 0 0 4px rgba(255,255,255,.05);
}

.carousel-viewport::before {
  /* Notch / dynamic island */
  content: "";
  display: block;
  width: 90px;
  height: 24px;
  background: #1a1a1a;
  border-radius: 99px;
  margin: 0 auto 8px;
  position: relative;
  z-index: 5;
}

.carousel-screen {
  overflow: hidden;
  border-radius: 26px;
  aspect-ratio: 430 / 932;
  background: #000;
  padding-top: 5%;
}

.carousel-track {
  display: flex;
  transition: transform .45s cubic-bezier(.4,.0,.2,1);
  position: relative;
}

.carousel-slide {
  flex: 0 0 100%;
  min-width: 0;
}

.carousel-slide img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0;
}

/* ── Carousel Controls ──────────────────────────────────────── */

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
  position: relative;
  z-index: 2;
}

.carousel-btn {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  color: var(--white);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, border-color .15s;
  flex-shrink: 0;
}
.carousel-btn:hover {
  background: rgba(255,255,255,.2);
  border-color: rgba(255,255,255,.35);
}

.carousel-dots {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 200px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.25);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background .2s, transform .2s;
}
.carousel-dot:hover {
  background: rgba(255,255,255,.5);
}
.carousel-dot.active {
  background: var(--gold);
  transform: scale(1.3);
}

/* ── Subtle Background Decorations ──────────────────────────── */

/* Hero glow */
.hero-decorated {
  position: relative;
  overflow: hidden;
}

.hero-bg-glow {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .15;
  background:
    radial-gradient(ellipse 500px 300px at 20% 80%, #2a7de1, transparent),
    radial-gradient(ellipse 400px 250px at 80% 30%, #28a745, transparent);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding-right: 400px;
}

.hero-phones {
  position: absolute;
  right: -5%;
  top: 0;
  width: 55%;
  z-index: 1;
  pointer-events: none;
}

.hero-phones-img {
  width: 100%;
  height: auto;
  display: block;
}

/* On small screens, show phones below text */
@media (max-width: 768px) {
  .hero-content { padding-right: 0; }
  .hero-phones {
    position: relative;
    right: auto;
    top: auto;
    width: 90%;
    max-width: 420px;
    margin: 2rem auto 0;
  }
}

/* "What You Get" section blur decoration */
.section-decorated {
  position: relative;
  overflow: hidden;
}

.section-bg-blur {
  position: absolute;
  top: -60px;
  right: -100px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(42,125,225,.08), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.section-decorated h2,
.section-decorated .card-grid {
  position: relative;
  z-index: 1;
}

/* CTA section gradient */
.cta-section {
  position: relative;
  overflow: hidden;
}

.cta-bg-gradient {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .04;
  background:
    radial-gradient(ellipse 600px 300px at 30% 50%, #132d5e, transparent),
    radial-gradient(ellipse 500px 250px at 70% 50%, #d4a843, transparent);
}

.cta-section .container {
  position: relative;
  z-index: 1;
}

/* ── Responsive ─────────────────────────────────────────────── */

@media (min-width: 641px) {
  .carousel-viewport {
    max-width: 460px;
    padding: 16px 12px;
    border-radius: 44px;
  }

  .carousel-viewport::before {
    width: 100px;
    height: 26px;
    margin-bottom: 10px;
  }

  .carousel-screen {
    border-radius: 28px;
  }
}

@media (min-width: 900px) {
  .app-showcase {
    padding: 4rem 1.5rem 3.5rem;
  }

  .carousel-viewport {
    max-width: 460px;
    padding: 18px 14px;
    border-radius: 48px;
  }

  .carousel-viewport::before {
    width: 110px;
    height: 28px;
    margin-bottom: 12px;
  }

  .carousel-screen {
    border-radius: 30px;
  }
}

@media (max-width: 400px) {
  .carousel-viewport {
    max-width: 280px;
    padding: 12px 8px;
    border-radius: 36px;
  }

  .carousel-viewport::before {
    width: 76px;
    height: 20px;
    margin-bottom: 6px;
  }

  .carousel-screen {
    border-radius: 22px;
  }

  .carousel-btn {
    width: 34px;
    height: 34px;
    font-size: 1.2rem;
  }
}
