/* ==========================================================================
   Tri-Pacific Heating & Air Conditioning — site styles
   One small stylesheet, no framework. Mobile first; desktop rules at 900px.
   ========================================================================== */

:root {
  --navy: #06214f;
  --navy-2: #0a2d6b;
  --blue: #003a9c;      /* brand blue */
  --blue-light: #e6edf8;
  --steel: #5b6b7c;
  --ink: #1b2430;
  --muted: #4a5767;        /* 7.4:1 on white */
  --line: #d9e1e8;
  --bg: #ffffff;
  --bg-soft: #f4f7fa;
  --accent: #b2121f;       /* brand red: calls and quotes only */
  --accent-dark: #8a0d17;
  --warm: #fbf3f3;         /* residential page wash */
  --warm-2: #f0d9da;
  --ok: #1f7a4d;
  --err: #b42318;
  --radius: 10px;
  --shadow: 0 6px 24px rgba(6, 33, 79, .10);
  --max: 1160px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --callbar-h: 52px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  padding-top: var(--callbar-h); /* room for the fixed mobile call bar */
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
a:hover { color: var(--navy); }
h1, h2, h3, h4 { line-height: 1.2; color: var(--navy); margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 5vw, 3rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
ul { padding-left: 1.2em; }

/* Keyboard users always see where they are */
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--navy); color: #fff; padding: 10px 16px;
}
.skip-link:focus { left: 8px; top: 8px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.section { padding: 56px 0; }
.section.soft { background: var(--bg-soft); }
.section.navy { background: var(--navy); color: #e9f0f7; }
.section.navy h2, .section.navy h3 { color: #fff; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700; color: var(--blue); margin-bottom: .5em; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 62ch; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

/* ---------- Buttons (min 48px tap target) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: 12px 22px; border-radius: 8px;
  font-weight: 700; font-size: 1rem; text-decoration: none; border: 2px solid transparent;
  cursor: pointer; transition: background .15s, color .15s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-outline { border-color: currentColor; color: var(--navy); background: transparent; }
.btn-outline:hover { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn-light { border-color: #fff; color: #fff; }
.btn-light:hover { background: #fff; color: var(--navy); }
.btn svg { width: 20px; height: 20px; flex: none; }

/* ---------- Fixed mobile call bar (top of screen) ---------- */
.callbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--callbar-h);
  display: flex; align-items: center; justify-content: center; gap: .6em;
  background: var(--accent); color: #fff; font-weight: 800; font-size: 1.05rem;
  text-decoration: none; letter-spacing: .01em;
}
.callbar:hover { color: #fff; background: var(--accent-dark); }
.callbar svg { width: 22px; height: 22px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: var(--callbar-h); z-index: 90;
  background: #fff; border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); }
.brand-logo { height: 30px; width: auto; flex: none; }
.brand-divider { width: 1px; align-self: stretch; margin: 6px 0; background: var(--line); }
.brand-name { font-weight: 800; line-height: 1.1; font-size: .92rem; color: var(--navy); }
.brand-name small { display: block; font-weight: 600; font-size: .62rem; color: var(--steel); letter-spacing: .04em; text-transform: uppercase; }
.header-phone { display: none; }

.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; color: var(--navy); cursor: pointer;
}
.nav-toggle svg { width: 24px; height: 24px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; color: #fff; padding: 56px 0 64px;
  background:
    linear-gradient(115deg, rgba(6,33,79,.94) 0%, rgba(8,40,96,.82) 50%, rgba(0,58,156,.55) 100%),
    var(--hero-img, none) center / cover no-repeat, var(--navy);
}
.hero h1 { color: #fff; max-width: 18ch; }
.hero .lead { color: #d6e3ef; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 28px; }
.trust { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; font-size: .93rem; }
.trust li { display: flex; align-items: center; gap: 8px; color: #e9f0f7; }
.trust svg { width: 20px; height: 20px; flex: none; color: #ff9aa2; }
.hero.page-hero { padding: 44px 0 48px; }
.hero.page-hero h1 { max-width: 24ch; }
.breadcrumb { font-size: .85rem; margin-bottom: 12px; color: #b9cde0; }
.breadcrumb a { color: #fff; }

/* Residential variant: warmer, homeowner tone */
.theme-res .hero {
  background:
    linear-gradient(115deg, rgba(6,33,79,.92) 0%, rgba(60,20,50,.78) 55%, rgba(178,18,31,.55) 100%),
    var(--hero-img, none) center / cover no-repeat, #7a0c15;
}
.theme-res .section.soft { background: var(--warm); }
.theme-res .card { border-color: var(--warm-2); }
.theme-res .eyebrow { color: var(--accent-dark); }
/* Construction variant: darker, industrial */
.theme-con .hero {
  background:
    linear-gradient(115deg, rgba(12,20,32,.94) 0%, rgba(25,40,60,.82) 55%, rgba(60,80,100,.55) 100%),
    var(--hero-img, none) center / cover no-repeat, #1b2430;
}

/* ---------- Cards and grids ---------- */
.grid { display: grid; gap: 18px; }
.grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
}
.card h3 { margin-top: .2em; }
.card .icon { width: 44px; height: 44px; color: var(--blue); margin-bottom: 8px; }
.theme-res .card .icon { color: var(--accent-dark); }
.card a.more { font-weight: 700; text-decoration: none; }
.card a.more::after { content: " \2192"; }
.checks { list-style: none; padding: 0; }
.checks li { position: relative; padding-left: 28px; margin-bottom: .55em; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: .35em; width: 16px; height: 16px; border-radius: 50%;
  background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' stroke='%23fff' stroke-width='2' fill='none'/%3E%3C/svg%3E") center/12px no-repeat;
}
.theme-res .checks li::before { background-color: var(--accent-dark); }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; text-align: center; }
.stat b { display: block; font-size: 2rem; color: #fff; line-height: 1.1; }
.stat span { font-size: .9rem; color: #c3d4e4; }

.split { display: grid; gap: 28px; align-items: start; }

/* ---------- Quote form ---------- */
.quote-box { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; border: 1px solid var(--line); color: var(--ink); }
.quote-box h2 { font-size: 1.5rem; }
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 700; font-size: .95rem; margin-bottom: 4px; color: var(--ink); }
.field .req { color: var(--err); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 10px 12px; font: inherit; font-size: 16px; /* 16px stops iOS zoom */
  border: 1.5px solid #9aa8b6; border-radius: 8px; background: #fff; color: var(--ink);
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); outline: 3px solid rgba(0,58,156,.25); outline-offset: 0; }
.field [aria-invalid="true"] { border-color: var(--err); }
.field .error { display: none; color: var(--err); font-size: .88rem; margin-top: 4px; }
.field [aria-invalid="true"] + .error { display: block; }
fieldset.field { border: 0; padding: 0; margin: 0 0 14px; }
fieldset.field legend { font-weight: 700; font-size: .95rem; margin-bottom: 6px; padding: 0; }
.radio-row { display: grid; gap: 8px; }
.radio-row label {
  display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 12px;
  border: 1.5px solid #9aa8b6; border-radius: 8px; font-weight: 600; cursor: pointer; margin: 0;
}
.radio-row input { width: 20px; height: 20px; min-height: 0; accent-color: var(--accent); }
.radio-row label:has(input:checked) { border-color: var(--accent); background: #fdeced; }
.form-row { display: grid; gap: 0 14px; }
.privacy-note { font-size: .85rem; color: var(--muted); margin: 10px 0 0; }
.form-status { margin-top: 14px; padding: 14px; border-radius: 8px; display: none; }
.form-status.ok { display: block; background: #e7f5ee; color: var(--ok); border: 1px solid #b7e0c9; }
.form-status.fail { display: block; background: #fdecea; color: var(--err); border: 1px solid #f5c2bd; }
.hp { position: absolute; left: -9999px; }
.btn-block { width: 100%; }

/* ---------- Testimonials ---------- */
.quote-card blockquote { margin: 0 0 12px; font-size: 1.02rem; }
.quote-card blockquote::before { content: "\201C"; font-size: 2.6rem; line-height: 0; color: var(--accent); vertical-align: -.45em; margin-right: 4px; }
.quote-card figcaption { font-weight: 700; color: var(--navy); }
.quote-card figcaption span { display: block; font-weight: 500; color: var(--muted); font-size: .9rem; }
.tag { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding: 3px 8px; border-radius: 99px; background: var(--blue-light); color: var(--blue); margin-bottom: 10px; }
.tag.res { background: #fdeced; color: var(--accent-dark); }
.placeholder-note { font-size: .82rem; color: var(--muted); background: #fff8e1; border: 1px dashed #e0c36a; padding: 8px 12px; border-radius: 8px; }

/* ---------- Gallery ---------- */
.gallery { display: grid; grid-template-columns: 1fr; gap: 16px; margin: 0; padding: 0; list-style: none; }
.gallery figure { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--bg-soft); }
.gallery figcaption { padding: 12px 14px; font-size: .93rem; }
.gallery figcaption b { display: block; color: var(--navy); }
.gallery-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.gallery-nav a { padding: 10px 14px; border: 1px solid var(--line); border-radius: 99px; text-decoration: none; font-weight: 600; font-size: .92rem; min-height: 44px; display: inline-flex; align-items: center; }

/* ---------- FAQ ---------- */
.faq details { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; margin-bottom: 10px; }
.faq summary { cursor: pointer; padding: 16px 44px 16px 18px; font-weight: 700; color: var(--navy); list-style: none; position: relative; min-height: 48px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--blue); }
.faq details[open] summary::after { content: "\2212"; }
.faq .answer { padding: 0 18px 16px; color: var(--ink); }

/* ---------- Blog ---------- */
.post-list { display: grid; gap: 18px; }
.post-meta { font-size: .88rem; color: var(--muted); }
.article { max-width: 72ch; }
.article h2 { margin-top: 1.6em; font-size: 1.5rem; }
.article .callout { background: var(--blue-light); border-left: 4px solid var(--blue); padding: 14px 18px; border-radius: 6px; margin: 1.4em 0; }

/* ---------- Map ---------- */
.map-frame { width: 100%; aspect-ratio: 4 / 3; border: 0; border-radius: var(--radius); box-shadow: var(--shadow); background: var(--bg-soft); }
.nap { font-style: normal; line-height: 1.7; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--accent); color: #fff; padding: 36px 0; }
.cta-band h2 { color: #fff; margin: 0 0 .3em; }
.cta-band p { margin: 0 0 16px; }
.cta-band .btn-outline { color: #fff; }
.cta-band .btn-outline:hover { background: #fff; color: var(--accent-dark); border-color: #fff; }
.cta-band .btn-primary { background: var(--navy); }
.cta-band .btn-primary:hover { background: #031331; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Footer ---------- */
.site-footer { background: #041a40; color: #c7d5e3; font-size: .95rem; padding: 48px 0 24px; }
.site-footer a { color: #fff; }
.site-footer h2 { color: #fff; font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; }
.footer-grid { display: grid; gap: 28px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 6px; }
.license-box { border: 1px solid #23415f; border-radius: var(--radius); padding: 16px; background: #0b2744; }
.license-box strong { color: #fff; }
.socials { display: flex; gap: 10px; flex-wrap: wrap; }
.socials a, .socials span {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border-radius: 50%; background: #0f3156; color: #fff;
}
.socials span { opacity: .35; }
.socials svg { width: 20px; height: 20px; }
.footer-bottom { border-top: 1px solid #1a3958; margin-top: 32px; padding-top: 18px; font-size: .85rem; display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ==========================================================================
   Tablet and up
   ========================================================================== */
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr 1fr; }
  .radio-row { grid-template-columns: repeat(3, 1fr); }
  .stats { grid-template-columns: repeat(4, 1fr); }
}

/* ==========================================================================
   Desktop: the call bar goes away, the phone lives in the sticky header
   ========================================================================== */
@media (min-width: 900px) {
  :root { --callbar-h: 0px; }
  .callbar { display: none; }
  .site-header { top: 0; }
  .header-row { min-height: 80px; }
  .brand-logo { height: 42px; }
  .brand-name { font-size: 1.05rem; }
  .brand-name small { font-size: .7rem; }
  .nav-toggle { display: none; }
  .header-phone {
    display: inline-flex; align-items: center; gap: 6px; font-weight: 800; color: var(--navy);
    text-decoration: none; font-size: 1.05rem; white-space: nowrap;
  }
  .header-phone svg { width: 20px; height: 20px; color: var(--accent); }
  .header-right { display: flex; align-items: center; gap: 18px; }
  .section { padding: 80px 0; }
  .hero { padding: 88px 0 96px; }
  .hero.page-hero { padding: 64px 0 64px; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .split { grid-template-columns: 1.1fr .9fr; gap: 48px; }
  .split.even { grid-template-columns: 1fr 1fr; }
  .trust { grid-template-columns: repeat(4, auto); justify-content: start; }
  .hero-split .trust { grid-template-columns: 1fr 1fr; }
  .hero-split { display: grid; grid-template-columns: 1.15fr .85fr; grid-template-areas: 'copy form' 'more form'; column-gap: 48px; align-items: start; }
  .hero-split .hero-copy { grid-area: copy; align-self: end; }
  .hero-split .instant-quote { grid-area: form; align-self: center; }
  .hero-split .hero-more { grid-area: more; }
  .footer-grid { grid-template-columns: 1.3fr 1fr 1fr 1.4fr; }
  .post-list { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) and (max-width: 1080px) {
  .header-phone span { display: none; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
@media print { .callbar, .site-header, .quote-box, .cta-band, .site-footer .socials { display: none !important; } body { padding: 0; } }

/* ---------- Instant Quote card (homepage hero) ---------- */
.hero .instant-quote { border: 0; box-shadow: 0 18px 50px rgba(0,0,0,.35); position: relative; }
.instant-quote h2 { font-size: 1.45rem; margin-bottom: .6em; }
.iq-badge {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 10px;
  font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em;
  color: var(--accent-dark); background: #fdeced; padding: 6px 12px; border-radius: 99px;
}
.iq-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(178,18,31,.6); animation: iqpulse 1.8s infinite; }
@keyframes iqpulse { 0% { box-shadow: 0 0 0 0 rgba(178,18,31,.55); } 70% { box-shadow: 0 0 0 9px rgba(178,18,31,0); } 100% { box-shadow: 0 0 0 0 rgba(178,18,31,0); } }
@media (prefers-reduced-motion: reduce) { .iq-dot { animation: none; } }
.opt { font-weight: 500; color: var(--muted); font-size: .85rem; }
.instant-quote .form-row { gap: 0 12px; }
.home-hero { padding-bottom: 56px; }
@media (max-width: 899px) {
  .home-hero { padding-top: 32px; }
  .home-hero .instant-quote { margin: 20px 0 8px; }
  .home-hero .lead { font-size: 1.02rem; }
}

@media (max-width: 370px) { .brand-logo { height: 26px; } .brand-name { font-size: .82rem; } .brand-name small { font-size: .56rem; } }

/* ---------- Inner pages ---------- */
.subnav { background: #fff; border-bottom: 1px solid var(--line); overflow-x: auto; -webkit-overflow-scrolling: touch; }
.subnav .wrap { display: flex; gap: 4px; white-space: nowrap; padding-top: 6px; padding-bottom: 6px; }
.subnav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 6px; font-weight: 600; font-size: .92rem; text-decoration: none; color: var(--ink); }
.subnav a:hover { background: var(--bg-soft); }
.subnav a[aria-current="page"] { color: #fff; background: var(--blue); }

.photo { margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--bg-soft); }
.photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.photo.tall img { aspect-ratio: 3 / 4; max-height: 520px; }
.photo.wide img { aspect-ratio: auto; object-fit: contain; background: #0d1a2b; }
.photo figcaption { padding: 10px 14px; font-size: .9rem; color: var(--muted); background: #fff; }

.pills { list-style: none; padding: 0; margin: 18px 0 0; display: grid; grid-template-columns: 1fr; gap: 8px; }
.pills li { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: 6px; padding: 10px 12px; font-weight: 600; font-size: .95rem; }
.plans .plan { display: flex; align-items: center; gap: 12px; padding: 16px; }
.plans .plan h3 { margin: 0; font-size: 1.02rem; }
.plan-n { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 800; display: grid; place-items: center; }

.creds { padding: 28px 0; background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cred-row { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 18px 32px; }
.cred-row img { height: 56px; width: auto; }
.cred-lic a { display: flex; flex-direction: column; align-items: center; text-decoration: none; border: 2px solid var(--blue); border-radius: 8px; padding: 6px 14px; color: var(--blue); }
.cred-lic strong { font-size: 1rem; }
.cred-lic span { font-size: .78rem; color: var(--muted); }

.loc h3 { font-size: 1.02rem; }
.loc .nap { margin-bottom: 8px; }
.loc-lines { font-size: .92rem; color: var(--muted); margin: 0; }
.loc-home { border: 2px solid var(--accent); }
.loc-group { margin-bottom: 36px; scroll-margin-top: 150px; }
.state-chips { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.state-chips a { display: inline-flex; gap: 6px; align-items: center; min-height: 44px; padding: 8px 16px; border: 1px solid var(--line); border-radius: 99px; text-decoration: none; color: var(--ink); background: #fff; }
.state-chips b { color: var(--blue); }

.person { display: flex; gap: 16px; align-items: flex-start; }
.person h3 { margin: 0; }
.avatar { flex: none; width: 56px; height: 56px; border-radius: 50%; background: var(--blue); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: 1.1rem; letter-spacing: .02em; }
.person-lead { border: 2px solid var(--accent); }
.person-lead .avatar { background: var(--accent); width: 72px; height: 72px; font-size: 1.4rem; }
.p-title { font-weight: 700; color: var(--blue); margin: 2px 0 8px; font-size: .95rem; }
.p-org { display: block; font-weight: 500; color: var(--muted); }

.tag-muted { background: var(--bg-soft); color: var(--muted); }
.t-date { font-size: .82rem; color: var(--muted); margin: 10px 0 0; }
.t-note { font-size: .85rem; color: var(--muted); margin-top: 20px; max-width: 80ch; }

table.data { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; font-size: .95rem; }
table.data th, table.data td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data thead th { background: var(--navy); color: #fff; }
table.data tbody th { color: var(--navy); width: 42%; }
.slides { list-style: none; padding: 0; margin: 20px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.slides a { display: block; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #fff; }
.slides img { width: 100%; height: auto; }
.slides span { display: block; text-align: center; font-size: .82rem; color: var(--muted); padding-top: 4px; }

.grid-5 { grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .pills.cols-3, .pills.cols-2 { grid-template-columns: 1fr 1fr; }
  .slides { grid-template-columns: repeat(3, 1fr); }
  .grid-5 { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .pills.cols-3 { grid-template-columns: repeat(3, 1fr); }
  .slides { grid-template-columns: repeat(4, 1fr); }
  .grid-5 { grid-template-columns: repeat(5, 1fr); }
  .footer-grid { grid-template-columns: 1.2fr 1fr 1fr 1.3fr; }
}
.quote-card { margin: 0; }
table.data td:first-child { white-space: nowrap; }
.jobs-box { background:#fff; border:1px solid var(--line); border-radius: var(--radius); padding: 12px; min-height: 120px; overflow:hidden; }
/* bigger tap areas for stand-alone text links */
.card a.more, .license-box a, .callout a { display: inline-flex; align-items: center; min-height: 44px; }
.callout a { display: inline; padding: 10px 0; }

/* phones: keep text readable over photos */
@media (max-width: 899px) { .hero { background-position: center, 60% center; } .hero .lead { text-shadow: 0 1px 2px rgba(0,0,0,.35); } }


/* ==========================================================================
   Main menu (phone: slide-down panel with expandable sections;
   computer: one row with drop-down panels)
   ========================================================================== */
.nav-toggle .i-close { display: none; }
.nav-toggle[aria-expanded="true"] .i-menu { display: none; }
.nav-toggle[aria-expanded="true"] .i-close { display: block; }
.nav-toggle[aria-expanded="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }

.site-nav { display: none; }
.site-nav.open {
  display: block; position: absolute; left: 0; right: 0; top: 100%;
  background: #fff; border-top: 1px solid var(--line); box-shadow: 0 18px 40px rgba(6,33,79,.18);
  max-height: calc(100vh - var(--callbar-h) - 64px); max-height: calc(100dvh - var(--callbar-h) - 64px); overflow-y: auto;
  animation: navIn .18s ease-out;
}
@keyframes navIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.nav-inner { padding-top: 8px; padding-bottom: 20px; }
.nav-list { list-style: none; margin: 0; padding: 0; }
.nav-list > li { border-bottom: 1px solid var(--bg-soft); }
.top-row { display: flex; align-items: center; }
.site-nav a.top { flex: 1; display: flex; align-items: center; min-height: 52px; padding: 0 4px; font-weight: 700; font-size: 1.05rem; color: var(--navy); text-decoration: none; }
.site-nav a.top[aria-current="page"] { color: var(--accent); }
.sub-toggle { flex: none; width: 52px; height: 52px; display: grid; place-items: center; border: 0; background: transparent; color: var(--blue); cursor: pointer; border-radius: 8px; }
.sub-toggle svg { width: 22px; height: 22px; transition: transform .18s; }
.has-sub.open .sub-toggle svg { transform: rotate(180deg); }
.sub { display: none; padding: 0 0 12px; }
.has-sub.open .sub { display: block; }
.sub-grid { display: grid; gap: 4px; }
.sub-link { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 10px; text-decoration: none; color: var(--ink); min-height: 52px; }
.sub-link:hover, .sub-link:focus-visible { background: var(--bg-soft); }
.sub-link[aria-current="page"] { background: var(--blue-light); }
.sub-link b { display: block; color: var(--navy); font-size: .98rem; }
.sub-link small { display: block; color: var(--muted); font-size: .84rem; line-height: 1.35; }
.sub-ic { flex: none; width: 38px; height: 38px; border-radius: 10px; background: var(--blue-light); color: var(--blue); display: grid; place-items: center; }
.sub-ic svg { width: 20px; height: 20px; }
.nav-quote { display: flex; width: 100%; margin-top: 16px; }
.nav-foot { margin-top: 10px; text-align: center; }
.btn-call { width: 100%; background: var(--navy); color: #fff; }
.btn-call:hover { background: #031331; color: #fff; }
.nav-foot p { font-size: .85rem; color: var(--muted); margin: 12px 0 0; }
body.menu-open { overflow: hidden; }

@media (min-width: 900px) {
  .site-nav, .site-nav.open { display: block; position: static; box-shadow: none; border: 0; max-height: none; overflow: visible; animation: none; background: transparent; }
  .nav-inner { display: flex; align-items: center; gap: 6px; padding-top: 0; padding-bottom: 10px; }
  .nav-list { display: flex; align-items: center; gap: 2px; }
  .nav-list > li { border: 0; position: relative; }
  .site-nav a.top { min-height: 44px; padding: 0 10px; font-size: .96rem; font-weight: 600; color: var(--ink); border-radius: 8px; }
  .site-nav a.top:hover { background: var(--bg-soft); }
  .site-nav a.top[aria-current="page"] { color: var(--blue); }
  .has-sub .top-row a.top { padding-right: 2px; }
  .sub-toggle { width: 28px; height: 44px; }
  .sub-toggle svg { width: 16px; height: 16px; }
  .sub {
    display: block; position: absolute; left: 0; top: 100%; z-index: 50; width: 600px; padding: 14px;
    background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 24px 50px rgba(6,33,79,.18);
    opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .15s, transform .15s, visibility .15s;
  }
  .sub::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; } /* hover bridge */
  .has-sub:hover .sub, .has-sub:focus-within .sub, .has-sub.open .sub { opacity: 1; visibility: visible; transform: none; }
  .has-sub:hover .sub-toggle svg, .has-sub.open .sub-toggle svg { transform: rotate(180deg); }
  .sub-grid { grid-template-columns: 1fr 1fr; gap: 4px; }
  .nav-list > li:nth-last-child(-n+3) .sub { left: auto; right: 0; }
  .nav-quote { width: auto; margin: 0 0 0 auto; }
  .nav-foot { display: none; }
  body.menu-open { overflow: auto; }
}
@media (min-width: 900px) and (max-width: 1080px) {
  .site-nav a.top { padding: 0 6px; font-size: .9rem; }
  .sub { width: 520px; }
}
@media (prefers-reduced-motion: reduce) { .site-nav.open, .sub { animation: none; transition: none; } }

/* Services menu: grouped columns */
.sub-cols { display: grid; gap: 14px; }
.sub-head { display: flex; align-items: center; min-height: 44px; padding: 0 10px; font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); text-decoration: none; }
.sub-head:hover { text-decoration: underline; }
.sub-all { display: flex; align-items: center; justify-content: center; min-height: 44px; margin-top: 8px; border-top: 1px solid var(--line); font-weight: 700; text-decoration: none; color: var(--blue); }
@media (min-width: 900px) {
  .sub-wide { width: 720px; }
  .sub-wide .sub-cols { grid-template-columns: 1.15fr 1fr; gap: 18px; }
  .sub-wide .sub-col + .sub-col { border-left: 1px solid var(--line); padding-left: 14px; }
  .sub-wide .sub-grid { grid-template-columns: 1fr; }
  .sub:not(.sub-wide) .sub-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) and (max-width: 1080px) { .sub-wide { width: 640px; } }
.h-link { color: inherit; text-decoration: none; }
.h-link:hover { text-decoration: underline; }
.pill-row { display: flex; flex-wrap: wrap; gap: 10px; }
.pill-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 99px; text-decoration: none; font-weight: 600; background: #fff; }
.site-footer h2 a { color: #fff; text-decoration: none; }
.theme-res-band .eyebrow { color: var(--accent-dark); }
.sub-head span { margin-left: 6px; }
.site-footer h2 a { display: inline-flex; align-items: center; min-height: 44px; }
.plan-list { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 10px; }
.plan-list li { display: flex; align-items: center; gap: 12px; font-size: 1.02rem; color: var(--navy); }

/* Photo tiles */
.tiles { list-style: none; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.tiles figure { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.tiles img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: var(--bg-soft); }
.tiles figcaption { padding: 8px 10px; font-size: .86rem; font-weight: 700; color: var(--navy); }
@media (min-width: 900px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.p-contact { margin: 6px 0 0; font-size: .92rem; overflow-wrap: break-word; }
/* Tri-Pacific wordmark (the wave mark + name) */
.brand-mark { height: 38px; width: 38px; border-radius: 9px; }
.brand-name { font-size: 1.12rem; }
.brand-name small { font-size: .66rem; }
@media (min-width: 900px) { .brand-mark { height: 46px; width: 46px; } .brand-name { font-size: 1.35rem; } .brand-name small { font-size: .74rem; } }
@media (max-width: 370px) { .brand-mark { height: 30px; width: 30px; } .brand-name { font-size: .95rem; } }

/* ---------- Tri-Pacific logo lockup (header): the company's triangle + its gray lettering ---------- */
.brand { gap: 10px; }
.tp-mark { height: 44px; width: auto; flex: none; }
.tp-word {
  font-family: Tahoma, Verdana, "Segoe UI", Geneva, sans-serif; color: #808080;
  font-size: 1.3rem; line-height: 1.05; letter-spacing: .02em; font-weight: 400;
}
.tp-word small { display: block; font-size: .6rem; letter-spacing: .03em; margin-top: 4px; color: #6f6f6f; }
@media (min-width: 900px) {
  .tp-mark { height: 62px; }
  .tp-word { font-size: 1.7rem; }
  .tp-word small { font-size: .62rem; }
}
@media (max-width: 370px) { .tp-mark { height: 36px; } .tp-word { font-size: 1.1rem; } .tp-word small { font-size: .55rem; } }
.tp-full { display: block; width: 100%; max-width: 420px; height: auto; margin: 0 0 28px; }
