/* ==========================================================================
   DOREEN HUSK · COMPONENT LIBRARY
   Depends on tokens.css. Order: reset → base → layout → components → utils
   ========================================================================== */

/* ---------- 1. RESET ------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: var(--t-body);
  line-height: var(--lh-body);
  color: var(--c-ink);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, picture, svg, video { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
h1, h2, h3, h4 { text-wrap: balance; }
p { text-wrap: pretty; }

/* Visible, consistent focus for keyboard users only. */
:focus-visible {
  outline: 3px solid var(--c-focus);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}
:focus:not(:focus-visible) { outline: none; }

/* Skip link — first thing a screen-reader / keyboard user meets. */
.skip-link {
  position: absolute; top: -100px; left: var(--s-4);
  z-index: var(--z-toast);
  background: var(--c-navy); color: #fff;
  padding: var(--s-3) var(--s-5); border-radius: 0 0 var(--r-md) var(--r-md);
  font-weight: var(--fw-semi);
  transition: top var(--d-base) var(--ease);
}
.skip-link:focus { top: 0; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- 2. TYPOGRAPHY ------------------------------------------------- */
.display, .h1, .h2, .h3 {
  font-family: var(--font-display);
  font-weight: var(--fw-semi);
  font-optical-sizing: auto;
  color: var(--c-navy);
}
.display { font-size: var(--t-display); line-height: var(--lh-tight); letter-spacing: var(--ls-display); }
.h1      { font-size: var(--t-h1);      line-height: var(--lh-snug);  letter-spacing: var(--ls-display); }
.h2      { font-size: var(--t-h2);      line-height: var(--lh-snug);  letter-spacing: var(--ls-heading); }
.h3      { font-size: var(--t-h3);      line-height: 1.3;             letter-spacing: var(--ls-heading); }
.h4 {
  font-family: var(--font-body);
  font-size: var(--t-h4); font-weight: var(--fw-semi);
  line-height: 1.4; color: var(--c-navy);
}

/* Eyebrow — small uppercase label above a heading. */
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-size: var(--t-label); font-weight: var(--fw-semi);
  letter-spacing: var(--ls-label); text-transform: uppercase;
  color: var(--c-red);
}
.eyebrow::before {
  content: ""; width: 24px; height: 2px;
  background: var(--c-red); border-radius: var(--r-full);
}
.eyebrow--plain::before { display: none; }
.eyebrow--light { color: #fff; }
.eyebrow--light::before { background: var(--c-red); }

.lead {
  font-size: var(--t-lead); line-height: var(--lh-body);
  color: var(--c-ink-2); max-width: 58ch;
}
.prose { max-width: var(--w-prose); }
.prose p + p { margin-top: var(--s-5); }
.prose p { line-height: var(--lh-loose); color: var(--c-ink-2); }

.muted { color: var(--c-ink-3); }
.text-center { text-align: center; }
.text-center .lead, .text-center .prose { margin-inline: auto; }

/* Red underline accent under a word — used sparingly in headlines. */
.mark {
  background-image: linear-gradient(var(--c-red), var(--c-red));
  background-size: 100% 3px; background-repeat: no-repeat;
  background-position: 0 92%;
  padding-bottom: 2px;
}

/* ---------- 3. LAYOUT ----------------------------------------------------- */
.container { width: 100%; max-width: var(--w-page); margin-inline: auto; padding-inline: var(--gutter); }
.container--wide  { max-width: var(--w-wide); }
.container--prose { max-width: calc(var(--w-prose) + var(--gutter) * 2); }

.section { padding-block: var(--section-y); }
.section--tight { padding-block: clamp(2.5rem, 1.5rem + 4vw, 4.5rem); }
.section--alt  { background: var(--c-bg-2); }
.section--dark { background: var(--c-navy); color: #E8EAEE; }
.section--dark .h1, .section--dark .h2, .section--dark .h3, .section--dark .h4 { color: #fff; }
.section--dark .lead, .section--dark .prose p { color: #B9C1CC; }

.section-head { margin-bottom: var(--s-8); }
.section-head .eyebrow { margin-bottom: var(--s-3); }
.section-head .lead { margin-top: var(--s-4); }

.grid { display: grid; gap: var(--s-6); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* Two-column split with an image on one side. */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 1rem + 5vw, 5rem);
  align-items: center;
}
.split--media-right > .split__media { order: 2; }
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .split--media-right > .split__media { order: 0; }
}

.stack   { display: flex; flex-direction: column; gap: var(--s-4); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }

/* ---------- 4. BUTTONS ---------------------------------------------------- */
.btn {
  --btn-bg: var(--c-red);
  --btn-fg: #fff;
  --btn-bd: transparent;
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--s-2);
  padding: 0.875rem 1.75rem;
  background: var(--btn-bg); color: var(--btn-fg);
  border: var(--bw) solid var(--btn-bd);
  border-radius: var(--r-full);
  font-size: var(--t-sm); font-weight: var(--fw-semi);
  letter-spacing: 0.01em; line-height: 1;
  text-align: center; white-space: nowrap;
  transition: background var(--d-base) var(--ease),
              color var(--d-base) var(--ease),
              border-color var(--d-base) var(--ease),
              transform var(--d-fast) var(--ease),
              box-shadow var(--d-base) var(--ease);
}
.btn:hover  { transform: translateY(-2px); box-shadow: var(--e-3); }
.btn:active { transform: translateY(0); box-shadow: var(--e-1); }

.btn--primary:hover   { --btn-bg: var(--c-red-dark); }
.btn--secondary       { --btn-bg: var(--c-navy); }
.btn--secondary:hover { --btn-bg: var(--c-navy-2); }
.btn--outline         { --btn-bg: transparent; --btn-fg: var(--c-navy); --btn-bd: var(--c-line); }
.btn--outline:hover   { --btn-bg: var(--c-navy); --btn-fg: #fff; --btn-bd: var(--c-navy); }
.btn--ghost           { --btn-bg: transparent; --btn-fg: var(--c-navy); --btn-bd: transparent; }
.btn--ghost:hover     { --btn-bg: rgba(14,27,46,.06); box-shadow: none; }
.btn--on-dark         { --btn-bg: #fff; --btn-fg: var(--c-navy); }
.btn--on-dark:hover   { --btn-bg: #F0EEE9; }
.btn--outline-light   { --btn-bg: transparent; --btn-fg: #fff; --btn-bd: rgba(255,255,255,.4); }
.btn--outline-light:hover { --btn-bg: rgba(255,255,255,.12); --btn-bd: rgba(255,255,255,.7); }

.btn--lg { padding: 1.0625rem 2.25rem; font-size: var(--t-body); }
.btn--sm { padding: 0.625rem 1.25rem; font-size: var(--t-xs); }
.btn--block { display: flex; width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] {
  opacity: .5; pointer-events: none; transform: none;
}
.btn__icon { width: 1em; height: 1em; flex: none; }

/* Text link with an arrow that slides on hover. */
.link-arrow {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-weight: var(--fw-semi); font-size: var(--t-sm);
  color: var(--c-red);
}
.link-arrow svg { transition: transform var(--d-base) var(--ease-out); }
.link-arrow:hover svg { transform: translateX(4px); }

/* ---------- 5. CARDS ------------------------------------------------------ */
.card {
  background: var(--c-surface);
  border: var(--bw) solid var(--c-line);
  border-radius: var(--r-lg);
  padding: var(--s-6);
  transition: transform var(--d-base) var(--ease-out),
              box-shadow var(--d-base) var(--ease),
              border-color var(--d-base) var(--ease);
}
.card--hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--e-3);
  border-color: transparent;
}
.card__icon {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: var(--r-md);
  background: var(--c-red-soft); color: var(--c-red);
  margin-bottom: var(--s-5);
}
.card__icon svg { width: 24px; height: 24px; }
.card .h4 { margin-bottom: var(--s-3); }
.card p { color: var(--c-ink-2); font-size: var(--t-sm); }

/* Numbered step card — the buying / selling process. */
.step { position: relative; padding-top: var(--s-6); }
.step__num {
  font-family: var(--font-display);
  font-size: 3.5rem; font-weight: var(--fw-semi);
  line-height: 1; color: var(--c-line);
  letter-spacing: var(--ls-display);
  margin-bottom: var(--s-3);
  transition: color var(--d-base) var(--ease);
}
.step:hover .step__num { color: var(--c-red); }
.step__body { border-top: 2px solid var(--c-line); padding-top: var(--s-4); }
.step .h4 { margin-bottom: var(--s-2); }
.step p { color: var(--c-ink-2); font-size: var(--t-sm); }

/* ---------- 6. PROPERTY CARD ---------------------------------------------- */
.property {
  background: var(--c-surface);
  border: var(--bw) solid var(--c-line);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform var(--d-base) var(--ease-out),
              box-shadow var(--d-base) var(--ease);
}
.property:hover { transform: translateY(-4px); box-shadow: var(--e-3); }
.property__media {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden;
  /* Subtle diagonal hatch shows through until a real photo is dropped in. */
  background:
    repeating-linear-gradient(45deg, #EDEAE4 0 12px, #F4F1EC 12px 24px);
  display: grid; place-items: center;
}
.property__media::after {
  content: "Photo coming soon";
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: var(--t-xs); letter-spacing: var(--ls-label);
  text-transform: uppercase; color: var(--c-ink-3);
  pointer-events: none;
}
.property__media img { position: relative; z-index: 1; }
.property__media img[src=""], .property__media img:not([src]) { display: none; }
.property__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform var(--d-slow) var(--ease-out);
}
.property:hover .property__media img { transform: scale(1.05); }
.property__badge {
  position: absolute; top: var(--s-4); left: var(--s-4);
  background: var(--c-red); color: #fff;
  padding: var(--s-1) var(--s-3);
  border-radius: var(--r-full);
  font-size: var(--t-label); font-weight: var(--fw-bold);
  letter-spacing: var(--ls-label); text-transform: uppercase;
}
.property__badge--sold   { background: var(--c-navy); }
.property__badge--new    { background: var(--c-success); }
.property__body { padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-3); flex: 1; }
.property__price {
  font-family: var(--font-display);
  font-size: var(--t-h3); font-weight: var(--fw-semi);
  color: var(--c-navy); letter-spacing: var(--ls-heading);
}
.property__address { font-size: var(--t-sm); color: var(--c-ink-2); }
.property__specs {
  display: flex; flex-wrap: wrap; gap: var(--s-4);
  margin-top: auto; padding-top: var(--s-4);
  border-top: var(--bw) solid var(--c-line-2);
  font-size: var(--t-sm); color: var(--c-ink-3);
}
.property__spec { display: inline-flex; align-items: center; gap: var(--s-2); }
.property__spec svg { width: 16px; height: 16px; color: var(--c-ink-3); flex: none; }
.property__spec strong { color: var(--c-ink); font-weight: var(--fw-semi); }

/* ---------- 7. STATS BAR -------------------------------------------------- */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: var(--s-5);
}
.stat { text-align: center; padding: var(--s-5) var(--s-3); }
.stat__value {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem);
  font-weight: var(--fw-semi); line-height: 1.1;
  color: var(--c-red); letter-spacing: var(--ls-heading);
  margin-bottom: var(--s-2);
}
.stat__label {
  font-size: var(--t-xs); color: var(--c-ink-3);
  line-height: 1.4; max-width: 22ch; margin-inline: auto;
}
.stats--bordered .stat + .stat { border-left: var(--bw) solid var(--c-line); }
@media (max-width: 780px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats--bordered .stat:nth-child(odd) { border-left: 0; }
  .stats--bordered .stat:nth-child(n+3) { border-top: var(--bw) solid var(--c-line); }
}

/* ---------- 8. TESTIMONIAL ------------------------------------------------ */
.quote {
  background: var(--c-surface);
  border: var(--bw) solid var(--c-line);
  border-radius: var(--r-lg);
  padding: var(--s-7) var(--s-6) var(--s-6);
  position: relative;
  display: flex; flex-direction: column; gap: var(--s-5);
  height: 100%;
}
.quote::before {
  content: "\201C";
  position: absolute; top: 0.25rem; left: var(--s-6);
  font-family: var(--font-display); font-size: 5rem; line-height: 1;
  color: var(--c-red); opacity: .18;
}
.quote__text {
  font-size: var(--t-body); line-height: var(--lh-loose);
  color: var(--c-ink-2); position: relative; flex: 1;
}
.quote__author { display: flex; align-items: center; gap: var(--s-3); }
.quote__avatar {
  width: 44px; height: 44px; border-radius: var(--r-full);
  background: var(--c-navy); color: #fff;
  display: grid; place-items: center; flex: none;
  font-weight: var(--fw-semi); font-size: var(--t-sm);
}
.quote__name { font-weight: var(--fw-semi); font-size: var(--t-sm); color: var(--c-navy); }
.quote__meta { font-size: var(--t-xs); color: var(--c-ink-3); }
.stars { display: flex; gap: 2px; color: var(--c-red); }
.stars svg { width: 15px; height: 15px; }

/* ---------- 9. FORMS ------------------------------------------------------ */
.form { display: grid; gap: var(--s-5); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-5); }
@media (max-width: 640px) { .form__row { grid-template-columns: 1fr; } }

.field { display: flex; flex-direction: column; gap: var(--s-2); }
.field__label {
  font-size: var(--t-sm); font-weight: var(--fw-semi); color: var(--c-navy);
}
.field__label .req { color: var(--c-red); margin-left: 2px; }
.field__hint { font-size: var(--t-xs); color: var(--c-ink-3); }

.input, .textarea, .select {
  width: 100%;
  padding: 0.8125rem var(--s-4);
  background: var(--c-surface);
  border: var(--bw) solid var(--c-line);
  border-radius: var(--r-md);
  font-size: var(--t-sm); color: var(--c-ink);
  transition: border-color var(--d-base) var(--ease),
              box-shadow var(--d-base) var(--ease);
}
.input::placeholder, .textarea::placeholder { color: #A6ADB6; }
.input:hover, .textarea:hover, .select:hover { border-color: #CFCBC3; }
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--c-focus);
  box-shadow: var(--e-focus);
}
.textarea { resize: vertical; min-height: 130px; line-height: var(--lh-body); }
.select {
  appearance: none; cursor: pointer; padding-right: var(--s-9);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236B7683' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--s-4) center;
}
.field--error .input, .field--error .textarea, .field--error .select { border-color: var(--c-error); }
.field__error {
  font-size: var(--t-xs); color: var(--c-error); font-weight: var(--fw-medium);
  display: flex; align-items: center; gap: var(--s-1);
}

/* Radio / checkbox pills — "I'm interested in…" selectors. */
.choice-group { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; width: 0; height: 0; }
.choice span {
  display: inline-block;
  padding: 0.5625rem var(--s-4);
  border: var(--bw) solid var(--c-line);
  border-radius: var(--r-full);
  background: var(--c-surface);
  font-size: var(--t-sm); cursor: pointer;
  transition: all var(--d-base) var(--ease);
}
.choice span:hover { border-color: var(--c-ink-3); }
.choice input:checked + span {
  background: var(--c-navy); color: #fff; border-color: var(--c-navy);
}
.choice input:focus-visible + span { outline: 3px solid var(--c-focus); outline-offset: 2px; }

/* Static tag — looks like a choice pill but is not interactive. */
.pill {
  display: inline-block;
  padding: 0.4375rem var(--s-4);
  border: var(--bw) solid var(--c-line);
  border-radius: var(--r-full);
  background: var(--c-surface);
  font-size: var(--t-sm); color: var(--c-ink-2);
}

/* Honeypot — hidden from humans, catches bots. */
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* Alerts */
.alert {
  display: flex; gap: var(--s-3);
  padding: var(--s-4) var(--s-5);
  border-radius: var(--r-md);
  font-size: var(--t-sm);
  border: var(--bw) solid transparent;
}
.alert svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.alert--success { background: var(--c-success-soft); border-color: #BFE0CD; color: #14532D; }
.alert--error   { background: var(--c-error-soft);   border-color: #F3C6CB; color: #7F1020; }

/* ---------- 10. HEADER ---------------------------------------------------- */
.topbar {
  background: var(--c-navy); color: #C6CDD7;
  font-size: var(--t-xs);
  padding-block: var(--s-2);
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); }
.topbar a { display: inline-flex; align-items: center; gap: var(--s-2); transition: color var(--d-fast) var(--ease); }
.topbar a:hover { color: #fff; }
.topbar svg { width: 14px; height: 14px; }
.topbar__contact { display: flex; gap: var(--s-5); }
@media (max-width: 720px) {
  .topbar__tagline { display: none; }
  .topbar .container { justify-content: center; }
}
@media (max-width: 420px) { .topbar__contact { gap: var(--s-4); font-size: 11px; } }

.header {
  position: sticky; top: 0; z-index: var(--z-header);
  background: rgba(250, 248, 245, 0.88);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: var(--bw) solid transparent;
  transition: border-color var(--d-base) var(--ease),
              box-shadow var(--d-base) var(--ease);
}
.header.is-stuck { border-bottom-color: var(--c-line); box-shadow: var(--e-1); }
.header .container { display: flex; align-items: center; justify-content: space-between; gap: var(--s-5); min-height: 76px; }

/* No logo mark — the wordmark alone is the identity, so it carries a little
   more size and tracking than it would sitting next to a symbol. */
.brand { display: flex; align-items: center; flex: none; }
.brand__name {
  font-family: var(--font-display); font-size: 1.3125rem;
  font-weight: var(--fw-semi); color: var(--c-navy);
  letter-spacing: var(--ls-heading); line-height: 1.15;
}
.brand__sub {
  font-size: 10.5px; letter-spacing: var(--ls-label);
  text-transform: uppercase; color: var(--c-ink-3); font-weight: var(--fw-medium);
}
/* The name is now the only identity in the bar, so it never gets hidden —
   the qualifier line drops away first on very narrow screens. */
@media (max-width: 420px) {
  .brand__name { font-size: 1.1875rem; }
  .brand__sub  { display: none; }
}

.nav { display: flex; align-items: center; gap: var(--s-6); }
.nav__link {
  position: relative;
  font-size: var(--t-sm); font-weight: var(--fw-medium);
  color: var(--c-ink-2); padding-block: var(--s-2);
  transition: color var(--d-base) var(--ease);
}
.nav__link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; background: var(--c-red); border-radius: var(--r-full);
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--d-base) var(--ease-out);
}
.nav__link:hover { color: var(--c-navy); }
.nav__link:hover::after { transform: scaleX(1); }
.nav__link.is-active { color: var(--c-navy); font-weight: var(--fw-semi); }
.nav__link.is-active::after { transform: scaleX(1); }
@media (max-width: 1000px) { .header__nav-desktop, .header__cta { display: none; } }

.nav-toggle {
  display: none; width: 44px; height: 44px;
  place-items: center; border-radius: var(--r-md);
  color: var(--c-navy);
}
.nav-toggle:hover { background: rgba(14,27,46,.06); }
.nav-toggle svg { width: 26px; height: 26px; }
@media (max-width: 1000px) { .nav-toggle { display: grid; } }

/* Mobile drawer */
.drawer {
  position: fixed; inset: 0; z-index: var(--z-drawer);
  visibility: hidden; pointer-events: none;
}
.drawer.is-open { visibility: visible; pointer-events: auto; }
.drawer__scrim {
  position: absolute; inset: 0;
  background: rgba(14, 27, 46, .55);
  opacity: 0; transition: opacity var(--d-base) var(--ease);
}
.drawer.is-open .drawer__scrim { opacity: 1; }
.drawer__panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(88vw, 380px);
  background: var(--c-bg);
  padding: var(--s-5) var(--s-6) var(--s-8);
  display: flex; flex-direction: column; gap: var(--s-5);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform var(--d-slow) var(--ease-out);
  box-shadow: var(--e-4);
}
.drawer.is-open .drawer__panel { transform: translateX(0); }
.drawer__head { display: flex; justify-content: flex-end; }
.drawer__close {
  width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: var(--r-md); color: var(--c-navy);
}
.drawer__close:hover { background: rgba(14,27,46,.06); }
.drawer__close svg { width: 24px; height: 24px; }
.drawer__nav { display: flex; flex-direction: column; }
.drawer__link {
  font-family: var(--font-display);
  font-size: 1.5rem; font-weight: var(--fw-semi); color: var(--c-navy);
  padding-block: var(--s-4);
  border-bottom: var(--bw) solid var(--c-line);
  transition: color var(--d-fast) var(--ease), padding-left var(--d-base) var(--ease);
}
.drawer__link:hover { color: var(--c-red); padding-left: var(--s-2); }
.drawer__link.is-active { color: var(--c-red); }
.drawer__foot { margin-top: auto; display: grid; gap: var(--s-3); }

/* ---------- 11. HERO ------------------------------------------------------ */
.hero {
  position: relative; color: #fff; overflow: hidden;
  /* Designed fallback: if the photo is missing or still loading, this reads as
     an intentional brand gradient rather than a broken page. */
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(0,61,165,.55) 0%, transparent 60%),
    radial-gradient(900px 500px at 95% 110%, rgba(220,28,46,.40) 0%, transparent 62%),
    linear-gradient(160deg, #0E1B2E 0%, #17293F 55%, #0B1626 100%);
}
.hero__bg { position: absolute; inset: 0; }
/* <picture> is inline by default, which would collapse the 100% height fill. */
.hero__bg picture { display: block; width: 100%; height: 100%; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(14,27,46,.55) 0%, rgba(14,27,46,.42) 45%, rgba(14,27,46,.88) 100%),
    linear-gradient(90deg, rgba(14,27,46,.80) 0%, rgba(14,27,46,.30) 65%, transparent 100%);
}
.hero__inner {
  position: relative; z-index: var(--z-base);
  padding-block: clamp(4.5rem, 3rem + 12vw, 10rem);
  max-width: 760px;
}
.hero .display { color: #fff; margin-block: var(--s-4) var(--s-5); }
.hero .lead { color: #D2D8E0; max-width: 52ch; }
.hero__actions { margin-top: var(--s-7); display: flex; flex-wrap: wrap; gap: var(--s-3); }

/* Credential row under the hero buttons. Carries the trust signal without
   putting a box over the photograph. */
.hero__trust {
  display: flex; flex-wrap: wrap;
  gap: var(--s-3) var(--s-6);
  margin-top: var(--s-7);
  padding-top: var(--s-6);
  border-top: 1px solid rgba(255, 255, 255, .16);
}
.hero__trust li {
  display: flex; align-items: center; gap: var(--s-2);
  font-size: var(--t-sm); color: #C3CAD4;
}
.hero__trust svg { color: var(--c-red); flex: none; }

/* ---- Split hero (available, not currently used) ---------------------------
   Kept for reuse. Switch to it only when the hero image is a PERSON. A full-bleed background crops a
   standing figure badly: the hero box is roughly 2.9:1 on a wide monitor and
   0.47:1 on a phone, so a head ends up outside the frame at one end or the
   other. A fixed-ratio column never crops destructively.                    */
.hero--split .hero__grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: clamp(2rem, 1rem + 4vw, 4.5rem);
  align-items: center;
  padding-block: clamp(3rem, 2rem + 6vw, 5.5rem);
}
.hero--split .hero__inner { max-width: 600px; padding-block: 0; }

.hero__media { position: relative; }
.hero__portrait {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--c-navy-2);
  box-shadow: var(--e-4);
}
.hero__portrait img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 20%;   /* bias up: keeps the face in frame */
}

/* Credential badge, overlapping the portrait's lower-left corner. */
.hero__badge {
  position: absolute; bottom: var(--s-6); left: 0;
  display: flex; align-items: center; gap: var(--s-3);
  max-width: 86%;
  padding: var(--s-4) var(--s-5);
  background: var(--c-surface);
  border-radius: var(--r-md);
  box-shadow: var(--e-3);
}
.hero__badge svg { color: var(--c-red); flex: none; }
.hero__badge strong {
  display: block; color: var(--c-navy);
  font-size: var(--t-sm); font-weight: var(--fw-semi); line-height: 1.25;
}
.hero__badge span { font-size: var(--t-xs); color: var(--c-ink-3); line-height: 1.4; }
@media (min-width: 1100px) {
  .hero__badge { left: calc(-1 * var(--s-6)); }   /* break the frame slightly */
}

/* No photo supplied yet — drop the column and let the copy run full width.
   Set by the img's onerror handler, so the page never shows a broken image. */
.hero--no-photo .hero__media { display: none; }
.hero--no-photo .hero__grid { grid-template-columns: 1fr; }
.hero--no-photo .hero__inner { max-width: 760px; }

@media (max-width: 900px) {
  .hero--split .hero__grid { grid-template-columns: 1fr; }
  .hero--split .hero__inner { max-width: 100%; }
  .hero__media { max-width: 400px; }
  .hero__badge { left: var(--s-4); bottom: var(--s-4); }
}

/* Compact hero for interior pages */
.page-hero {
  background: var(--c-navy); color: #fff;
  padding-block: clamp(3rem, 2rem + 6vw, 5.5rem);
  position: relative; overflow: hidden;
}
.page-hero::before {
  content: ""; position: absolute; top: -30%; right: -10%;
  width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(circle, rgba(220,28,46,.20) 0%, transparent 68%);
}
.page-hero__inner { position: relative; max-width: 720px; }
.page-hero .h1 { color: #fff; margin-block: var(--s-3) var(--s-4); }
.page-hero .lead { color: #C3CAD4; }

.breadcrumb { display: flex; gap: var(--s-2); font-size: var(--t-xs); color: #8D97A5; }
.breadcrumb a:hover { color: #fff; }

/* ---------- 12. CTA BANNER ------------------------------------------------ */
.cta-band {
  background: linear-gradient(135deg, var(--c-navy) 0%, #1B3252 100%);
  color: #fff; border-radius: var(--r-xl);
  padding: clamp(2.5rem, 1.5rem + 5vw, 4.5rem);
  position: relative; overflow: hidden;
  text-align: center;
}
.cta-band::before {
  content: ""; position: absolute; top: -50%; left: -10%;
  width: 460px; height: 460px; border-radius: 50%;
  background: radial-gradient(circle, rgba(220,28,46,.22) 0%, transparent 70%);
}
.cta-band > * { position: relative; }
.cta-band .h2 { color: #fff; margin-block: var(--s-3) var(--s-4); }
.cta-band .lead { color: #C3CAD4; margin-inline: auto; }
.cta-band__actions { margin-top: var(--s-7); display: flex; flex-wrap: wrap; gap: var(--s-3); justify-content: center; }

/* ---------- 13. ACCORDION (FAQ) ------------------------------------------- */
.accordion { border-top: var(--bw) solid var(--c-line); }
.acc__item { border-bottom: var(--bw) solid var(--c-line); }
.acc__trigger {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-5); padding: var(--s-5) 0;
  text-align: left;
  font-family: var(--font-body);
  font-size: var(--t-h4); font-weight: var(--fw-semi); color: var(--c-navy);
  transition: color var(--d-base) var(--ease);
}
.acc__trigger:hover { color: var(--c-red); }
.acc__icon {
  width: 32px; height: 32px; flex: none;
  display: grid; place-items: center; border-radius: var(--r-full);
  border: var(--bw) solid var(--c-line); color: var(--c-red);
  transition: transform var(--d-base) var(--ease), background var(--d-base) var(--ease);
}
.acc__icon svg { width: 16px; height: 16px; }
.acc__trigger[aria-expanded="true"] .acc__icon { transform: rotate(45deg); background: var(--c-red-soft); }
.acc__panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--d-slow) var(--ease-out); }
.acc__panel[data-open="true"] { grid-template-rows: 1fr; }
.acc__panel > div { overflow: hidden; }
.acc__panel p { padding-bottom: var(--s-5); color: var(--c-ink-2); max-width: 70ch; }

/* ---------- 14. FOOTER ---------------------------------------------------- */
.footer { background: var(--c-navy); color: #A9B2BE; padding-top: var(--s-10); }
.footer a { transition: color var(--d-fast) var(--ease); }
.footer a:hover { color: #fff; }
.footer__grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: var(--s-8) var(--s-6);
  padding-bottom: var(--s-9);
}
@media (max-width: 900px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer__grid { grid-template-columns: 1fr; } }
.footer__title {
  font-size: var(--t-label); letter-spacing: var(--ls-label);
  text-transform: uppercase; color: #fff; font-weight: var(--fw-semi);
  margin-bottom: var(--s-5);
}
.footer__list { display: flex; flex-direction: column; gap: var(--s-3); font-size: var(--t-sm); }
.footer .brand__name { color: #fff; }
.footer .brand__sub { color: #8D97A5; }
.footer__blurb { font-size: var(--t-sm); line-height: var(--lh-body); margin-top: var(--s-5); max-width: 38ch; }
.footer__contact-item { display: flex; gap: var(--s-3); font-size: var(--t-sm); align-items: flex-start; }
.footer__contact-item svg { width: 17px; height: 17px; flex: none; margin-top: 3px; color: var(--c-red); }
.social { display: flex; gap: var(--s-2); margin-top: var(--s-5); }
.social a {
  width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: var(--r-full);
  border: var(--bw) solid rgba(255,255,255,.16);
  transition: all var(--d-base) var(--ease);
}
.social a:hover { background: var(--c-red); border-color: var(--c-red); color: #fff; transform: translateY(-2px); }
.social svg { width: 17px; height: 17px; }
.footer__bar {
  border-top: var(--bw) solid rgba(255,255,255,.10);
  padding-block: var(--s-5);
  display: flex; justify-content: space-between; align-items: center;
  gap: var(--s-4); flex-wrap: wrap;
  font-size: var(--t-xs); color: #7E8896;
}
.footer__legal { max-width: 76ch; line-height: 1.6; }

/* ---------- 15. TABLE ------------------------------------------------------
   Comparison tables (closing costs, pricing scenarios). Always wrapped in
   .table-wrap so a wide table scrolls itself instead of the whole page.     */
.table-wrap {
  overflow-x: auto;
  border: var(--bw) solid var(--c-line);
  border-radius: var(--r-lg);
  background: var(--c-surface);
  -webkit-overflow-scrolling: touch;
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--t-sm);
  min-width: 520px;              /* forces the scroll rather than crushing cells */
}
.table caption {
  text-align: left;
  padding: var(--s-5) var(--s-5) 0;
  font-size: var(--t-xs);
  color: var(--c-ink-3);
}
.table th, .table td {
  padding: var(--s-4) var(--s-5);
  text-align: left;
  vertical-align: top;
  border-bottom: var(--bw) solid var(--c-line-2);
}
.table thead th {
  background: var(--c-bg-2);
  color: var(--c-navy);
  font-weight: var(--fw-semi);
  font-size: var(--t-xs);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  white-space: nowrap;
  border-bottom-color: var(--c-line);
}
.table tbody tr:last-child th,
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--c-bg); }
.table tbody th {
  font-weight: var(--fw-semi);
  color: var(--c-navy);
}
/* Right-align and align the digits wherever a column holds figures. */
.table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.table .total td, .table .total th {
  background: var(--c-bg-2);
  font-weight: var(--fw-semi);
  color: var(--c-navy);
}

/* ---------- 16. TIMELINE --------------------------------------------------
   Vertical process timeline — for sequences where the ORDER carries meaning
   (a transaction runs in this order); use .step cards when it does not.     */
.timeline { position: relative; padding-left: var(--s-8); }
.timeline::before {
  content: "";
  position: absolute; left: 11px; top: 8px; bottom: 8px;
  width: 2px; background: var(--c-line); border-radius: var(--r-full);
}
.timeline__item { position: relative; padding-bottom: var(--s-7); }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item::before {
  content: "";
  position: absolute; left: calc(-1 * var(--s-8) + 4px); top: 4px;
  width: 16px; height: 16px; border-radius: var(--r-full);
  background: var(--c-surface);
  border: 3px solid var(--c-red);
  box-shadow: 0 0 0 4px var(--c-bg);
}
.timeline__when {
  font-size: var(--t-label); font-weight: var(--fw-semi);
  letter-spacing: var(--ls-label); text-transform: uppercase;
  color: var(--c-red); display: block; margin-bottom: var(--s-2);
}
.timeline__item .h4 { margin-bottom: var(--s-2); }
.timeline__item p { font-size: var(--t-sm); color: var(--c-ink-2); }

/* ---------- 17. RESOURCE / LEAD-MAGNET CARD -------------------------------
   A downloadable guide offered in exchange for an email.                    */
.resource {
  display: flex; gap: var(--s-5); align-items: flex-start;
  padding: var(--s-6);
  background: var(--c-surface);
  border: var(--bw) solid var(--c-line);
  border-left: 4px solid var(--c-red);
  border-radius: var(--r-md);
}
.resource__icon {
  width: 48px; height: 48px; flex: none;
  display: grid; place-items: center;
  border-radius: var(--r-md);
  background: var(--c-red-soft); color: var(--c-red);
}
.resource__body { flex: 1; min-width: 0; }
.resource .h4 { margin-bottom: var(--s-2); }
.resource p { font-size: var(--t-sm); color: var(--c-ink-2); margin-bottom: var(--s-4); }
@media (max-width: 560px) {
  .resource { flex-direction: column; gap: var(--s-4); }
}

/* ---------- 18. UTILITIES ------------------------------------------------- */
.img-frame {
  border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--e-3); background: var(--c-bg-2);
}
/* <picture> is inline by default; make it fill the fixed-ratio frame. */
.img-frame picture { display: block; width: 100%; height: 100%; }
.img-frame img { width: 100%; height: 100%; object-fit: cover; }
.ratio-portrait { aspect-ratio: 4 / 5; }
.ratio-landscape { aspect-ratio: 3 / 2; }
.ratio-square { aspect-ratio: 1; }

.divider { height: var(--bw); background: var(--c-line); border: 0; }
.mt-0{margin-top:0}.mt-4{margin-top:var(--s-4)}.mt-5{margin-top:var(--s-5)}
.mt-6{margin-top:var(--s-6)}.mt-7{margin-top:var(--s-7)}.mt-8{margin-top:var(--s-8)}
.mb-4{margin-bottom:var(--s-4)}.mb-5{margin-bottom:var(--s-5)}.mb-6{margin-bottom:var(--s-6)}

/* Checklist with red ticks */
.checklist { display: flex; flex-direction: column; gap: var(--s-3); }
.checklist li { display: flex; gap: var(--s-3); font-size: var(--t-sm); color: var(--c-ink-2); line-height: 1.55; }
.checklist svg { width: 20px; height: 20px; flex: none; color: var(--c-red); margin-top: 1px; }

/* Scroll reveal — progressive enhancement, content is visible without JS. */
.reveal { opacity: 0; transform: translateY(24px); }
.js .reveal { transition: opacity var(--d-reveal) var(--ease-out), transform var(--d-reveal) var(--ease-out); }
.reveal.is-in { opacity: 1; transform: none; }
html:not(.js) .reveal { opacity: 1; transform: none; }
