/* ============================================================
   the-app.css — interactive app walkthrough at /the-app/
   Hero + screen carousel (5 simulator screenshots) + CTA.
   Reuses .phone wrapper class from styles.css for the frame.
   ============================================================ */

.app-shell {
  background: var(--brand-base);
  color: var(--brand-cream);
  min-height: 100vh;
}

/* ---------------------------------- */
/* Hero                                */
/* ---------------------------------- */

.app-hero {
  padding: 160px 0 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.app-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  color: var(--brand-earn);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 28px;
}

.app-hero-eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-earn);
}

.app-hero h1 {
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 22px;
  font-weight: 500;
  color: var(--brand-cream);
}

.app-hero h1 .serif {
  font-family: "Source Serif Pro", Georgia, serif;
  font-style: italic;
  font-weight: 400;
}

.app-hero-sub {
  font-size: 17px;
  line-height: 1.55;
  color: var(--brand-cream-60);
  max-width: 540px;
  margin: 0 auto;
}

/* ---------------------------------- */
/* Carousel                            */
/* ---------------------------------- */

.app-carousel-section {
  padding: 40px 0 100px;
}

.app-carousel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
}

/* Stage (centered) — gets the radial glow halo */
.app-carousel-stage {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
}

.app-carousel-stage::before {
  content: "";
  position: absolute;
  inset: -60px;
  background: radial-gradient(ellipse 60% 55% at 50% 55%, rgba(16, 185, 129, 0.22), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Override .phone defaults so it renders standalone */
.app-carousel-phone {
  position: relative !important;
  z-index: 1;
  width: 300px !important;
  transform: none !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  cursor: grab;
  user-select: none;
  touch-action: pan-y;
}
.app-carousel-phone:active {
  cursor: grabbing;
}

/* Screen image stack — each <img> absolute, only .is-active visible */
.phone-screen-img {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 32px;
  overflow: hidden;
  background: var(--brand-base);
}

.phone-screen-img .screen {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
  display: block;
  -webkit-user-drag: none;
}

.phone-screen-img .screen.is-active {
  opacity: 1;
}

/* Arrows */
.app-carousel-arrow {
  background: rgba(245, 230, 211, 0.05);
  border: 1px solid rgba(245, 230, 211, 0.10);
  border-radius: 50%;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--brand-cream);
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
  flex: 0 0 auto;
  z-index: 2;
}

.app-carousel-arrow:hover {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.5);
  color: var(--brand-earn);
}

.app-carousel-arrow:focus-visible {
  outline: 2px solid var(--brand-earn);
  outline-offset: 3px;
}

.app-carousel-arrow:active {
  transform: scale(0.94);
}

.app-carousel-arrow svg {
  width: 22px;
  height: 22px;
}

/* Annotations — same stack pattern as the screens (crossfade) */
.app-carousel-annotations {
  position: relative;
  max-width: 580px;
  margin: 56px auto 0;
  text-align: center;
  min-height: 180px;
}

.app-carousel-annotation {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.32s ease;
  pointer-events: none;
}

.app-carousel-annotation.is-active {
  opacity: 1;
  pointer-events: auto;
}

.app-carousel-annotation-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-earn);
  margin-bottom: 14px;
}

.app-carousel-annotation-title {
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  font-weight: 500;
  color: var(--brand-cream);
  margin: 0 0 14px;
}

.app-carousel-annotation-title .serif {
  font-family: "Source Serif Pro", Georgia, serif;
  font-style: italic;
  font-weight: 400;
}

.app-carousel-annotation-desc {
  font-size: 15px;
  line-height: 1.65;
  color: var(--brand-cream-60);
  margin: 0;
}

/* Dots */
.app-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 36px;
}

.app-carousel-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(245, 230, 211, 0.18);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease, width 0.25s ease;
}

.app-carousel-dot:hover {
  background: rgba(245, 230, 211, 0.40);
}

.app-carousel-dot:focus-visible {
  outline: 2px solid var(--brand-earn);
  outline-offset: 3px;
}

.app-carousel-dot.is-active {
  background: var(--brand-earn);
  width: 24px;
  border-radius: 5px;
}

/* Subtle hint copy under the dots */
.app-carousel-hint {
  text-align: center;
  margin-top: 24px;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--brand-cream-40, rgba(245, 230, 211, 0.4));
}

/* Touch / mouse swap via media query */
.app-carousel-hint .show-mouse { display: inline; }
.app-carousel-hint .show-touch { display: none; }

@media (hover: none) and (pointer: coarse) {
  .app-carousel-hint .show-mouse { display: none; }
  .app-carousel-hint .show-touch { display: inline; }
}

/* ---------------------------------- */
/* Closing CTA                         */
/* ---------------------------------- */

.app-cta {
  padding: 100px 0 140px;
  text-align: center;
  border-top: 1px solid rgba(245, 230, 211, 0.06);
}

.app-cta h2 {
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 500;
  color: var(--brand-cream);
  margin: 0 0 22px;
}

.app-cta h2 .serif {
  font-family: "Source Serif Pro", Georgia, serif;
  font-style: italic;
  font-weight: 400;
}

.app-cta-sub {
  font-size: 16px;
  line-height: 1.6;
  color: var(--brand-cream-60);
  max-width: 480px;
  margin: 0 auto 32px;
}

.app-cta .btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  background: var(--brand-earn);
  color: var(--brand-base);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: transform 0.18s var(--ease);
}

.app-cta .btn-primary:hover {
  transform: translateY(-2px);
}

.app-cta .btn-primary svg {
  width: 16px;
  height: 16px;
}

/* ---------------------------------- */
/* Responsive                          */
/* ---------------------------------- */

@media (max-width: 768px) {
  .app-hero {
    padding: 120px 0 30px;
  }
  .app-carousel-section {
    padding: 20px 0 60px;
  }
  .app-carousel {
    gap: 8px;
  }
  .app-carousel-arrow {
    width: 42px;
    height: 42px;
  }
  .app-carousel-arrow svg {
    width: 18px;
    height: 18px;
  }
  .app-carousel-phone {
    width: 240px !important;
  }
  .app-carousel-annotations {
    min-height: 200px;
    margin-top: 40px;
    padding: 0 16px;
  }
  .app-cta {
    padding: 60px 0 80px;
  }
}

@media (max-width: 480px) {
  .app-carousel-phone {
    width: 220px !important;
  }
}
