/* ============================================================
   PHI-NEXT — responsive.css
   Mobile-first breakpoints: 320 → 768 → 1024 → 1440
   ============================================================ */

/* ─── Base (320px+) — mobile defaults in main.css ───────── */

/* ─── Small (480px+) ─────────────────────────────────────── */
@media (min-width: 480px) {
  :root {
    --container-pad: 2rem;
  }

  .hero-actions {
    flex-wrap: nowrap;
  }

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

/* ─── Tablet (768px+) ────────────────────────────────────── */
@media (min-width: 768px) {
  :root {
    --container-pad: 2.5rem;
  }

  .section-pad    { padding: var(--space-lg) 0; }
  .section-pad-lg { padding: var(--space-xl) 0; }

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

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

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

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

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

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

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

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

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

  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
  }

  .achievement-item {
    grid-template-columns: 120px 1fr;
  }
}

/* ─── Desktop (1024px+) ──────────────────────────────────── */
@media (min-width: 1024px) {
  :root {
    --container-pad: 3rem;
  }

  .nav-hamburger      { display: none; }
  .nav-links          { display: flex; }
  .nav-actions        { display: flex; }

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

  .dna-grid {
    grid-template-columns: 1fr 1.2fr;
    gap: var(--space-xl);
  }

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

  .founder-grid {
    grid-template-columns: 1fr 1.6fr;
    gap: var(--space-xl);
  }

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

/* ─── Wide (1440px+) ─────────────────────────────────────── */
@media (min-width: 1440px) {
  :root {
    --container-pad: 4rem;
  }
}

/* ─── Mobile overrides (max 767px) ──────────────────────────  */
@media (max-width: 767px) {
  /* Nav */
  .nav-links      { display: none; }
  .nav-actions    { display: none; }
  .nav-hamburger  { display: flex; }

  /* Hero */
  .hero {
    min-height: 90vh;
    padding-top: 80px;
    align-items: flex-end;
    padding-bottom: var(--space-lg);
  }

  .hero-content { max-width: 100%; }

  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; text-align: center; }

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

  /* DNA */
  .dna-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  /* Values */
  .values-grid { grid-template-columns: 1fr; }

  /* Services */
  .services-grid { grid-template-columns: 1fr; }

  /* Achievements */
  .achievement-item {
    grid-template-columns: 80px 1fr;
    gap: var(--space-sm);
  }

  .achievement-year { font-size: 1.375rem; }

  /* Differentiators */
  .differentiators-grid { grid-template-columns: 1fr; }

  /* Steps */
  .steps-grid { grid-template-columns: 1fr; }

  /* Pricing */
  .pricing-grid { grid-template-columns: 1fr; }

  /* Levels */
  .levels-grid { grid-template-columns: 1fr; }

  /* Contact */
  .contact-grid { grid-template-columns: 1fr; }

  /* Founder */
  .founder-grid { grid-template-columns: 1fr; }
  .founder-photo,
  .founder-photo-placeholder {
    max-width: 360px;
    width: 100%;
    margin: 0 auto;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
  }

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

  /* Before/After */
  .before-after-table {
    display: block;
    overflow-x: auto;
  }

  /* Cookie */
  .cookie-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  /* Section header */
  .section-header {
    margin-bottom: var(--space-md);
  }

  /* CTA band */
  .cta-band { text-align: left; }
  .cta-band p { margin-left: 0; margin-right: 0; }
}

/* ─── Print ──────────────────────────────────────────────── */
@media print {
  .nav,
  .cookie-banner,
  .nav-mobile-overlay,
  .cta-band,
  .site-footer {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  .hero {
    min-height: unset;
    padding: 2rem 0;
  }

  a::after {
    content: " (" attr(href) ")";
    font-size: 0.75em;
  }
}

/* ─── 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;
  }

  html { scroll-behavior: auto; }
}

/* ─── High contrast ──────────────────────────────────────── */
@media (prefers-color-scheme: light) {
  /* Site intentionally dark — no light mode override */
}
