/* ==========================================================================
   Dots & Boxes — Responsive Styles
   Mobile-first breakpoints
   ========================================================================== */

/* --------------------------------------------------------------------------
   Tablet (max 1024px)
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  :root {
    --section-padding: 80px;
  }

  .hero__content {
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: center;
    padding: 60px 0;
  }

  .hero__text {
    max-width: 100%;
    margin: 0 auto;
  }

  .hero__buttons {
    justify-content: center;
  }

  .hero__visual {
    order: -1;
  }

  .hero__phone img {
    width: 240px;
    max-height: 500px;
  }

  .features__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .why-choose__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .leaderboard__wrapper {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-preview__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }

  .worldwide__visual {
    height: 350px;
  }
}

/* --------------------------------------------------------------------------
   Mobile Navigation (max 900px)
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .nav-toggle {
    display: flex;
  }

  .nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-white);
    flex-direction: column;
    padding: 24px;
    gap: 4px;
    box-shadow: var(--shadow-lg);
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition: transform var(--transition), opacity var(--transition), visibility var(--transition);
    border-bottom: 1px solid var(--color-border);
  }

  .nav.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav__link {
    width: 100%;
    text-align: center;
    padding: 14px 20px;
    font-size: 1rem;
  }

  .header__actions .btn-play-store {
    display: none;
  }

  .header__logo span {
    font-size: 1rem;
  }
}

/* --------------------------------------------------------------------------
   Mobile (max 768px)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  :root {
    --section-padding: 64px;
    --header-height: 64px;
  }

  .container {
    padding: 0 20px;
  }

  .section-header {
    margin-bottom: 40px;
  }

  .features__grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .feature-card {
    padding: 28px 24px;
  }

  .why-choose__grid {
    grid-template-columns: 1fr;
  }

  .reward-step {
    min-width: 160px;
    padding: 28px 24px;
  }

  .reward-arrow {
    transform: rotate(90deg);
  }

  .rewards__flow {
    flex-direction: column;
  }

  .leaderboard__stats {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .stat-card {
    padding: 20px;
  }

  .stat-card__number {
    font-size: 2rem;
  }

  .carousel__btn {
    width: 40px;
    height: 40px;
  }

  .carousel__slide {
    width: 180px;
  }

  .carousel__card img,
  .carousel__reflection img {
    width: 180px;
  }

  .about-preview__highlights {
    grid-template-columns: 1fr;
  }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }

  .footer__brand p {
    max-width: 100%;
    margin: 0 auto;
  }

  .footer__bottom {
    flex-direction: column;
    text-align: center;
  }

  .contact-card {
    padding: 32px 24px;
  }

  .contact-page-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .contact-info-cards {
    grid-template-columns: 1fr;
  }

  .delete-account__box {
    padding: 32px 24px;
  }

  .hero__phone img {
    width: 200px;
    max-height: 420px;
  }

  .hero__phone-ring {
    width: 260px;
    height: 260px;
  }

  .hero__phone-ring--2 {
    width: 300px;
    height: 300px;
  }

  .worldwide__visual {
    height: 300px;
  }

  .worldwide__avatar {
    width: 44px;
    height: 44px;
    font-size: 1.25rem;
  }

  .worldwide__tags {
    gap: 10px;
  }

  .worldwide__tag {
    padding: 10px 18px;
    font-size: 0.8125rem;
  }

  .cta-banner {
    min-height: 320px;
  }

  .cta-banner__content {
    padding: 60px 20px;
  }

  .btn {
    padding: 12px 24px;
    font-size: 0.875rem;
  }

  .btn-play-store--large {
    padding: 14px 24px;
  }
}

/* --------------------------------------------------------------------------
   Small Mobile (max 480px)
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
  :root {
    --section-padding: 48px;
  }

  .hero__headline {
    font-size: 2.25rem;
  }

  .hero__description {
    font-size: 1rem;
  }

  .hero__buttons {
    flex-direction: column;
    width: 100%;
  }

  .hero__buttons .btn {
    width: 100%;
  }

  .leaderboard__stats {
    grid-template-columns: 1fr;
  }

  .carousel__slide {
    width: 160px;
  }

  .carousel__card img,
  .carousel__reflection img {
    width: 160px;
  }

  .carousel__btn--prev {
    left: 4px;
  }

  .carousel__btn--next {
    right: 4px;
  }

  .legal-content {
    padding: 40px 0 64px;
  }

  .page-hero {
    padding: calc(var(--header-height) + 40px) 0 40px;
  }
}

/* --------------------------------------------------------------------------
   Landscape Mobile
   -------------------------------------------------------------------------- */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: auto;
  }

  .hero__content {
    padding: 40px 0;
  }

  .hero__phone img {
    width: 160px;
    max-height: 300px;
  }
}

/* --------------------------------------------------------------------------
   Reduced Motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .animate-on-scroll {
    opacity: 1;
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   High DPI / Retina
   -------------------------------------------------------------------------- */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .hero__phone img {
    image-rendering: -webkit-optimize-contrast;
  }
}

/* --------------------------------------------------------------------------
   Print
   -------------------------------------------------------------------------- */
@media print {
  .header,
  .nav-toggle,
  .carousel__btn,
  .btn,
  .hero__dots,
  .hero__glow {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  .section {
    padding: 20px 0;
    break-inside: avoid;
  }
}
