/* ==========================================================================
   responsive.css — Chedders Bootstrap Core DNA
   Breakpoint-specific overrides — mobile-first
   ========================================================================== */

/* --------------------------------------------------------------------------
   Smallest Mobile — max 320px (DNA §5.1 Tier 0)
   -------------------------------------------------------------------------- */
@media (max-width: 320px) {

  /* Footer — 4 columns, minimum font sizes */
  .site-footer__top {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 8px;
  }

  .site-footer__col-title {
    font-size: 9px;
    display: none;
  }

  .site-footer__links a {
    font-size: 10px;
  }

  .site-footer__brand-logo span:not(.logo-icon) {
    display: none; /* logo mark only at 320px */
  }
}

/* --------------------------------------------------------------------------
   Mobile — max 575px
   -------------------------------------------------------------------------- */
@media (max-width: 575px) {

  /* Spacing */
  .section-padding {
    padding-top: 56px;
    padding-bottom: 56px;
  }

  .section-padding--sm {
    padding-top: 40px;
    padding-bottom: 40px;
  }

  .section-padding--lg {
    padding-top: 72px;
    padding-bottom: 72px;
  }

  .content-width {
    padding-left: 16px;
    padding-right: 16px;
  }

  /* Typography */
  h1 { font-size: 26px; }
  h2 { font-size: 22px; }
  h3 { font-size: 18px; }

  .hero__title { font-size: 26px; }

  /* Navbar */
  .site-nav__links,
  .site-nav__actions .btn-chedders {
    display: none;
  }

  .nav-hamburger {
    display: flex;
  }

  /* Hero */
  .hero {
    padding-top: 48px;
    padding-bottom: 48px;
  }

  .hero__inner {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .hero__desc {
    font-size: 15px;
  }

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero__actions .btn-chedders {
    width: 100%;
    justify-content: center;
  }

  .hero__window-body {
    grid-template-columns: 1fr;
  }

  .hero__preview-pane {
    border-top: 1px solid var(--border);
  }

  .hero__code-pane {
    border-right: none;
    min-height: auto;
  }

  /* Grids */
  .responsive-grid-2,
  .responsive-grid-3,
  .responsive-grid-4 {
    grid-template-columns: 1fr;
  }

  /* Feature cards */
  .feature-card {
    padding: 20px;
  }

  /* Status section */
  .status-item {
    padding: 12px 16px;
  }

  /* Why items */
  .why-item {
    gap: 14px;
    padding: 20px 0;
  }

  /* CTA Banner */
  .cta-banner {
    padding: 36px 24px;
  }

  .cta-banner__list {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .cta-banner .btn-chedders {
    width: 100%;
    justify-content: center;
  }

  /* Founder Note */
  .founder-note {
    padding: 24px;
  }

  /* Footer — 4 columns locked at all widths (DNA §7.7) */
  .site-footer__top {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 12px;
  }

  .site-footer__tagline {
    max-width: 100%;
    display: none; /* hide tagline at smallest sizes to save space */
  }

  .site-footer__col-title {
    font-size: 10px;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
  }

  .site-footer__links a {
    font-size: 11px;
  }

  .site-footer__social {
    display: none; /* hide social icons row on mobile — brand col too narrow */
  }

  .site-footer__bottom {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
  }

  .site-footer__legal {
    justify-content: center;
  }

  /* Hero visual — order swap */
  .hero__visual {
    order: -1;
  }
}

/* --------------------------------------------------------------------------
   Tablet — 576px to 991px
   -------------------------------------------------------------------------- */
@media (min-width: 576px) and (max-width: 991px) {

  /* Spacing */
  .section-padding {
    padding-top: 72px;
    padding-bottom: 72px;
  }

  .content-width {
    padding-left: 20px;
    padding-right: 20px;
  }

  /* Typography */
  h1 { font-size: 32px; }
  h2 { font-size: 24px; }

  .hero__title { font-size: 30px; }

  /* Navbar */
  .site-nav__links {
    display: none;
  }

  .nav-hamburger {
    display: flex;
  }

  .site-nav__actions .btn-chedders:not(:last-child) {
    display: none;
  }

  /* Hero */
  .hero {
    padding-top: 56px;
    padding-bottom: 56px;
  }

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

  .hero__desc {
    max-width: 100%;
  }

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

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

  /* Footer — 4 columns maintained at tablet (DNA §7.7) */
  .site-footer__top {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 20px;
  }

  .site-footer__col-title {
    font-size: 12px;
  }

  .site-footer__links a {
    font-size: 13px;
  }

  /* CTA Banner */
  .cta-banner {
    padding: 44px 36px;
  }

  /* Hero window body */
  .hero__window-body {
    grid-template-columns: 1fr;
  }

  .hero__code-pane {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
}

/* --------------------------------------------------------------------------
   Laptop — 992px to 1199px
   -------------------------------------------------------------------------- */
@media (min-width: 992px) and (max-width: 1199px) {

  .hero__inner {
    gap: 48px;
  }

  .hero__title {
    font-size: 38px;
  }

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

/* --------------------------------------------------------------------------
   Desktop — 1200px and above
   -------------------------------------------------------------------------- */
@media (min-width: 1200px) {

  .hero {
    padding-top: 96px;
    padding-bottom: 96px;
  }
}

/* --------------------------------------------------------------------------
   Wide — 1400px and above
   -------------------------------------------------------------------------- */
@media (min-width: 1400px) {
  .content-width {
    max-width: 1320px;
  }
}

/* --------------------------------------------------------------------------
   Reduced Motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .fade-in-up {
    opacity: 1;
    transform: none;
  }

  html {
    scroll-behavior: auto;
  }
}
