/* Primewest Plumbing — streamlined site
   Self-contained, theme-aware, uses original site's imagery.
*/

:root {
  --bg: #ffffff;
  --bg-elev: #f6f8fb;
  --bg-sunk: #eef2f7;
  --fg: #0e1a2b;
  --fg-muted: #4b5b70;
  --fg-soft: #6b7a8f;
  --border: #dde4ed;
  --brand: #0a4c8a;
  --brand-strong: #073968;
  --brand-soft: #e8f1fb;
  --accent: #ff6a2c;
  --accent-strong: #e8541a;
  --success: #1e8a54;
  --warn: #b6791b;
  --shadow-sm: 0 1px 2px rgba(10, 30, 60, .06), 0 1px 3px rgba(10, 30, 60, .05);
  --shadow-md: 0 6px 20px rgba(10, 30, 60, .08), 0 2px 6px rgba(10, 30, 60, .05);
  --shadow-lg: 0 20px 50px rgba(10, 30, 60, .18), 0 6px 16px rgba(10, 30, 60, .08);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --maxw: 1120px;
  --pad: clamp(16px, 3vw, 28px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220;
    --bg-elev: #111a2c;
    --bg-sunk: #0a1120;
    --fg: #eef3fa;
    --fg-muted: #a8b6c8;
    --fg-soft: #7d8ea4;
    --border: #1e2b41;
    --brand: #4aa3ff;
    --brand-strong: #78bfff;
    --brand-soft: #12233b;
    --accent: #ff8a52;
    --accent-strong: #ffa072;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3), 0 1px 3px rgba(0, 0, 0, .35);
    --shadow-md: 0 6px 24px rgba(0, 0, 0, .5), 0 2px 8px rgba(0, 0, 0, .3);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, .55), 0 6px 16px rgba(0, 0, 0, .35);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad);
  position: relative;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--bg), transparent 5%);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 40px; height: 40px;
  border-radius: 8px;
  background: #fff;
  padding: 3px;
  box-shadow: var(--shadow-sm);
  object-fit: contain;
}
.nav-links {
  display: flex;
  gap: 6px;
  margin-left: 8px;
  flex: 1;
}
.nav-links a {
  color: var(--fg-muted);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.95rem;
}
.nav-links a:hover {
  color: var(--fg);
  background: var(--bg-elev);
  text-decoration: none;
}
.nav-links a.active {
  color: var(--brand);
  background: var(--brand-soft);
}
.nav-cta {
  display: flex;
  gap: 8px;
  align-items: center;
}
.mobile-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--fg);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  cursor: pointer;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .06s ease, background .15s ease, box-shadow .15s ease, color .15s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--brand-strong); }
.btn-accent { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn-accent:hover { background: var(--accent-strong); }
.btn-outline { background: transparent; color: var(--fg); border-color: var(--border); }
.btn-outline:hover { border-color: var(--fg-muted); background: var(--bg-elev); }
.btn-lg { padding: 14px 22px; font-size: 1rem; }

/* ---------- Hero (uses original site's hero photo as background) ---------- */
.hero {
  position: relative;
  padding: 72px 0 56px;
  color: #f4f8fd;
  overflow: hidden;
  isolation: isolate;
  background: #0a1728 url("img/hero.jpg") center/cover no-repeat;
}
/* Soft dark shade ONLY on the left third, keeps hero copy readable
   without tinting the logo/wordmark in the background */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(7, 20, 40, .70) 0%,
    rgba(7, 20, 40, .35) 35%,
    rgba(7, 20, 40, 0) 60%
  );
  z-index: 0;
  pointer-events: none;
}
/* Logo watermark drifting behind the hero content */
.hero::after {
  content: "";
  position: absolute;
  right: -80px;
  top: 50%;
  transform: translateY(-50%);
  width: min(620px, 65vw);
  aspect-ratio: 1 / 1;
  background: url("img/logo.png") center/contain no-repeat;
  opacity: 0.08;
  pointer-events: none;
  z-index: 0;
  filter: drop-shadow(0 8px 30px rgba(0,0,0,.4));
}
.hero .container { z-index: 1; }
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: start; /* left column flows; card anchors to top-right */
}
.hero-title-image {
  width: min(420px, 90%);
  height: auto;
  margin: 0 0 20px;
  filter: drop-shadow(0 6px 22px rgba(0,0,0,.35));
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  background: rgba(255, 255, 255, .15);
  backdrop-filter: blur(6px);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 16px;
  border: 1px solid rgba(255,255,255,.2);
}
.hero h1 {
  font-size: clamp(2rem, 4.4vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  color: #ffffff;
  text-shadow: 0 2px 12px rgba(0,0,0,.35);
}
.hero p.lead {
  font-size: 1.1rem;
  color: rgba(255,255,255,.9);
  max-width: 52ch;
  margin: 0 0 28px;
  text-shadow: 0 1px 8px rgba(0,0,0,.3);
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.hero .btn-outline {
  color: #fff;
  border-color: rgba(255,255,255,.55);
  background: rgba(10, 25, 50, .45);
  backdrop-filter: blur(4px);
}
.hero .btn-outline:hover {
  background: rgba(10, 25, 50, .7);
  border-color: rgba(255,255,255,.85);
}
.trustline {
  margin-top: 24px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  color: rgba(255,255,255,.85);
  font-size: 0.9rem;
}
.trustline strong { color: #fff; }
/* Hero card — matched to the Primewest logo's deep-navy + metallic-blue palette.
   Absolutely positioned so it lands over the "T" of "WEST" in the background wordmark. */
.hero-card {
  position: absolute;
  top: 40px;
  left: 46%;
  right: auto;
  align-self: auto;
  justify-self: auto;
  width: 400px;
  max-width: min(420px, 38vw);
  z-index: 3;
  background:
    radial-gradient(120% 100% at 0% 0%, rgba(120, 180, 255, .10), transparent 55%),
    linear-gradient(155deg, #0a2547 0%, #061529 100%);
  color: #eaf2ff;
  border: 1px solid rgba(120, 180, 255, .28);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .12),
    inset 0 0 0 1px rgba(120, 180, 255, .05),
    0 20px 50px rgba(0, 15, 40, .55),
    0 6px 16px rgba(0, 0, 0, .35);
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
/* Subtle metallic sheen along the top edge */
.hero-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(180, 210, 255, .55) 20%,
    rgba(220, 235, 255, .8) 50%,
    rgba(180, 210, 255, .55) 80%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 1;
}
.hero-card h3 {
  margin: 0 0 14px;
  font-size: 1.05rem;
  color: #ffffff;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 0 rgba(0, 20, 50, .6);
}
.hero-card ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.hero-card li {
  display: flex; gap: 12px; align-items: flex-start;
  color: #c6d6ec;
  font-size: 0.95rem;
}
.check {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4aa3ff 0%, #78bfff 55%, #a9d3ff 100%);
  color: #062244;
  display: grid; place-items: center;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 1px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .5),
    inset 0 -1px 0 rgba(0, 20, 50, .3),
    0 2px 6px rgba(74, 163, 255, .35);
  border: 1px solid rgba(255, 255, 255, .35);
}

/* ---------- Google Guaranteed strip ---------- */
.trust-strip {
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elev);
}
.trust-strip .row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  text-align: center;
}
.trust-strip img {
  height: 60px;
  width: auto;
}
.trust-strip .stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.trust-strip .stat .n {
  font-size: 1.5rem; font-weight: 700; color: var(--brand);
  letter-spacing: -0.02em;
}
.trust-strip .stat .l { font-size: 0.85rem; color: var(--fg-muted); }

/* ---------- Sections ---------- */
section { padding: 56px 0; }
.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 32px;
}
.section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -0.02em;
  margin: 0 0 10px;
}
.section-head p { color: var(--fg-muted); margin: 0; }
.divider { border-top: 1px solid var(--border); }

/* ---------- Services grid (uses original Wix service icons) ---------- */
.services {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.service {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
  display: block;
  color: inherit;
  text-decoration: none;
  position: relative;
}
.service:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in oklab, var(--brand), var(--border) 60%);
  text-decoration: none;
}
.service:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.service-cta {
  display: inline-block;
  margin-top: 10px;
  color: var(--brand);
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity .15s ease, transform .15s ease;
}
.service:hover .service-cta {
  opacity: 1;
  transform: translateX(0);
}
.service .icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand);
  display: grid; place-items: center;
  font-size: 22px;
  margin-bottom: 12px;
}

/* Real social icons pulled from the original site — used in footer */
.socials {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-top: 12px;
}
.socials a {
  width: 36px; height: 36px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg);
  display: grid; place-items: center;
  transition: transform .12s ease, box-shadow .12s ease;
}
.socials a:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.socials img { width: 100%; height: 100%; object-fit: cover; }
.service h3 { font-size: 1rem; margin: 0 0 6px; }
.service p { font-size: 0.9rem; color: var(--fg-muted); margin: 0; }

/* ---------- Areas + Map ---------- */
.areas {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 20px;
}
.area-chip {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  color: var(--fg-muted);
  font-size: 0.9rem;
}

.map-wrap {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: #0a1728;
}
#serviceMap {
  height: 460px;
  width: 100%;
}
.map-legend {
  position: absolute;
  left: 14px; bottom: 14px;
  background: rgba(10, 20, 40, .85);
  color: #eef3fa;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.85rem;
  display: grid; gap: 6px;
  backdrop-filter: blur(6px);
  z-index: 500;
  pointer-events: none;
}
.map-legend .dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
  box-shadow: 0 0 0 2px rgba(255,255,255,.25);
}
.map-legend .dot-hq { background: #ff6a2c; box-shadow: 0 0 0 3px rgba(255,106,44,.35); }
.map-legend .dot-area { background: #4aa3ff; }

/* Custom Leaflet marker: round pill with label — tuned for satellite base */
.pw-marker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #0a4c8a;
  color: #fff;
  padding: 5px 10px 5px 8px;
  border-radius: 999px;
  font: 700 12px -apple-system, "Segoe UI", Roboto, sans-serif;
  white-space: nowrap;
  box-shadow:
    0 0 0 3px #ffffff,
    0 4px 14px rgba(0,0,0,.55);
  border: 1px solid rgba(0,0,0,.2);
  transform: translate(-50%, calc(-100% - 8px));
  transition: transform .12s ease, background .12s ease;
  cursor: pointer;
  letter-spacing: 0.01em;
}
.pw-marker::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #4aa3ff;
  box-shadow: 0 0 0 2px #fff;
  flex-shrink: 0;
}
.pw-marker::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -8px;
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-top-color: #ffffff;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,.35));
}
.pw-marker:hover {
  transform: translate(-50%, calc(-100% - 8px)) scale(1.06);
  background: #073968;
  z-index: 1000;
}
.pw-marker .eta {
  background: rgba(255,255,255,.22);
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 0.03em;
  font-weight: 600;
}
.pw-marker-hq {
  background: linear-gradient(135deg, #ff6a2c, #e8541a);
  font-size: 13px;
  padding: 6px 12px 6px 10px;
  box-shadow:
    0 0 0 3px #ffffff,
    0 6px 18px rgba(232, 84, 26, .55),
    0 4px 14px rgba(0,0,0,.55);
}
.pw-marker-hq::before { background: #fff; }
.pw-marker-hq::after { border-top-color: #ffffff; }

/* Leaflet popup styling to match the site */
.leaflet-popup-content-wrapper {
  background: #0e1a2b !important;
  color: #eef3fa !important;
  border-radius: 10px !important;
  box-shadow: 0 10px 30px rgba(0,0,0,.5) !important;
}
.leaflet-popup-content { margin: 10px 14px !important; font: 500 13px -apple-system, "Segoe UI", Roboto, sans-serif !important; }
.leaflet-popup-content b { color: #fff; }
.leaflet-popup-content .eta-line { color: #ff8a52; font-weight: 600; margin-top: 4px; display: block; }
.leaflet-popup-tip { background: #0e1a2b !important; }
.leaflet-control-attribution {
  background: rgba(10, 20, 40, .7) !important;
  color: #a8b6c8 !important;
  font-size: 10px !important;
}
.leaflet-control-attribution a { color: #78bfff !important; }

/* ---------- CTA band (uses logo as watermark background) ---------- */
.cta-band {
  position: relative;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 36px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  isolation: isolate;
}
.cta-band::before {
  content: "";
  position: absolute;
  right: -60px; top: -60px;
  width: 320px; height: 320px;
  background: url("img/logo.png") center/contain no-repeat;
  opacity: 0.1;
  z-index: 0;
  transform: rotate(-8deg);
  pointer-events: none;
}
.cta-band > * { position: relative; z-index: 1; }
.cta-band h3 { margin: 0 0 6px; font-size: 1.4rem; }
.cta-band p { margin: 0; opacity: 0.9; }
.cta-band .btn-accent { color: #fff; }

/* ---------- Table (compare page) ---------- */
.compare-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev);
}
table.compare {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
  font-size: 0.95rem;
}
table.compare th,
table.compare td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
table.compare th {
  background: var(--bg-sunk);
  color: var(--fg-muted);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
table.compare tr:last-child td { border-bottom: none; }
.price { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--brand); white-space: nowrap; }
.price-strike { color: var(--fg-soft); text-decoration: line-through; font-weight: 400; }
.includes { color: var(--fg-muted); font-size: 0.9rem; max-width: 380px; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-match {
  background: color-mix(in oklab, var(--success), transparent 80%);
  color: var(--success);
}
.badge-beat {
  background: color-mix(in oklab, var(--accent), transparent 80%);
  color: var(--accent-strong);
}

/* ---------- Form (compare page) ---------- */
.match-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.match-form .full { grid-column: 1 / -1; }
.match-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--fg-muted);
  margin-bottom: 6px;
}
.match-form input,
.match-form select,
.match-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--fg);
  border-radius: var(--radius-sm);
  font: inherit;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.match-form input:focus,
.match-form select:focus,
.match-form textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--brand), transparent 80%);
}
.match-form textarea { min-height: 100px; resize: vertical; }
.form-note { font-size: 0.85rem; color: var(--fg-soft); margin-top: 8px; }
.form-success {
  background: color-mix(in oklab, var(--success), transparent 85%);
  color: var(--success);
  border: 1px solid color-mix(in oklab, var(--success), transparent 60%);
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  margin-top: 14px;
  display: none;
}
.form-success.show { display: block; }

/* ---------- Pledge tiles (compare page) ---------- */
.pledge {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}
.pledge-tile {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}
.pledge-tile .n {
  font-size: 1.8rem; font-weight: 700; color: var(--brand);
  letter-spacing: -0.02em;
}
.pledge-tile .l { color: var(--fg-muted); font-size: 0.9rem; margin-top: 4px; }

/* Compare page hero — same photo, tighter */
.hero.hero-compact {
  padding: 56px 0 40px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-sunk);
  border-top: 1px solid var(--border);
  padding: 32px 0;
  color: var(--fg-muted);
  font-size: 0.9rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 24px;
  margin-bottom: 20px;
}
.footer-grid h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg);
  margin: 0 0 10px;
}
.footer-grid ul {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 6px;
}
.footer-legal {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Gallery page ---------- */
.gallery-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin: 8px auto 32px;
  max-width: 900px;
}
.gallery-toc a {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  color: var(--fg-muted);
  font-size: 0.85rem;
  transition: background .12s ease, color .12s ease;
}
.gallery-toc a:hover {
  background: var(--brand-soft);
  color: var(--brand);
  text-decoration: none;
}

.gallery-section {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  scroll-margin-top: 80px;
}
.gallery-section:first-of-type { border-top: none; }
.gallery-section-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.gallery-section-head .num {
  color: var(--brand);
  font-weight: 700;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}
.gallery-section-head h2 {
  margin: 0;
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  letter-spacing: -0.02em;
}
.gallery-section-head p {
  color: var(--fg-muted);
  margin: 0;
  flex-basis: 100%;
  font-size: 0.95rem;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.gallery-tile {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: linear-gradient(135deg,
    color-mix(in oklab, var(--brand), var(--bg-elev) 60%),
    var(--bg-elev)
  );
  position: relative;
  transition: transform .12s ease, box-shadow .12s ease;
}
.gallery-tile:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-md);
}
/* Placeholder sits behind — always rendered; photo covers it when loaded */
.gallery-tile .empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 8px;
  text-align: center;
  padding: 20px;
  z-index: 0;
}
.gallery-tile .empty .glyph {
  font-size: 2.4rem;
  opacity: 0.9;
  line-height: 1;
}
.gallery-tile .empty .lbl {
  font-size: 0.9rem;
  font-weight: 700;
  color: color-mix(in oklab, var(--fg), transparent 15%);
  letter-spacing: 0.01em;
}
.gallery-tile .empty .hint {
  font-size: 0.72rem;
  color: var(--fg-soft);
  opacity: 0.8;
}
.gallery-tile .empty .hint code {
  background: color-mix(in oklab, var(--brand), transparent 80%);
  color: var(--brand);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.72rem;
}
.gallery-tile .tile-photo {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 1;
}

.gallery-notice {
  background: color-mix(in oklab, var(--warn), transparent 88%);
  border: 1px solid color-mix(in oklab, var(--warn), transparent 60%);
  color: var(--warn);
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  margin-bottom: 24px;
}
.gallery-notice code {
  background: rgba(0,0,0,.08);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.85rem;
}

/* ---------- Mobile-only "Why Primewest" section ---------- */
/* Hidden on desktop — the .hero-card serves that role there. Shown on mobile
   as its own dedicated section right after the hero. */
.why-us-mobile { display: none; }
.why-us-card {
  background:
    radial-gradient(120% 100% at 0% 0%, rgba(120, 180, 255, .10), transparent 55%),
    linear-gradient(155deg, #0a2547 0%, #061529 100%);
  color: #eaf2ff;
  border: 1px solid rgba(120, 180, 255, .28);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .12),
    0 20px 50px rgba(0, 15, 40, .55),
    0 6px 16px rgba(0, 0, 0, .35);
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.why-us-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(220, 235, 255, .8) 50%, transparent);
  pointer-events: none;
}
.why-us-card h3 {
  margin: 0 0 14px;
  font-size: 1.1rem;
  color: #fff;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 0 rgba(0, 20, 50, .6);
}
.why-us-card ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.why-us-card li {
  display: flex; gap: 12px; align-items: flex-start;
  color: #c6d6ec;
  font-size: 0.95rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero::after { opacity: 0.05; right: -140px; }
  .cta-band { grid-template-columns: 1fr; text-align: left; }
  .pledge { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .match-form { grid-template-columns: 1fr; }
  /* Swap: hide the floating hero card, show the dedicated section instead */
  .hero-card { display: none; }
  .why-us-mobile {
    display: block;
    padding: 32px 0;
    background: var(--bg);
  }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .mobile-toggle { display: inline-flex; }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 8px var(--pad) 12px;
    gap: 2px;
  }
  .nav-cta .btn:not(.btn-accent) { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-title-image { width: 260px; }
}
