/* ==========================================================================
   Brancato's Heating & Cooling — Design System
   Colors/fonts are set from content/settings.json at runtime.
   These are the fallback defaults.
   ========================================================================== */

:root {
  /* Brand (from logo) */
  --brand-blue: #0060A8;
  --brand-steel: #3D5F8F;
  --brand-orange: #E97F1F;
  --brand-ember: #C23000;

  /* Light theme */
  --bg: #FAFBFC;
  --bg-alt: #F0F3F6;
  --surface: #FFFFFF;
  --ink: #1A2530;
  --ink-muted: #52616E;
  --border: #DDE4EA;
  --link: var(--brand-blue);
  --header-bg: rgba(250, 251, 252, 0.92);
  --hero-bg: linear-gradient(160deg, #EAF2F9 0%, #FAFBFC 60%);
  --shadow: 0 1px 3px rgba(26, 37, 48, 0.08), 0 4px 16px rgba(26, 37, 48, 0.06);
  --cta: var(--brand-orange);
  --cta-ink: #FFFFFF;
  --cta-hover: #D26E12;

  --font-heading: "Bitter", Georgia, serif;
  --font-body: "Public Sans", -apple-system, "Segoe UI", sans-serif;

  --radius: 8px;
  --radius-lg: 14px;
  --maxw: 1120px;
}

[data-theme="dark"] {
  --bg: #1C2733;
  --bg-alt: #16202A;
  --surface: #243240;
  --ink: #E8EDF2;
  --ink-muted: #A3B1BE;
  --border: #34455A;
  --link: #6FB1E8;
  --header-bg: rgba(28, 39, 51, 0.92);
  --hero-bg: linear-gradient(160deg, #223244 0%, #1C2733 60%);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.25);
  --cta: #F0902A;
  --cta-hover: #F6A54D;
}

* { box-sizing: border-box; margin: 0; }

html { scroll-behavior: smooth; font-size: 17.6px; }
@media (max-width: 900px) {
  html { font-size: 16.8px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 18.7px;
  -webkit-font-smoothing: antialiased;
}
@media (max-width: 900px) {
  body { font-size: 17.9px; }
}

h1, h2, h3, h4 { font-family: var(--font-heading); line-height: 1.2; text-wrap: balance; }
h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.25rem; }
p { text-wrap: pretty; }
a { color: var(--link); }
img { max-width: 100%; display: block; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
section { padding: 64px 0; }
.section-alt { background: var(--bg-alt); }
.section-kicker {
  color: var(--brand-orange); font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; font-size: 0.8rem; margin-bottom: 8px;
}
.section-head { max-width: 640px; margin-bottom: 36px; }
.section-head p { color: var(--ink-muted); margin-top: 10px; }

/* ---------- Announcement banner ---------- */
.announce-bar {
  background: var(--brand-orange); color: #1A2530;
  text-align: center; padding: 10px 48px; position: relative;
  font-size: 0.95rem; font-weight: 600;
}
[data-theme="dark"] .announce-bar { background: #1D4E79; color: #fff; }
.announce-bar a { color: #1A2530; text-decoration: underline; text-underline-offset: 3px; margin-left: 8px; }
[data-theme="dark"] .announce-bar a { color: #fff; }
.announce-bar a:hover { opacity: 0.85; }
.announce-close {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: #1A2530; cursor: pointer;
  font-size: 1.2rem; line-height: 1; padding: 6px 10px; opacity: 0.8;
}
[data-theme="dark"] .announce-close { color: #fff; }
.announce-close:hover { opacity: 1; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; gap: 20px;
  max-width: var(--maxw); margin: 0 auto; padding: 10px 24px;
}
.header-logo img { height: 46px; width: auto; }
.site-nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
@media (min-width: 901px) {
  /* Center the link cluster between logo and controls: the two auto margins
     split the free space equally, so links sit equidistant from both ends. */
  .site-nav { flex: 1; margin-left: 0; }
  .site-nav > :first-child { margin-left: auto; }
  .site-nav .theme-toggle { margin-left: auto; }
}
.site-nav a {
  text-decoration: none; color: var(--ink); font-weight: 600; font-size: 0.95rem;
  padding: 10px 12px; border-radius: var(--radius);
}
.site-nav a:hover { background: var(--bg-alt); }
.site-nav a[aria-current="page"] { color: var(--link); }

/* ---------- Nav dropdown ---------- */
.nav-drop { position: relative; }
.nav-drop-btn {
  background: none; border: none; cursor: pointer;
  font-family: var(--font-body); font-weight: 600; font-size: 0.95rem;
  color: var(--ink); padding: 10px 12px; border-radius: var(--radius);
  display: inline-flex; align-items: center; gap: 5px;
}
.nav-drop-btn:hover { background: var(--bg-alt); }
.nav-drop-btn .caret { font-size: 0.7rem; transition: transform 0.15s; }
.nav-drop.open .nav-drop-btn .caret { transform: rotate(180deg); }
.nav-drop-btn[aria-current="page"] { color: var(--link); }
.nav-drop-menu {
  display: none; position: absolute; top: 100%; left: 0; min-width: 190px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 6px; z-index: 110;
}
.nav-drop.open .nav-drop-menu { display: block; }
.nav-drop-menu a { display: block; padding: 10px 14px !important; border-radius: 6px; }
@media (min-width: 901px) {
  .nav-drop:hover .nav-drop-menu, .nav-drop:focus-within .nav-drop-menu { display: block; }
}
@media (max-width: 900px) {
  .nav-drop { width: 100%; }
  .nav-drop-btn { width: 100%; justify-content: space-between; padding: 14px 12px; }
  .nav-drop-menu { position: static; box-shadow: none; border: none;
    background: var(--bg-alt); margin: 2px 0 4px; }
}
.header-phone {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--cta); color: var(--cta-ink) !important;
  padding: 10px 18px !important; border-radius: 999px;
  font-weight: 700; text-decoration: none; white-space: nowrap;
}
.header-phone:hover { background: var(--cta-hover) !important; }

.theme-toggle {
  background: none; border: 1px solid var(--border); border-radius: 999px;
  width: 40px; height: 40px; cursor: pointer; color: var(--ink);
  font-size: 1.05rem; display: inline-flex; align-items: center; justify-content: center;
}
.theme-toggle:hover { background: var(--bg-alt); }

.nav-burger { display: none; background: none; border: 1px solid var(--border);
  border-radius: var(--radius); width: 44px; height: 44px; cursor: pointer;
  color: var(--ink); font-size: 1.3rem; }

@media (max-width: 900px) {
  .nav-burger { display: inline-flex; align-items: center; justify-content: center; margin-left: auto; }
  .site-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; background: var(--surface);
    border-bottom: 1px solid var(--border); padding: 12px 24px 20px; gap: 2px;
    box-shadow: var(--shadow); margin-left: 0;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 14px 12px; }
  .header-phone { justify-content: center; margin-top: 8px; }
}

/* ---------- Hero ---------- */
.hero { background: var(--hero-bg); padding: 84px 0 72px; }
.hero-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 48px; align-items: center; }
.hero-tag { color: var(--brand-orange); font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; font-size: 0.85rem; margin-bottom: 14px; }
.hero p.lede { font-size: 1.15rem; color: var(--ink-muted); margin: 18px 0 28px; max-width: 54ch; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-media { border-radius: var(--radius-lg); overflow: hidden; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px; border-radius: 999px; font-weight: 700; font-size: 1rem;
  text-decoration: none; border: none; cursor: pointer; font-family: var(--font-body);
}
.btn-primary { background: var(--cta); color: var(--cta-ink); }
.btn-primary:hover { background: var(--cta-hover); }
.btn-secondary { background: transparent; color: var(--ink); border: 2px solid var(--border); }
.btn-secondary:hover { border-color: var(--brand-steel); }

/* ---------- Trust strip ---------- */
.trust-strip { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  background: var(--surface); padding: 22px 0; }
.trust-items { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.trust-item { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 0.95rem; }
.trust-item svg { color: var(--brand-blue); flex-shrink: 0; }
[data-theme="dark"] .trust-item svg { color: var(--link); }

/* ---------- Cards / grids ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-3, .grid-2, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow);
}
.card h3 { margin-bottom: 10px; }
.card p { color: var(--ink-muted); font-size: 0.97rem; }
.card .card-link { display: inline-block; margin-top: 14px; font-weight: 700; text-decoration: none; }
.card ul { color: var(--ink-muted); font-size: 0.97rem; padding-left: 20px; margin-top: 10px; }
.card ul li { margin-bottom: 4px; }

/* ---------- Staff ---------- */
.staff-card { text-align: center; padding: 24px 18px; }
.staff-photo {
  width: 120px; height: 120px; border-radius: 50%; object-fit: cover;
  margin: 0 auto 14px; background: var(--bg-alt);
  display: flex; align-items: center; justify-content: center;
  border: 3px solid var(--border);
}
.staff-photo.placeholder { font-family: var(--font-heading); font-size: 2rem;
  color: var(--brand-steel); font-weight: 700; }
.staff-card .role { color: var(--brand-orange); font-weight: 700; font-size: 0.85rem;
  text-transform: uppercase; letter-spacing: 0.05em; }
.staff-card .bio { color: var(--ink-muted); font-size: 0.92rem; margin-top: 8px; }

/* ---------- Reviews ---------- */
.review-card { display: flex; flex-direction: column; gap: 14px; }
.review-stars { color: var(--brand-orange); letter-spacing: 2px; }
.review-quote { font-size: 1rem; color: var(--ink); font-style: italic; flex-grow: 1; }
.review-attr { color: var(--ink-muted); font-size: 0.9rem; font-weight: 600; }

/* ---------- Forms ---------- */
.form-card { max-width: 640px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 6px; }
.field .req { color: var(--brand-ember); }
[data-theme="dark"] .field .req { color: #FF8A65; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 1rem;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--brand-blue); outline-offset: 1px; border-color: transparent;
}
.form-note { font-size: 0.85rem; color: var(--ink-muted); margin-top: 14px; }

/* ---------- Careers ---------- */
.job-card { margin-bottom: 20px; }
.job-card .job-meta { display: flex; gap: 16px; flex-wrap: wrap; color: var(--ink-muted);
  font-size: 0.9rem; margin: 8px 0 12px; }
.job-badge { display: inline-block; padding: 3px 12px; border-radius: 999px;
  font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.job-badge.open { background: #E3F2E6; color: #1B6B2F; }
[data-theme="dark"] .job-badge.open { background: #1F3D28; color: #7BD693; }

/* ---------- Placeholders ---------- */
.photo-placeholder {
  background: var(--bg-alt); border: 2px dashed var(--border); border-radius: var(--radius-lg);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--ink-muted); font-size: 0.9rem; font-weight: 600; text-align: center;
  min-height: 240px; padding: 24px; gap: 8px;
}
.photo-placeholder svg { opacity: 0.5; }

/* ---------- Steps ---------- */
.steps { counter-reset: step; }
.step { display: flex; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--border); }
.step:last-child { border-bottom: none; }
.step-num {
  counter-increment: step; flex-shrink: 0;
  width: 44px; height: 44px; border-radius: 50%; background: var(--brand-blue); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading); font-weight: 700; font-size: 1.1rem;
}
.step-num::before { content: counter(step); }
.step h3 { margin-bottom: 4px; }
.step p { color: var(--ink-muted); font-size: 0.97rem; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--brand-blue); color: #fff; text-align: center; }
[data-theme="dark"] .cta-band { background: #1D4E79; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,0.85); margin: 12px auto 26px; max-width: 52ch; }
.cta-band .btn-secondary { color: #fff; border-color: rgba(255,255,255,0.5); }
.cta-band .btn-secondary:hover { border-color: #fff; }

/* ---------- FAQ ---------- */
details.faq {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 22px; margin-bottom: 12px;
}
details.faq summary { font-weight: 700; cursor: pointer; font-size: 1.02rem; }
details.faq p { margin-top: 12px; color: var(--ink-muted); }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--border);
  padding: 48px 0 28px; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 { margin-bottom: 12px; font-size: 1rem; }
.footer-grid ul { list-style: none; padding: 0; }
.footer-grid li { margin-bottom: 8px; font-size: 0.95rem; color: var(--ink-muted); }
.footer-grid a { color: var(--ink-muted); text-decoration: none; }
.footer-grid a:hover { color: var(--link); }
.footer-logo img { height: 40px; margin-bottom: 12px; }
.footer-bottom { border-top: 1px solid var(--border); margin-top: 36px; padding-top: 20px;
  font-size: 0.85rem; color: var(--ink-muted); display: flex; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; }

/* ---------- Social links ---------- */
.social-row { display: flex; gap: 10px; margin-top: 14px; }
.social-link {
  width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--brand-blue); transition: transform 0.12s, border-color 0.12s;
}
[data-theme="dark"] .social-link { color: var(--link); }
.social-link:hover { transform: translateY(-2px); border-color: var(--brand-blue); }
.social-link svg { width: 20px; height: 20px; }

/* ---------- Brands strip (Preferred Equipment) ---------- */
.brands-strip {
  display: flex; flex-wrap: wrap; gap: 16px; align-items: stretch;
}
.brand-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 28px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; box-shadow: var(--shadow); min-width: 160px; text-align: center;
}
.brand-item img { max-height: 44px; max-width: 160px; width: auto; height: auto; display: block; }
.brand-item .brand-name { font-family: var(--font-heading); font-weight: 700; font-size: 1.05rem; }
.brand-caption { color: var(--brand-orange); font-size: 0.78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em; }

/* ---------- Page hero (interior pages) ---------- */
.page-hero { background: var(--hero-bg); padding: 56px 0 44px; }
.page-hero p { color: var(--ink-muted); margin-top: 12px; max-width: 60ch; }

/* ---------- Utility ---------- */
.text-muted { color: var(--ink-muted); }
.mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 36px; }
.hidden { display: none !important; }
.success-msg { background: #E3F2E6; color: #1B6B2F; padding: 16px 20px;
  border-radius: var(--radius); font-weight: 600; }
[data-theme="dark"] .success-msg { background: #1F3D28; color: #7BD693; }
