/* ==========================================================================
   TR Drilling & Service, Design System
   Brand palette (from logo): blue #006898 + charcoal gray #585858 + white
   ========================================================================== */

:root {
  /* Brand */
  --blue: #006898;          /* primary brand blue (logo) */
  --blue-bright: #0875a8;   /* links / hover pop (AA: 5.1:1 on white) */
  --blue-dark: #00547b;
  --blue-darker: #003f5d;
  --blue-deep: #002b40;     /* hero / footer background */
  --blue-300: #7cb8d6;
  --blue-200: #b6d8e8;
  --blue-tint: #e9f2f7;     /* light section wash */
  --charcoal: #585858;      /* brand gray (wordmark) */

  /* Neutrals */
  --ink: #2b2f33;           /* headings, strong text */
  --slate: #4c545a;         /* body text */
  --muted: #646d74;         /* secondary text (AA: 4.5:1+ on white, mist, tint) */
  --line: #e2e8ec;
  --mist: #eef3f6;
  --paper: #f7f9fb;
  --white: #ffffff;

  /* UI */
  --star: #f5a623;
  --ok: #1f7a4d;

  /* Type */
  --font-head: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;

  /* Layout */
  --maxw: 1180px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(20, 40, 55, .06), 0 2px 10px rgba(20, 40, 55, .05);
  --shadow-md: 0 12px 32px rgba(0, 58, 92, .13);
  --shadow-lg: 0 26px 64px rgba(0, 43, 64, .22);
  --transition: .2s ease;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; }
a { color: var(--blue); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--blue-bright); }
ul, ol { padding-left: 1.25rem; }
:focus-visible { outline: 3px solid var(--blue-bright); outline-offset: 2px; border-radius: 4px; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.08;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: .2px;
}
h1 { font-size: clamp(2.4rem, 5.2vw, 3.9rem); }
h2 { font-size: clamp(1.85rem, 3.6vw, 2.7rem); }
h3 { font-size: clamp(1.3rem, 2.2vw, 1.6rem); }
h4 { font-size: 1.15rem; }
p { margin-bottom: 1rem; color: var(--slate); }
.lead { font-size: 1.2rem; color: var(--slate); }
strong { color: var(--ink); font-weight: 600; }
.num-star { font-size: .6em; vertical-align: .08em; }   /* the star beside a rating number */
.eyebrow {
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 2.5px;
  font-weight: 600;
  font-size: .95rem;
  color: var(--blue);
  margin-bottom: .6rem;
  display: block;
}
.eyebrow.light { color: var(--blue-300); }

/* ---------- Layout ---------- */
.container { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.section--tight { padding: clamp(2.5rem, 5vw, 4rem) 0; }
.bg-tint { background: var(--blue-tint); }
.bg-mist { background: var(--mist); }
.bg-limestone { background: var(--mist); }   /* legacy alias */
.bg-paper { background: var(--paper); }
.bg-navy { background: var(--blue-deep); color: #cfe0ea; }   /* deep brand blue */
.bg-navy h1, .bg-navy h2, .bg-navy h3 { color: var(--white); }
.bg-navy p { color: #aecbdb; }
.center { text-align: center; }
.measure { max-width: 720px; }
.measure.center { margin-inline: auto; }
.grid { display: grid; gap: clamp(1.25rem, 3vw, 2rem); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.section-head { max-width: 760px; margin-bottom: 2.75rem; }
.section-head.center { margin-inline: auto; }

/* ---------- Media helpers ---------- */
.media-cover { width: 100%; height: 100%; object-fit: cover; display: block; }
.ratio-16-9 { aspect-ratio: 16 / 9; }
.ratio-3-2 { aspect-ratio: 3 / 2; }
.ratio-4-3 { aspect-ratio: 4 / 3; }
.ratio-1-1 { aspect-ratio: 1 / 1; }
.rounded { border-radius: var(--radius); overflow: hidden; }
.shadow { box-shadow: var(--shadow-md); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font-family: var(--font-head);
  font-weight: 600; font-size: 1.12rem; letter-spacing: .4px;
  padding: .85rem 1.6rem; border-radius: var(--radius-sm);
  border: 2px solid transparent; cursor: pointer;
  transition: transform var(--transition), background var(--transition), box-shadow var(--transition), color var(--transition);
  text-align: center; line-height: 1.1;
}
.btn svg { width: 1.1em; height: 1.1em; }
.btn-primary { background: var(--blue); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--blue-dark); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-white { background: #fff; color: var(--blue); }
.btn-white:hover { background: var(--blue-tint); color: var(--blue-dark); transform: translateY(-2px); }
.btn-secondary { background: var(--charcoal); color: #fff; }
.btn-secondary:hover { background: #444; color: #fff; transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--blue-dark); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-tint); }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.btn-outline-light:hover { background: #fff; color: var(--blue-dark); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-lg { font-size: 1.22rem; padding: 1rem 2rem; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: .9rem; }

/* ---------- Header ---------- */
.topbar { background: var(--blue-deep); color: #cfe0ea; font-size: .92rem; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 42px; flex-wrap: wrap; }
.topbar a { color: #e6eef4; }
.topbar a:hover { color: var(--blue-300); }
.topbar strong { color: #fff; font-weight: 600; }
.topbar-left { display: flex; gap: 1.4rem; flex-wrap: wrap; align-items: center; }
.topbar-item { display: inline-flex; align-items: center; gap: .45rem; }
.topbar-item svg { width: 1em; height: 1em; opacity: .85; }
.topbar-rating { display: inline-flex; align-items: center; gap: .4rem; }
.topbar .stars { color: var(--star); letter-spacing: 1px; }

/* NOTE: no backdrop-filter/transform/filter here. They make position:fixed descendants
   (the mobile off-canvas .nav-menu) relative to the header instead of the viewport,
   which traps the menu in the header's height. Keep the header bg opaque instead. */
.site-header { position: sticky; top: 0; z-index: 100; background: #ffffff; border-bottom: 1px solid var(--line); transition: box-shadow var(--transition); }
/* Header/topbar get a little more room than the 1180px content so the wide logo + full nav fit on one line */
.topbar .container, .site-header .container { max-width: 1300px; }
.nav { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 98px; transition: min-height .25s ease; }
.brand { display: inline-flex; align-items: center; }
.brand-img { width: auto; transition: height .25s ease; }
.brand-compact { height: 64px; display: inline-block; }
.brand-wide { height: 46px; display: none; }              /* legacy V2 lockup, large screens only */
.site-header.scrolled .nav { min-height: 70px; }
.site-header.scrolled .brand-compact { height: 46px; }
.site-header.scrolled .brand-wide { height: 38px; }
@media (min-width: 1280px) {
  .brand-compact { display: none; }
  .brand-wide { display: inline-block; }
}
.site-footer .brand img { height: 104px; width: auto; }

.nav-menu { display: flex; align-items: center; gap: .15rem; list-style: none; margin: 0; padding: 0; }
.nav-menu > li { position: relative; }
.nav-menu > li > a {
  font-family: var(--font-head); font-size: 1.1rem; font-weight: 500; letter-spacing: .3px;
  color: var(--charcoal); padding: .6rem .66rem; display: inline-flex; align-items: center; gap: .3rem; border-radius: 6px;
  white-space: nowrap;
}
.nav-menu > li > a:hover, .nav-menu > li.current > a { color: var(--blue); background: var(--blue-tint); }
.nav-menu .caret { width: .65em; height: .65em; transition: transform var(--transition); }
.has-dropdown:hover .caret { transform: rotate(180deg); }

.dropdown {
  position: absolute; top: calc(100% + 4px); left: 0; min-width: 252px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md); padding: .5rem; list-style: none; margin: 0;
  opacity: 0; visibility: hidden; transform: translateY(8px); transition: all var(--transition); z-index: 120;
}
.has-dropdown:hover .dropdown, .has-dropdown:focus-within .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown a { display: block; padding: .55rem .75rem; border-radius: 6px; color: var(--slate); font-weight: 500; font-size: .98rem; }
.dropdown a:hover { background: var(--blue-tint); color: var(--blue); }

/* Services mega-menu: one Services tab, three labeled columns */
.has-dropdown.has-mega { position: static; }
.dropdown--mega {
  left: 0; right: auto; width: min(700px, calc(100vw - 2.5rem));
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .05rem 1.3rem; padding: 1rem 1.15rem .75rem;
}
.dropdown--mega .mega-col { padding: 0; }
.mega-head {
  display: block; font-family: var(--font-head); font-size: .72rem; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase; color: var(--blue);
  padding: .15rem .55rem .4rem; border-bottom: 1px solid var(--line); margin-bottom: .25rem;
}
.mega-list { list-style: none; margin: 0; padding: 0; }
.dropdown--mega .mega-list a { font-size: .93rem; padding: .46rem .55rem; white-space: nowrap; }
.mega-foot {
  grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; border-top: 1px solid var(--line); margin-top: .55rem; padding-top: .3rem;
}
.mega-foot a { white-space: nowrap; }
.mega-foot .mega-all { color: var(--blue); }

/* Service-area map popups */
.map-pop strong { color: var(--charcoal); }
.map-pop a { color: var(--blue); font-weight: 600; }
.leaflet-popup-content { margin: .7rem .9rem; font-size: .95rem; }

/* Resources hub topic-group headings */
.res-group { font-family: var(--font-head); font-weight: 600; font-size: 1.55rem; color: var(--charcoal); margin: 2.6rem 0 1.1rem; }
.res-group:first-child { margin-top: .4rem; }

.nav-actions { display: flex; align-items: center; gap: .8rem; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: .4rem; }
.nav-toggle svg { width: 30px; height: 30px; color: var(--blue-dark); }

/* ---------- Hero ---------- */
.hero { position: relative; color: #fff; overflow: hidden; background: var(--blue-deep); }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.hero-overlay { position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(100deg, rgba(0,30,46,.92) 0%, rgba(0,43,64,.82) 42%, rgba(0,58,92,.5) 100%),
    radial-gradient(1100px 600px at 82% -10%, rgba(10,130,189,.4), transparent 60%);
}
.hero .container { position: relative; z-index: 2; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; padding: clamp(3.8rem, 8vw, 6.5rem) 0; }
.hero h1 { color: #fff; margin-bottom: 1.1rem; text-shadow: 0 2px 24px rgba(0,20,32,.4); }
.hero h1 .accent { color: var(--blue-300); }
.hero p { color: #d7e6ef; font-size: 1.2rem; max-width: 40ch; }
.hero .btn-row { margin-top: 1.8rem; }
.hero-points { list-style: none; padding: 0; margin: 1.8rem 0 0; display: flex; flex-wrap: wrap; gap: .9rem 1.6rem; }
.hero-points li { display: flex; align-items: center; gap: .5rem; font-weight: 500; color: #eaf3f8; font-size: 1rem; }
.hero-points svg { width: 1.2em; height: 1.2em; color: var(--blue-300); flex: none; }

.hero-card { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); border-radius: var(--radius); padding: 1.6rem; backdrop-filter: blur(6px); box-shadow: var(--shadow-lg); }
.hero-card .card-photo { border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 1.2rem; aspect-ratio: 16 / 10; }
.hero-card h2 { color: #fff; font-size: 1.35rem; }
.hero-card .stat-row { display: flex; gap: 1rem; margin-top: 1.2rem; }
.hero-card .stat { flex: 1; background: rgba(255,255,255,.1); border-radius: var(--radius-sm); padding: .9rem; text-align: center; }
.hero-card .stat b { font-family: var(--font-head); font-size: 1.9rem; color: #fff; display: block; line-height: 1; }
.hero-card .stat span { font-size: .8rem; color: #cfe0ea; letter-spacing: .3px; }

/* ---------- Page hero (interior) ---------- */
.page-hero { position: relative; background: var(--blue-deep); color: #fff; overflow: hidden; }
.page-hero .ph-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.page-hero::before { content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(100deg, rgba(0,30,46,.94), rgba(0,43,64,.78) 60%, rgba(0,58,92,.55)),
              radial-gradient(900px 420px at 88% -20%, rgba(10,130,189,.35), transparent 60%); }
.page-hero .container { position: relative; z-index: 2; padding: clamp(2.8rem, 6vw, 4.8rem) 0; }
.page-hero h1 { color: #fff; }
.page-hero p { color: #d7e6ef; max-width: 62ch; font-size: 1.15rem; }
.breadcrumb { font-size: .9rem; color: #9fc0d2; margin-bottom: .9rem; }
.breadcrumb a { color: #cfe3ef; }
.breadcrumb a:hover { color: var(--blue-300); }
.breadcrumb span { opacity: .6; margin: 0 .35rem; }

/* ---------- Cards ---------- */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.7rem; box-shadow: var(--shadow-sm); transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition); height: 100%; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--blue-200); }
.card h2 { font-size: clamp(1.3rem, 2.2vw, 1.6rem); margin-bottom: .5rem; }
.card h3 { margin-bottom: .5rem; }
.card p { margin-bottom: 0; }
.card-media { margin: -1.7rem -1.7rem 1.3rem; aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--radius) var(--radius) 0 0; background: var(--mist); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .card-media img { transform: scale(1.05); }
.card-icon { width: 56px; height: 56px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(150deg, var(--blue-bright), var(--blue-dark)); color: #fff; margin-bottom: 1.1rem; }
.card-icon svg { width: 28px; height: 28px; }
.card-link { display: inline-flex; align-items: center; gap: .35rem; font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; margin-top: 1rem; color: var(--blue); }
.card-link svg { width: 1em; height: 1em; transition: transform var(--transition); }
/* Bare inline arrows in a form-card link (e.g. "Official district site") have no sizing
   class of their own, so constrain them or the 24x24 SVG balloons to fill the box. */
.form-card a svg { width: 1em; height: 1em; vertical-align: -.12em; }
.card a.card-stretch::after { content: ""; position: absolute; inset: 0; }
.card.is-link { position: relative; }
.card.is-link:hover .card-link svg { transform: translateX(4px); }

/* ---------- Feature / split ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.split.reverse .split-media { order: 2; }
.split-media { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); background: var(--mist); }
.split-media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
.split-media.tall img { aspect-ratio: 3 / 4; }
.check-list { list-style: none; padding: 0; margin: 1.2rem 0 0; display: grid; gap: .7rem; }
.check-list li { display: flex; gap: .65rem; align-items: flex-start; color: var(--slate); }
.check-list svg { width: 1.4em; height: 1.4em; color: var(--ok); flex: none; margin-top: .1rem; }

/* ---------- Photo band (full-bleed) ---------- */
.photo-band { position: relative; color: #fff; overflow: hidden; background: var(--blue-deep); }
.photo-band .pb-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.photo-band .pb-overlay { position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(0,30,46,.9), rgba(0,43,64,.6) 55%, rgba(0,43,64,.25)); }
.photo-band .container { position: relative; z-index: 2; }

/* ---------- Stats band ---------- */
.stats-band { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; text-align: center; }
.stats-band .stat b { font-family: var(--font-head); font-size: clamp(2.4rem, 5vw, 3.4rem); color: #fff; display: block; line-height: 1; }
.stats-band .stat span { color: #aecbdb; font-size: .98rem; letter-spacing: .3px; }

/* ---------- Steps ---------- */
.steps { counter-reset: step; display: grid; gap: 1.5rem; }
/* any grid that holds numbered .step cards must establish the counter so it reads 1,2,3,4 */
.step-grid { counter-reset: step; }
.step { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem 1.5rem 1.5rem 4.6rem; box-shadow: var(--shadow-sm); }
.step::before { counter-increment: step; content: counter(step); position: absolute; left: 1.2rem; top: 1.35rem; width: 2.4rem; height: 2.4rem; background: var(--blue); color: #fff; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-head); font-weight: 700; font-size: 1.3rem; }
.step h3 { margin-bottom: .35rem; }
.step p { margin-bottom: 0; }

/* ---------- Testimonials ---------- */
.review { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.7rem; box-shadow: var(--shadow-sm); height: 100%; display: flex; flex-direction: column; }
.review .stars { color: var(--star); letter-spacing: 2px; font-size: 1.1rem; margin-bottom: .8rem; }
.review blockquote { font-size: 1.08rem; color: var(--ink); margin: 0 0 1.1rem; flex: 1; }
.review .who { display: flex; align-items: center; gap: .75rem; }
.review .avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; flex: none; }
.review .who b { display: block; color: var(--ink); }
.review .who span { font-size: .88rem; color: var(--muted); }

/* ---------- Gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .8rem; }
.gallery figure { position: relative; border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow-sm); margin: 0; }
.gallery img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; transition: transform .4s ease; display: block; }
.gallery figure:hover img { transform: scale(1.06); }
.gallery figcaption.sr-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.1rem .8rem .65rem; background: linear-gradient(transparent, rgba(0,43,64,.88)); color: #fff; font-size: .85rem; font-weight: 500; opacity: 0; transition: opacity .25s ease; pointer-events: none; }
.gallery figure:hover figcaption.sr-cap { opacity: 1; }

/* ---------- Trust / logos ---------- */
.brand-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1rem 2.5rem; }
.brand-strip .mfr { font-family: var(--font-head); font-weight: 600; font-size: 1.25rem; color: var(--muted); letter-spacing: .5px; padding: .4rem .9rem; border: 1px solid var(--line); border-radius: 100px; background: #fff; }

/* ---------- CTA band ---------- */
.cta-band { position: relative; overflow: hidden; }
.cta-band::before { content: ""; position: absolute; inset: 0; background: radial-gradient(700px 380px at 12% 120%, rgba(10,130,189,.5), transparent 60%); }
.cta-band .container { position: relative; z-index: 2; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.cta-inner .cta-copy { max-width: 620px; }
.cta-inner h2 { margin-bottom: .5rem; }

/* ---------- FAQ accordion ---------- */
.faq { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: var(--shadow-sm); }
.faq + .faq { margin-top: .9rem; }
.faq summary { list-style: none; cursor: pointer; padding: 1.2rem 1.4rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-family: var(--font-head); font-weight: 600; font-size: 1.25rem; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { flex: none; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--blue-tint); display: grid; place-items: center; transition: var(--transition); color: var(--blue); }
.faq[open] summary .icon { background: var(--blue); color: #fff; transform: rotate(45deg); }
.faq .faq-body { padding: 0 1.4rem 1.3rem; }
.faq .faq-body p:last-child { margin-bottom: 0; }

/* ---------- Forms ---------- */
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-md); padding: clamp(1.5rem, 3vw, 2.4rem); }
.form-card h2 { font-size: clamp(1.2rem, 2vw, 1.5rem); line-height: 1.2; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field { display: flex; flex-direction: column; gap: .35rem; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: .95rem; color: var(--ink); }
.field .req { color: var(--blue); }
.field input, .field select, .field textarea {
  font-family: inherit; font-size: 1rem; padding: .75rem .85rem; border: 1px solid #828b93; border-radius: var(--radius-sm);
  background: var(--paper); color: var(--ink); transition: border var(--transition), box-shadow var(--transition); width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,104,152,.15); background: #fff; }
.field textarea { resize: vertical; min-height: 120px; }
.form-note { font-size: .85rem; color: var(--muted); margin-top: .8rem; }

/* ---------- Info / contact tiles ---------- */
.info-tile { display: flex; gap: 1rem; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem; box-shadow: var(--shadow-sm); }
.info-tile .info-icon { width: 46px; height: 46px; border-radius: 10px; background: var(--blue-tint); color: var(--blue); display: grid; place-items: center; flex: none; }
.info-tile .info-icon svg { width: 24px; height: 24px; }
.info-tile h2 { font-size: 1.15rem; margin-bottom: .2rem; }
.info-tile p, .info-tile a { margin: 0; color: var(--slate); }
.info-tile a:hover { color: var(--blue); }

/* ---------- Area list ---------- */
.area-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .8rem; }
.area-grid li { list-style: none; }
.area-pill { display: flex; align-items: center; gap: .55rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .8rem 1rem; font-weight: 500; color: var(--blue-dark); box-shadow: var(--shadow-sm); }
.area-pill svg { width: 1.1em; height: 1.1em; color: var(--blue); flex: none; }
a.area-pill:hover { border-color: var(--blue); color: var(--blue); }

/* ---------- City directory ---------- */
.city-directory { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1.6rem 1.25rem; }
.dir-col h3 { font-family: var(--font-head); font-size: 1.05rem; color: var(--blue-dark); text-transform: uppercase; letter-spacing: 1px; margin-bottom: .55rem; padding-bottom: .4rem; border-bottom: 2px solid var(--blue-200); }
.dir-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; }
.dir-col a { color: var(--slate); font-weight: 500; }
.dir-col a:hover { color: var(--blue); }

/* ---------- Prose (article) ---------- */
.prose h2 { margin: 2.2rem 0 .9rem; }
.prose h3 { margin: 1.8rem 0 .6rem; }
.prose p { margin-bottom: 1.1rem; }
.prose ul { margin: 0 0 1.2rem; display: grid; gap: .5rem; }
.prose li { color: var(--slate); }
.prose table { width: 100%; border-collapse: collapse; margin: 1.3rem 0 1.6rem; font-size: .96rem; }
.prose th, .prose td { text-align: left; padding: .7rem .85rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose thead th { background: var(--blue-tint); color: var(--blue-dark); font-weight: 700; border-bottom: 2px solid var(--blue-200); }
.prose tbody tr:last-child td { border-bottom: 0; }
.prose .cost-table td:last-child { font-weight: 700; color: var(--ink); }
/* responsive tables: scroll horizontally on small screens instead of overflowing the page */
@media (max-width: 640px) {
  .prose table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; font-size: .9rem; }
  .prose th, .prose td { padding: .55rem .7rem; min-width: 5.5rem; }
  .prose .cost-table td:last-child { white-space: nowrap; }
}

/* ---------- Article byline (E-E-A-T) ---------- */
.byline { display: flex; align-items: center; gap: .85rem; padding: 0 0 1.4rem; margin: 0 0 1.6rem; border-bottom: 1px solid var(--line); }
.byline-logo { width: 44px; height: 44px; border-radius: 50%; background: var(--blue-tint); padding: 5px; flex: none; }
.byline-text { display: flex; flex-direction: column; line-height: 1.35; }
.byline-text strong { color: var(--ink); font-size: .98rem; }
.byline-text span { color: var(--muted); font-size: .85rem; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: .4rem; background: var(--blue-tint); color: var(--blue-dark); font-weight: 600; font-size: .85rem; padding: .35rem .8rem; border-radius: 100px; border: 1px solid var(--blue-200); }
.badge svg { width: 1em; height: 1em; color: var(--ok); }
.inline-cta { background: var(--blue-tint); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1.5rem; margin: 2.2rem 0; }
.inline-cta p { margin: 0 0 .9rem; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1.2rem 1rem; max-width: 940px; margin: 1.6rem auto 0; }
.team-card { margin: 0; text-align: center; }
.team-card img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--radius); display: block; }
.team-card figcaption { margin-top: .55rem; font-family: var(--font-head); font-weight: 600; font-size: 1.02rem; color: var(--blue-dark); }
.badge-row { display: flex; flex-wrap: wrap; gap: .6rem; }
.footer-social { display: flex; gap: .55rem; margin-top: 1rem; }
.footer-social a { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 9px; background: rgba(255,255,255,.09); color: #dceaf2; transition: background var(--transition), color var(--transition); }
.footer-social a:hover { background: var(--blue); color: #fff; }
.footer-social svg { width: 18px; height: 18px; }

/* ---------- Association memberships (official NGWA / wellowner logos) ---------- */
.member-badges { display: flex; gap: 2.6rem; justify-content: center; align-items: center; flex-wrap: wrap; margin: 1.4rem 0 1rem; }
.member-badges img { width: auto; height: auto; max-height: 74px; max-width: 220px; transition: transform .2s ease; }
.member-badges a:hover img { transform: translateY(-3px); }
.member-note { color: var(--muted); font-size: .92rem; max-width: 600px; margin: 0 auto; text-align: center; }
/* dark footer: both logos sit together on one white panel so the marks read cleanly and prominently */
.footer-memberships { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 18px; margin-top: 1.2rem; background: #fff; border-radius: 10px; padding: 12px 16px; }
.footer-memberships a { display: inline-flex; align-items: center; }
.footer-memberships img { width: auto; height: 32px; }

/* ---------- Alert / success ---------- */
.notice { background: #eef7f1; border: 1px solid #bfe1cd; color: #1f5d3d; border-radius: var(--radius); padding: 1.2rem 1.4rem; }

/* ---------- Dated data snapshot (drought/aquifer conditions) ---------- */
.databox { background: var(--blue-tint); border-left: 4px solid var(--blue); border-radius: 8px; padding: 1.3rem 1.5rem; margin: 1.5rem 0; }
.databox .asof { display: inline-block; font-size: .76rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--blue-dark); background: #fff; border: 1px solid var(--blue-200); border-radius: 100px; padding: .2rem .75rem; margin-bottom: .8rem; }
.databox > :last-child { margin-bottom: 0; }
.databox .refresh { font-size: .86rem; color: var(--muted); font-style: italic; margin-top: .8rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--blue-deep); color: #a7c2d2; padding-top: clamp(3rem, 6vw, 4.5rem); font-size: .98rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 2.2rem; padding-bottom: 2.5rem; }
.site-footer h2 { color: #fff; font-size: 1.05rem; text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 1rem; font-family: var(--font-head); }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.site-footer a { color: #a7c2d2; }
.site-footer a:hover { color: var(--blue-300); }
.footer-contact li { display: flex; gap: .6rem; align-items: flex-start; }
.footer-contact svg { width: 1.1em; height: 1.1em; color: var(--blue-300); flex: none; margin-top: .3rem; }
.footer-brand p { color: #93b1c3; }
.footer-licenses { font-size: .85rem; color: #7e9cae; margin-top: 1rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 1.4rem 0; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .88rem; color: #7e9cae; }
.footer-bottom a { color: #93b1c3; }

/* ---------- Skip link ---------- */
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--blue); color: #fff; padding: .6rem 1rem; z-index: 200; border-radius: 0 0 8px 0; }
.skip-link:focus { left: 0; color: #fff; }

/* ---------- Utilities ---------- */
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.text-blue { color: var(--blue); }
.nowrap { white-space: nowrap; }
.hide { display: none !important; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-card { max-width: 480px; margin: 0 auto; }
  .split, .split.reverse .split-media { grid-template-columns: 1fr; order: 0; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .stats-band { grid-template-columns: repeat(2, 1fr); gap: 2rem 1rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav, .site-header.scrolled .nav { min-height: 74px; }
  .brand-img, .site-header.scrolled .brand-img { height: 54px; }
  .site-footer .brand img { height: 84px; }
  .nav-menu {
    position: fixed; inset: 0 0 0 auto; width: min(86vw, 360px);
    background: #fff; flex-direction: column; align-items: stretch; gap: 0;
    padding: 5.5rem 1.2rem 2rem; box-shadow: var(--shadow-lg);
    transform: translateX(100%); transition: transform .28s ease; overflow-y: auto;
  }
  body.nav-open .nav-menu { transform: translateX(0); }
  body.nav-open { overflow: hidden; }
  .nav-menu > li > a { font-size: 1.3rem; padding: .85rem .6rem; border-radius: 8px; justify-content: space-between; }
  .dropdown {
    position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none;
    border: 0; border-left: 2px solid var(--line); border-radius: 0; margin: 0 0 .5rem .6rem;
    padding: 0 0 0 .6rem; min-width: auto; display: none;
  }
  .has-dropdown.open .dropdown { display: block; }
  .has-dropdown .caret { pointer-events: none; }
  .dropdown--mega { width: auto; grid-template-columns: 1fr; gap: 0; padding: 0 0 0 .6rem; }
  .dropdown--mega .mega-col { margin-bottom: .35rem; }
  .mega-head { border-bottom: 0; padding: .55rem .4rem .05rem; font-size: .82rem; }
  .dropdown--mega .mega-list a { font-size: 1.05rem; padding: .5rem .4rem; white-space: normal; }
  .mega-foot { grid-column: auto; flex-direction: column; align-items: flex-start; gap: 0; border-top: 0; margin-top: .15rem; padding-top: 0; }
  .nav-overlay { position: fixed; inset: 0; background: rgba(0,30,46,.5); opacity: 0; visibility: hidden; transition: opacity .25s ease; z-index: 99; }
  body.nav-open .nav-overlay { opacity: 1; visibility: visible; }
  .nav-actions .btn { display: none; }
}

@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .topbar { font-size: .82rem; }
  .topbar-left { gap: .6rem .9rem; }
  .cta-inner { flex-direction: column; align-items: flex-start; }
  .hero-card .stat-row { flex-wrap: wrap; }
}

/* ---------- Sticky mobile call/quote bar ---------- */
.mobile-cta { display: none; }
@media (max-width: 760px) {
  .mobile-cta {
    display: grid; grid-template-columns: 1fr 1fr;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 95;
    box-shadow: 0 -3px 18px rgba(0, 43, 64, .22);
  }
  .mobile-cta a {
    display: flex; align-items: center; justify-content: center; gap: .5rem;
    padding: 1rem; color: #fff; font-family: var(--font-head);
    font-size: 1.18rem; font-weight: 600; letter-spacing: .3px;
  }
  .mobile-cta a svg { width: 1.25em; height: 1.25em; }
  .mobile-cta .mcta-call { background: var(--charcoal); }
  .mobile-cta .mcta-quote { background: var(--blue); }
  .mobile-cta a:hover, .mobile-cta a:active { filter: brightness(1.12); }
  .mobile-cta a:focus-visible { outline: 3px solid #fff; outline-offset: -4px; }
  body { padding-bottom: 58px; }
}

/* ---------- Scroll reveal (progressive enhancement; JS adds .reveal) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1); will-change: opacity, transform; }
  .reveal.in { opacity: 1; transform: none; }
}

/* ---------- Trust strip ---------- */
.trust-strip { background: #fff; border-bottom: 1px solid var(--line); }
.trust-strip .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .9rem 2.4rem; padding-top: 1.1rem; padding-bottom: 1.1rem; }
.trust-item { display: inline-flex; align-items: center; gap: .55rem; color: var(--ink); font-weight: 600; font-size: 1rem; }
.trust-item svg { width: 1.25em; height: 1.25em; color: var(--blue); flex: none; }
.trust-item .tstar { color: var(--star); letter-spacing: 1px; font-size: 1.05em; }
.trust-item a { color: var(--ink); }
.trust-item a:hover { color: var(--blue); }
@media (max-width: 620px) { .trust-item { font-size: .9rem; } .trust-strip .container { gap: .7rem 1.4rem; } }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
