/* ============================================================
   Cardinal Home Inspections — Design System
   Bold & modern: cardinal red, deep charcoal, warm cream
   ============================================================ */

:root {
  /* Cardinal Home Inspections brand: deep cardinal red, navy #073673, white */
  --red: #B22230;
  --red-dark: #8C1823;
  --red-bright: #D6303F;
  --ink: #073673;
  --ink-soft: #1A4487;
  --slate: #46587A;
  --cream: #F5F8FC;
  --paper: #FFFFFF;
  --sand: #E4EBF6;
  --gold: #9DC0F0;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(28, 30, 34, .10);
  --shadow-lg: 0 24px 60px rgba(28, 30, 34, .16);
  --font-head: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", Arial, sans-serif;
  --max: 1180px;
}

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

/* ---------- Accessibility: focus & skip link ---------- */
:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
  border-radius: 4px;
}
/* On dark backgrounds the red ring needs a light halo to stay visible */
.hero :focus-visible, .page-hero :focus-visible, .stats :focus-visible,
.cta-band :focus-visible, footer.site :focus-visible, .topbar :focus-visible,
.band :focus-visible, .search-overlay :focus-visible {
  outline-color: #fff;
  box-shadow: 0 0 0 6px rgba(178, 34, 48, .65);
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 999;
  background: var(--red); color: #fff; padding: 12px 22px;
  border-radius: 0 0 10px 10px; font-weight: 700;
  transition: top .18s ease;
}
.skip-link:focus { top: 0; color: #fff; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
/* height:auto lets build.py stamp real width/height attributes on every image
   (which reserves space and stops layout shift) without distorting anything. */
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red); text-decoration: none; }
a:hover { color: var(--red-dark); }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: .3px;
  text-transform: uppercase;
}
h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.35rem, 2.4vw, 1.7rem); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
section { padding: 84px 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-head); text-transform: uppercase;
  font-size: 1.05rem; letter-spacing: 3px; color: var(--red);
  font-weight: 600; margin-bottom: 14px;
}
.eyebrow::before {
  content: ""; width: 34px; height: 3px; background: var(--red);
  border-radius: 2px;
}
.lead { font-size: 1.18rem; color: var(--slate); max-width: 720px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-head); text-transform: uppercase;
  letter-spacing: 1.5px; font-weight: 600; font-size: 1.05rem;
  padding: 15px 32px; border-radius: 50px; border: 2px solid transparent;
  cursor: pointer; transition: all .25s ease;
}
.btn-red { background: var(--red); color: #fff; box-shadow: 0 8px 22px rgba(178, 34, 48, .35); }
.btn-red:hover { background: var(--red-dark); color: #fff; transform: translateY(-2px); }
/* Ghost button: readable on a LIGHT background by default. It used to be
   white-on-white outside dark panels, which made ~38 buttons across the site
   effectively invisible. */
.btn-ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: #fff; }

/* …and inverted anywhere it sits on a dark panel. */
.hero .btn-ghost, .page-hero .btn-ghost, .cta-band .btn-ghost,
.band .btn-ghost, footer.site .btn-ghost {
  border-color: rgba(255,255,255,.55); color: #fff; background: transparent;
}
.hero .btn-ghost:hover, .page-hero .btn-ghost:hover, .cta-band .btn-ghost:hover,
.band .btn-ghost:hover, footer.site .btn-ghost:hover {
  background: rgba(255,255,255,.12); color: #fff;
}
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--ink-soft); color: #fff; transform: translateY(-2px); }
.btn-outline { border-color: var(--red); color: var(--red); }
.btn-outline:hover { background: var(--red); color: #fff; }

/* ---------- Top bar ---------- */
.topbar {
  background: var(--ink); color: #C8CBD2; font-size: .88rem;
  padding: 7px 0;
}
.topbar .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.topbar a { color: #fff; font-weight: 600; }
.topbar .lic { letter-spacing: 1px; }

/* ---------- Header ---------- */
header.site {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.96); backdrop-filter: blur(8px);
  box-shadow: 0 2px 18px rgba(28,30,34,.08);
}
header.site .wrap {
  display: flex; align-items: center; gap: 28px; height: 92px;
}
/* Logo already contains the wordmark — no duplicate text beside it */
.brand { display: flex; align-items: center; }
.brand img { height: 68px; width: auto; display: block; }
@media (max-width: 980px) {
  header.site .wrap { height: 80px; }
  .brand img { height: 56px; }
}
@media (max-width: 420px) {
  .brand img { height: 48px; }
}
/* Footer sits on near-black navy — the navy wordmark needs a white panel behind it */
.footer-logo-panel {
  display: inline-block; background: #fff;
  padding: 14px 20px; border-radius: 14px;
  margin-bottom: 18px; line-height: 0;
}
.footer-logo { height: 88px; width: auto; display: block; }
@media (max-width: 560px) {
  .footer-logo-panel { padding: 12px 16px; }
  .footer-logo { height: 72px; }
}

nav.main { margin-left: auto; display: flex; align-items: center; gap: 4px; }
nav.main > a, nav.main .navdrop > button {
  font-family: var(--font-head); text-transform: uppercase; letter-spacing: 1.2px;
  font-weight: 600; font-size: 1rem; color: var(--ink);
  padding: 10px 13px; border-radius: 8px; background: none; border: none; cursor: pointer;
}
nav.main > a:hover, nav.main .navdrop > button:hover { color: var(--red); background: var(--sand); }
nav.main > a.active { color: var(--red); }

.navdrop { position: relative; }
.navdrop .menu {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 280px;
  background: #fff; border-radius: 12px; box-shadow: var(--shadow-lg);
  padding: 10px; display: none; z-index: 60;
}
/* Invisible bridge across the gap between button and menu, so moving the
   mouse diagonally toward an item doesn't break the hover. */
.navdrop .menu::before {
  content: ""; position: absolute; top: -14px; left: 0; right: 0; height: 14px;
}
/* Widen the hover target slightly on either side of the menu too. */
.navdrop .menu::after {
  content: ""; position: absolute; top: 0; bottom: -8px; left: -12px; right: -12px;
  z-index: -1;
}
.navdrop:hover .menu, .navdrop:focus-within .menu, .navdrop.force-open .menu { display: block; }
.navdrop .menu a {
  display: block; padding: 10px 14px; border-radius: 8px; color: var(--ink);
  font-weight: 600; font-size: .96rem;
}
.navdrop .menu a:hover { background: var(--cream); color: var(--red); }
/* menu item that carries a real brand medallion */
.navdrop .menu a.menu-badge { display: flex; align-items: center; gap: 9px; }
.navdrop .menu a.menu-badge img { height: 28px; width: 28px; object-fit: contain; flex: 0 0 28px; }

.nav-cta { margin-left: 8px; }
.search-toggle {
  background: var(--sand); border: none; cursor: pointer; border-radius: 50%;
  width: 42px; height: 42px; display: grid; place-items: center; font-size: 1.05rem;
}
.search-toggle:hover { background: var(--red); color: #fff; }

/* Mobile nav */
.hamburger { display: none; background: none; border: none; font-size: 1.7rem; cursor: pointer; margin-left: auto; }
@media (max-width: 980px) {
  nav.main {
    display: none; position: absolute; top: 80px; left: 0; right: 0;
    background: #fff; flex-direction: column; align-items: stretch;
    padding: 14px 20px 24px; box-shadow: var(--shadow-lg); gap: 2px;
    max-height: calc(100vh - 80px); overflow-y: auto;   /* long menu stays reachable */
  }
  nav.main.open { display: flex; }
  .navdrop .menu { position: static; display: block; box-shadow: none; padding-left: 18px; }
  .hamburger { display: block; padding: 8px 12px; }
  .nav-cta { margin: 12px 0 0; justify-content: center; }
  /* Fingers need ~44px — bump every tappable nav item on touch screens */
  nav.main > a, nav.main .navdrop > button { padding: 14px 13px; }
  .navdrop .menu a { padding: 14px; }
  .town-chip { padding: 13px 22px; }
  .search-toggle { width: 46px; height: 46px; }
}

/* ---------- Search overlay ---------- */
.search-overlay {
  position: fixed; inset: 0; background: rgba(20,21,25,.86); z-index: 200;
  display: none; padding: 12vh 24px 0; backdrop-filter: blur(4px);
}
.search-overlay.open { display: block; }
.search-overlay[hidden] { display: none; }
.search-panel { max-width: 640px; margin: 0 auto; }
.search-panel input {
  width: 100%; font-size: 1.35rem; padding: 18px 24px; border-radius: 14px;
  border: none; outline: 3px solid var(--red); font-family: var(--font-body);
}
.search-results {
  background: #fff; border-radius: 14px; margin-top: 14px; max-height: 52vh;
  overflow: auto; box-shadow: var(--shadow-lg);
}
.search-results a {
  display: block; padding: 14px 22px; border-bottom: 1px solid var(--sand); color: var(--ink);
}
.search-results a:hover { background: var(--cream); }
.search-results .r-title { font-weight: 700; }
.search-results .r-type {
  display: inline-block; font-size: .72rem; text-transform: uppercase; letter-spacing: 1px;
  background: var(--red); color: #fff; border-radius: 4px; padding: 1px 8px; margin-right: 8px;
  vertical-align: middle;
}
.search-results .r-snip { font-size: .9rem; color: var(--slate); }
.search-hint { color: #B9BCC4; text-align: center; margin-top: 14px; font-size: .9rem; }
.search-close {
  position: absolute; top: 26px; right: 30px; background: none; border: none;
  color: #fff; font-size: 2.2rem; cursor: pointer; line-height: 1;
}

/* ---------- Hero ---------- */
.hero {
  position: relative; color: #fff; overflow: hidden;
  background: linear-gradient(120deg, #041D42 0%, #073673 55%, #0A4A9E 130%);
  padding: 110px 0 120px;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(900px 420px at 85% 15%, rgba(178,34,48,.34), transparent 60%),
    radial-gradient(600px 340px at 8% 90%, rgba(157,192,240,.14), transparent 60%);
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 2; display: grid; grid-template-columns: 1.2fr .8fr; gap: 56px; align-items: center; }
.hero h1 span { color: var(--red-bright); }
.hero p.lead { color: #D8DAE0; margin: 22px 0 34px; }
/* Flex everywhere, not just in the hero — outside it the gap was collapsing to
   whatever whitespace happened to be in the markup. */
.cta-row { display: flex; gap: 16px; flex-wrap: wrap; }
.hero .cta-row { display: flex; gap: 16px; flex-wrap: wrap; }
/* ---- Character bands (illustrated Jeff) ---- */
.char-band { padding: 56px 0; background: var(--cream); }
.char-inner {
  display: grid; grid-template-columns: 260px 1fr; gap: 44px; align-items: center;
  max-width: 900px; margin: 0 auto;
}
.char-flip .char-inner { grid-template-columns: 1fr 260px; }
.char-flip .char-img { order: 2; }
.char-img { width: 100%; height: auto; display: block; filter: drop-shadow(0 14px 26px rgba(7,54,115,.18)); }
.char-copy h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); margin-bottom: 14px; }
.char-copy p { color: var(--slate); font-size: 1.06rem; line-height: 1.75; margin: 0; }
@media (max-width: 760px) {
  .char-inner, .char-flip .char-inner { grid-template-columns: 1fr; gap: 22px; text-align: center; }
  .char-flip .char-img { order: 0; }
  .char-img { max-width: 210px; margin: 0 auto; }
}

/* ---- Photo gallery (Jeff's own field photography) ---- */
.shot-grid {
  display: grid; gap: 26px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.shot { margin: 0; background: #fff; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.shot img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.shot figcaption { padding: 18px 20px; color: var(--slate); font-size: .94rem; line-height: 1.6; }
/* the tall portrait shot gets its own crop so nothing important is cut off */
.shot img[src*="filter-pump"] { object-position: center 40%; }
@media (max-width: 560px) { .shot img { aspect-ratio: 3 / 2; } }

/* ---- Custom brand illustrations ---- */
.illo-band { padding: 56px 0; background: #fff; }
.illo { margin: 0 auto; max-width: 620px; text-align: center; }
.illo img { width: 100%; height: auto; display: block; }
/* Photographs get a frame; line illustrations sit flat on the page. */
.illo-photo { max-width: 860px; }
.illo-photo img { border-radius: 18px; box-shadow: var(--shadow-lg); }
.illo-photo figcaption { max-width: 660px; }
.illo figcaption {
  margin-top: 18px; color: var(--slate); font-size: .97rem; line-height: 1.65;
  font-style: italic; max-width: 520px; margin-left: auto; margin-right: auto;
}
@media (max-width: 620px) { .illo-band { padding: 40px 0; } }

/* ---- Video: click-to-play facade (no YouTube JS until the user asks) ---- */
.vid-grid {
  display: grid; gap: 28px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 340px));
  justify-content: center;
}
.vid { margin: 0; }
.vid-play {
  position: relative; display: block; width: 100%; padding: 0; border: 0;
  background: #041B3A; border-radius: 16px; overflow: hidden; cursor: pointer;
  aspect-ratio: 9 / 16;                 /* shot vertically for phones */
  box-shadow: var(--shadow-lg);
}
.vid-play img {
  width: 100%; height: 100%; object-fit: cover; opacity: .82;
  transition: opacity .25s, transform .35s;
}
.vid-play:hover img, .vid-play:focus-visible img { opacity: 1; transform: scale(1.03); }
.vid-btn {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 68px; height: 68px; border-radius: 50%;
  background: var(--red); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; padding-left: 5px;
  box-shadow: 0 6px 22px rgba(0,0,0,.35);
  transition: transform .25s, background .25s;
}
.vid-play:hover .vid-btn, .vid-play:focus-visible .vid-btn {
  transform: translate(-50%, -50%) scale(1.1); background: var(--red-bright);
}
.vid iframe { width: 100%; aspect-ratio: 9 / 16; border: 0; border-radius: 16px; display: block; }
.vid figcaption { padding: 16px 4px 0; display: flex; flex-direction: column; gap: 6px; }
.vid figcaption strong { color: var(--ink); font-size: 1.02rem; line-height: 1.35; }
.vid figcaption span { color: var(--slate); font-size: .92rem; line-height: 1.6; }
@media (prefers-reduced-motion: reduce) {
  .vid-play img, .vid-btn { transition: none; }
  .vid-play:hover img { transform: none; }
}

/* ---- Testimonials (Google reviews, displayed WITHOUT review schema) ---- */
.review-grid {
  display: grid; gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  align-items: stretch;
}
.review-card {
  margin: 0; background: #fff; border-radius: var(--radius);
  padding: 30px 28px; box-shadow: var(--shadow);
  border-top: 4px solid var(--red);
  display: flex; flex-direction: column; gap: 14px;
}
.review-card blockquote { margin: 0; }
.review-card blockquote p {
  margin: 0; color: var(--slate); line-height: 1.7; font-size: .97rem;
}
.review-card blockquote p::before { content: "\201C"; }
.review-card blockquote p::after  { content: "\201D"; }
.review-card figcaption {
  margin-top: auto; padding-top: 14px; border-top: 1px solid var(--sand);
  display: flex; flex-direction: column; gap: 2px;
}
.review-card figcaption strong { color: var(--ink); font-size: 1rem; }
.review-card figcaption span { color: var(--slate); font-size: .85rem; }
.stars { color: #E8A417; font-size: 1.15rem; letter-spacing: 3px; line-height: 1; }
@media (max-width: 560px) { .review-card { padding: 24px 22px; } }

/* ---- Learning Center / glossary ---- */
.review-banner {
  max-width: 1200px; margin: 0 auto; padding: 16px 22px;
  background: #FFF4E0; border: 1px solid #E8B860; border-left: 5px solid #D08A15;
  border-radius: 10px; color: #5A3B08; font-size: .95rem; line-height: 1.6;
}
.review-banner strong { display: block; margin-bottom: 4px; color: #7A4E06; }
.draft-dot {
  display: inline-block; vertical-align: middle; margin-left: 8px;
  padding: 2px 8px; border-radius: 20px; background: #FFF4E0;
  border: 1px solid #E8B860; color: #7A4E06;
  font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
}
.term-aka { color: #C3CCDC; font-size: .95rem; font-style: italic; margin-top: -6px; }
.term-sib {
  margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--sand);
  font-size: .95rem; line-height: 2;
}
.term-sib a { white-space: nowrap; }

.hero-price {
  margin: 20px 0 0; padding: 14px 18px;
  background: rgba(255,255,255,.08); border-left: 3px solid var(--gold);
  border-radius: 0 10px 10px 0;
  font-size: .97rem; line-height: 1.55; color: #D8DAE0;
}
.hero-price strong { color: #fff; font-size: 1.06rem; }

.hero-badges { display: flex; gap: 26px; margin-top: 44px; flex-wrap: wrap; }
.hero-badge { display: flex; align-items: center; gap: 10px; font-size: .95rem; color: #E7E8EC; }
.hero-badge .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--gold); }

.hero-card {
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.16);
  border-radius: 20px; padding: 34px; backdrop-filter: blur(6px);
}
.hero-card h3 { color: #fff; margin-bottom: 18px; }
.hero-card ul { list-style: none; }
.hero-card li { padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.12); display: flex; gap: 12px; color: #E4E5EA; }
.hero-card li:last-child { border-bottom: none; }
.hero-card .check { color: var(--gold); font-weight: 700; }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; } }

/* ---------- Stats strip ---------- */
.stats { background: var(--ink); color: #fff; padding: 44px 0; }
.stats .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; text-align: center; }
.stat .num { font-family: var(--font-head); font-size: 3rem; font-weight: 700; color: var(--red-bright); }
.stat .lbl { text-transform: uppercase; letter-spacing: 2px; font-size: .82rem; color: #B9BCC4; }
@media (max-width: 760px) { .stats .wrap { grid-template-columns: repeat(2, 1fr); } }

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

.card {
  background: var(--paper); border-radius: var(--radius); padding: 32px 28px;
  box-shadow: var(--shadow); transition: transform .25s ease, box-shadow .25s ease;
  position: relative; overflow: hidden; display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--red), var(--gold)); opacity: 0;
  transition: opacity .25s;
}
.card:hover::before { opacity: 1; }
.card .icon {
  width: 58px; height: 58px; border-radius: 14px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--red), var(--red-dark)); color: #fff;
  font-size: 1.6rem; margin-bottom: 20px;
}
.card h3 { margin-bottom: 10px; }
.card p { color: var(--slate); font-size: .98rem; flex: 1; }
.card .more { margin-top: 18px; font-family: var(--font-head); text-transform: uppercase; letter-spacing: 1.5px; font-weight: 600; }
.card .more::after { content: " →"; }

/* ---------- Split sections ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
/* Education section with no photograph yet — text runs full width and reads as
   a deliberate layout rather than a half-empty two-column grid. */
.wrap-narrow { max-width: 760px; margin: 0 auto; }

/* THE Hero Edge: Piney Woods — the supplied logo is white with a drop shadow, so it
   needs a dark field. Navy band keeps it on-brand and legible. */
.he-band { display: inline-block; background: var(--ink); border-radius: 12px;
  padding: 22px 34px; max-width: 100%; }
.he-band img { display: block; width: 100%; max-width: 420px; height: auto; }

/* Always-visible escape hatch under every video. The player is a third-party
   embed we do not control — when it fails, the visitor needs somewhere to go
   that is not a dead rectangle. Previously this sat inside <noscript>, which
   meant it never appeared for anyone with JavaScript on. */
.vid-out { display: inline-block; margin-top: 10px; font-weight: 600;
  font-size: .92rem; color: var(--red); text-decoration: underline;
  text-underline-offset: 3px; }
.vid-out:hover { color: var(--red-dark); }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.split img { border-radius: 20px; box-shadow: var(--shadow-lg); }

.checklist { list-style: none; margin-top: 22px; }
.checklist li { padding: 9px 0 9px 36px; position: relative; color: var(--ink-soft); }
.checklist li::before {
  content: "✓"; position: absolute; left: 0; top: 8px; width: 24px; height: 24px;
  background: var(--red); color: #fff; border-radius: 50%; display: grid; place-items: center;
  font-size: .8rem; font-weight: 700;
}

/* ---------- Dark band / guarantee ---------- */
.band {
  background: linear-gradient(120deg, var(--red-dark), var(--red)); color: #fff;
  border-radius: 24px; padding: 56px; display: grid; grid-template-columns: 1.3fr .7fr;
  gap: 40px; align-items: center; box-shadow: var(--shadow-lg);
}
.band h2 { color: #fff; }
.band p { color: #FBE8E8; margin-top: 14px; }
@media (max-width: 860px) { .band { grid-template-columns: 1fr; padding: 40px 30px; } }

/* ---------- Towns / areas ---------- */
.town-chips { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.town-chip {
  background: #fff; border: 2px solid var(--sand); border-radius: 50px;
  padding: 10px 22px; font-family: var(--font-head); text-transform: uppercase;
  letter-spacing: 1.2px; font-weight: 600; color: var(--ink); transition: all .2s;
}
.town-chip:hover { border-color: var(--red); color: var(--red); transform: translateY(-2px); }

/* ---------- FAQ accordion ---------- */
.faq-item { background: #fff; border-radius: 12px; box-shadow: var(--shadow); margin-bottom: 14px; overflow: hidden; }
.faq-item summary {
  cursor: pointer; padding: 20px 26px; font-weight: 700; font-size: 1.05rem;
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.6rem; color: var(--red); font-weight: 400; transition: transform .2s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-body { padding: 0 26px 22px; color: var(--slate); }

/* ---------- Page hero (interior) ---------- */
.page-hero {
  background: linear-gradient(120deg, #041D42, #073673 70%, #0A4A9E 140%);
  color: #fff; padding: 76px 0 64px; position: relative; overflow: hidden;
}
.page-hero::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(700px 300px at 88% 20%, rgba(178,34,48,.36), transparent 60%);
}
.page-hero .wrap { position: relative; z-index: 2; }
/* Hero with a photo beside the intro copy */
.page-hero-media { padding-bottom: 76px; }
.ph-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 52px; align-items: center; }
.ph-media img {
  width: 100%; height: auto; display: block;
  border-radius: 18px;
  box-shadow: 0 22px 50px rgba(0,0,0,.42);
  border: 1px solid rgba(255,255,255,.18);
}
@media (max-width: 900px) {
  .ph-grid { grid-template-columns: 1fr; gap: 34px; }
  .ph-media { max-width: 560px; }
}

.page-hero .crumbs { font-size: .88rem; color: #B9BCC4; margin-bottom: 16px; }
.page-hero .crumbs a { color: #E4E5EA; }
.page-hero p.lead { color: #D8DAE0; margin-top: 18px; }

/* ---------- Contact / forms ---------- */
.form-card { background: #fff; border-radius: 20px; padding: 40px; box-shadow: var(--shadow-lg); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
label { font-weight: 700; font-size: .9rem; display: block; margin-bottom: 6px; }
input, select, textarea {
  width: 100%; padding: 13px 16px; border-radius: 10px; border: 2px solid var(--sand);
  font-family: var(--font-body); font-size: 1rem; background: var(--cream);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--red); background: #fff; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

/* ---------- Info tiles ---------- */
/* ---------- Contact form status / helper text ---------- */
.form-note {
  font-size: .86rem; color: var(--slate); text-align: center; margin-top: 10px;
}
.form-status {
  margin-top: 18px; padding: 16px 20px; border-radius: 12px;
  background: #E8F2E6; border-left: 5px solid #2E7D32; color: var(--ink-soft);
  font-size: .96rem; line-height: 1.55;
}
.form-status.is-error { background: #FDECEC; border-left-color: var(--red); }
.form-status[hidden] { display: none; }

.tile { background: #fff; border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.tile h3, .tile .tile-h { color: var(--red); margin-bottom: 6px; font-size: 1.1rem; }

/* ---------- CTA footer band ---------- */
.cta-band { background: var(--ink); color: #fff; text-align: center; padding: 80px 0; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #B9BCC4; margin: 16px auto 30px; max-width: 560px; }

/* ---------- Footer ---------- */
footer.site { background: #041B3A; color: #A9B7CF; padding: 64px 0 30px; font-size: .95rem; }
footer.site .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.1fr; gap: 40px; }
footer.site h3, footer.site .tile-h { color: #fff; font-size: 1.05rem; margin-bottom: 16px; letter-spacing: 1.5px; }
footer.site a { color: #C8CBD2; display: block; padding: 4px 0; }
footer.site a:hover { color: var(--red-bright); }
footer.site .fine { border-top: 1px solid #14335E; margin-top: 44px; padding-top: 22px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: .85rem; color: #7E92B3; }
@media (max-width: 900px) { footer.site .cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { footer.site .cols { grid-template-columns: 1fr; } }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Article (blog) ---------- */
.article { max-width: 780px; }
.article h2 { margin: 38px 0 14px; font-size: clamp(1.5rem, 3vw, 2.1rem); }
.article h3 { margin: 30px 0 10px; }
.article p { margin: 14px 0; }
.article ul { margin: 14px 0 14px 24px; }
.article li { margin: 7px 0; }
.article blockquote {
  border-left: 5px solid var(--red); background: #fff; border-radius: 0 14px 14px 0;
  padding: 22px 26px; margin: 26px 0; font-size: 1.08rem; font-style: italic;
  box-shadow: var(--shadow); color: var(--ink-soft);
}
/* Tables scroll inside their own box so the PAGE never scrolls sideways on a phone */
.table-scroll {
  margin: 22px 0; overflow-x: auto; -webkit-overflow-scrolling: touch;
  border-radius: 12px; box-shadow: var(--shadow); background: #fff;
}
.table-scroll table { margin: 0 !important; box-shadow: none !important; min-width: 520px; }
.table-hint {
  display: none; font-size: .82rem; color: var(--slate);
  margin: -14px 0 18px; font-style: italic;
}
@media (max-width: 620px) { .table-hint { display: block; } }

.article table { width: 100%; border-collapse: collapse; margin: 22px 0; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.article th { background: var(--ink); color: #fff; text-align: left; padding: 12px 16px; font-family: var(--font-head); text-transform: uppercase; letter-spacing: 1px; font-size: .9rem; }
.article td { padding: 12px 16px; border-bottom: 1px solid var(--sand); font-size: .96rem; }
.article tr:last-child td { border-bottom: none; }

/* ---------- Affiliations strip ---------- */
.affil { display: flex; flex-wrap: wrap; gap: 34px; align-items: center; justify-content: center; }
.affil img { height: 76px; width: auto; filter: grayscale(25%); opacity: .92; transition: all .25s; }
.affil img:hover { filter: none; opacity: 1; transform: scale(1.06); }

/* ---------- USP / guarantee badges ---------- */
.usp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; margin-top: 44px; }
.usp {
  background: #fff; border-radius: 16px; padding: 30px 24px 28px; text-align: center;
  box-shadow: var(--shadow); transition: transform .25s ease, box-shadow .25s ease;
  border-top: 4px solid var(--red);
}
.usp:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.usp img { height: 150px; width: 150px; margin: 0 auto 18px; object-fit: contain; }
.usp h3, .usp .tile-h { font-size: 1.15rem; margin-bottom: 10px; }
.usp p { font-size: .94rem; color: var(--slate); line-height: 1.55; }
@media (max-width: 980px) { .usp-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .usp-grid { grid-template-columns: 1fr; } }

/* ---------- Contextual guarantee spotlight ---------- */
.spotlight { background: #fff; padding: 56px 0; }
.spotlight-inner {
  display: grid; grid-template-columns: 168px 1fr; gap: 34px; align-items: center;
  max-width: 880px; margin: 0 auto; background: var(--cream);
  border-left: 6px solid var(--red); border-radius: 0 18px 18px 0;
  padding: 32px 38px; box-shadow: var(--shadow);
}
.spotlight-inner img { width: 168px; height: 168px; object-fit: contain; }
.spotlight-inner h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin-bottom: 10px; }
.spotlight-inner p { color: var(--ink-soft); font-size: 1.03rem; line-height: 1.6; }
@media (max-width: 700px) {
  .spotlight-inner { grid-template-columns: 1fr; text-align: center; padding: 28px 24px; gap: 20px; }
  .spotlight-inner img { margin: 0 auto; width: 130px; height: 130px; }
  .spotlight-inner { border-left: none; border-top: 6px solid var(--red); border-radius: 0 0 18px 18px; }
}

/* compact badge row — appears on every page above the footer */
.usp-strip { background: var(--sand); padding: 30px 0 34px; border-top: 1px solid #D4DEEE; }
.usp-strip-head {
  text-align: center; font-family: var(--font-head); text-transform: uppercase;
  letter-spacing: 2.5px; font-size: .82rem; font-weight: 700; color: var(--slate);
  margin-bottom: 20px;
}
.usp-mini { display: flex; flex-wrap: wrap; gap: 34px; justify-content: center; align-items: flex-start; }
.usp-mini figure { text-align: center; width: 120px; margin: 0; }
.usp-mini img { height: 76px; width: 76px; object-fit: contain; margin: 0 auto; opacity: .92; }
.usp-mini figcaption {
  font-family: var(--font-head); text-transform: uppercase; letter-spacing: 1px;
  font-size: .76rem; font-weight: 700; color: var(--ink); margin-top: 10px; line-height: 1.3;
}
@media (max-width: 560px) {
  .usp-mini { gap: 24px; }
  .usp-mini figure { width: 108px; }
  .usp-mini img { height: 76px; width: 76px; }
  .usp-mini figcaption { font-size: .68rem; }
}

/* ---------- DealGuard pricing tiers ---------- */
.tier-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 40px; }
.tier {
  background: #fff; border-radius: 16px; padding: 32px 28px;
  box-shadow: var(--shadow); border-top: 5px solid var(--red);
  transition: transform .25s ease, box-shadow .25s ease;
}
.tier:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.tier h3 { font-size: 1.5rem; color: var(--ink); }
.tier-price {
  font-family: var(--font-head); font-size: 3rem; font-weight: 700;
  color: var(--red); line-height: 1; margin: 8px 0 6px;
}
.tier-best {
  font-size: .92rem; color: var(--slate); font-style: italic;
  padding-bottom: 16px; border-bottom: 2px solid var(--sand); margin-bottom: 4px;
}
.tier .checklist li { font-size: .95rem; padding-left: 32px; }
.tier .checklist li::before { width: 20px; height: 20px; font-size: .7rem; top: 10px; }
@media (max-width: 900px) { .tier-grid { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; } }

/* ---------- Process timeline ---------- */
.timeline { position: relative; margin-top: 44px; }
.timeline::before {
  content: ""; position: absolute; left: 33px; top: 20px; bottom: 20px; width: 3px;
  background: linear-gradient(180deg, var(--red), var(--ink)); border-radius: 2px;
}
.tl-step { display: flex; gap: 26px; margin-bottom: 30px; position: relative; }
.tl-num {
  flex: 0 0 68px; height: 68px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--red), var(--red-dark)); color: #fff;
  font-family: var(--font-head); font-size: 1.9rem; font-weight: 700;
  box-shadow: 0 6px 18px rgba(178,34,48,.34); z-index: 2; border: 4px solid var(--cream);
}
.tl-body { background: #fff; border-radius: 14px; padding: 24px 28px; box-shadow: var(--shadow); flex: 1; }
.tl-body h3 { margin-bottom: 8px; }
.tl-body p { color: var(--slate); }
.tl-tip {
  margin-top: 14px; padding: 12px 16px; background: var(--cream);
  border-left: 4px solid var(--gold); border-radius: 0 8px 8px 0;
  font-size: .93rem; color: var(--ink-soft);
}
.tl-tip strong { color: var(--red); }
@media (max-width: 640px) {
  .timeline::before { left: 24px; }
  .tl-num { flex-basis: 50px; height: 50px; font-size: 1.4rem; }
  .tl-step { gap: 16px; }
  .tl-body { padding: 18px 20px; }
}

/* ---------- Trust signal bar (canonical USP placement) ---------- */
.trust-bar {
  background: var(--sand);
  border-top: 1px solid #D4DEEE; border-bottom: 1px solid #D4DEEE;
  padding: 20px 0;
}
.trust-bar .wrap {
  display: flex; flex-wrap: wrap; gap: 18px 44px; justify-content: center; align-items: center;
}
.trust-item {
  display: flex; align-items: center; gap: 12px;
  font-size: .95rem; font-weight: 700; color: var(--ink);
  line-height: 1.2; max-width: 260px;
}
.trust-item img { height: 52px; width: 52px; object-fit: contain; flex: 0 0 52px; }
@media (max-width: 900px) {
  .trust-bar .wrap { gap: 14px 28px; }
  .trust-item { font-size: .86rem; max-width: 220px; }
  .trust-item img { height: 44px; width: 44px; flex-basis: 44px; }
}
@media (max-width: 560px) {
  .trust-bar { padding: 16px 0; }
  .trust-bar .wrap { gap: 12px 20px; }
  .trust-item { font-size: .78rem; max-width: 45%; gap: 8px; }
  .trust-item img { height: 38px; width: 38px; flex-basis: 38px; }
}

/* ---------- Answer-first (Quick Answer) blocks ---------- */
.qa-wrap { padding: 40px 0 0; }
.qa-box {
  background: #fff; border-left: 6px solid var(--red); border-radius: 0 16px 16px 0;
  padding: 30px 34px; box-shadow: var(--shadow);
}
.qa-q {
  font-size: clamp(1.25rem, 2.2vw, 1.6rem); margin-bottom: 12px; color: var(--ink);
}
.qa-a { font-size: 1.12rem; color: var(--ink-soft); line-height: 1.6; }
.qa-facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px; margin-top: 22px; padding-top: 20px; border-top: 2px solid var(--sand);
}
.qa-facts dt {
  font-family: var(--font-head); text-transform: uppercase; letter-spacing: 1.4px;
  font-size: .78rem; color: var(--red); font-weight: 700; margin-bottom: 3px;
}
.qa-facts dd { font-size: .98rem; color: var(--ink-soft); font-weight: 600; }

/* ---------- Related links cluster ---------- */
.cluster { background: var(--sand); border-radius: 14px; padding: 26px 30px; margin-top: 30px; }
.cluster h3, .cluster .tile-h { font-size: 1.05rem; margin-bottom: 12px; color: var(--ink); }
.cluster ul { list-style: none; display: grid; gap: 8px; }
.cluster li::before { content: "→ "; color: var(--red); font-weight: 700; }

/* ---------- Education photo slots ---------- */
.edu-slot {
  border: 3px dashed var(--sand); border-radius: 16px; min-height: 320px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; background: repeating-linear-gradient(45deg, #fff, #fff 14px, var(--cream) 14px, var(--cream) 28px);
  color: var(--slate); text-align: center; font-family: var(--font-head);
  text-transform: uppercase; letter-spacing: 2px; font-size: .95rem;
}
.edu-slot-icon { font-size: 3.2rem; }

/* ---------- Utility ---------- */
/* .lead has a 720px max-width. Without auto margins it stays pinned to the left
   inside a centred block, so the paragraph sat left of its own heading. */
.center { text-align: center; }
.center .lead, .center p.lead { margin-left: auto; margin-right: auto; }
.center .cta-row { justify-content: center; }
.mt-1 { margin-top: 12px; } .mt-2 { margin-top: 24px; } .mt-3 { margin-top: 40px; }
.section-alt { background: var(--sand); }
.pill-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 24px; }

/* promoted from h4 → h3 for correct heading hierarchy; visual size unchanged */
.tile-h { font-size: 1.1rem; }
/* tile heading with a real brand medallion instead of an emoji */
.tile-h-badge { display: flex; align-items: center; gap: 10px; }
.tile-h-badge img { height: 40px; width: 40px; object-fit: contain; flex: 0 0 40px; }
.tile .tile-h { color: var(--red); margin-bottom: 6px; }
footer.site .tile-h { color: #fff; font-size: 1.05rem; margin-bottom: 16px; letter-spacing: 1.5px; }
.cluster .tile-h { font-size: 1.05rem; margin-bottom: 12px; color: var(--ink); }
