/* ==========================================================================
   House Guide Solution — main stylesheet
   Column layout uses the Bootstrap grid (bootstrap-grid.min.css, loaded first).
   1 Tokens · 2 Base · 3 Top bar & header · 4 Buttons · 5 Hero & finder
   6 Sections · 7 Tiles & cards · 8 Blog · 9 Forms · 10 Footer
   11 Responsive · 12 Motion & print
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
  --navy-900: #0b1c26;
  --navy-800: #14283a;
  --ocean-700: #0c4a5c;
  --ocean-600: #115e73;
  --ocean-500: #1a7690;
  --ocean-100: #e3f0f3;
  --ocean-50: #f2f8f9;
  --sun-500: #f0b23e;
  --sun-400: #f5c463;
  --sun-100: #fdf1d8;
  --sand-100: #f6f1ea;
  --sand-200: #ebe2d5;
  --white: #ffffff;
  --ink: #1d2b36;
  --muted: #586874;
  --line: #dde5e9;
  --danger: #b42318;
  --danger-bg: #fdeceb;
  --success: #17653a;
  --success-bg: #e5f4ea;

  --font-head: "Archivo", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;

  --fs-sm: .9375rem;
  --fs-base: 1.0625rem;
  --fs-lg: 1.25rem;
  --fs-h3: 1.3125rem;
  --fs-h2: clamp(1.75rem, 1.35rem + 1.6vw, 2.5rem);
  --fs-h1: clamp(2.25rem, 1.55rem + 3vw, 3.75rem);

  --s-2: .5rem;
  --s-3: .75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4.5rem;
  --s-9: 6rem;

  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 14px;
  --header-h: 80px;
  --measure: 68ch;
  --shadow: 0 20px 44px -24px rgba(11, 28, 38, .4);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* 2. Base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 20px); }
body {
  margin: 0; background: var(--white); color: var(--ink);
  font-family: var(--font-body); font-size: var(--fs-base); line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
body.nav-open { overflow: hidden; }
img, svg { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-head); font-stretch: 112%; color: var(--navy-800);
  line-height: 1.12; letter-spacing: -.01em; margin: 0 0 var(--s-4); font-weight: 700; text-wrap: balance;
}
h1 { font-size: var(--fs-h1); font-weight: 800; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.25; }
h4 { font-size: 1.0625rem; }
p { margin: 0 0 var(--s-4); }
p, li { text-wrap: pretty; }
ul { padding-left: 1.25rem; margin: 0 0 var(--s-4); }
a { color: var(--ocean-600); text-underline-offset: 3px; }
a:hover { color: var(--navy-800); }
:focus-visible { outline: 3px solid var(--sun-500); outline-offset: 3px; border-radius: 3px; }
::selection { background: var(--sun-400); color: var(--navy-900); }

.skip-link { position: absolute; left: 1rem; top: -100px; z-index: 300; background: var(--navy-900); color: #fff; padding: .75rem 1rem; border-radius: var(--r-md); font-weight: 600; }
.skip-link:focus { top: .75rem; 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; }

.container { max-width: 1260px; padding-left: clamp(16px, 4vw, 40px); padding-right: clamp(16px, 4vw, 40px); }
.container-narrow { max-width: 880px; }

.section { padding-top: var(--s-9); padding-bottom: var(--s-9); }
.section-tight { padding-top: var(--s-8); padding-bottom: var(--s-8); }
.bg-sand { background: var(--sand-100); }
.bg-ocean-light { background: var(--ocean-50); }
.bg-navy { background: var(--navy-900); color: #d5e2e8; }
.bg-navy h2, .bg-navy h3 { color: #fff; }

.kicker { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; color: var(--ocean-600); margin-bottom: var(--s-3); }
.kicker::before { content: ""; width: 28px; height: 3px; border-radius: 3px; background: var(--sun-500); }
.bg-navy .kicker, .hero .kicker, .page-banner .kicker, .cta-photo .kicker { color: var(--sun-400); }

.section-intro { max-width: 640px; margin-bottom: var(--s-7); }
.section-intro p { color: var(--muted); font-size: var(--fs-lg); line-height: 1.55; margin: 0; }
.bg-navy .section-intro p { color: #b8c9d2; }
.section-bar { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s-5); margin-bottom: var(--s-7); }
.section-bar .section-intro { margin-bottom: 0; }
.lead { font-size: var(--fs-lg); color: var(--muted); line-height: 1.6; }
.muted { color: var(--muted); }

.icon-badge { display: inline-grid; place-items: center; flex-shrink: 0; width: 52px; height: 52px; border-radius: 50%; background: var(--ocean-100); color: var(--ocean-600); }
.icon-badge svg { width: 24px; height: 24px; }
.icon-badge-sun { background: var(--sun-100); color: #8a5a00; }

/* 3. Top bar & header ------------------------------------------------------------ */
.topbar { background: var(--navy-900); color: #c4d3da; font-size: var(--fs-sm); }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); min-height: 42px; flex-wrap: wrap; }
.topbar ul { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s-5); margin: 0; padding: 0; }
.topbar li { display: inline-flex; align-items: center; gap: 8px; }
.topbar svg { width: 16px; height: 16px; color: var(--sun-400); }
.topbar a { color: #fff; text-decoration: none; }
.topbar a:hover { text-decoration: underline; color: #fff; }

.site-header { position: sticky; top: 0; z-index: 100; background: var(--white); border-bottom: 1px solid var(--line); }
.site-header.is-scrolled { box-shadow: 0 8px 24px -18px rgba(11, 28, 38, .5); }
.header-inner { display: flex; align-items: center; gap: var(--s-5); min-height: var(--header-h); }

/* Logo: icon + name on a single line, one consistent style */
.brand { display: inline-flex; align-items: center; gap: 10px; margin-right: auto; text-decoration: none; color: var(--navy-800); white-space: nowrap; flex-shrink: 0; }
.brand:hover { color: var(--navy-800); }
.brand img { width: 42px; height: 42px; }
.brand-name { font-family: var(--font-head); font-stretch: 112%; font-weight: 800; font-size: 1.28rem; letter-spacing: -.01em; line-height: 1; }

.nav-toggle { display: none; align-items: center; gap: 8px; height: 46px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--white); color: var(--navy-800); font: 600 1rem var(--font-body); cursor: pointer; }
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

.primary-nav { display: flex; align-items: center; gap: var(--s-5); }
.nav-list { display: flex; align-items: center; gap: var(--s-2); list-style: none; margin: 0; padding: 0; }
.nav-link { position: relative; display: inline-block; padding: 10px 12px; color: var(--ink); font-weight: 600; text-decoration: none; white-space: nowrap; }
.nav-link::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 3px; border-radius: 3px; background: var(--sun-500); transform: scaleX(0); transition: transform .2s var(--ease); }
.nav-link:hover { color: var(--ocean-600); }
.nav-link:hover::after, .nav-link[aria-current="page"]::after { transform: scaleX(1); }
.nav-link[aria-current="page"] { color: var(--ocean-600); }

/* 4. Buttons ------------------------------------------------------------------ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 12px 24px; border-radius: 999px; border: 2px solid transparent; font: 700 1rem/1.2 var(--font-body); text-decoration: none; cursor: pointer; white-space: nowrap; transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .18s var(--ease); }
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 18px; height: 18px; }
.btn-ocean { background: var(--ocean-600); color: #fff; }
.btn-ocean:hover { background: var(--ocean-700); color: #fff; }
.btn-sun { background: var(--sun-500); color: var(--navy-900); }
.btn-sun:hover { background: var(--sun-400); color: var(--navy-900); }
.btn-outline { background: transparent; color: var(--navy-800); border-color: var(--navy-800); }
.btn-outline:hover { background: var(--navy-800); color: #fff; }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .6); }
.btn-ghost-light:hover { background: #fff; color: var(--navy-900); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .65; cursor: progress; transform: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; text-decoration: none; }
.link-arrow svg { width: 18px; height: 18px; transition: transform .18s var(--ease); }
.link-arrow:hover svg { transform: translateX(3px); }

/* 5. Hero & service finder ----------------------------------------------------- */
.hero { position: relative; isolation: isolate; color: #fff; padding-top: var(--s-9); padding-bottom: calc(var(--s-9) + var(--s-6)); min-height: min(86vh, 760px); display: flex; align-items: center; }
.hero-media { position: absolute; inset: 0; z-index: -2; background: var(--navy-800); }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 60%; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(11, 28, 38, .9) 0%, rgba(11, 28, 38, .72) 42%, rgba(11, 28, 38, .15) 100%); }
.hero h1 { color: #fff; max-width: 14ch; }
.hero .lead { color: #dbe7ec; max-width: 48ch; margin-bottom: var(--s-6); }

.finder { background: var(--white); color: var(--ink); border-radius: var(--r-lg); padding: var(--s-5); box-shadow: var(--shadow); max-width: 560px; }
.finder label { display: block; font-family: var(--font-head); font-stretch: 112%; font-weight: 700; color: var(--navy-800); font-size: 1.125rem; margin-bottom: var(--s-3); }
.finder-row { display: flex; gap: var(--s-3); flex-wrap: wrap; }
.finder-row select { flex: 1 1 240px; }
.finder-hint { margin: var(--s-3) 0 0; font-size: var(--fs-sm); color: var(--muted); }
.finder-error { margin: var(--s-2) 0 0; font-size: var(--fs-sm); color: var(--danger); font-weight: 600; }
.finder-error:empty { display: none; }

/* Inner page banner with a photo */
.page-banner { position: relative; isolation: isolate; color: #fff; padding-top: var(--s-8); padding-bottom: var(--s-8); }
.page-banner-media { position: absolute; inset: 0; z-index: -2; background: var(--navy-800); }
.page-banner-media img { width: 100%; height: 100%; object-fit: cover; }
.page-banner::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(11, 28, 38, .92), rgba(11, 28, 38, .62)); }
.page-banner h1 { color: #fff; max-width: 20ch; }
.page-banner .lead { color: #dbe7ec; max-width: 60ch; margin: 0; }
.page-banner-plain { background: var(--ocean-700); }
.page-banner-plain::before { display: none; }

.breadcrumb { margin-bottom: var(--s-5); font-size: var(--fs-sm); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; color: #c4d3da; }
.breadcrumb li + li::before { content: "›"; margin-right: 6px; color: var(--sun-400); }
.breadcrumb a { color: #fff; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; color: #fff; }
.article-head .breadcrumb ol { color: var(--muted); }
.article-head .breadcrumb a { color: var(--ocean-600); }

/* 6. Sections ---------------------------------------------------------------- */
/* Area tiles (homepage) */
.area-tile { position: relative; display: block; border-radius: var(--r-lg); overflow: hidden; color: #fff; text-decoration: none; min-height: 340px; isolation: isolate; background: var(--navy-800); }
.area-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .6s var(--ease); }
.area-tile::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(11, 28, 38, 0) 30%, rgba(11, 28, 38, .88) 100%); }
.area-tile:hover img { transform: scale(1.04); }
.area-tile-body { position: absolute; left: 0; right: 0; bottom: 0; padding: var(--s-5); }
.area-tile h3 { color: #fff; margin-bottom: 4px; }
.area-tile p { margin: 0 0 var(--s-3); color: #dbe7ec; }
.area-tile .link-arrow { color: var(--sun-400); }
.area-tile:hover { color: #fff; }

/* Principles */
.principle { height: 100%; padding-top: var(--s-5); border-top: 3px solid var(--sun-500); }
.principle h3 { margin: var(--s-4) 0 var(--s-2); }
.principle p { margin: 0; color: var(--muted); }

/* Steps: vertical timeline (sequence shown by the line, no numbering) */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 25px; top: 26px; bottom: 26px; width: 2px; background: repeating-linear-gradient(var(--ocean-500) 0 6px, transparent 6px 12px); }
.timeline li { position: relative; display: grid; grid-template-columns: 52px 1fr; gap: var(--s-4); padding-bottom: var(--s-6); }
.timeline li:last-child { padding-bottom: 0; }
.timeline .icon-badge { background: var(--ocean-600); color: #fff; position: relative; }
.timeline h3 { margin: 10px 0 var(--s-2); }
.timeline p { margin: 0; color: var(--muted); }
.photo-frame { position: relative; }
.photo-frame img { width: 100%; border-radius: var(--r-lg); aspect-ratio: 4 / 5; object-fit: cover; background: var(--ocean-100); }
.photo-frame::after { content: ""; position: absolute; inset: auto -14px -14px auto; width: 55%; height: 55%; border-radius: var(--r-lg); background: var(--sun-500); z-index: -1; }
.photo-frame-wrap { position: relative; isolation: isolate; }

/* FAQ: rounded panels */
.faq { display: grid; gap: var(--s-3); }
.faq details { background: var(--white); border: 1.5px solid var(--line); border-radius: var(--r-lg); transition: border-color .2s ease; }
.faq details[open] { border-color: var(--ocean-500); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); padding: var(--s-4) var(--s-5); font-family: var(--font-head); font-stretch: 108%; font-weight: 700; color: var(--navy-800); font-size: 1.0625rem; line-height: 1.4; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--ocean-600); }
.faq-toggle { flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; background: var(--ocean-100); color: var(--ocean-600); display: grid; place-items: center; transition: transform .2s var(--ease), background-color .2s ease; }
.faq-toggle svg { width: 16px; height: 16px; }
.faq details[open] .faq-toggle { transform: rotate(45deg); background: var(--sun-500); color: var(--navy-900); }
.faq-body { padding: 0 var(--s-5) var(--s-5); color: var(--muted); }
.faq-body p { margin: 0; max-width: var(--measure); }

/* Newsletter band */
.newsletter-band { background: var(--ocean-600); color: #e6f1f4; border-radius: var(--r-lg); padding: clamp(28px, 5vw, 56px); }
.newsletter-band h2 { color: #fff; margin-bottom: var(--s-3); }
.newsletter-band p { color: #d3e6ec; margin: 0; }
.newsletter-band a { color: #fff; }
.newsletter-band .checkbox { color: #e6f1f4; }
.newsletter-band .field-error { color: #ffd6d2; }
.newsletter-band input[type="email"] { border-color: transparent; }
.inline-field { display: flex; gap: var(--s-3); align-items: flex-start; }
.inline-field .field { flex: 1; }

/* Photo CTA */
.cta-photo { position: relative; isolation: isolate; border-radius: var(--r-lg); overflow: hidden; color: #fff; padding: clamp(32px, 6vw, 80px); background: var(--navy-800); }
.cta-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.cta-photo::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(11, 28, 38, .9), rgba(12, 74, 92, .65)); }
.cta-photo h2 { color: #fff; max-width: 20ch; }
.cta-photo p { color: #dbe7ec; max-width: 52ch; margin-bottom: var(--s-6); }

.note-box { display: grid; grid-template-columns: auto 1fr; gap: var(--s-3); padding: var(--s-4) var(--s-5); border-radius: var(--r-lg); background: var(--sun-100); color: #5b3d00; }
.note-box svg { width: 22px; height: 22px; margin-top: 2px; }
.note-box p { margin: 0; }

/* 7. Tiles & service cards ------------------------------------------------------- */
.svc-tile { position: relative; display: flex; align-items: flex-end; min-height: 230px; border-radius: var(--r-lg); overflow: hidden; color: #fff; text-decoration: none; isolation: isolate; background: var(--navy-800); }
.svc-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .6s var(--ease); }
.svc-tile::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(11, 28, 38, .05) 25%, rgba(11, 28, 38, .85) 100%); }
.svc-tile:hover img { transform: scale(1.05); }
.svc-tile:hover { color: #fff; }
.svc-tile span { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); width: 100%; padding: var(--s-4) var(--s-5); font-family: var(--font-head); font-stretch: 108%; font-weight: 700; font-size: 1.125rem; line-height: 1.25; }
.svc-tile svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--sun-400); }

.filter-bar { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-6); }
.filter-btn { font: 600 1rem/1 var(--font-body); padding: 12px 20px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--white); color: var(--navy-800); cursor: pointer; }
.filter-btn:hover { border-color: var(--ocean-500); }
.filter-btn[aria-pressed="true"] { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.filter-status { color: var(--muted); margin-bottom: var(--s-5); }

.svc-card { display: flex; flex-direction: column; height: 100%; background: var(--white); border-radius: var(--r-lg); overflow: hidden; box-shadow: 0 1px 0 var(--line), 0 0 0 1px var(--line); transition: box-shadow .25s ease, transform .25s var(--ease); scroll-margin-top: calc(var(--header-h) + 24px); }
.svc-card:hover { box-shadow: var(--shadow), 0 0 0 1px var(--line); transform: translateY(-3px); }
.svc-card:target { box-shadow: 0 0 0 3px var(--sun-500), var(--shadow); }
.svc-card-media { position: relative; background: var(--ocean-100); }
.svc-card-media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.svc-card-area { position: absolute; left: var(--s-4); top: var(--s-4); background: rgba(255, 255, 255, .94); color: var(--navy-800); font-size: .875rem; font-weight: 700; padding: 6px 12px; border-radius: 999px; }
.svc-card-body { display: flex; flex-direction: column; flex: 1; padding: var(--s-5); }
.svc-card-title { display: flex; align-items: center; gap: var(--s-3); margin-bottom: var(--s-3); }
.svc-card-title .icon-badge { width: 44px; height: 44px; }
.svc-card-title .icon-badge svg { width: 22px; height: 22px; }
.svc-card h2, .svc-card h3 { font-size: 1.25rem; margin: 0; }
.svc-card p { color: var(--muted); }
.svc-card .card-note { font-size: .9rem; background: var(--sun-100); color: #5b3d00; padding: 8px 12px; border-radius: var(--r-md); }
.svc-card .btn { margin-top: auto; align-self: flex-start; }
.svc-card[hidden], .svc-col[hidden] { display: none !important; }

/* 8. Blog ------------------------------------------------------------------- */
.post-card { display: flex; flex-direction: column; height: 100%; background: var(--white); border-radius: var(--r-lg); overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.post-card-media { display: block; background: var(--ocean-100); overflow: hidden; }
.post-card-media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .5s var(--ease); }
.post-card:hover .post-card-media img { transform: scale(1.04); }
.post-card-body { display: flex; flex-direction: column; flex: 1; padding: var(--s-5); }
.pill { display: inline-block; align-self: flex-start; font-size: .875rem; font-weight: 700; color: var(--ocean-700); background: var(--ocean-100); padding: 4px 12px; border-radius: 999px; margin-bottom: var(--s-3); }
.post-card h2, .post-card h3 { font-size: 1.25rem; margin-bottom: var(--s-2); }
.post-card h2 a, .post-card h3 a, .post-lead h2 a { color: var(--navy-800); text-decoration: none; }
.post-card h2 a:hover, .post-card h3 a:hover, .post-lead h2 a:hover { color: var(--ocean-600); text-decoration: underline; }
.post-card p { color: var(--muted); }
.post-card .link-arrow { margin-top: auto; }

.post-lead { background: var(--sand-100); border-radius: var(--r-lg); overflow: hidden; margin-bottom: var(--s-7); }
.post-lead img { width: 100%; height: 100%; min-height: 300px; object-fit: cover; background: var(--ocean-100); }
.post-lead-body { padding: clamp(24px, 4vw, 48px); }

.article-head { padding-top: var(--s-7); padding-bottom: var(--s-6); background: var(--sand-100); }
.article-head h1 { max-width: 24ch; font-size: clamp(2rem, 1.5rem + 2.2vw, 3.125rem); }
.article-head .lead { max-width: 60ch; }
.byline { color: var(--muted); font-size: var(--fs-sm); margin: 0; }
.article-cover { margin: calc(-1 * var(--s-5)) 0 var(--s-7); }
.article-cover img { width: 100%; border-radius: var(--r-lg); aspect-ratio: 21 / 9; object-fit: cover; background: var(--ocean-100); }
.article-cover figcaption { font-size: .875rem; color: var(--muted); margin-top: var(--s-2); }

.prose { max-width: var(--measure); font-size: 1.125rem; line-height: 1.75; }
.prose h2 { font-size: 1.625rem; margin-top: var(--s-7); }
.prose h2:first-child { margin-top: 0; }
.prose li { margin-bottom: var(--s-2); }
.prose li::marker { color: var(--ocean-500); }

.sidebar { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: var(--s-5); }
.side-card { border-radius: var(--r-lg); padding: var(--s-5); background: var(--white); box-shadow: 0 0 0 1px var(--line); }
.side-card h2 { font-size: 1.125rem; margin-bottom: var(--s-3); }
.side-card-dark { background: var(--navy-800); box-shadow: none; color: #c9d7de; }
.side-card-dark h2 { color: #fff; }
.toc ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.toc a { display: block; padding: 6px 12px; border-left: 3px solid var(--line); color: var(--muted); text-decoration: none; font-size: .975rem; line-height: 1.4; }
.toc a:hover { color: var(--ocean-600); border-left-color: var(--sun-500); }
.article-foot { max-width: var(--measure); margin-top: var(--s-7); padding-top: var(--s-6); border-top: 1px solid var(--line); }
.copy-status { font-size: .95rem; color: var(--success); min-height: 1.4em; margin: var(--s-3) 0 0; }

.legal-nav { position: sticky; top: calc(var(--header-h) + 24px); }
.credits { list-style: none; padding: 0; }
.credits li { margin-bottom: var(--s-2); }

/* 9. Forms ------------------------------------------------------------------- */
.form { display: grid; gap: var(--s-5); }
.field { display: grid; gap: 6px; align-content: start; }
.field label { font-weight: 700; color: var(--navy-800); }
.optional { font-weight: 400; color: var(--muted); }
.hint { font-size: .9rem; color: var(--muted); margin: 0; }
input[type="text"], input[type="email"], input[type="tel"], select, textarea {
  width: 100%; min-height: 52px; padding: 12px 16px; font: 400 1.0625rem/1.4 var(--font-body); color: var(--ink);
  background: var(--white); border: 1.5px solid #c5d1d7; border-radius: var(--r-md); transition: border-color .15s ease, box-shadow .15s ease;
}
textarea { min-height: 170px; resize: vertical; }
select {
  appearance: none; -webkit-appearance: none; padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23115e73' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 18px;
}
input:hover, select:hover, textarea:hover { border-color: var(--ocean-500); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ocean-600); box-shadow: 0 0 0 4px rgba(17, 94, 115, .18); }
[aria-invalid="true"] { border-color: var(--danger) !important; }
.field-error { color: var(--danger); font-size: .925rem; font-weight: 600; margin: 0; }
.field-error:empty { display: none; }
.checkbox { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; font-size: .975rem; }
.checkbox input { width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--ocean-600); }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-alert { display: grid; grid-template-columns: 22px 1fr; gap: 12px; padding: var(--s-4) var(--s-5); border-radius: var(--r-md); font-weight: 600; }
.form-alert svg { width: 22px; height: 22px; margin-top: 1px; }
.form-alert p { margin: 0; }
.form-alert[hidden] { display: none; }
.form-alert-error { background: var(--danger-bg); color: var(--danger); }
.form-alert-success { background: var(--success-bg); color: var(--success); }
.form-panel { background: var(--white); border-radius: var(--r-lg); padding: clamp(24px, 4vw, 44px); box-shadow: 0 0 0 1px var(--line), var(--shadow); }

.contact-card { background: var(--navy-800); color: #c9d7de; border-radius: var(--r-lg); padding: clamp(24px, 4vw, 40px); }
.contact-card h2 { color: #fff; }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-5); }
.contact-list li { display: grid; grid-template-columns: auto 1fr; gap: var(--s-4); align-items: start; }
.contact-list .icon-badge { background: rgba(255, 255, 255, .1); color: var(--sun-400); }
.contact-list h3 { color: #fff; font-size: 1.0625rem; margin: 4px 0 2px; }
.contact-list p, .contact-list address { margin: 0; font-style: normal; color: #c9d7de; }
.contact-list a { color: #fff; }
.contact-list .link-arrow { color: var(--sun-400); margin-top: 6px; }

.status-page { padding-top: var(--s-9); padding-bottom: var(--s-9); min-height: 60vh; display: grid; align-items: center; }

/* 10. Footer ---------------------------------------------------------------- */
.site-footer { background: var(--sand-100); color: var(--ink); padding-top: var(--s-8); border-top: 4px solid var(--sun-500); }
.site-footer a { color: var(--navy-800); text-decoration: none; }
.site-footer a:hover { color: var(--ocean-600); text-decoration: underline; }
.site-footer .brand { margin-bottom: var(--s-4); }
.footer-about p { color: var(--muted); max-width: 40ch; }
.footer-col h2 { font-size: 1rem; margin-bottom: var(--s-4); font-stretch: 100%; }
.footer-col ul, .footer-contact { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-contact li { display: flex; align-items: center; gap: 10px; }
.footer-contact svg { width: 18px; height: 18px; color: var(--ocean-600); flex-shrink: 0; }
.footer-bottom { margin-top: var(--s-8); padding: var(--s-5) 0; border-top: 1px solid var(--sand-200); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-3); font-size: var(--fs-sm); color: var(--muted); }
.footer-bottom p { margin: 0; }

.back-to-top { position: fixed; right: 20px; bottom: 20px; z-index: 90; width: 50px; height: 50px; border-radius: 50%; border: 0; background: var(--sun-500); color: var(--navy-900); display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .2s ease, transform .2s var(--ease), visibility .2s; }
.back-to-top svg { width: 22px; height: 22px; }
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.back-to-top:hover { background: var(--sun-400); }

/* Image fallback, applied by main.js when a photo cannot load */
img.img-failed { background: linear-gradient(135deg, var(--ocean-100), var(--sand-100)); object-position: -9999px -9999px; }

/* 11. Responsive (Bootstrap breakpoints: lg 992, md 768) ------------------------ */
@media (max-width: 991.98px) {
  :root { --header-h: 70px; }
  .nav-toggle { display: inline-flex; }
  .primary-nav { position: fixed; top: var(--nav-top, var(--header-h)); left: 0; right: 0; bottom: 0; background: var(--white); flex-direction: column; align-items: stretch; gap: var(--s-5); padding: var(--s-5) clamp(16px, 4vw, 40px) var(--s-7); overflow-y: auto; border-top: 1px solid var(--line); display: none; }
  .primary-nav.is-open { display: flex; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-list li { border-bottom: 1px solid var(--line); }
  .nav-link { display: block; padding: 16px 4px; font-size: 1.125rem; }
  .nav-link::after { left: 4px; right: auto; width: 40px; bottom: 8px; }
  .header-cta { width: 100%; }
  .hero::before { background: linear-gradient(180deg, rgba(11, 28, 38, .75), rgba(11, 28, 38, .88)); }
  .sidebar, .legal-nav { position: static; }
  .photo-frame img { aspect-ratio: 4 / 3; }
}
@media (max-width: 767.98px) {
  :root { --fs-base: 1rem; }
  .section { padding-top: var(--s-8); padding-bottom: var(--s-8); }
  .section-tight { padding-top: var(--s-7); padding-bottom: var(--s-7); }
  .row.g-5 { --bs-gutter-x: 1.5rem; }
  .topbar-inner { justify-content: center; padding: 6px 0; }
  .topbar .topbar-extra { display: none; }
  .brand-name { font-size: 1.08rem; }
  .brand img { width: 36px; height: 36px; }
  .nav-toggle-label { display: none; }
  .hero { min-height: 0; padding-top: var(--s-8); padding-bottom: var(--s-8); }
  .inline-field { flex-direction: column; align-items: stretch; }
  .btn-row .btn, .finder-row .btn { flex: 1 1 auto; }
  .area-tile { min-height: 260px; }
  .photo-frame::after { display: none; }
  .article-cover img { aspect-ratio: 16 / 10; }
  .prose { font-size: 1.0625rem; }
  .back-to-top { right: 14px; bottom: 14px; }
}

/* 12. Motion & print ------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@media print {
  .topbar, .site-header, .site-footer, .back-to-top, .newsletter-band, .cta-photo, .sidebar { display: none !important; }
}

/* Tick list (subscribe page) */
.tick-list { list-style: none; padding: 0; display: grid; gap: var(--s-3); }
.tick-list li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; }
.tick-list svg { width: 22px; height: 22px; color: var(--ocean-600); margin-top: 1px; }
.credits-list li { font-size: 1rem; }

/* Help card that completes the services grid */
.help-card { height: 100%; display: flex; flex-direction: column; justify-content: center; background: var(--navy-800); color: #c9d7de; border-radius: var(--r-lg); padding: clamp(28px, 4vw, 48px); }
.help-card h2 { color: #fff; font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); max-width: 22ch; }
.help-card p { max-width: 52ch; margin-bottom: var(--s-5); }
.help-card .kicker { color: var(--sun-400); }

/* Long email addresses wrap instead of widening narrow cards */
.sidebar > *, .contact-list li > div, .note-box > p { min-width: 0; }
.contact-list a, .footer-contact a, .topbar a { overflow-wrap: anywhere; }
