/* ────────────────────────────────────────────────────────────────
   Site v2 supplemental — mobile patches + component overrides.
   Loaded AFTER site.css so these rules win.
   ──────────────────────────────────────────────────────────────── */

/* ─── GEO BUTTON (postcode field "use my location") ───────────── */
.search .field.field--with-geo { position: relative; padding-right: 50px; }
.search .field.field--with-geo input { padding-right: 8px; }
.search .field .geo-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--primary-tint);
  color: var(--primary);
  border: none;
  cursor: pointer;
  transition: background .15s, color .15s, transform .1s;
  padding: 0;
}
.search .field .geo-btn:hover { background: var(--brand-tint); color: var(--brand-deep); }
.search .field .geo-btn:active { transform: translateY(-50%) scale(0.95); }
.search .field .geo-btn:disabled { opacity: .6; cursor: wait; }
.geo-spinner { animation: geo-spin 1s linear infinite; transform-origin: center; }
@keyframes geo-spin { to { transform: rotate(360deg); } }
@media (max-width: 640px) {
  .search .field.field--with-geo { padding-right: 50px; }
  .search .field .geo-btn { width: 34px; height: 34px; }
}

/* ─── HERO PROMO (free quote system advert) ───────────────────── */
.hero-promo {
  background: linear-gradient(160deg, var(--primary) 0%, var(--primary-deep) 100%);
  color: white;
  border-radius: 26px;
  padding: 36px 32px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 30px 60px -20px rgba(15,30,47,.25);
}
.hero-promo::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 85% 15%, rgba(249,115,22,0.18) 0%, transparent 45%),
    radial-gradient(circle at 15% 95%, rgba(255,255,255,0.05) 0%, transparent 40%);
  pointer-events: none;
}
.hero-promo > * { position: relative; z-index: 1; }
.hero-promo__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  padding: 6px 12px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
  color: rgba(255,255,255,.85);
}
.hero-promo__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 3px rgba(249,115,22,.22);
}
.hero-promo__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(26px, 3.4vw, 36px);
  line-height: 1.1;
  letter-spacing: -.02em;
  margin: 4px 0 0;
  color: white;
}
.hero-promo__title em {
  font-style: italic;
  font-weight: 400;
  color: var(--brand);
}
.hero-promo__body {
  font-size: 15.5px;
  line-height: 1.55;
  color: rgba(255,255,255,.78);
  margin: 0;
  max-width: 36ch;
}
.hero-promo__list {
  list-style: none;
  padding: 0;
  margin: 4px 0 0;
  display: grid;
  gap: 10px;
}
.hero-promo__list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14.5px;
  color: rgba(255,255,255,.92);
}
.hero-promo__list li svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: var(--brand);
  background: rgba(249,115,22,.16);
  border-radius: 50%;
  padding: 3px;
}
.hero-promo__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
  padding: 14px 22px;
  background: var(--brand);
  color: white !important;
  font-weight: 600;
  font-size: 15px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  box-shadow: 0 8px 20px -5px rgba(249,115,22,.5);
  transition: background .15s, transform .1s;
}
.hero-promo__cta:hover { background: var(--brand-deep); }
.hero-promo__cta:active { transform: translateY(1px); }
.hero-promo__foot {
  font-size: 12px;
  color: rgba(255,255,255,.5);
  margin: 6px 0 0;
  text-align: center;
}

/* ─── ROOFER CARD MEDIA (no photos yet → branded location mark) ─ */
.roofer-card .rc-media {
  background: linear-gradient(135deg, #1b3d6e 0%, #122a4d 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 24px;
  position: relative;
  overflow: hidden;
}
.roofer-card .rc-media::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 18% 28%, rgba(249,115,22,.10) 0%, transparent 42%),
    radial-gradient(circle at 84% 76%, rgba(255,255,255,.04) 0%, transparent 38%);
  pointer-events: none;
}
.roofer-card:nth-child(4n+2) .rc-media { background: linear-gradient(135deg, #2a4a78 0%, #1b3d6e 100%); }
.roofer-card:nth-child(4n+3) .rc-media { background: linear-gradient(135deg, #122a4d 0%, #0a1729 100%); }
.roofer-card:nth-child(4n+4) .rc-media { background: linear-gradient(135deg, #1b3d6e 0%, #2952a3 60%, #1b3d6e 100%); }

.rc-mark {
  position: relative;
  z-index: 1;
  text-align: center;
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.rc-mark-eyebrow {
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: rgba(255,255,255,.55);
}
.rc-mark-town {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.05;
  color: rgba(255,255,255,.96);
  letter-spacing: -.02em;
  text-wrap: balance;
  max-width: 90%;
}
.rc-mark-rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  padding: 4px 10px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,.95);
}
.rc-mark-rating svg { color: var(--brand); }
.rc-mark-rc { color: rgba(255,255,255,.6); font-weight: 400; }
.roofer-card .rc-media .badge { z-index: 2; }
.roofer-card .rc-media .save { z-index: 2; background: rgba(255,255,255,.95); }
.roofer-card .rc-media .save:hover { background: white; }
.roofer-card .rc-price b + * { color: var(--primary); }

/* ─── MOBILE ──────────────────────────────────────────────────── */

/* Make sure body never causes horizontal scroll on mobile */
html, body { overflow-x: hidden; }

/* Header — collapse nav links on mobile, keep logo + CTA visible */
@media (max-width: 880px) {
  .nav-row { grid-template-columns: auto 1fr; gap: 12px; padding: 12px var(--pad); }
  .nav-links { display: none !important; }
  .logo-mark { width: 44px !important; height: 44px !important; }
  .logo-mark img { width: 44px !important; height: 44px !important; }
  .wordmark { font-size: 14px !important; line-height: 1.1; }
  .wordmark .row1 b { font-size: inherit; }
  .nav-cta .signin { display: none; }  /* keep only the prominent CTA on mobile */
  .nav-cta .list { font-size: 13px; padding: 8px 14px; }
}

/* Smaller phones — hide list CTA text, keep button itself */
@media (max-width: 420px) {
  .nav-cta .list { padding: 8px 12px; font-size: 12px; }
}

/* Hero — tighten on mobile */
@media (max-width: 900px) {
  .hero { padding: 32px var(--pad) 40px; gap: 28px; }
  .hero-visual { aspect-ratio: 5/4; }
}
@media (max-width: 540px) {
  h1.headline { font-size: clamp(32px, 9vw, 44px); margin-bottom: 16px; }
  .hero-sub { font-size: 16px; margin-bottom: 24px; }
  .eyebrow { font-size: 12px; padding: 6px 12px; }
  .popular { gap: 6px; }
  .popular a { font-size: 12px; padding: 5px 10px; }
  .popular .lbl { display: none; }
}

/* Search bar — already collapses to single column at 640px in site.css,
   but ensure the tap targets are tall enough */
@media (max-width: 640px) {
  .search .field { padding: 12px 16px; min-height: 52px; }
  .search .go { min-height: 52px; padding: 0 24px; }
}

/* Stats strip — 4-col grid is awkward on phones, use 2-col */
@media (max-width: 720px) {
  .stats { grid-template-columns: 1fr 1fr; gap: 0; padding: 32px var(--pad); }
  .stat { padding: 18px 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: left; }
  .stat:nth-child(2n) { border-right: none; }
  .stat:nth-child(n+3) { border-bottom: none; }
  .stat .n { font-size: 28px; }
}

/* Map band — stack on mobile */
@media (max-width: 880px) {
  .map-band { grid-template-columns: 1fr; gap: 20px; padding: 40px 28px; }
  .map-band h2 { font-size: clamp(22px, 5vw, 30px); }
  .map-svg { max-width: 200px; margin: 0 auto; }
}

/* Featured roofers cards-row — already responsive via auto-fit,
   but tighten gap on phones */
@media (max-width: 540px) {
  .cards-row { grid-template-columns: 1fr; gap: 14px; }
  .roofer-card .rc-media { aspect-ratio: 16/10; }
}

/* Section-head — stack title + "more" link */
@media (max-width: 640px) {
  .section-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .section-head .more { font-size: 14px; }
}

/* Counties — tighter gap + smaller chips */
@media (max-width: 540px) {
  .counties { grid-template-columns: 1fr 1fr; gap: 8px; }
  .county { padding: 10px 12px; font-size: 13px; }
}

/* How-it-works — stack steps */
@media (max-width: 880px) {
  .steps { grid-template-columns: 1fr; gap: 24px; }
  .step { padding: 24px; }
  .step h3 { font-size: 20px; }
}

/* Sell-band — stack the bento and shrink feature card */
@media (max-width: 900px) {
  .bento { grid-template-columns: 1fr; gap: 16px; }
  .card.feature { grid-row: auto !important; grid-column: auto !important; padding: 28px; }
  .card { padding: 24px; }
  .card.feature h3 { font-size: 24px; }
  .card.feature .price { font-size: 36px; }
}

/* Blog cards — stack on mobile */
@media (max-width: 720px) {
  .article .ph { aspect-ratio: 16/9; }
}

/* FAQ — tighter spacing */
@media (max-width: 540px) {
  .faq-item summary { font-size: 15px; padding: 16px 0; }
  .faq-item[open] > * + * { font-size: 14.5px; }
}

/* CTA band — stack on mobile */
@media (max-width: 720px) {
  .cta-band { grid-template-columns: 1fr; padding: 32px 24px; gap: 20px; }
  .cta-band h2 { font-size: clamp(24px, 6vw, 32px); }
  .cta-band .right { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .cta-band .mini { padding: 12px; }
  .cta-band .mini strong { font-size: 16px; }
}

/* Footer — already does 4 → 2 → 1 col stacking, just tighten */
@media (max-width: 540px) {
  .footer-inner { gap: 28px; padding-bottom: 8px; }
  .footer-newsletter form { flex-direction: column; padding: 12px; border-radius: 16px; }
  .footer-newsletter input { padding: 12px; }
  .footer-newsletter button { width: 100%; padding: 12px; }
  .footer-bottom { font-size: 12px; flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* Universal — ensure tap targets are at least 44px on mobile per Apple HIG */
@media (max-width: 720px) {
  .btn { min-height: 44px; padding-top: 12px; padding-bottom: 12px; }
  .nav-cta a.list { min-height: 40px; }
  button.go { min-height: 44px; }
  .save { width: 32px; height: 32px; }
}

/* Mobile menu toggle button — show on mobile only.
   We don't have a JS hamburger yet, but at least make it accessible if added. */
@media (min-width: 881px) {
  .mobile-menu-btn { display: none; }
}
