/* ============================================================
   BEEFY MARKETING — SHARED MOBILE / RESPONSIVE STYLESHEET
   Loaded on all pages. Complements page-level inline styles.
   ============================================================ */

/* ── GLOBAL READABILITY OVERRIDES ──
   Raise muted-text opacity and body weight site-wide.
   These declarations load after page-level <style> blocks
   and therefore win at equal specificity. */
:root {
  --white-muted: rgba(245,240,235,0.78);
}
body {
  font-weight: 400;
}

/* ── 1440px CONTENT CONTAINER ──
   nav / section / footer backgrounds bleed full-width.
   .section-inner caps content at 1440px, centred, and carries horizontal padding
   so removing it from the outer elements prevents double-padding. */
.section-inner {
  max-width: 1440px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  padding-left: 48px;
  padding-right: 48px;
  box-sizing: border-box;
}

/* Strip horizontal padding only from elements that have a .section-inner child.
   Using :has() ensures the 288 static blog-post files (which were NOT migrated
   and have no .section-inner wrappers) are completely unaffected. */
nav:has(> .section-inner),
section:has(> .section-inner),
footer:has(> .section-inner) {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Grid-container sections that are their own layout — cap via max-width directly */
.stat-highlight-band {
  max-width: 1440px;
  margin-left: auto;
  margin-right: auto;
}

/* Direct-body grid/flex bands (diff-band, stats-row, etc.):
   Backgrounds/borders stay full-width because these divs are not width-constrained.
   Content is capped at 1440px via expanding side-padding: at viewports ≤ 1536px
   the original 48px side-padding is preserved; above 1536px padding grows
   symmetrically so inner content never exceeds 1440px. */
.diff-band,
.stats-row,
.stats-band,
.contact-grid,
.services-strip,
.clients-section,
.case-meta-bar,
.filter-bar,
.accent-strip,
.ck-bar {
  padding-left: max(48px, calc((100% - 1440px) / 2)) !important;
  padding-right: max(48px, calc((100% - 1440px) / 2)) !important;
}

/* ── ACCESSIBILITY: FOCUS-VISIBLE ──
   Restores visible focus rings for keyboard navigation.
   :focus-visible only fires on keyboard focus (not mouse clicks),
   so this adds zero visual noise for pointer users. */
:focus-visible {
  outline: 2px solid #f27d0c !important;
  outline-offset: 3px !important;
  border-radius: 2px;
}

/* ── HAMBURGER BUTTON (hidden on desktop, shown on mobile) ── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  /* 44×44px minimum tap target (WCAG 2.5.5) */
  min-width: 44px;
  min-height: 44px;
  padding: 11px;
  z-index: 201;
  flex-shrink: 0;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #f5f0eb;
  border-radius: 1px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-hamburger.is-open span:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); }
.nav-hamburger.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.is-open span:nth-child(3) { transform: rotate(-45deg) translate(4px, -4px); }

/* ── MOBILE SLIDE-IN MENU ── */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: #0a0a0a;
  z-index: 200;
  display: flex;
  flex-direction: column;
  padding: 100px 32px 48px;
  transform: translateX(100%);
  transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}
.mobile-menu.is-open {
  transform: translateX(0);
}
.mobile-menu-link {
  font-family: 'Bebas Neue', 'Arial Black', sans-serif;
  font-size: 38px;
  letter-spacing: 0.05em;
  color: rgba(245,240,235,0.85);
  text-decoration: none;
  padding: 14px 0;
  border-bottom: 1px solid rgba(245,240,235,0.07);
  display: block;
  transition: color 0.2s;
  line-height: 1;
}
.mobile-menu-link:hover,
.mobile-menu-link:active { color: #f5f0eb; }
.mobile-menu-cta {
  display: block;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #0a0a0a;
  background: linear-gradient(135deg, #c0187a 0%, #d42b2b 45%, #f27d0c 100%);
  text-decoration: none;
  padding: 18px 32px;
  text-align: center;
  margin-top: 28px;
}
.mobile-menu-footer {
  margin-top: auto;
  padding-top: 32px;
  font-size: 11px;
  color: rgba(245,240,235,0.25);
  font-family: 'DM Sans', sans-serif;
  letter-spacing: 0.1em;
}

/* ── BODY SCROLL LOCK when menu open ── */
body.menu-open { overflow: hidden; }


/* ==============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================== */

@media (max-width: 900px) {

  /* section-inner takes over horizontal padding at mobile */
  .section-inner { padding-left: 20px !important; padding-right: 20px !important; }

  /* Direct-body bands: reduce to 20px at mobile (overrides the max() formula) */
  .diff-band,
  .stats-row,
  .stats-band,
  .contact-grid,
  .services-strip,
  .clients-section,
  .case-meta-bar,
  .filter-bar,
  .accent-strip,
  .ck-bar { padding-left: 20px !important; padding-right: 20px !important; }

  /* NAV */
  nav:has(> .section-inner) { padding: 16px 0 !important; }
  .nav-links, .nav-cta { display: none !important; }
  .nav-hamburger { display: flex; }
  .nav-logo-img { height: 56px !important; }

  /* ── HOMEPAGE ── */
  /* .hero-section was the wrong selector — homepage uses .hero */
  .hero { padding: 128px 0 72px !important; min-height: 0 !important; }
  .hero-headline { font-size: clamp(48px, 11vw, 80px) !important; }
  .hero-headline .italic-line { white-space: normal !important; }
  .hero-sub { font-size: 16px !important; }
  .hero-cta-row { flex-wrap: wrap; gap: 12px !important; }
  .hero-bull-wrap { display: none !important; }
  .hero-scroll-hint { display: none !important; }

  /* Services section: header 2-col → 1-col, stats 4-col → 2-col, approach 2-col → 1-col */
  .services-header { grid-template-columns: 1fr !important; gap: 32px !important; }
  .stats-band { grid-template-columns: repeat(2, 1fr) !important; }
  .approach-layout { grid-template-columns: 1fr !important; gap: 56px !important; }

  /* Services overview strip on homepage */
  .services-overview { padding: 60px 0 !important; }
  .services-grid { grid-template-columns: repeat(2, 1fr) !important; }

  /* Work/portfolio showcase */
  .work-grid { grid-template-columns: 1fr !important; }
  .work-showcase { padding: 60px 0 !important; }

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

  /* Testimonials */
  .testimonials-grid { grid-template-columns: 1fr !important; }
  .testimonial-card-row { grid-template-columns: 1fr !important; }

  /* Blog preview */
  .blog-preview-grid { grid-template-columns: 1fr !important; }
  .blog-featured-grid { grid-template-columns: 1fr !important; }

  /* Clients */
  .clients-grid { grid-template-columns: repeat(2, 1fr) !important; }

  /* ── HERO SECTIONS (service / industry / about / contact) ── */
  /* Reduce top padding from 130px → 96px (just clears the 88px fixed nav + 8px gap)
     and bottom from 60px → 48px to tighten vertical rhythm on phones */
  .page-hero { padding: 132px 0 72px !important; }
  .about-hero { padding: 132px 0 72px !important; }
  .contact-hero { padding: 132px 0 72px !important; }
  .page-hero > .section-inner,
  .about-hero > .section-inner,
  .contact-hero > .section-inner { padding-left: 24px !important; padding-right: 24px !important; }
  .case-hero { min-height: clamp(420px, 55vh, 600px) !important; }
  .case-hero-content { padding: 128px 0 56px !important; }

  /* Hero headline font sizes: reduce minimums so they don't overwhelm mobile screens */
  .page-title { font-size: clamp(46px, 10vw, 64px) !important; }
  .about-headline { font-size: clamp(48px, 11vw, 68px) !important; }
  .contact-headline { font-size: clamp(48px, 11vw, 68px) !important; }

  /* Prevent italic accent lines from overflowing on small screens
     (white-space: nowrap is intentional on desktop to avoid orphan words,
     but causes horizontal scroll at mobile widths) */
  .about-headline .accent,
  .contact-headline .accent { white-space: normal !important; }

  /* Hero content layout */
  .hero-grid { grid-template-columns: 1fr !important; gap: 40px !important; }
  .hero-content { max-width: 100% !important; }

  /* Section eyebrow / title */
  .section-title { font-size: clamp(34px, 7vw, 56px) !important; }
  .case-headline { font-size: clamp(42px, 9vw, 72px) !important; }

  /* ── BODY TEXT FONT SIZES ──
     13px card/descriptor text is below Google's recommended 16px minimum for
     body copy; bumping to 14px improves readability and passes Lighthouse checks */
  .cap-desc,
  .process-desc,
  .diff-item-desc { font-size: 14px !important; line-height: 1.7 !important; }
  .faq-a { font-size: 15px !important; }

  /* ── CONTENT SECTIONS ── */
  .content-section { padding: 60px 0 !important; }

  /* Diff band (3-col with pipe dividers → stacked) */
  .diff-band { grid-template-columns: 1fr !important; gap: 32px !important; padding: 48px 0 !important; }
  .diff-divider { display: none !important; }

  /* Capability grid 3-col → 1-col */
  .cap-grid { grid-template-columns: 1fr !important; }

  /* Process grid 4-col → 2-col */
  .process-grid { grid-template-columns: repeat(2, 1fr) !important; }

  /* Related services 3-col → 1-col */
  .related-grid { grid-template-columns: 1fr !important; }

  /* "More work" 3-col grid */
  .more-grid { grid-template-columns: 1fr !important; }

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

  /* CTA bands */
  .cta-band { padding: 64px 0 !important; }
  .about-cta { padding: 64px 0 !important; }
  .cta-actions { flex-direction: column !important; align-items: center !important; }

  /* ── ABOUT PAGE ── */
  .stats-row { grid-template-columns: repeat(2, 1fr) !important; }
  .story-layout { grid-template-columns: 1fr !important; gap: 40px !important; }
  .beefy-beats { grid-template-columns: repeat(2, 1fr) !important; }
  .beefy-brand-row { grid-template-columns: 1fr !important; gap: 40px !important; }
  .culture-grid { grid-template-columns: 1fr !important; }
  .team-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .team-grid-large { grid-template-columns: repeat(2, 1fr) !important; }
  .values-grid { grid-template-columns: 1fr !important; }
  .awards-grid { grid-template-columns: 1fr !important; }

  /* ── INDUSTRIES HUB ── */
  .ind-grid { grid-template-columns: repeat(2, 1fr) !important; }

  /* ── TEAM BIO PAGES ── */
  .profile-layout { grid-template-columns: 1fr !important; gap: 40px !important; }
  .spec-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .team-mini-grid { grid-template-columns: repeat(2, 1fr) !important; }

  /* ── CONTACT PAGE ── */
  .contact-grid { grid-template-columns: 1fr !important; }
  .contact-info { padding: 48px 0 !important; }
  .contact-form-wrap { padding: 48px 0 !important; }
  .form-row { grid-template-columns: 1fr !important; }
  .services-strip { grid-template-columns: 1fr !important; }

  /* ── WORK / CASE STUDY PAGES ── */
  .case-meta-bar { grid-template-columns: repeat(2, 1fr) !important; }
  .case-body { padding: 60px 0 !important; }
  .case-body-grid { grid-template-columns: 1fr !important; gap: 40px !important; }

  /* Brand identity page specific grids */
  .symbol-grid { grid-template-columns: 1fr !important; }
  .color-swatches { grid-template-columns: 1fr !important; }
  .type-grid { grid-template-columns: 1fr !important; }
  .results-grid { grid-template-columns: 1fr !important; }
  .logo-section,
  .symbol-section,
  .color-section,
  .type-section,
  .website-section,
  .results-section { padding: 60px 0 !important; }
  .mission-band { padding: 48px 0 !important; }
  .mission-pillars { gap: 32px !important; }

  /* ── RESULTS LIST (non-grid) ── */
  .results-list { display: flex !important; flex-direction: column !important; gap: 2px !important; }

  /* ── SERVICES TAGS ── */
  .services-tags { gap: 8px !important; }
  .service-used-tag { padding: 8px 14px !important; font-size: 10px !important; }

  /* ── FOOTER (all pages) ──
     Mobile layout: brand full-width centered on top, then a 2-column
     grid of Services + Company, then Contact as a horizontal bar at the
     bottom — far more compact than the previous single-column stack. */
  footer:has(> .section-inner) { padding: 48px 0 32px !important; }

  /* 2-col grid; brand block spans both cols */
  .footer-layout {
    grid-template-columns: 1fr 1fr !important;
    gap: 40px 28px !important;
    margin-bottom: 40px !important;
  }

  /* Brand block: center logo, tagline, and socials */
  .footer-layout > div:first-child {
    grid-column: 1 / -1 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
  }
  .footer-social { justify-content: center !important; gap: 12px !important; }

  /* Services col: split 11 links into 2 internal sub-columns to halve height */
  .footer-layout > div:nth-child(2) .footer-links {
    columns: 2 !important;
    column-gap: 12px !important;
    gap: 0 !important;
  }
  .footer-layout > div:nth-child(2) .footer-links li { margin-bottom: 10px !important; }

  /* Contact col: span full width and lay links out horizontally */
  .footer-layout > div:last-child {
    grid-column: 1 / -1 !important;
    border-top: 1px solid rgba(245,240,235,0.06) !important;
    padding-top: 28px !important;
  }
  .footer-layout > div:last-child .footer-col-title { margin-bottom: 14px !important; }
  .footer-layout > div:last-child .footer-links {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 8px 20px !important;
  }

  .footer-bottom { flex-direction: column !important; gap: 8px !important; text-align: center !important; }
  /* Raise footer social icon tap targets to 44×44px (WCAG 2.5.5) without
     changing their visual size — extra space becomes transparent hit area */
  .footer-social a { width: 44px !important; height: 44px !important; }

  /* ── RESOURCE LIBRARY ── */
  .resource-grid { grid-template-columns: 1fr !important; }
  .resources-grid { grid-template-columns: 1fr !important; }

  /* ── BLOG (index page) ── */
  .blog-grid { grid-template-columns: 1fr !important; }
  .blog-search-bar { flex-direction: column !important; gap: 8px !important; }

  /* ── SERVICES PAGES ── */
  .logo-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .logo-portfolio-section { padding: 60px 0 !important; }
  .service-pull-quote { font-size: clamp(20px, 5vw, 28px) !important; }
  /* Stat highlight band (design-branding, web-design-development): 3-col → 1-col */
  .stat-highlight-band { grid-template-columns: 1fr !important; padding: 0 20px !important; }
  .stat-hl-item { padding: 36px 20px !important; }
  .stat-hl-item + .stat-hl-item { border-top: 1px solid rgba(245,240,235,0.06) !important; }
  .stat-hl-item + .stat-hl-item::before { display: none !important; }

  /* ── WORK / CASE STUDY PAGES (shared components) ── */

  /* Project layout (NC A&T, etc.) — also reverses RTL direction */
  .project-layout,
  .project-layout.reverse { grid-template-columns: 1fr !important; direction: ltr !important; gap: 40px !important; }
  .project-layout.reverse > * { direction: ltr !important; }

  /* Institutional 3-col grid → 1-col */
  .institutional-grid { grid-template-columns: 1fr !important; gap: 16px !important; }

  /* Social stats row 4-col → 2-col */
  .social-stats-row { grid-template-columns: repeat(2, 1fr) !important; }

  /* Brand identity grids */
  .brand-grid { grid-template-columns: 1fr !important; gap: 16px !important; }
  .branding-split { grid-template-columns: 1fr !important; gap: 16px !important; }
  .brand-panel-4 { grid-template-columns: repeat(2, 1fr) !important; }

  /* Animation & character grids */
  .animations-grid { grid-template-columns: 1fr !important; }

  /* Annual report & awards grids */
  .reports-grid { grid-template-columns: 1fr !important; }
  .awards-grid { grid-template-columns: 1fr !important; max-width: 100% !important; }

  /* Operation Red Wing 2-col */
  .orw-grid-2 { grid-template-columns: 1fr !important; }

  /* Named classes for previously-inline grids — visit-tomball */
  .vt-browser-split { grid-template-columns: 1fr !important; min-height: auto !important; }
  .vt-logos-4col { grid-template-columns: repeat(2, 1fr) !important; }
  .vt-logos-2col { grid-template-columns: 1fr !important; }
  .vt-logos-3col { grid-template-columns: 1fr !important; }
  .vt-video-grid { grid-template-columns: 1fr !important; }

  /* Named classes for previously-inline grids — tomball-edc */
  .edc-split-2 { grid-template-columns: 1fr !important; }

  /* Named classes for previously-inline grids — marcus-luttrell */
  .ml-split-2 { grid-template-columns: 1fr !important; }
  .ml-pt-3col { grid-template-columns: 1fr !important; }

  /* Named classes for previously-inline grids — craving-kernels */
  .ck-website-grid { grid-template-columns: 1fr !important; }

  /* ── PORTFOLIO PAGE ── */
  .featured-grid { grid-template-columns: 1fr !important; }
  .featured-section { padding: 60px 0 !important; }
  .gallery-filters { flex-wrap: wrap !important; gap: 8px !important; justify-content: center !important; }
  .port-hero { min-height: 0 !important; padding: 128px 0 72px !important; }

  /* ── TEAM BIO PAGES ── */
  .facts-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .profile-hero { padding: 120px 0 72px !important; }
  .profile-photo-box { width: 240px !important; height: 300px !important; margin: 0 auto !important; }

  /* ── ABOUT PAGE (additional) ── */
  .beefy-name-section { padding: 60px 0 !important; }
  .culture-section { padding: 60px 0 !important; }

  /* ── INDUSTRIES — page-specific unique grids ── */
  /* celebrities-influencers */
  .spotlight-grid { grid-template-columns: 1fr !important; }
  .monetize-row   { grid-template-columns: 1fr !important; }
  /* food-beverage */
  .fb-channel-layout { grid-template-columns: 1fr !important; }
  .fb-sector-grid    { grid-template-columns: 1fr !important; }
  /* higher-education */
  .grant-layout { grid-template-columns: 1fr !important; }
  /* hospitality */
  .membership-row { grid-template-columns: 1fr !important; }
  .venue-grid     { grid-template-columns: 1fr !important; }
  /* industries hub */
  .svc-grid { grid-template-columns: 1fr !important; }
  /* music-entertainment */
  .music-delivers-grid { grid-template-columns: 1fr !important; }
  .music-story-layout  { grid-template-columns: 1fr !important; }
  /* nonprofit-organizations */
  .values-layout { grid-template-columns: 1fr !important; }
  /* transportation-logistics */
  .houston-row { grid-template-columns: 1fr !important; }
  .sector-grid  { grid-template-columns: 1fr !important; }

  /* ── SERVICES — page-specific unique grids ── */
  /* shared 2-col content layout used across 8 services pages */
  .two-col     { grid-template-columns: 1fr !important; gap: 40px !important; }
  /* web-design-development */
  .feature-row { grid-template-columns: 1fr !important; }
  /* print-promotional */
  .flip              { grid-template-columns: 1fr !important; }
  .product-band-inner { grid-template-columns: 1fr !important; }
  .product-list      { grid-template-columns: 1fr !important; }

  /* ── DAVID GOGGINS specific ── */
  .creative-grid { grid-template-columns: 1fr !important; }
  .evidence-grid  { grid-template-columns: 1fr !important; }
  .social-split   { grid-template-columns: 1fr !important; }

  /* ── CRAVING KERNELS specific ── */
  .cmo-grid         { grid-template-columns: 1fr !important; }
  .deliverables-list { grid-template-columns: 1fr !important; }
  .tshirt-display   { grid-template-columns: 1fr !important; }
  .website-dual     { grid-template-columns: 1fr !important; }

  /* ── MARCUS LUTTRELL specific ── */
  .pt-shirts    { grid-template-columns: 1fr !important; }
  .social-mosaic { grid-template-columns: repeat(2, 1fr) !important; }

  /* ── VISIT-TOMBALL specific ── */
  .merch-grid  { grid-template-columns: 1fr !important; }
  .social-grid { grid-template-columns: repeat(3, 1fr) !important; }
  .site-cards-mock { grid-template-columns: repeat(2, 1fr) !important; gap: 8px !important; }

  /* ── TOMBALL-EDC specific ── */
  .social-posts-grid     { grid-template-columns: repeat(2, 1fr) !important; }
  .spreads-display       { grid-template-columns: 1fr !important; }
  .spread-ads-content    { grid-template-columns: 1fr !important; }
  .spread-social-content2 { grid-template-columns: repeat(2, 1fr) !important; }

  /* ── HOMEPAGE specific ── */
  .feature-highlight-grid { grid-template-columns: 1fr !important; gap: 48px !important; }

  /* ── CRAVING KERNELS specific ── */
  .anim-panel { min-height: 200px !important; }
}

/* Small phones (≤480px) */
@media (max-width: 480px) {
  /* Grid collapses */
  .process-grid { grid-template-columns: 1fr !important; }
  .clients-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .services-grid { grid-template-columns: 1fr !important; }
  .gallery-grid { grid-template-columns: 1fr !important; }
  .stats-row { grid-template-columns: repeat(2, 1fr) !important; }
  .stats-band { grid-template-columns: repeat(2, 1fr) !important; }
  .beefy-beats { grid-template-columns: 1fr !important; }
  .team-grid { grid-template-columns: 1fr !important; }
  .team-grid-large { grid-template-columns: 1fr !important; }
  .case-meta-bar { grid-template-columns: 1fr !important; }
  .ind-grid { grid-template-columns: 1fr !important; }
  .spec-grid { grid-template-columns: 1fr !important; }

  /* Tighter vertical padding on small phones */
  .hero { padding: 116px 0 64px !important; }
  .page-hero, .about-hero, .contact-hero { padding: 120px 0 64px !important; }
  .content-section { padding: 48px 0 !important; }
  .cta-band, .about-cta { padding: 52px 0 !important; }
  .diff-band { padding: 40px 0 !important; }
  .mission-band { padding: 40px 0 !important; }
  .case-body,
  .logo-section, .symbol-section, .color-section,
  .type-section, .website-section, .results-section { padding: 48px 0 !important; }

  /* Headline scale-down for very narrow viewports */
  .hero-headline { font-size: clamp(40px, 10vw, 60px) !important; }
  .page-title { font-size: clamp(38px, 10vw, 54px) !important; }
  .about-headline { font-size: clamp(40px, 11vw, 56px) !important; }
  .contact-headline { font-size: clamp(40px, 11vw, 56px) !important; }
  .case-headline { font-size: clamp(36px, 10vw, 58px) !important; }
  .section-title { font-size: clamp(30px, 8vw, 46px) !important; }

  .mobile-menu-link { font-size: 32px !important; }
}
