/* ═══════════════════════════════════════════
   Responsive Breakpoints
   ═══════════════════════════════════════════
   Mobile:  < 640px
   Tablet:  640px – 1024px
   Desktop: > 1024px
   Wide:    > 1400px
   ═══════════════════════════════════════════ */

/* ── Tablet & below ── */
@media (max-width: 1024px) {
  .header__nav-desktop {
    display: none;
  }

  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
  }

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

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

  .grid-2 {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .page-hero {
    min-height: 45vh;
  }

  .hero-section {
    min-height: 90vh;
  }

  .strength-item {
    grid-template-columns: 1fr !important;
    gap: var(--space-md) !important;
  }

  .strength-item__number {
    font-size: clamp(36px, 5vw, 48px) !important;
  }

  .activity-grid {
    grid-template-columns: 1fr !important;
  }

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

  /* Gallery 2-col on tablet */
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* ── Mobile ── */
@media (max-width: 640px) {
  :root {
    --space-page: 20px;
    --header-height: 60px;
  }

  .header {
    padding: 0 20px;
  }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .grid-4,
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }

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

  /* Hide cursor on mobile */
  .cursor { display: none !important; }

  /* Hero adjustments */
  .hero-section {
    min-height: 100svh;
    padding: 0 20px;
  }

  .t-hero {
    font-size: clamp(42px, 14vw, 80px);
    letter-spacing: -0.03em;
  }

  .hero-cta-group {
    flex-direction: column;
    width: 100%;
  }

  .hero-cta-group .btn {
    width: 100%;
  }

  /* Section adjustments */
  .section {
    padding: var(--space-2xl) 20px;
  }

  .page-hero {
    min-height: 40vh;
    padding: calc(var(--header-height) + var(--space-2xl)) 20px var(--space-lg);
  }

  /* Button full width on mobile */
  .btn-group--mobile-full {
    flex-direction: column;
    width: 100%;
  }
  .btn-group--mobile-full .btn {
    width: 100%;
    text-align: center;
  }

  /* Stats grid */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: var(--space-lg) !important;
  }

  .stat__number {
    font-size: clamp(36px, 10vw, 56px);
  }

  /* Flow section */
  .flow-grid {
    grid-template-columns: 1fr;
  }

  /* Gallery grid */
  .gallery-grid {
    grid-template-columns: 1fr !important;
  }

  .gallery-grid img,
  .gallery-grid .img-placeholder {
    aspect-ratio: 1 / 1;
    height: auto !important;
  }

  /* Fallback for browsers without aspect-ratio */
  @supports not (aspect-ratio: 1 / 1) {
    .gallery-grid img,
    .gallery-grid .img-placeholder {
      height: 0 !important;
      padding-bottom: 100%;
      object-fit: cover;
    }
  }

  /* Community mood grid */
  .mood-grid {
    grid-template-columns: 1fr !important;
  }
  .mood-grid > * {
    grid-column: auto !important;
    grid-row: auto !important;
  }

  /* Step cards stack */
  .steps-grid {
    grid-template-columns: 1fr;
  }

  /* Step card buttons fit within card */
  .step-card .btn {
    white-space: normal;
    word-break: break-all;
    width: 100%;
    font-size: 12px;
  }

  /* Team grid */
  .team-grid {
    grid-template-columns: 1fr !important;
  }

  /* Menu overlay font size */
  .menu-overlay__link {
    font-size: clamp(20px, 6vw, 30px);
    padding: 4px 0;
  }

  /* Marquee size */
  .marquee__text {
    font-size: clamp(36px, 12vw, 60px);
  }

  /* News items */
  .news-item {
    padding: var(--space-md) 0;
  }

  /* FAQ */
  .faq-item__q {
    font-size: var(--text-base);
  }

  /* Instagram block */
  .ig-block {
    padding: var(--space-2xl) 20px;
  }

  /* Final CTA */
  .final-cta {
    padding: var(--space-2xl) 20px;
  }

  .final-cta__title {
    font-size: var(--text-3xl);
  }

  /* Slogan */
  .slogan {
    font-size: clamp(16px, 4vw, 24px) !important;
    letter-spacing: 0.1em !important;
  }
}

/* ── Small mobile (< 375px) ── */
@media (max-width: 375px) {
  .t-hero {
    font-size: 38px;
  }

  .btn {
    padding: 14px 24px;
    font-size: 11px;
  }

  .stat__number {
    font-size: 32px;
  }
}

/* ── Wide screens ── */
@media (min-width: 1400px) {
  .container {
    padding: 0 80px;
  }
}

/* ── Touch device ── */
@media (hover: none) {
  .cursor { display: none !important; }

  .btn::before {
    display: none;
  }

  .btn:active {
    background: var(--white);
    color: var(--black);
  }

  .btn--dark:active {
    background: var(--black);
    color: var(--white);
  }

  .news-item:hover {
    background: transparent;
  }

  .news-item:active {
    background: var(--gray-950);
  }
}

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

  .reveal {
    opacity: 1;
    transform: none;
  }

  .hero-title-line,
  .hero-subtitle,
  .hero-cta,
  .hero-scroll {
    opacity: 1;
    transform: none;
  }

  .marquee__track {
    animation: none;
  }
}

/* ── Dark mode preference (already dark, just ensure consistency) ── */
@media (prefers-color-scheme: light) {
  /* Site is intentionally dark-themed; no changes needed */
}

/* ── Print ── */
@media print {
  .header,
  .menu-overlay,
  .cursor,
  .noise-overlay,
  .loader,
  .scroll-indicator {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  .section--white {
    background: white;
  }

  .btn {
    border-color: black;
    color: black;
  }
}
