/* ════════════════════════════════════════════════════════════
   responsive.css — Cateye Creative Agency
   All responsive breakpoints — Desktop-first override strategy
   Load order: Bootstrap → main.css → responsive.css

   BREAKPOINT MAP
   ──────────────
   [1]  xxxl  ≥ 1800px  Ultra-wide / 4K
   [2]  xxl   ≤ 1799px  Large desktop
   [3]  xl    ≤ 1399px  Desktop
   [4]  lg    ≤ 1199px  Small laptop / tablet landscape
   [5]  md    ≤  991px  Tablet portrait
   [6]  sm    ≤  767px  Mobile landscape
   [7]  xs    ≤  575px  Mobile portrait
   ════════════════════════════════════════════════════════════ */


/* ─────────────────────────────────────────────────────────
   [1] XXXL — ≥ 1800px  Ultra-wide lock
   ───────────────────────────────────────────────────────── */
@media (min-width: 1800px) {
  .container-1800 { max-width: 1800px; }

  h1, .h1, .hero-title { font-size: 7.5rem; }
  h2, .h2              { font-size: 5.5rem; }

  .stat-block .stat-number { font-size: 5.5rem; }
}


/* ─────────────────────────────────────────────────────────
   [2] XXL — ≤ 1799px  Large desktop
   ───────────────────────────────────────────────────────── */
@media (max-width: 1799px) {
  .container-1800 {
    padding-right: var(--space-12);
    padding-left: var(--space-12);
  }

  .hero-title { font-size: 5.75rem; }
}


/* ─────────────────────────────────────────────────────────
   [3] XL — ≤ 1399px  Standard desktop
   ───────────────────────────────────────────────────────── */
@media (max-width: 1399px) {
  .container-1800 {
    padding-right: var(--space-10);
    padding-left: var(--space-10);
  }

  h1, .h1,
  .hero-title  { font-size: var(--text-5xl); }          /* 80px */
  h2, .h2      { font-size: 4rem; }                     /* 64px */
  h3, .h3      { font-size: var(--text-3xl); }          /* 42px */

  .contact-title { font-size: 4rem; }

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

  .hero-rotating-word { min-width: 240px; }
  .hero-stat-float { left: calc(-1 * var(--space-8)); }

  .manifesto-quote { font-size: var(--text-4xl); }

  .cta-banner-text { font-size: 12rem; }

  .section-cta-banner h2 { font-size: 4rem; }

  .contact-form-wrap { padding: var(--space-10); }
}


/* ─────────────────────────────────────────────────────────
   [4] LG — ≤ 1199px  Small laptop / tablet landscape
   ───────────────────────────────────────────────────────── */
@media (max-width: 1199px) {
  .container-1800 {
    padding-right: var(--space-8);
    padding-left: var(--space-8);
  }

  h1, .h1,
  .hero-title  { font-size: var(--text-4xl); }         /* 56px */
  h2, .h2      { font-size: var(--text-3xl); }         /* 42px */
  h3, .h3      { font-size: var(--text-2xl); }         /* 32px */
  .lead        { font-size: var(--text-lg); }

  .contact-title { font-size: var(--text-3xl); }

  /* Hide desktop nav — show hamburger */
  .nav-links { display: none; }
  .nav-cta   { display: none; }
  .hamburger { display: flex; }

  /* ── Touch targets ──
     From this breakpoint down the hamburger is the primary nav control and
     the layout is routinely driven by touch (iPad landscape is 1024px), so
     keep interactive controls at ~44px. */
  .hamburger { width: 44px; height: 44px; padding: 8px; }
  .filter-btn { min-height: 44px; }
  .form-input-custom,
  .form-select-custom { min-height: 44px; }
  .btn-cateye,
  .btn-ghost,
  .btn-white { min-height: 44px; }
  .video-popup-close { width: 44px; height: 44px; }
  /* Give short inline links a real tap area without shifting layout */
  .footer-contact-phone,
  .blog-card-link,
  .skip-link { display: inline-flex; align-items: center; min-height: 44px; max-width: 100%; }
  /* Standalone accent links sit just under the 24px WCAG minimum —
     a little vertical padding clears it without disturbing the flow. */
  .link-accent { padding-block: 4px; }
  /* The email is a long unbreakable token — keep it block-level so it can
     wrap instead of pushing past the viewport on narrow screens. */
  .footer-contact-email {
    display: flex;
    align-items: center;
    min-height: 44px;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

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

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

  /* Portfolio: 2 cols */
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }

  /* Process rows */
  .process-row-inner { gap: var(--space-5); }
  /* Industries marquee */
  .ind-headline { font-size: clamp(2.5rem, 5vw, 5rem); }
  .ind-item { font-size: clamp(1.3rem, 2.5vw, 2.2rem); }

  /* Industries: 4 cols stays */

  /* Why hanging cards */
  .hang-card { width: clamp(160px, 16vw, 220px); }
  .hang-wire { height: 55px; }

  /* Stats: 2x2 */
  .stats-grid-4 { grid-template-columns: repeat(2, 1fr); }

  /* Testimonial slider */
  .testimonial-card { width: clamp(260px, 44vw, 360px); }

  /* CTA banner */
  .section-cta-banner h2 { font-size: var(--text-3xl); }

  /* Contact info */
  .contact-info { padding-right: var(--space-6); }

  /* Footer */
  .footer-top .col-lg-3 { margin-bottom: var(--space-8); }

  /* Hero visual float cards position */
  .hero-stat-float { left: 0; }
  .hero-badge-float { right: 0; }

  /* Manifesto */
  .manifesto-quote { font-size: var(--text-3xl); }

  .cta-banner-text { font-size: 8rem; }

  .testimonial-hero-text { font-size: var(--text-2xl); }

  .hero-rotating-word { min-width: 200px; }
}


/* ─────────────────────────────────────────────────────────
   [5] MD — ≤ 991px  Tablet portrait
   ───────────────────────────────────────────────────────── */
@media (max-width: 991px) {
  /* Story stats: wrap into 3+2 */
  .story-stats-row { flex-wrap: wrap; justify-content: center; }
  .story-stat { flex: 0 0 33.333%; }
  .story-stat-divider { display: none; }
  .container-1800 {
    padding-right: var(--space-6);
    padding-left: var(--space-6);
  }

  h1, .h1,
  .hero-title  { font-size: var(--text-3xl); }         /* 42px */
  h2, .h2      { font-size: 2.75rem; }                 /* 44px */
  h3, .h3      { font-size: var(--text-xl); }          /* 24px */

  p, .body-text { font-size: var(--text-base); }
  .lead         { font-size: var(--text-base); }

  .contact-title { font-size: var(--text-2xl); }

  .section-xl  { padding: var(--space-12) 0; }
  .section-lg  { padding: var(--space-10) 0; }
  .section-md  { padding: var(--space-8) 0; }
  .section-sm  { padding: var(--space-5) 0; }

  /* Hero: left-aligned on tablet and mobile */
  .hero-content { text-align: left; }
  /* justify-content only — .hero-eyebrow relies on align-items:center to sit
     its 1px accent line level with the text */
  .hero-eyebrow,
  .hero-cta-row { justify-content: flex-start; }
  .hero-sub { margin-left: 0; margin-right: 0; }
  .hero-trust-bar { justify-content: flex-start; flex-wrap: wrap; }
  .hero-client-logos { justify-content: flex-start; }
  /* Keep the video box on the same left edge as the copy */
  .hero-img-col { justify-content: flex-start; }

  /* Contact page headline centres on stacked layouts, matching the hero.
     (The home h1 already inherits centring from .hero-content above.) */
  .contact-page-title { text-align: center; }

  /* ── Featured Work cards ──
     Taller cards on stacked layouts: the 21:8 desktop ratio left them as thin
     letterbox strips once they went full width. */
  .portfolio-stack .portfolio-card { aspect-ratio: 3 / 2; }

  /* All card copy sits over artwork/video here, so force it white for
     legibility — the accent category and dim result text lose contrast
     against a moving background. */
  .portfolio-card-info .portfolio-category,
  .portfolio-card-info .portfolio-title,
  .portfolio-card-info .portfolio-result {
    color: #fff;
  }

  /* Section headers stack here, so the supporting note reads left-aligned
     and flush with the heading above it rather than ragged against the
     right edge. */
  .section-header-flex {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-4);
  }

  .section-header-note {
    text-align: left;
    max-width: 100%;
  }

  /* ── Hero: stacked layout needs room, not a fixed viewport height ──
     Below this breakpoint the two columns stack, so the hero must grow with
     its content. The compound selector is deliberate: plain .section-hero
     would be overridden by the .section-xl padding reset further down the
     file. Top clears the 101px fixed nav, bottom clears the 50px marquee
     pinned to the hero's lower edge. */
  .section-hero.section-xl {
    padding-top: 8.5rem;
    padding-bottom: 5.5rem;
  }

  /* The 1:1 video box ballooned to a 625px square once stacked — far taller
     than the copy above it. Landscape keeps the hero readable in one screen. */
  .hero-img-box {
    width: 100%;
    max-width: 520px;
    aspect-ratio: 16 / 9;
  }

  .hero-img-col { padding: var(--space-8) 0 0; }

  /* Rotating word inline min-width */
  .hero-rotating-word { min-width: 160px; }

  /* ── Process: reclaim the desktop image gutter ──
     .process-list reserves 600px on the right for the absolutely
     positioned .process-img-panel. Neither was ever adjusted below
     desktop, so on tablet/mobile the list stayed 600px wider than the
     viewport and the panel overlapped the copy. The #process selector
     is needed to beat the ID-specificity rule in the light-theme block. */
  .process-list,
  #process .process-list { padding-right: 0; }
  .process-img-panel { display: none; }

  /* ── Process rows: allow wrapping ──
     The desktop design keeps titles/descriptions on one line. Below this
     breakpoint that text is wider than the viewport, and because
     body has overflow-x:hidden it gets clipped instead of scrolled —
     the copy simply disappears off the right edge. Let it wrap. */
  .process-row-body { min-width: 0; }
  .process-row-title,
  .process-row-desc { white-space: normal; }
  /* Wrapped copy needs more room than the one-line 5em reveal allows */
  .process-row.is-active .process-row-desc { max-height: 18em; }

  /* Touch-target sizing lives in the ≤1199px block — the same breakpoint
     where the hamburger replaces the desktop nav. */

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

  /* Portfolio: 2 cols */
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }

  /* Industries: 2 cols */
  .industries-grid { grid-template-columns: repeat(2, 1fr); }

  /* Why hanging cards — tablet */
  .hang-stage { gap: var(--space-3); }
  .hang-card { width: clamp(130px, 18vw, 185px); border-radius: 14px; }
  .hang-wire { height: 50px; }
  .why-cta-strip { flex-direction: column; align-items: flex-start; gap: var(--space-6); }

  /* Testimonial slider */
  .testimonial-card { width: 280px; }

  /* Blog: 2 cols */
  .blog-grid { grid-template-columns: repeat(2, 1fr); }

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

  /* CTA banner */
  .section-cta-banner h2 { font-size: 2.5rem; }
  .section-cta-banner p { font-size: var(--text-base); }
  .cta-banner-text { display: none; }

  /* Contact page: stack columns */
  .contact-info {
    padding-right: 0;
    margin-bottom: var(--space-10);
  }

  /* FAQ section: stack */
  .faq-left-col { margin-bottom: var(--space-10); }

  /* Map */
  .map-container { height: 320px; }

  /* Section header flex — stack on tablet */
  .section-header-flex {
    flex-direction: column;
    gap: var(--space-5);
    align-items: flex-start;
  }

  /* Footer */
  .footer-top { row-gap: var(--space-8); }

  /* Manifesto */
  .manifesto-quote { font-size: var(--text-2xl); }

  /* Testimonial hero */
  .testimonial-hero-quote { padding: var(--space-8); }
  .testimonial-hero-text { font-size: var(--text-xl); }

  /* Hero stat floats — hide on smaller viewport */
  .hero-stat-float,
  .hero-badge-float { display: none; }

  /* Process rows: hide vertical tag on small laptop */
  .process-row-tag { display: none; }
  .process-row-inner { grid-template-columns: 70px 1fr; }
}


/* ─────────────────────────────────────────────────────────
   [6] SM — ≤ 767px  Mobile landscape
   ───────────────────────────────────────────────────────── */
@media (max-width: 767px) {
  :root {
    --text-6xl: 3rem;
    --text-5xl: 2.5rem;
  }

  .container-1800 {
    padding-right: var(--space-5);
    padding-left: var(--space-5);
  }

  h1, .h1,
  .hero-title  { font-size: 2.25rem; line-height: 1.15; }
  h2, .h2      { font-size: 2.25rem; }                 /* 36px */
  h3, .h3      { font-size: 1.375rem; }
  .contact-title { font-size: 1.875rem; }
  .manifesto-quote { font-size: 1.5rem; }

  .section-xl { padding: var(--space-16) 0; }
  .section-lg { padding: var(--space-12) 0; }
  .section-md { padding: var(--space-10) 0; }

  /* Nav */
  .nav-logo-text { font-size: 1rem; }

  /* Hero */
  .hero-cta-row {
    flex-direction: column;
    width: 100%;
  }
  .btn-cateye,
  .btn-ghost {
    width: 100%;
    justify-content: center;
  }
  .hero-trust-bar {
    flex-direction: column;
    gap: var(--space-4);
  }

  /* Hero video box: smaller play button, tighter popup close button */
  .video-play-btn { width: 60px; height: 60px; }
  .video-play-btn-ring { inset: -12px; }
  .video-popup-overlay { padding: var(--space-4); }
  .video-popup-close { width: 44px; height: 44px; }

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

  /* Portfolio: 1 col */
  .portfolio-grid { grid-template-columns: 1fr; }

  /* Portfolio stack — disable sticky stacking on mobile */
  .stack-slot {
    position: relative !important;
    top: auto !important;
    margin-bottom: var(--space-5) !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
  }
  .stack-slot:last-child { margin-bottom: 0 !important; }
  /* Taller still on phones, where the card is the full column width */
  .portfolio-stack .portfolio-card { aspect-ratio: 1 / 1; }

  /* Portfolio card play trigger — smaller on mobile */
  .portfolio-play-icon { width: 52px; height: 52px; }
  .portfolio-play-text { font-size: 0.625rem; }

  /* Industries: 2 cols */
  .industries-grid { grid-template-columns: repeat(2, 1fr); }

  /* Why hanging cards — mobile: 2 rows, scroll */
  .hang-stage { flex-wrap: wrap; justify-content: center; gap: var(--space-4); padding-top: var(--space-10); }
  .hang-card { width: clamp(140px, 42vw, 170px); }
  .hang-wire { height: 40px; }

  /* Blog: 1 col */
  .blog-grid { grid-template-columns: 1fr; }

  /* Stats: 2 col */
  .stats-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .stat-block { padding: var(--space-6); }
  .stat-block .stat-number { font-size: 2.5rem; }

  /* Process rows — tablet */
  .process-row-inner { grid-template-columns: 70px 1fr; gap: var(--space-4); padding: var(--space-4) 0; }
  .process-row-num { font-size: 3rem; }
  .process-row-title { font-size: 1.8rem; }
  .process-row-tag { display: none; }
  .process-intro-text { text-align: left; }
  /* Industries */
  .ind-headline { font-size: 2.8rem; }
  .ind-statement { margin-bottom: var(--space-10); }
  .ind-item { font-size: 1.6rem; }

  /* Testimonial hero */
  .testimonial-hero-text { font-size: var(--text-base); }
  .testimonial-hero-quote { padding: var(--space-6); }
  .testimonial-hero-quote::before { font-size: 6rem; }

  /* Contact form */
  .contact-form-wrap { padding: var(--space-6); border-radius: var(--radius-lg); }

  /* Mobile menu */
  .mobile-menu { padding: 5rem var(--space-6) var(--space-8); }

  /* WhatsApp float */
  .whatsapp-float { bottom: var(--space-5); right: var(--space-5); width: 48px; height: 48px; }

  /* CTA banner */
  .section-cta-banner h2 { font-size: 2.125rem; }

  /* Footer bottom: stack */
  .footer-bottom { flex-direction: column; text-align: center; gap: var(--space-3); }

  /* Map */
  .map-container { height: 260px; }
  .map-overlay-info { left: var(--space-4); bottom: var(--space-4); }

  /* Portfolio filters: scroll */
  .portfolio-filters { flex-wrap: nowrap; overflow-x: auto; padding-bottom: var(--space-2); }
  .portfolio-filters::-webkit-scrollbar { height: 2px; }
  .filter-btn { flex-shrink: 0; }

  /* Service check grid */
  .service-check-grid { gap: var(--space-2); }

  /* Section header */
  .section-header-flex { gap: var(--space-4); }

  /* Accordion */
  .accordion-custom .accordion-button { font-size: var(--text-base); }
}


/* ─────────────────────────────────────────────────────────
   [7] XS — ≤ 575px  Mobile portrait
   ───────────────────────────────────────────────────────── */
@media (max-width: 575px) {
  /* Story stats: 2 per row */
  .story-stat { flex: 0 0 50%; }
  .story-heading { font-size: 1.75rem; }
  .container-1800 {
    padding-right: var(--space-4);
    padding-left: var(--space-4);
  }

  h1, .h1,
  .hero-title  { font-size: 2rem; }
  h2, .h2      { font-size: 2rem; }                    /* 32px */
  h3, .h3      { font-size: 1.25rem; }
  .contact-title { font-size: 1.75rem; }
  .overline    { font-size: 0.625rem; }

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

  /* Stats: 1 col on smallest screens */
  .stats-grid-4 { grid-template-columns: repeat(2, 1fr); }

  /* Industries: 2 col */
  .industries-grid { grid-template-columns: repeat(2, 1fr); }

  /* Process rows — mobile */
  .process-row-inner { grid-template-columns: 48px 1fr; gap: var(--space-3); padding: var(--space-4) 0; }
  .process-row-num { font-size: 2.2rem; }
  .process-row-title { font-size: 1.4rem; }
  /* Industries */
  .ind-headline { font-size: 2.2rem; }
  .ind-item { font-size: 1.2rem; padding: var(--space-1) var(--space-4); }

  /* Testimonial slider */
  .testimonial-card { width: 280px; }

  /* Portfolio single col */
  .portfolio-grid { grid-template-columns: 1fr; }

  /* Footer legal: stack */
  .footer-legal-links {
    flex-direction: column;
    gap: var(--space-2);
    text-align: center;
  }

  /* Contact form */
  .contact-form-wrap { padding: var(--space-5); }

  /* Form row: force stack */
  .contact-form-wrap .row > .col-md-6 { margin-bottom: 0; }

  /* Mobile nav links font */
  .mobile-nav-links a { font-size: var(--text-xl); }

  /* CTA banner */
  .section-cta-banner h2 { font-size: 1.875rem; }
  .btn-white { width: 100%; justify-content: center; }

  /* Hero trust bar */
  .client-logo-item { font-size: 0.7rem; }

  /* Blog grid */
  .blog-grid { grid-template-columns: 1fr; }

  /* FAQ section */
  .faq-section .col-lg-4 { margin-bottom: var(--space-8); }

  /* Diff grid: 1 col */
  .diff-grid { grid-template-columns: 1fr; }

  /* Map overlay */
  .map-overlay-info {
    left: var(--space-3);
    right: var(--space-3);
    bottom: var(--space-3);
  }
}
