/* PlumberBee: base styles, design tokens, layout, header and footer.
   Mobile-first. Breakpoints live in responsive.css. */

:root {
  /* Brand colors (from the PlumberBee logo: deep navy, bee gold) */
  --navy: #0a2552;
  --navy-900: #061a3d;
  --navy-800: #0d2d63;
  --navy-600: #1d4185;
  --navy-50: #eef2f9;
  --gold: #f6b500;
  --gold-400: #ffc933;
  --gold-soft: #fff6dc;
  --gold-line: #f1d98c;
  --gold-text: #8d6100; /* gold for text on light backgrounds (AA contrast) */

  /* Neutrals */
  --ink: #0f1f3a;
  --text: #2a3950;
  --muted: #5a6880;
  --line: #e4e8ef;
  --line-strong: #c9d1de;
  --bg: #ffffff;
  --bg-soft: #f5f7fa;
  --danger: #b42318;
  --success: #067647;

  /* Shape and depth */
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgb(10 37 82 / 0.06), 0 1px 3px rgb(10 37 82 / 0.05);
  --shadow: 0 18px 40px -20px rgb(10 37 82 / 0.28);

  /* Type and spacing */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --section: clamp(56px, 8vw, 112px);
  --section-tight: clamp(40px, 5vw, 72px);
  --focus: var(--navy-600);

  color-scheme: light;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 88px; } /* compact sticky header (73px) + gap */
body { margin: 0; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
:where(ul[class], ol[class]) { list-style: none; padding: 0; }
img, picture, svg { display: block; max-width: 100%; }
img { height: auto; }
input, select, textarea, button { font: inherit; color: inherit; }
button { cursor: pointer; }
table { border-collapse: collapse; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* ---------- Base ---------- */
body {
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { color: var(--ink); line-height: 1.15; letter-spacing: -0.015em; }
h3 { font-size: 1.125rem; line-height: 1.3; }
a { color: var(--navy-600); text-underline-offset: 3px; }
a:hover { color: var(--navy); }
strong { color: var(--ink); font-weight: 700; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.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;
}

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  padding: 12px 18px; background: var(--gold); color: var(--navy); font-weight: 700;
  border-radius: var(--radius-sm); text-decoration: none;
}
.skip-link:focus { top: 12px; }

.icon { width: 1.25em; height: 1.25em; flex: none; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: calc(820px + var(--gutter) * 2); }

.section { padding-block: var(--section); }
.section--tight { padding-block: var(--section-tight); }
.section--soft { background: var(--bg-soft); }
.section:not(.section--soft):not(.lead) + .section:not(.section--soft):not(.lead) { padding-top: 0; }
.section--soft + .section--soft { padding-top: 0; }

.section-head { max-width: 760px; margin-bottom: clamp(32px, 4vw, 52px); }
.section-head--split { max-width: none; display: flex; flex-wrap: wrap; gap: 20px; align-items: end; justify-content: space-between; }

.eyebrow {
  margin-bottom: 14px;
  font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold-text);
}
.section-title { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.75rem); font-weight: 800; letter-spacing: -0.025em; }
.section-title--sm { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); }
.section-title--light { color: #fff; }
.section-lead { margin-top: 16px; font-size: 1.125rem; color: var(--muted); max-width: 68ch; }

.prose > * + * { margin-top: 1.1em; }
.prose h3 { margin-top: 1.8em; }
.prose p { max-width: 72ch; }
.prose-list { padding-left: 1.2em; }
.prose-list li + li { margin-top: 6px; }

/* ---------- Top bar ---------- */
.topbar { display: none; background: var(--navy-900); color: rgb(255 255 255 / 0.82); font-size: 0.8125rem; --focus: var(--gold); }
.topbar__inner { display: flex; justify-content: space-between; align-items: center; min-height: 38px; gap: 24px; }
.topbar p, .topbar__right, .topbar__right > span { display: flex; align-items: center; gap: 8px; }
.topbar__right { gap: 18px; }
.topbar .icon { width: 16px; height: 16px; color: var(--gold); }
.topbar a { color: #fff; display: inline-flex; text-decoration: none; }
.topbar a:hover { color: var(--gold); }
.topbar a .icon { color: currentColor; width: 18px; height: 18px; }
.topbar__phone { gap: 6px; align-items: center; font-weight: 700; }
.topbar__phone .icon { color: var(--gold) !important; width: 16px !important; height: 16px !important; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgb(255 255 255 / 0.97);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(1.4) blur(8px);
}
/* Phones and tablets: phone button | centered logo | menu button */
.site-header__inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; min-height: 96px; transition: min-height 0.2s ease; }
.site-header__start { grid-column: 1; justify-self: start; }
.site-header.is-scrolled .site-header__inner { min-height: 72px; }
.site-header.is-jumping, .site-header.is-jumping * { transition: none !important; }
.site-header.is-scrolled .brand__logo { height: 60px; }
.brand { grid-column: 2; display: inline-flex; align-items: center; flex: none; }
.brand__logo { display: block; height: 84px; width: auto; transition: height 0.2s ease; }
.site-header__actions { grid-column: 3; justify-self: end; display: flex; align-items: center; gap: 12px; }

.header-phone {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 46px; height: 46px; border: 1px solid var(--line-strong); border-radius: 12px;
  font-weight: 700; color: var(--navy); text-decoration: none; white-space: nowrap;
}
.header-phone span { display: none; }
.header-phone .icon { width: 22px; height: 22px; }
.header-phone .icon { color: var(--gold-text); }
.header-phone:hover { color: var(--navy-600); }
.site-header__actions .header-cta { display: none; }

.menu-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; padding: 0;
  border: 1px solid var(--line-strong); border-radius: 12px; background: #fff; color: var(--navy);
}
.menu-toggle .icon { width: 24px; height: 24px; }
.menu-toggle .icon--close { display: none; }
.menu-toggle[aria-expanded="true"] .icon--open { display: none; }
.menu-toggle[aria-expanded="true"] .icon--close { display: block; }

/* Mobile navigation panel (desktop layout in responsive.css) */
.primary-nav {
  position: absolute; left: 0; right: 0; top: 100%;
  max-height: calc(100vh - 96px); max-height: calc(100dvh - 96px); overflow-y: auto;
  padding: 8px var(--gutter) 24px;
  background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
}
.primary-nav:not(.is-open) { display: none; }
.nav-list > li { border-bottom: 1px solid var(--line); }
.nav-list > li > a:not(.btn), .submenu-toggle {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  padding: 16px 4px; border: 0; background: none;
  font-size: 1.0625rem; font-weight: 650; color: var(--ink); text-decoration: none; text-align: left;
}
.nav-list a[aria-current="page"], .has-menu.is-current > .submenu-toggle { color: var(--navy-600); }
.icon--chevron { width: 18px; height: 18px; transition: transform 0.2s ease; }
.submenu-toggle[aria-expanded="true"] .icon--chevron { transform: rotate(180deg); }

.submenu { display: none; }
.has-menu.is-open > .submenu { display: block; }
.submenu { padding: 0 0 12px; }
.submenu ul, ul.submenu { gap: 2px; list-style: none; margin: 0; padding: 0; }
.submenu ul, .has-menu.is-open > ul.submenu { display: grid; }
.submenu a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 10px;
  color: var(--text); text-decoration: none; font-weight: 550;
}
.submenu a:hover, .submenu a[aria-current="page"] { background: var(--navy-50); color: var(--navy); }
.submenu a .icon { color: var(--navy-600); }
.submenu__featured { margin-bottom: 6px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.submenu__featured a { background: var(--gold-soft); }
.submenu__featured a:hover, .submenu__featured a[aria-current="page"] { background: #ffefc2; }
.submenu__featured a .icon { color: var(--gold-text); }
.submenu__featured span { display: grid; line-height: 1.25; }
.submenu__featured strong { color: var(--ink); }
.submenu__featured small { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-text); }
.submenu--areas ul { grid-template-columns: 1fr 1fr; }
.submenu__all { margin-top: 6px; font-weight: 700 !important; color: var(--navy-600) !important; }
.submenu__all .icon { width: 18px; height: 18px; }
.primary-nav__cta { display: grid; gap: 10px; padding-top: 20px; }
.nav-cta { display: none; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: rgb(255 255 255 / 0.74); font-size: 0.9375rem; --focus: var(--gold); }
.site-footer a { color: rgb(255 255 255 / 0.88); text-decoration: none; }
.site-footer a:hover { color: var(--gold); }

/* Brand band: round logo beside the motto and description, call + social on the right */
.site-footer__top {
  display: grid; justify-items: center; gap: 22px; text-align: center;
  position: relative; padding-block: clamp(44px, 6vw, 64px) clamp(32px, 4vw, 44px);
}
.site-footer__top::after { content: ""; position: absolute; left: var(--gutter); right: var(--gutter); bottom: 0; height: 1px; background: rgb(255 255 255 / 0.1); }
.site-footer .brand { grid-column: auto; grid-row: auto; margin: 0; }
.site-footer .brand__logo--footer { height: 112px; filter: drop-shadow(0 10px 22px rgb(0 0 0 / 0.35)); }
.site-footer__intro { max-width: 60ch; }
.site-footer__motto { margin-bottom: 8px; font-size: 1.1875rem; font-weight: 800; color: #fff; letter-spacing: -0.01em; }
.site-footer__cta { display: grid; justify-items: center; gap: 16px; }
.site-footer__cta .btn { min-height: 48px; }
.site-footer .site-footer__cta .btn--gold, .site-footer .site-footer__cta .btn--gold:hover { color: var(--navy); }
.site-footer__social { display: flex; gap: 10px; }
.site-footer__social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgb(255 255 255 / 0.2);
  transition: border-color 0.18s ease, color 0.18s ease;
}
.site-footer__social a:hover { border-color: var(--gold); }
.site-footer__social .icon { width: 18px; height: 18px; }

.site-footer__grid { display: grid; gap: 36px; padding-block: clamp(36px, 5vw, 56px); }
.site-footer__title { margin-bottom: 16px; font-size: 0.8125rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
.site-footer__links li + li { margin-top: 10px; }
.site-footer__links strong { color: var(--gold); }
.site-footer__links--cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
.site-footer__links--cols li + li { margin-top: 0; }
@media (min-width: 400px) {
  .site-footer__links--cols a { white-space: nowrap; }
}
.site-footer__contact { margin-bottom: 22px; }
.site-footer__contact li + li { margin-top: 12px; }
.site-footer__contact a { display: inline-flex; align-items: center; gap: 10px; overflow-wrap: anywhere; }
.site-footer__contact .icon { color: var(--gold); }
.site-footer__bottom { border-top: 1px solid rgb(255 255 255 / 0.1); font-size: 0.875rem; color: rgb(255 255 255 / 0.6); }
.site-footer__bottom-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; padding-block: 22px; }
.site-footer__bottom a { color: rgb(255 255 255 / 0.85); font-weight: 600; }
.site-footer__bottom a:hover { color: var(--gold); }

