/* ==========================================================================
   YMobiDev — App Page CSS
   Smart CTA, app hero and screenshots
   ========================================================================== */

.smart-store-cta-wrap {
  margin-bottom: var(--space-3);
}

.smart-store-cta-wrap--center {
  display: flex;
  justify-content: center;
}

.smart-store-cta {
  min-width: min(100%, 17rem);
}

.smart-store-nudge {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-2);
  max-width: 32rem;
  margin-bottom: var(--space-2);
  padding: 0.85rem 1rem;
  background: rgba(91, 108, 249, 0.06);
  border: 1px solid rgba(91, 108, 249, 0.14);
  border-radius: 16px;
  opacity: 0;
  transform: translateY(8px);
}

.smart-store-nudge[hidden] {
  display: none;
}

.smart-store-nudge-text {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  line-height: 1.55;
}

.smart-store-nudge.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity var(--transition-normal), transform var(--transition-normal);
}

.smart-store-nudge-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  flex-shrink: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--color-text-muted);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.smart-store-nudge-close:hover {
  background: rgba(91, 108, 249, 0.1);
  color: var(--color-text-primary);
}

.smart-store-mobile-bar {
  position: fixed;
  left: max(0.75rem, env(safe-area-inset-left));
  right: max(0.75rem, env(safe-area-inset-right));
  bottom: calc(0.75rem + env(safe-area-inset-bottom));
  z-index: 70;
  display: none;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.8rem;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(91, 108, 249, 0.14);
  border-radius: 18px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(12px);
  opacity: 0;
  transform: translateY(12px);
}

.smart-store-mobile-bar[hidden] {
  display: none;
}

.smart-store-mobile-bar-text {
  flex: 1;
  margin: 0;
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  line-height: 1.45;
}

.smart-store-mobile-bar.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity var(--transition-normal), transform var(--transition-normal);
}

.smart-store-mobile-button {
  flex-shrink: 0;
  min-width: auto;
  white-space: nowrap;
}

.smart-store-mobile-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--color-text-muted);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.smart-store-mobile-close:hover {
  background: rgba(91, 108, 249, 0.1);
  color: var(--color-text-primary);
}

.app-hero {
  padding-block: clamp(4rem, 7vw, 5.5rem);
  background-color: var(--color-bg-secondary);
  border-bottom: 1px solid var(--color-border-subtle);
}

.app-share-banner {
  padding-top: clamp(1.25rem, 3vw, 2rem);
  background:
    radial-gradient(circle at top right, rgba(91, 108, 249, 0.12), transparent 36%),
    linear-gradient(180deg, rgba(247, 248, 255, 0.96) 0%, rgba(255, 255, 255, 0.98) 100%);
}

.app-share-banner-card {
  max-width: 860px;
  margin-inline: auto;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(91, 108, 249, 0.12);
  border-radius: 26px;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
}

.app-share-banner-tag {
  display: inline-flex;
  margin-bottom: var(--space-3);
}

.app-share-banner-kicker {
  margin: 0 0 var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-brand);
  letter-spacing: 0.01em;
}

.app-share-banner-card h2 {
  margin-bottom: var(--space-2);
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.app-share-banner-description {
  margin: 0;
  color: var(--color-text-primary);
  font-size: clamp(1rem, 2vw, 1.1rem);
  font-weight: var(--weight-semibold);
}

.app-share-banner-body {
  max-width: 40rem;
  margin: var(--space-3) 0 0;
  color: var(--color-text-secondary);
}

.app-share-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.app-hero-inner {
  display: flex;
  align-items: flex-start;
  gap: var(--space-8);
  max-width: 800px;
  margin-inline: auto;
}

.app-hero-icon {
  width: 120px;
  height: 120px;
  border-radius: 24px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 4px 24px rgba(0,0,0,0.12);
  background-color: var(--color-bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-hero-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app-hero-content h1 {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: var(--weight-bold);
  margin-bottom: var(--space-2);
}

.app-hero-content .tagline {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-3);
  line-height: 1.72;
}

.app-hero-content .tag-group {
  margin-bottom: var(--space-2);
}

.section--app-screenshots {
  padding-top: clamp(1.5rem, 4vw, 2.5rem);
}

.cta-strip-note {
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.4);
}

.cta-strip-note a {
  color: rgba(255, 255, 255, 0.4);
}

.screenshot-carousel {
  padding: var(--space-5);
  background:
    radial-gradient(circle at top left, rgba(129, 140, 248, 0.16), transparent 32%),
    linear-gradient(180deg, rgba(245, 245, 255, 0.8) 0%, rgba(255, 255, 255, 0.98) 100%);
  border: 1px solid var(--color-border-subtle);
  border-radius: 28px;
  box-shadow: var(--card-shadow);
}

.screenshot-nav {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--color-border-subtle);
  background-color: rgba(255, 255, 255, 0.85);
  color: var(--color-text-primary);
  box-shadow: 0 6px 18px rgba(24, 24, 27, 0.08);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), opacity var(--transition-fast);
}

.screenshot-nav:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(24, 24, 27, 0.12);
}

.screenshot-nav:focus-visible,
.screenshot-dot:focus-visible,
.screenshot-viewport:focus-visible,
.screenshot-lightbox-nav:focus-visible,
.screenshot-lightbox-dot:focus-visible,
.screenshot-lightbox-close:focus-visible {
  outline: 2px solid var(--color-border-accent);
  outline-offset: 3px;
}

.screenshot-nav:disabled {
  opacity: 0.45;
  cursor: default;
}

.screenshot-viewport {
  overflow-x: auto;
  max-width: 40rem;
  margin-inline: auto;
  overscroll-behavior-x: contain;
  overflow-anchor: none;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
}

.screenshot-viewport::-webkit-scrollbar {
  display: none;
}

.screenshot-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(136px, 148px);
  gap: var(--space-3);
}

.screenshot-carousel.is-static .screenshot-viewport {
  overflow: hidden;
}

.screenshot-carousel.is-static .screenshot-track {
  justify-content: flex-start;
}

.screenshot-carousel.is-static .screenshot-dots {
  display: none;
}

.screenshot-card {
  scroll-snap-align: start;
  min-width: 0;
}

.screenshot-card-button {
  display: block;
  width: 100%;
  text-align: left;
  cursor: zoom-in;
}

.screenshot-card-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 390 / 844;
  padding: 9px 5px 11px;
  background: linear-gradient(180deg, #20222d 0%, #08090d 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  box-shadow: 0 16px 28px rgba(24, 24, 27, 0.16);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.screenshot-card-button:hover .screenshot-card-frame,
.screenshot-card-button:focus-visible .screenshot-card-frame {
  transform: translateY(-2px);
  box-shadow: 0 24px 36px rgba(24, 24, 27, 0.2);
}

.screenshot-card-frame::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  width: 34%;
  height: 10px;
  transform: translateX(-50%);
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.08);
  z-index: 1;
}

.screenshot-card-screen {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 20px;
  background: #05060a;
}

.screenshot-card-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.screenshot-card-meta {
  max-width: 148px;
  margin-inline: auto;
  padding: var(--space-2) var(--space-1) 0;
}

.screenshot-card-meta .tag {
  margin-bottom: 0.6rem;
}

.screenshot-card-meta p {
  display: -webkit-box;
  min-height: calc(0.74rem * 1.45 * 2);
  overflow: hidden;
  font-size: 0.74rem;
  line-height: 1.45;
  color: var(--color-text-secondary);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.screenshot-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: var(--space-4);
}

.screenshot-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
  background-color: rgba(91, 108, 249, 0.18);
  transition: transform var(--transition-fast), background-color var(--transition-fast);
}

.screenshot-dot[aria-pressed="true"] {
  background-color: var(--color-gold-primary);
  transform: scale(1.15);
}

body.has-lightbox {
  overflow: hidden;
}

.screenshot-lightbox {
  position: fixed;
  inset: 0;
  width: 100vw;
  max-width: 100vw;
  min-width: 100vw;
  height: 100vh;
  max-height: 100vh;
  margin: 0;
  padding: 0;
  border: none;
  overflow: visible;
  background: transparent;
}

.screenshot-lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.screenshot-lightbox::backdrop {
  background: rgba(6, 8, 15, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.screenshot-lightbox-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: auto;
  max-width: calc(100vw - 1.5rem);
  padding: clamp(1rem, 3vw, 1.5rem);
  max-height: calc(100vh - 1.5rem);
  overflow: auto;
  pointer-events: none;
}

.screenshot-lightbox-close {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  background: rgba(5, 6, 10, 0.72);
  color: rgba(255, 255, 255, 0.94);
  font-size: 1.6rem;
  line-height: 1;
  pointer-events: auto;
  z-index: 2;
}

.screenshot-lightbox-nav {
  position: fixed;
  top: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  background: rgba(5, 6, 10, 0.72);
  color: rgba(255, 255, 255, 0.94);
  font-size: 1.3rem;
  line-height: 1;
  transform: translateY(-50%);
  pointer-events: auto;
  z-index: 2;
}

.screenshot-lightbox-nav:disabled {
  opacity: 0.35;
  cursor: default;
}

.screenshot-lightbox-nav--prev {
  left: max(0.75rem, calc(50vw - 14rem));
}

.screenshot-lightbox-nav--next {
  right: max(0.75rem, calc(50vw - 14rem));
}

.screenshot-lightbox-frame {
  position: relative;
  width: min(100%, 360px);
  aspect-ratio: 390 / 844;
  margin: 0 auto;
  padding: 16px 11px 18px;
  background: linear-gradient(180deg, #20222d 0%, #08090d 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 38px;
  box-shadow: 0 24px 44px rgba(24, 24, 27, 0.24);
  pointer-events: auto;
}

.screenshot-lightbox-frame::before {
  content: '';
  position: absolute;
  top: 14px;
  left: 50%;
  width: 34%;
  height: 12px;
  transform: translateX(-50%);
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.08);
}

.screenshot-lightbox-screen {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 28px;
  background: #05060a;
}

.screenshot-lightbox-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.screenshot-lightbox-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: var(--space-3);
  pointer-events: auto;
}

.screenshot-lightbox-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.28);
  transition: transform var(--transition-fast), background-color var(--transition-fast);
}

.screenshot-lightbox-dot[aria-pressed="true"] {
  background-color: #ffffff;
  transform: scale(1.15);
}

.parents-note-container {
  max-width: 700px;
}

.parents-note-card {
  padding: var(--space-6);
  background-color: var(--color-bg-secondary);
  border-radius: var(--card-radius);
  border: 1px solid var(--color-border-subtle);
  text-align: left;
}

.parents-note-icon {
  display: block;
  margin-inline: 0;
  margin-bottom: var(--space-3);
  color: var(--color-gold-primary);
}

.parents-note-card h2 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-2);
}

.parents-note-card p {
  color: var(--color-text-secondary);
  line-height: var(--leading-normal);
}

.parents-note-card p + p {
  margin-top: var(--space-2);
}

@media (prefers-reduced-motion: reduce) {
  .smart-store-nudge,
  .smart-store-mobile-bar,
  .smart-store-nudge.is-visible,
  .smart-store-mobile-bar.is-visible {
    transition: none;
    transform: none;
  }
}

@media (max-width: 768px) {
  body.has-mobile-store-bar {
    padding-bottom: 5.5rem;
  }

  .app-share-banner-card {
    border-radius: 22px;
  }

  .smart-store-cta {
    width: 100%;
  }

  .smart-store-nudge {
    padding: 0.75rem 0.9rem;
  }

  .smart-store-mobile-bar {
    display: flex;
  }

  .screenshot-carousel {
    padding: var(--space-4);
    border-radius: 24px;
  }

  .screenshot-track {
    grid-auto-columns: minmax(140px, 44vw);
  }

  .screenshot-viewport {
    max-width: none;
  }

  .screenshot-lightbox {
    width: calc(100vw - 1rem);
  }

  .screenshot-lightbox-shell {
    max-width: calc(100vw - 1rem);
    padding: 0.75rem;
    max-height: calc(100vh - 1rem);
  }

  .screenshot-lightbox-close {
    display: flex;
  }

  .screenshot-lightbox-nav {
    position: absolute;
    top: auto;
    bottom: 3.75rem;
    transform: none;
  }

  .screenshot-lightbox-nav--prev {
    left: 0.5rem;
  }

  .screenshot-lightbox-nav--next {
    right: 0.5rem;
  }

  .screenshot-lightbox-dots {
    position: absolute;
    left: 50%;
    bottom: 1.4rem;
    margin-top: 0;
    padding: 0.45rem 0.65rem;
    border-radius: 999px;
    background: rgba(5, 6, 10, 0.48);
    transform: translateX(-50%);
    z-index: 2;
  }

  .screenshot-lightbox-frame {
    width: min(100%, 300px);
    padding: 14px 10px 16px;
    border-radius: 32px;
  }

  .screenshot-lightbox-screen,
  .screenshot-lightbox-screen img {
    border-radius: 24px;
  }
}

@media (max-width: 640px) {
  .app-hero-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
