/*
Theme Name: Brake Club USA
Theme URI: https://www.brakeclubusa.com/
Author: Brake Club USA
Description: Custom theme for brakeclubusa.com — mobile brake repair serving Greater Houston. Recreates the high-fidelity design handoff pixel-perfectly: quote funnel, booking flow with discount ladder, 21 city pages, 5 service pages, fleet + careers forms, and an admin pricing console. All lead/booking/pricing logic is server-side per the security checklist.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: Proprietary
Text Domain: brakeclub
*/

/* ============================================================
   BRAKE CLUB USA — Design Tokens (from design-system handoff)
   NOTE: production should self-host these fonts (see
   developer_handoff/03_SEO_GUIDE.md, performance section).
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@700;800;900&family=Barlow:wght@400;500;600;700&display=swap');

:root {
  --navy:          #1C3252;
  --navy-dark:     #0F1E33;
  --navy-mid:      #254167;
  --red:           #C41A2A;
  --red-dark:      #A01522;
  --red-light:     #E8202F;
  --white:         #FFFFFF;
  --off-white:     #F4F5F7;
  --gray-light:    #E5E7EB;
  --gray-mid:      #6B7280;
  --gray-dark:     #1F2937;

  --color-bg-primary:       var(--off-white);
  --color-bg-dark:          var(--navy);
  --color-bg-darker:        var(--navy-dark);
  --color-bg-card:          var(--white);
  --color-bg-card-dark:     var(--navy-mid);

  --color-text-primary:     var(--gray-dark);
  --color-text-secondary:   var(--gray-mid);
  --color-text-on-dark:     var(--white);
  --color-text-on-dark-muted: rgba(255,255,255,0.65);

  --color-accent:           var(--red);
  --color-accent-hover:     var(--red-dark);
  --color-brand:            var(--navy);

  --color-border:           var(--gray-light);
  --color-border-dark:      rgba(255,255,255,0.12);

  --font-display:   'Barlow Condensed', sans-serif;
  --font-body:      'Barlow', sans-serif;

  --shadow-sm:   0 1px 4px rgba(0,0,0,0.07);
  --shadow-md:   0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg:   0 8px 32px rgba(0,0,0,0.14);
  --shadow-xl:   0 16px 48px rgba(0,0,0,0.20);

  --radius-sm:   4px;
  --radius-md:   6px;
  --radius-lg:   12px;
  --radius-xl:   20px;
  --radius-pill: 9999px;

  --transition-fast:   0.15s ease;
  --transition-base:   0.2s ease;
  --transition-slow:   0.35s ease;

  --max-width: 1200px;
}

/* Global base shared by every page (the per-page <style> blocks
   from the design files are output in each page's head). */
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Barlow', sans-serif;
  background: #fff;
  color: #111;
  -webkit-font-smoothing: antialiased;
}
a.navlink:hover { color: #C41A2A; }
.lift { transition: transform .18s ease, box-shadow .18s ease; }
.lift:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(15,30,51,.14); }
.btnp:hover { background: #A01522 !important; }

/* Mobile bottom CTA bar + responsive header (shared on all pages) */
.bcu-bottom-cta { display: none; }
@media (max-width: 980px) {
  .bcu-nav { display: none !important; }
  .bcu-top-cta { display: none !important; }
  .bcu-menu-btn { display: inline-flex !important; }
  .bcu-bottom-cta { display: flex !important; }
  .bcu-pagepad { padding-bottom: 84px !important; }
}

/* ============================================================
   MOBILE RESPONSIVE LAYER — added 2026-07-10 (capture-first patch)
   The templates use inline desktop styles, so every rule here is
   !important by necessity. Scope: stack all grids, kill horizontal
   overflow, scale display headings, center the quote card on phones.
   ============================================================ */

/* --- Tablet and down --- */
@media (max-width: 980px) {
  .cols-3, .cols-4 { grid-template-columns: 1fr 1fr !important; }
  .hero-split { grid-template-columns: 1fr !important; gap: 28px !important; }
  .bcu-hero-inner { flex-wrap: wrap !important; min-height: 0 !important; padding: 36px 0 !important; gap: 22px !important; }
  .bcu-hero-copy { flex: 1 1 100% !important; }
  body:not(.bcu-focus) .bcu-quotewrap { flex: 1 1 100% !important; max-width: 460px !important; margin: 0 auto !important; }
  .bcu-watermark { display: none !important; } /* 560px absolute img overflowed phone viewports */
}

/* --- Phones --- */
@media (max-width: 720px) {
  html, body { overflow-x: hidden !important; } /* stop sideways drift that made content look off-center */
  .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr !important; }
  .bcu-rev-video, .bcu-svc-grid { grid-template-columns: 1fr !important; }

  /* Quote card: stack panels, tighten spacing, center the intro panel */
  #bcu-quote-card { margin-top: -24px !important; border-radius: 14px !important; }
  #bcu-quote-card .cols-2 > div { padding: 24px 20px !important; }
  #bcu-quote-card .cols-2 > div:first-child { text-align: center !important; }
  #bcu-quote-card .cols-2 > div:first-child > div > div[style*="display:flex"] { justify-content: center !important; }

  /* Scale inline display headings so lines wrap cleanly */
  [style*="font-size:54px"], [style*="font-size:50px"], [style*="font-size:48px"] { font-size: 34px !important; line-height: 1.08 !important; }
  [style*="font-size:46px"], [style*="font-size:42px"] { font-size: 31px !important; line-height: 1.1 !important; }
  [style*="font-size:40px"] { font-size: 29px !important; line-height: 1.1 !important; }
}

/* --- Funnel focus-mode fixes (added 2026-07-10, round 2) --- */
@media (max-width: 720px) {
  /* iOS zooms any input under 16px, shifting the layout sideways mid-form */
  [data-bcu-in], select[data-bcu-in] { font-size: 16px !important; }
  body.bcu-focus .bcu-action-row button { min-height: 48px !important; }
}

/* --- Focus-mode card: internal scroll + Back/Next ALWAYS pinned at card bottom (v4) --- */
.bcu-fcard > div { overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.bcu-fcard .bcu-action-row { position: sticky; bottom: -1px; background: #fff; padding: 12px 0 10px; z-index: 6; box-shadow: 0 -12px 14px -10px rgba(0,0,0,.18); }
.bcu-fcard .bcu-secure-note { position: sticky; bottom: -1px; background: #fff; padding-bottom: 6px; z-index: 6; }
@media (max-width: 720px) {
  .bcu-fcard { max-height: calc(100dvh - 20px) !important; border-radius: 14px !important; }
}
