/* =============== Root / Theme =============== */
:root{
  --red:#D82128; --red-700:#b0181e;
  --ink:#111827; --ink-weak:#6b7280;
  --paper:#ffffff; --paper-2:#f6f7f9;
  --bg-dark:#0b1a2b; --panel-dark:#0f2136;
  --brand-red-1:#e83b41;
  --brand-red-2:#c81f25;
  --dark: #0f0f0f;
  --light-bg: #fdecec;
  --text: #222;
  --muted:#4a4f57;
  --shadow:0 10px 30px rgba(17,24,39,.15);
  --radius:16px;
  /* set shared pill sizing once */
  --pill-py: 8px;
  --pill-px: 14px;
  --pill-fs: 13px;
}
*{box-sizing:border-box}
html,body{height:100%}
body{ 
  margin:0; 
  font-family:Inter,system-ui,Segoe UI,Roboto,Helvetica,Arial; 
  line-height:1.55;
  /* Give the page room for the fixed header */
  /*padding-top: 64px;   must match header height */
}

body.no-scroll {
  overflow: hidden;
  height: 100vh;
  position: fixed;
  width: 100%;
}

body.lightbox-open header {
  display: none !important;
}

body.lightbox-open #contact {
  z-index: 0 !important;
  position: relative !important;
}

.theme-dark{ color:#f8fafc; background:var(--bg-dark) }
.theme-light{ color:var(--ink); background:#f7f7f8 }

/* Utilities */
.container{ width:min(1100px,92%); margin-inline:auto }
.grid{ display:grid; gap:18px }
a{ color:inherit }



/* =============== Header =============== */
.site-header{
  position:sticky; top:0; z-index:40;
  background:#fff; border-bottom:1px solid rgba(0,0,0,.08); box-shadow: var(--shadow);
}
.header-inner{ display:flex; align-items:center; justify-content:space-between; padding:14px 0 }
.brand{ text-decoration:none }
.brand-text{ font-weight:900; color:#111; letter-spacing:.2px }
.brand-text small{ font-weight:600; color:#6b7280; margin-left:.35rem; font-size:.8rem }

.site-nav{ display:none; align-items:center; gap:22px; font-weight:700 }
/*.site-nav a{ text-decoration:none; color:#111 }
.site-nav a:hover{ color:var(--red) }*/
.site-nav a {position: relative; display: inline-block; text-decoration: none; color: #111;
  padding: 0; background: none; border: none;}
.site-nav a.active {color: var(--red);}
.site-nav a.active::after {transform: scaleX(1);}
.site-nav a::after {content: ''; position: absolute; left: 0; bottom: -4px; width: 100%;
  height: 2px; background-color: var(--red); transform: scaleX(0); transform-origin: left; transition: transform 0.3s ease;}
.nav-toggle{ display:inline-flex; flex-direction:column; gap:5px; background:transparent; border:0; cursor:pointer }
.nav-toggle span{ width:26px; height:2px; background:#111; border-radius:2px; display:block }
@media (min-width:880px){ .nav-toggle{display:none} .site-nav{display:flex} }

.logo {
  height: 80px;         /* adjust to fit your navbar height */
  width: auto;          /* keeps proportions */
  display: block;
}


/* Mobile menu */
.site-nav.open{
  display:flex; position:absolute; left:4%; right:4%; top:62px; flex-direction:column;
  gap:10px; background:#fff; border:1px solid rgba(0,0,0,.08); padding:12px; border-radius:12px;
}

/* === Force header to always stay on top === */
.site-header{
  position: fixed;      /* instead of sticky */
  top: 0; left: 0; right: 0;
  height: 100px;         /* set your actual header height */
  z-index: 99;
  background: #fff;
  border-bottom: 1px solid rgba(0,0,0,.08);
}

/* When mobile menu opens, make sure it layers above everything */
.site-nav.open{ z-index: 100; }

/* Prevent any section from covering the header (some browsers create new stacking contexts) */
.hero, .section, .reviews-carousel, .map-card, .contact-card { position: relative; z-index: 1; }

/* Make in-page anchor jumps account for the fixed header */
main section[id] { scroll-margin-top: 80px; }  /* ~header height + a bit */



/* =============== Sections / Titles =============== */
.section{ padding:72px 0 }
.section--soft{ background:#fde9ea }
.section__title{ margin:0 0 10px; font-size:clamp(26px,3.2vw,40px); font-weight:900 }
.section__subtitle{ color:#6b7280; margin:6px 0 24px }
.underline{ display:block; width:56px; height:6px; background:var(--red); border-radius:6px; margin:8px 0 }



/* =============== Hero (Red) =============== */
.hero{ position:relative; min-height:calc(620px); display:grid; align-items:end; overflow:hidden; border-bottom:4px solid rgba(255,255,255,.08) }
.hero.-red{
  height:100vh;
}
.hero.-red .hero__media{
  position:absolute; inset:0;
  background:linear-gradient(0deg, rgba(11,26,43,.4), rgba(11,26,43,.4)),
    url('mainbackground.jpg') center/cover no-repeat;
}
.hero__overlay{ position:absolute; inset:0; background:rgba(216,33,40,.70); mix-blend-mode:multiply;}
.hero__content{ position:relative; bottom: 150px ;}
.hero h1{ font-weight:900; font-size:clamp(30px,5.2vw,60px); line-height:1.05; margin:0 0 14px }
.lead{ max-width:50ch; color:#fff; opacity:.95 }
.hero__ctas{ display:flex; gap:14px; margin:22px 0 26px }

.hero__badges{ display:grid; gap:14px; grid-template-columns:repeat(3,minmax(0,1fr)); max-width:720px }
.badge{ display:flex; gap:12px; align-items:center; background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.18); padding:14px 16px; border-radius:12px; color:#fff }
.badge .icon{ font-size:20px }
/* Apply styles at 640px and below */
@media (max-width: 640px) {
  .hero__content{ position:relative; bottom: 120px ;}
  /* your overrides here */

}




/* =============== Buttons =============== */
.btn{
  display:inline-block; background:#fff; color:#111; padding:14px 20px; border-radius:12px;
  font-weight:900; text-decoration:none; box-shadow:var(--shadow); transition:transform .08s ease, background .2s ease;
}
.btn:hover{ transform:translateY(-1px) }
.btn--ghost{ background:transparent; color:#fff; border:2px solid rgba(255,255,255,.85); box-shadow:none }
.btn--small{ padding:10px 14px; border-radius:10px }
.theme-light .btn--ghost{ color:var(--red); border-color:var(--red) }
.btn--ghost.red{ color:var(--red); border-color:var(--red) }



/* =============== Services =============== */
.service-grid{ grid-template-columns:1fr }
@media (min-width:860px){ .service-grid{ grid-template-columns:repeat(2,1fr) } }
.service-card {
  background: #fff; /* fallback color */
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  padding: 20px;
  box-shadow: var(--shadow);
  background-size: cover;
  background-position: center;
  color: #fff; /* optional if the image has dark areas */
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5); /* dark overlay for contrast */
  z-index: 0;
}

.service-card * {
  position: relative;
  z-index: 1;
}

/* Background images for each card */
.bg-heating {
  background-image: url('galleryphotos/medium-shot-smiley-man-campervan.jpg');
}

.bg-iaq {
  background-image: url('galleryphotos/close-up-ventilation-system.jpg');
}

.bg-cooling {
  background-image: url('galleryphotos/defective-external-air-conditioner.jpg');
}
.bg-other {
  background-image: url('galleryphotos/man-using-tablet-his-smart-home.jpg');
}
.tri-grid{ display:grid; gap:18px; grid-template-columns:1fr; margin-top:18px }
@media (min-width:860px){ .tri-grid{ grid-template-columns:repeat(3,1fr) } }
.tri-card{
  position:relative; border-radius:16px; color:#fff; padding:18px; min-height:160px; overflow:hidden;
  border:1px solid rgba(0,0,0,.06); box-shadow:var(--shadow)
}
.tri-card:before{ content:""; position:absolute; inset:0; background:linear-gradient( to bottom, rgba(0,0,0,.15), rgba(0,0,0,.45) ) }
.tri-card *{ position:relative; z-index:1 }
.tri-card.-residential{ background:url('https://images.unsplash.com/photo-1507089947368-19c1da9775ae?q=80&w=1200') center/cover }
.tri-card.-commercial{ background:url('https://images.unsplash.com/photo-1487058792275-0ad4aaf24ca7?q=80&w=1200') center/cover }
.tri-card.-industrial{ background:url('https://images.unsplash.com/photo-1503387762-592deb58ef4e?q=80&w=1200') center/cover }

/* --- Hover raise effect for cards --- */
.service-card,
.tri-card {
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  will-change: transform;
}

/* lift + stronger shadow on hover/focus */
.service-card:hover,
.service-card:focus-within {
  transform: translateY(-6px);
  box-shadow: 0 14px 30px rgba(17,24,39,.18);
  border-color: rgba(0,0,0,.12);
}

.tri-card:hover,
.tri-card:focus-within {
  transform: translateY(-6px);
  box-shadow: 0 16px 36px rgba(0,0,0,.28);
}

/* subtle press feedback when actively clicking */
.service-card:active,
.tri-card:active {
  transform: translateY(-2px);
}

/* optional: cursor hint if your cards are clickable */
.service-card,
.tri-card { cursor: default; }
.tri-card a, .service-card a { cursor: pointer; }

/* accessibility: respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .service-card, .tri-card { transition: none; }
}



/* =============== Reviews =============== */
.reviews-carousel{ position:relative }
.reviews-carousel .track{
  display:grid; grid-auto-flow:column; grid-auto-columns:calc(100% - 56px);
  gap:18px; overflow:hidden; scroll-behavior:smooth;
}
@media (min-width:960px){ .reviews-carousel .track{ grid-auto-columns:1fr 1fr 1fr } }
.review-card{
  background:#fff; border:2px solid #f0c1c3; border-radius:14px; padding:18px; box-shadow:var(--shadow)
}
.review-card h3{ color:#b0181e; margin:0 0 8px }
.review-card .meta{ color:#6b7280; margin-top:6px }
.review-card .stars{ color:#ffb703; font-size:18px; margin-top:8px }
.carousel-btn{
  position:absolute; top:50%; transform:translateY(-50%); width:36px; height:36px; border-radius:50%;
  border:2px solid #e6a7aa; background:#fff; color:#b0181e; font-weight:900; cursor:pointer
}
.carousel-btn.prev{ left:-6px } .carousel-btn.next{ right:-6px }

.cta-ribbon{
  margin-top:26px; display:flex; align-items:center; justify-content:space-between; gap:16px;
  background:#fde9ea; border:1px solid #f6c7ca; border-radius:16px; padding:16px 18px;
}
.cta-ribbon.solid{ background:linear-gradient(180deg, #e83b41, #c81f25); color:#fff; border-color:transparent }
.cta-ribbon.solid .btn{ background:#fff; color:#111 }

/* Reviews carousel: behavior-only helpers (no visual changes) */
.reviews-carousel { position: relative; isolation: isolate; }

.reviews-carousel .track{
  display: flex;                /* lay cards in a row */
  gap: 18px;                    /* keep your current gap */
  overflow-x: auto;             /* allow horizontal scroll */
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

/* keep your card look; just make them snap and size responsively */
#reviews .review-card{
  flex: 0 0 84%;                /* 1 per view on small screens */
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
@media (min-width: 780px){ #reviews .review-card{ flex-basis: 48%; } }     /* 2 per */
@media (min-width: 1100px){ #reviews .review-card{ flex-basis: 31.5%; } }  /* 3 per */

.review_section_alt {
  margin: 5rem auto;
  padding: 0 1.5rem;
}

.review_section_alt h2 {
  color: var(--dark);
  font-size: 2rem;
  margin-bottom: 0.3rem;
  text-align: center;
}

.review_section_alt .subtitle {
  text-align: center;
  color: var(--ink-weak);
  margin-bottom: 2.5rem;
  line-height: 1.5;
}

/* Questions */
.question {
  display: block;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.4rem;
  color: var(--dark);
}

.question span {
  color: var(--red-700);
}

.optional {
  color: var(--ink-weak);
  font-weight: normal;
}

/* Inputs & textarea */
textarea, input[type="text"] {
  width: 100%;
  border: none;
  border-bottom: 2px solid #ccc;
  padding: 10px 4px;
  font-size: 1rem;
  background: transparent;
  color: var(--text);
  transition: border-color 0.2s ease;
}

textarea:focus, input[type="text"]:focus {
  border-bottom-color: var(--red-700);
  outline: none;
}

/* Star rating */
.stars {
  display: flex;
  justify-content: left;
  direction: rtl;
  margin-bottom: 1rem;
}

.stars input {
  display: none;
}

.stars label {
  font-size: 2rem;
  color: #ccc;
  cursor: pointer;
  transition: color 0.2s;
  margin: 0 4px;
}

.stars input:checked ~ label,
.stars label:hover,
.stars label:hover ~ label {
  color: #ffb703;
}

/* Button */
.submit {
  display: block;
  margin: 3rem auto 0;
  padding: 0.9rem 2.5rem;
  background-color: var(--red-700);
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  border-radius: 40px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.submit:hover {
  background-color: #8e1318;
  transform: translateY(-2px);
}

/* Subtle divider line between fields */
textarea, input[type="text"] {
  border-radius: 0;
  border-bottom: 2px solid #ddd;
}

textarea:not(:last-of-type),
input[type="text"]:not(:last-of-type) {
  margin-bottom: 1rem;
}

.no-bullet {
  list-style-type: none;
  margin: 0;
  padding: 0;
}








/* Make the carousel row equal-height */
.track {
  display: flex;
  align-items: stretch;   /* ✅ stretch all children to the tallest card */
}

/* Ensure each card can stretch naturally */
.review-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* keeps consistent internal layout */
  height: auto;                   /* allows stretching */
  flex: 1 1 auto;                 /* allow equal-height sizing */
}









/* buttons stay above cards & centered (same visuals) */
#reviews .carousel-btn{ z-index: 5; top: 50%; transform: translateY(-50%); }
#reviews .carousel-btn.prev{ left: -6px; }
#reviews .carousel-btn.next{ right: -6px; }
#reviews .carousel-btn[disabled]{ opacity: .45; cursor: not-allowed; }


/* Put carousel buttons outside the card row */
#reviews .reviews-carousel { position: relative; overflow: visible; }

/* remove the side padding/margin that kept buttons inside */
#reviews .track{
  padding: 0;           /* was: 4px 56px */
  margin: 0;            /* was: -56px */

}

/* Base position for buttons */
#reviews .carousel-btn{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
}

/* Mobile: Make home buttons one on top of the other */
@media (max-width: 640px){
  .hero__badges{ display:grid; gap:14px; grid-template-columns:1fr;}
}

/* Mobile: keep them slightly inset so they don't stick off-screen */
@media (max-width: 639.98px){
  #reviews .carousel-btn.prev{ left: 8px; }
  #reviews .carousel-btn.next{ right: 8px; }
}

/* Tablet: nudge them out a bit */
@media (min-width: 640px) and (max-width: 1023.98px){
  #reviews .carousel-btn.prev{ left: -18px; }
  #reviews .carousel-btn.next{ right: -18px; }
}

/* Desktop: fully outside the cards */
@media (min-width: 1024px){
  #reviews .carousel-btn.prev{ left: -48px; }
  #reviews .carousel-btn.next{ right: -48px; }
}

/* Optional: slightly bigger hit area without changing the look */
#reviews .carousel-btn{ padding: 0; width: 40px; height: 40px; }




/* =============== Gallery =============== */
.gallery-grid{ display:grid; gap:22px; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)) }
.g-item{
  width:100%; height:210px; object-fit:cover; border-radius:14px;
  border:3px solid var(--red); box-shadow:0 8px 20px rgba(0,0,0,.1); cursor:pointer; background:#ddd;
}
.g-item.-wide{ grid-column: span 2 }
.gallery-note{ color:#6b7280; margin-top:10px }

/* Lightbox */
.lightbox{
  position:fixed; inset:0; display:none; align-items:center; justify-content:center;
  background:rgba(0,0,0,.75); z-index:9999;
}
.lightbox.open{ display:flex }
.lightbox img{ max-width:92vw; max-height:88vh; border-radius:12px; box-shadow:var(--shadow) }
.lightbox__close{
  position:absolute; top:18px; right:18px; width:42px; height:42px; border-radius:50%; border:0;
  background:#fff; font-size:26px; cursor:pointer;
}
.lightbox__prev,
.lightbox__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background: #fff;
  border: none;
  border-radius: 50%;
  font-size: 28px;
  color: var(--red);
  cursor: pointer;
  z-index: 10000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  padding-bottom: 4px;
  padding-right: 6px;
}

.lightbox__prev:hover,
.lightbox__next:hover {
  background: #f0f0f0;
}

.lightbox__prev {
  left: 24px;
}

.lightbox__next {
  right: 24px;
}

.review-ftitle{
    margin-top: 3em;
}

.review__form{
  text-align: center;
  margin-top: 2em;
}
iframe{
  width: 70%;
  display: inline-block;
}



/* =============== Contact =============== */
.contact-wrap{ display:grid; gap:18px; grid-template-columns:1fr; margin-top:8px }
@media (min-width:960px){ .contact-wrap{ grid-template-columns:1fr 1.2fr } }
.contact-card, .map-card{
  background:#fff; border:1px solid rgba(0,0,0,.08); border-radius:16px; padding:18px; box-shadow:var(--shadow)
}
.contact-list{ list-style:none; margin:0; padding:0; display:grid; gap:18px }
.contact-list li{ display:flex; gap:14px; align-items:flex-start; padding-bottom:14px; border-bottom:1px solid rgba(0,0,0,.06) }
.contact-list li:last-child{ border-bottom:0; padding-bottom:0 }
.cl-icon{ display:grid; place-items:center; width:44px; height:44px; border-radius:12px; background:#fde9ea; color:#b0181e; font-size:22px }
.map-card img{ width:100%; height:auto; border-radius:12px }



/* =============== Footer =============== */
.site-footer{ background:#0b192b; color:#c9d1de }
.footer-inner{ display:flex; align-items:center; justify-content:space-between; gap:14px; padding:18px 0 }
.back-to-top{ color:#fff; text-decoration:none; font-weight:800; border:2px solid rgba(255,255,255,.5); padding:6px 10px; border-radius:10px }







/* put at the end of styles.css */
.g-item{ transition: transform .18s ease, box-shadow .18s ease; }
.g-item:hover{ transform: translateY(-4px); box-shadow: 0 12px 26px rgba(0,0,0,.18); }

/* Contact map sizing + rounded clipping */
.map-card { overflow: hidden; }
.map-card .map {
  width: 100%;
  height: 360px;
  border-radius: 12px;
}
@media (min-width: 960px){
  .map-card .map { height: 420px; }
}

/* Move attribution out of the map and style it subtly */
.map-card { overflow: hidden; }
.map-card .map { width:100%; height:420px; border-radius:12px; }
.map-credit{
  margin:6px 2px 0;
  font-size:12px;
  color:#94a3b8;
  text-align:right;
}

/* In case Leaflet still renders its control somewhere, hide it */
.leaflet-control-attribution { display:none !important; }


/* ===== Brands (must be horizontally scrollable) ===== */
#brands .brands-track{
  display:flex; align-items:center; gap:48px;
  overflow-x:auto !important;   /* allow motion */
  overflow-y:hidden !important;
  padding:12px 0;
  scrollbar-width:none;         /* hide scrollbar */
  -webkit-overflow-scrolling:touch;
}
#brands .brands-track::-webkit-scrollbar{ display:none }

#brands .brand-logo{
  flex:0 0 220px; height:72px; object-fit:contain;
  filter:grayscale(100%) opacity(.9);
  transition:filter .2s ease, transform .15s ease;
  user-select:none; -webkit-user-drag:none;
}
#brands .brand-logo:hover{ filter:none; transform:translateY(-2px); }

/* theme color */
.brands-title{ color:black; }

/* safety: no stray CSS animations */
#brands .brands-track, #brands .brand-logo, #brands *{ animation:none !important; }

@media (max-width:640px){
  #brands .brands-track{ gap:32px }
  #brands .brand-logo{ flex-basis:180px; height:60px }
}

/* 1) Little red dash under "Brands We Carry" */
.section__title.brands-title{
  display:inline-block;           /* so the dash sits right under the text */
  margin-bottom:12px;
}
.section__title.brands-title::after{
  content:"";
  display:block;
  width:64px;                     /* dash length */
  height:4px;                     /* dash thickness */
  margin-top:10px;
  background:var(--brand-red-1);
  border-radius:999px;            /* pill-shaped dash */
}

/* 2) Red outline on brand boxes when hovered (and keyboard focus) */
#brands .brand-logo{
  transition: filter .2s ease, transform .15s ease, box-shadow .15s ease;
  border-radius:12px;             /* so outline follows rounded corners */
}
#brands .brand-logo:hover{
  box-shadow:0 0 0 2px var(--brand-red-1), 0 8px 20px rgba(0,0,0,.08);
  filter:none;
  transform:translateY(-2px);
}
/* accessibility: show the same red outline on keyboard focus */
#brands .brand-logo:focus-visible{
  outline:none;
  box-shadow:0 0 0 3px var(--brand-red-1);
  border-radius:12px;
}


.contact-extras{
  margin-top: 14px;
  display: grid;
  gap: 14px;
}

.info-subcard h4{
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
  color: #0d1321;
}

/* Hours */
.hours-grid{
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 14px;
  font-size: 14px;
  color:#333;
}
.emergency-pill{
  margin-top: 10px;
  display:inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color:#fff;
  background: linear-gradient(180deg,var(--brand-red-1),var(--brand-red-2));
  box-shadow: 0 6px 16px rgba(200,31,37,.25);
}



@media (max-width:640px){
  .hours-grid{ font-size:13px; }
  .pay{ font-size:12px; }
}

/* 3 items in a clean grid, no boxes */
.tri-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0,1fr));
  gap:16px;
  margin:8px 0 18px;
}

/* Strip every old “card” style (gradients, overlays, shadows, borders) */
.tri-grid .tri-card,
.tri-grid .tri-card.-residential,
.tri-grid .tri-card.-commercial,
.tri-grid .tri-card.-industrial{
  position:relative;
                      /* use plain spacing */
  background:transparent !important;
  background-image:none !important;
  
  border:0 !important;
  
  color:var(--ink);
}
.tri-grid .tri-card::before,
.tri-grid .tri-card::after{
  content:none !important;
  background:none !important;
  box-shadow:none !important;
}

/* Heading with small red icon pill */
.tri-grid .tri-card h3{
  display:flex; align-items:center; gap:10px;
  margin:0 0 6px;
  font-weight:800;
  font-size:20px;
  line-height:1.2;
  color:var(--ink);
}
.tri-grid .tri-card .svc-ico{
  display:inline-grid; place-items:center;
  width:32px; height:32px; border-radius:50%;
  background:#fde9eb;            /* soft red tint */
  color:var(--red-700);         /* SVG uses currentColor */
  flex:0 0 32px;
}

/* One-line blurb */
.tri-grid .tri-card p{
  margin:0;
  font-size:14px;
  line-height:1.45;
  color:var(--muted);
}

/* Responsive */
@media (max-width:980px){
  .tri-grid{ grid-template-columns:repeat(2, minmax(0,1fr)); }
}
@media (max-width:560px){
  .tri-grid{ grid-template-columns:1fr; }
}

.tri-card {
  min-height: 120px;
}


/* brands rail */
#brands .brands-track{
  display:flex; align-items:center; gap:14px;
  overflow-x:auto; overflow-y:hidden; padding:4px 0;
  scrollbar-width:none; -webkit-overflow-scrolling:touch;
}
#brands .brands-track::-webkit-scrollbar{ display:none }

/* border ON the image so it wraps it */
#brands .brand-logo{
  display:inline-block;        /* so padding/border apply */
  height:140px;                 /* tweak for size */
  width:auto;                  /* keep aspect */
  object-fit:contain;

  /* make it a small chip that hugs the logo */
  padding:4px 8px;             /* TIGHT padding = tight border */
  border-radius:12px;
  border:2px solid transparent;
  background:
    linear-gradient(#fff,#fff) padding-box,
    linear-gradient(180deg,#e83b41,#c81f25) border-box;

  box-shadow:0 6px 16px rgba(0,0,0,.06);
  filter:grayscale(100%) opacity(.9);
  transition:filter .2s, transform .15s, box-shadow .15s;
}
#brands .brand-logo:hover{
  filter:none; transform:translateY(-2px);
  box-shadow:0 10px 26px rgba(0,0,0,.10);
}

/* kill any old fixed sizing that forces big boxes */
#brands .brand-logo{ flex:0 0 auto !important; max-width:none !important; }

/* smaller pill chips to match emergency pill */
.area-pills{
  display:flex; flex-wrap:wrap; gap:8px;          /* tighter gap */
  margin:6px 0 8px; padding:0; list-style:none;
}
.area-pills li{
  display:inline-flex; align-items:center; justify-content:center;
  padding:8px 14px;                                /* ↓ same height/feel */
  font-size:13px; font-weight:700; line-height:1;  /* match pill text size */
  border-radius:999px;
  background:#fff; border:1.25px solid #efefef;
  box-shadow:0 2px 8px rgba(0,0,0,.05);
  cursor:pointer; user-select:none;
  transition:transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.area-pills li:hover{
  transform:translateY(-1px);
  box-shadow:0 8px 18px rgba(0,0,0,.08);
  border-color:#f5c3c6;
}

/* apply to emergency pill */
.emergency-pill{
  padding:var(--pill-py) var(--pill-px);
  font-size:var(--pill-fs);
  border-radius:999px;
  /* (keep your existing gradient/shadow/etc.) */
}

/* make area chips inherit the same size */
.area-pills{ gap:8px; }
.area-pills li{
  padding:var(--pill-py) var(--pill-px);
  font-size:var(--pill-fs);
  border-radius:999px;
}

/* Stack map (top) and credit (bottom) */
.map-card{
  display: grid;
  grid-template-rows: minmax(480px, 1fr) auto; /* map height + credit row */
  gap: 8px;
}

/* Make the map fill the first row completely */
.map-card .map{
  width: 100%;
  height: 100%;
  border-radius: 14px;
  overflow: hidden;
}

/* Credit styling under the map */
.map-credit{
  margin: 0;
  text-align: right;               /* or 'center' if you prefer */
  font-size: 12px;
  color: #6b7280;                  /* subtle grey */
}

/* Ensure Leaflet’s default attribution control is hidden
   (you’re providing your own credit below). */
.leaflet-control-attribution{ display:none !important; }

/* Optional: smaller heights on mobile */
@media (max-width: 900px){
  .map-card{
    grid-template-rows: minmax(420px, 1fr) auto;
  }
}

/* iPhone-friendly: no snap, momentum on for user scrolls */
#brands .brands-track{
  scroll-snap-type:none;
  scroll-behavior:auto;              /* never smooth-scroll programmatically */
  -webkit-overflow-scrolling:touch;  /* momentum when user drags */
}

/* while script is autoplaying, disable momentum to avoid stutter */
#brands.scrolling .brands-track{
  -webkit-overflow-scrolling:auto;
}

/* While autoplay is running, disable iOS momentum to avoid stutter */
#brands.scrolling .brands-track{
  -webkit-overflow-scrolling: auto;
}

/* Performance tweaks for each logo chip */
#brands .brand-logo{
  will-change: transform, filter;          /* compositing hint */
  transform: translateZ(0);                /* standard property */
  -webkit-transform: translateZ(0);        /* iOS GPU nudge */
  box-shadow: 0 3px 12px rgba(0,0,0,0.05); /* <-- no stray characters */
}

/* During autoplay, kill transitions/filters to keep frames cheap */
#brands.scrolling .brand-logo{
  transition: none !important;
  filter: grayscale(100%) opacity(.95);
}

/* When the carousel is autopanning, don't animate mid-scroll */
#brands.scrolling .brand-logo{
  transition: none !important;
}

/* Keep logos dim while scrolling… */
#brands.scrolling .brand-logo:not(:hover){
  filter: grayscale(100%) opacity(.95);
}

/* …but if you hover one, light it up */
#brands.scrolling .brand-logo:hover{
  filter: none !important;
  opacity: 1 !important;
  transform: translateY(-2px);
}

/* (optional) make sure hover works if something disabled pointer events */
#brands .brand-logo{ pointer-events: auto; }

/* iPhone momentum when user drags; off while autoplay runs */
#brands .brands-track{
  -webkit-overflow-scrolling: touch;
  scroll-behavior: auto;
}
#brands.scrolling .brands-track{
  -webkit-overflow-scrolling: auto;
}

/* keep hover light-up even while scrolling */
#brands.scrolling .brand-logo{ transition:none !important; }
#brands.scrolling .brand-logo:not(:hover){ filter:grayscale(100%) opacity(.95); }
#brands.scrolling .brand-logo:hover{ filter:none !important; opacity:1 !important; transform:translateY(-2px); }
#brands .brand-logo{ pointer-events:auto; will-change:transform, filter; transform:translateZ(0); -webkit-transform:translateZ(0); }




/* ===== Mission Statement (fits the section grid) ===== */
.container .mission{
  margin-top: 3em;
}
.mission{

  --accent: var(--red);
  --accent-700: var(--red-700);

  /* same surface + radius as other cards */
  background: var(--paper);
  color: var(--ink);
  border: 1px solid color-mix(in srgb, var(--ink), transparent 92%);
  border-radius: var(--radius);
  box-shadow: var(--shadow);

  /* spacing that matches your section cards */
  padding: clamp(1rem, 2vw, 1.5rem);
  margin-inline: 0;                /* align to container edges */
  margin-block: 0 1.25rem;         /* sit close to heading/underline */
  position: relative;
  overflow: clip;
  width: 100%;                     /* fill the container like other blocks */
}

/* thin accent bar to match brand */
.mission::before{
  content:"";
  position:absolute; left:0; right:0; top:0; height:4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-700));
}

/* kicker + title sizes tuned to section headings */
.mission__kicker{
  display:inline-block;
  font-size:.8rem;
  font-weight:700;
  letter-spacing:.06em;
  text-transform:uppercase;
  color: color-mix(in srgb, var(--red), var(--ink) 35%);
  margin-bottom:.25rem;
}

.mission__title{
  margin:0 0 .6rem;
  line-height:1.25;
  /* keep h3 vibe without overpowering the section title */
  font-size: clamp(1.125rem, 1rem + 0.9vw, 1.5rem);
  color: var(--ink);
  text-wrap: balance;
}

/* comfy measure & rhythm; matches paragraph styling elsewhere */
.mission__body{
  
  line-height: 1.7;
  font-size: clamp(.98rem, .92rem + .35vw, 1.125rem);
  color: var(--ink-weak);
  text-wrap: pretty;
  hyphens: auto;
  margin: .25rem 0 .75rem;
}

/* values line up in two columns on md+, single column on mobile */
.mission__values{
  list-style:none;
  padding:0;
  margin:.5rem 0 0;
  display:grid;
  gap:.75rem 1.25rem;
  grid-template-columns: 1fr;
}
.mission__values li{
  color: var(--ink);
  padding-left:.85rem;
  border-left: 3px solid color-mix(in srgb, var(--red), var(--ink) 20%);
}
@media (min-width: 720px){
  .mission__values{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}




