/* ==========================================================================
   Mio Mortgage — styles
   Brand: navy #0F172A + teal #006B8F (from the M!O logo), Montserrat display.
   ========================================================================== */

:root {
  --navy: #0f172a;
  --navy-2: #172238;
  --navy-deep: #0a1020;
  --teal: #006b8f;
  --teal-hover: #00597a;
  --teal-light: #5cb8d9;
  --teal-soft: #e5f1f5;
  --mist: #f4f6f9;
  --sand: #f3efe8;
  --white: #ffffff;
  --text: #334155;
  --muted: #64748b;
  --line: rgba(15, 23, 42, 0.1);
  --line-light: rgba(255, 255, 255, 0.14);

  --display: "Montserrat", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --fs-h1: clamp(2.35rem, 1.1rem + 3.7vw, 4.35rem);
  --fs-h2: clamp(2rem, 1.3rem + 2.5vw, 3.6rem);
  --fs-lede: clamp(1.05rem, 1rem + 0.3vw, 1.2rem);

  --gutter: clamp(16px, 4vw, 48px);

  /* Spacing scale — one rhythm for every section */
  --space-section: clamp(72px, 8vw, 128px);  /* top/bottom of every section */
  --space-head: clamp(36px, 4vw, 60px);      /* section heading → content */
  --space-cols: clamp(40px, 6vw, 96px);      /* gap between side-by-side columns */
  --space-stack: clamp(16px, 1.6vw, 22px);   /* gap between stacked text blocks */
  --radius: 24px;
  --radius-sm: 12px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --header-h: 78px;

  --bang: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 164'%3E%3Cpath d='M5 0h32q5 0 4.6 5L33 108H9L.4 5Q0 0 5 0z'/%3E%3Ccircle cx='21' cy='138' r='20'/%3E%3C/svg%3E");
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); interpolate-size: allow-keywords; }
body {
  margin: 0; background: var(--white); color: var(--text);
  font-family: var(--body); font-size: 1.0625rem; line-height: 1.6;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
address { font-style: normal; }
::selection { background: var(--teal); color: #fff; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 6px; }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 16px; top: -60px; z-index: 200; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 8px; transition: top .2s; }
.skip-link:focus { top: 16px; }
.container { width: 100%; max-width: 1360px; margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- Type ---------- */
.h2 {
  font-family: var(--display); font-weight: 700; color: var(--navy);
  font-size: var(--fs-h2); line-height: 1.06; letter-spacing: -0.035em; text-wrap: balance;
}
.h2-sm { font-size: clamp(1.85rem, 1.3rem + 1.9vw, 3rem); }
.accent { color: var(--teal); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--display); font-size: .74rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--teal);
}
.eyebrow-rule { width: 26px; height: 2px; background: currentColor; display: inline-block; border-radius: 2px; }
.eyebrow-light { color: var(--teal-light); }
.bang { width: 7px; height: 26px; color: var(--teal); flex: none; }

.section { padding-block: var(--space-section); }
.section-head { display: grid; gap: var(--space-stack); margin-bottom: var(--space-head); }
.section-head-split { grid-template-columns: 1fr; align-items: end; }
@media (min-width: 960px) {
  .section-head-split { grid-template-columns: 1.3fr 1fr; gap: var(--space-cols); }
  .section-head-split > div { display: grid; gap: var(--space-stack); }
}
.section-intro { color: var(--muted); font-size: var(--fs-lede); max-width: 54ch; text-wrap: pretty; }
.section-intro a { color: var(--navy); border-bottom: 2px solid var(--teal); font-weight: 500; }
.fine { font-size: .76rem; line-height: 1.5; color: rgba(255, 255, 255, .5); }
.fine-dark { color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--navy); --fg: #fff; --hover: var(--teal);
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 17px 26px; border-radius: 999px; background: var(--bg); color: var(--fg);
  font-family: var(--display); font-weight: 600; font-size: .95rem; letter-spacing: -0.005em; line-height: 1;
  transition: transform .5s var(--ease), color .4s;
  will-change: transform;
}
.btn svg { width: 18px; height: 18px; transition: transform .5s var(--ease); }
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--hover); border-radius: inherit;
  transform: translateY(101%); transition: transform .55s var(--ease);
}
.btn:hover::before { transform: none; }
.btn:hover svg { transform: translateX(4px); }
.btn:active { transform: scale(.98); }
.btn-teal { --bg: var(--teal); --hover: var(--navy); box-shadow: 0 12px 30px -14px rgba(0, 107, 143, .8); }
.btn-navy { --bg: var(--navy); --hover: var(--teal); }
.btn-white { --bg: #fff; --fg: var(--navy); --hover: var(--teal-soft); }
.btn-small { padding: 12px 18px; font-size: .86rem; }
.btn-block { width: 100%; }

.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 600; font-size: .95rem; color: var(--navy); padding-block: 6px; position: relative; }
.link-arrow::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 2px; background: var(--teal); transform-origin: right; transition: transform .5s var(--ease); }
.link-arrow:hover::after { transform: scaleX(0); }
.link-arrow::before { content: "→"; order: 2; transition: transform .4s var(--ease); }
.link-arrow:hover::before { transform: translateX(4px); }

.round-btn { width: 52px; height: 52px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; color: var(--navy); transition: background .3s, color .3s, border-color .3s; }
.round-btn svg { width: 18px; height: 18px; }
.round-btn:hover { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ---------- Intro (logo key-turn) ---------- */
.intro { display: none; }
.js .intro.is-playing {
  display: grid; place-items: center; position: fixed; inset: 0; z-index: 300; background: #fff;
  clip-path: inset(0 0 0 0); transition: clip-path 1s var(--ease-in-out);
}
.js .intro.is-done { clip-path: inset(0 0 100% 0); pointer-events: none; }
.intro-video { width: min(78vw, 460px); aspect-ratio: 1; object-fit: cover; transition: transform 1s var(--ease-in-out), opacity .6s; }
.intro.is-done .intro-video { transform: translateY(-14vh) scale(.92); opacity: 0; }
.intro-skip { position: absolute; right: 24px; bottom: 24px; font-family: var(--display); font-size: .78rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); padding: 10px 14px; border-radius: 999px; transition: color .3s, background .3s; }
.intro-skip:hover { color: var(--navy); background: var(--mist); }
.intro-lock { overflow: hidden; }

/* ---------- Header ---------- */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header-h); transition: transform .6s var(--ease), background-color .4s, box-shadow .4s; }
.site-header.is-scrolled { background: rgba(255, 255, 255, .86); -webkit-backdrop-filter: saturate(160%) blur(16px); backdrop-filter: saturate(160%) blur(16px); box-shadow: 0 1px 0 var(--line); }
.site-header.is-hidden { transform: translateY(-100%); }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.logo { display: inline-grid; gap: 4px; color: var(--navy); }
.logo-mark { width: 76px; height: 29px; }
.logo-word { display: flex; justify-content: space-between; font-family: var(--display); font-weight: 600; font-size: 8px; line-height: 1; color: var(--navy); }
.primary-nav { display: none; }
.primary-nav ul { display: flex; gap: 2px; }
.primary-nav a { display: block; padding: 8px 11px; border-radius: 999px; font-family: var(--display); font-weight: 500; font-size: .86rem; color: var(--navy); white-space: nowrap; transition: background .3s, color .3s; }
.primary-nav a:hover { background: var(--teal-soft); color: var(--teal); }
.primary-nav a.is-current { background: var(--teal-soft); color: var(--teal); }
.header-actions { display: flex; align-items: center; gap: 14px; }
.header-phone { display: none; font-family: var(--display); font-weight: 600; font-size: .88rem; color: var(--navy); font-variant-numeric: tabular-nums; }
.header-actions .btn { display: inline-flex; white-space: nowrap; }

/* Header CTA: navy pill with a teal arrow chip and a soft pulsing halo */
.btn-cta {
  --bg: var(--navy); --hover: var(--teal);
  padding: 5px 5px 5px 18px !important; gap: 12px; font-weight: 700; letter-spacing: -0.01em;
  animation: cta-halo 2.8s var(--ease-in-out) infinite;
}
.btn-cta-icon {
  flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--teal); color: #fff; transition: background .45s var(--ease), color .45s, transform .5s var(--ease);
}
.btn-cta-icon svg { width: 16px; height: 16px; }
.btn-cta:hover .btn-cta-icon { background: #fff; color: var(--teal); transform: rotate(-45deg); }
.btn-cta:hover svg { transform: none; }
.btn-cta:hover { animation-play-state: paused; }
@keyframes cta-halo {
  0%, 100% { box-shadow: 0 10px 24px -12px rgba(15, 23, 42, .7), 0 0 0 0 rgba(0, 107, 143, .35); }
  50% { box-shadow: 0 10px 24px -12px rgba(15, 23, 42, .7), 0 0 0 7px rgba(0, 107, 143, 0); }
}
@media (prefers-reduced-motion: reduce) { .btn-cta { animation: none; } }

@media (max-width: 639px) {
  .header-actions { gap: 10px; }
  .header-actions .btn-small { padding: 10px 14px; font-size: .78rem; }
  .header-actions .btn-cta { padding: 4px 4px 4px 14px !important; gap: 8px; }
  .btn-cta-icon { width: 28px; height: 28px; }
  .btn-cta-icon svg { width: 14px; height: 14px; }
}
@media (max-width: 379px) {
  .header-actions .btn-small { padding: 9px 11px; font-size: .72rem; }
  .header-actions .btn-cta { padding: 4px 4px 4px 11px !important; gap: 6px; }
  .btn-cta-icon { width: 24px; height: 24px; }
}

.menu-toggle { width: 46px; height: 46px; border-radius: 50%; background: var(--navy); display: grid; place-content: center; gap: 6px; }
.menu-bar { display: block; width: 18px; height: 1.8px; background: #fff; border-radius: 2px; transition: transform .45s var(--ease); }
.menu-toggle[aria-expanded="true"] .menu-bar:nth-of-type(2) { transform: translateY(3.9px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-bar:nth-of-type(3) { transform: translateY(-3.9px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: -1; background: var(--navy); color: #fff;
  padding: calc(var(--header-h) + 32px) var(--gutter) 32px;
  display: flex; flex-direction: column; justify-content: space-between;
  clip-path: circle(0 at calc(100% - var(--gutter) - 23px) calc(var(--header-h) / 2));
  transition: clip-path .8s var(--ease-in-out);
}
.mobile-menu[hidden] { display: flex; visibility: hidden; }
.mobile-menu.is-open { clip-path: circle(150% at calc(100% - var(--gutter) - 23px) calc(var(--header-h) / 2)); visibility: visible; }
.mobile-menu li { overflow: hidden; }
.mobile-menu nav a { display: block; font-family: var(--display); font-weight: 700; font-size: clamp(1.9rem, 8vw, 3rem); line-height: 1.25; letter-spacing: -0.03em; transform: translateY(105%); transition: transform .7s var(--ease), color .3s; }
.mobile-menu nav a:hover { color: var(--teal-light); }
.mobile-menu.is-open nav a { transform: none; }
.mobile-menu.is-open li:nth-child(1) a { transition-delay: .18s; }
.mobile-menu.is-open li:nth-child(2) a { transition-delay: .22s; }
.mobile-menu.is-open li:nth-child(3) a { transition-delay: .26s; }
.mobile-menu.is-open li:nth-child(4) a { transition-delay: .30s; }
.mobile-menu.is-open li:nth-child(5) a { transition-delay: .34s; }
.mobile-menu.is-open li:nth-child(6) a { transition-delay: .38s; }
.mobile-menu.is-open li:nth-child(7) a { transition-delay: .42s; }
.mobile-menu.is-open li:nth-child(8) a { transition-delay: .46s; color: var(--teal-light); }
.mobile-menu-foot { display: grid; gap: 6px; color: rgba(255, 255, 255, .7); }
.menu-open .site-header { background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; transition: none; }
.menu-open .logo, .menu-open .logo-word { color: #fff; }
.menu-open .menu-toggle { background: #fff; }
.menu-open .menu-bar { background: var(--navy); }

@media (min-width: 640px) { .header-actions .btn { display: inline-flex; } }
@media (min-width: 1140px) { .primary-nav { display: block; } .menu-toggle, .mobile-menu { display: none !important; } }
@media (min-width: 1320px) { .header-phone { display: inline; } }

/* ==========================================================================
   HERO — keyhole reveal
   ========================================================================== */
.hero { position: relative; background: var(--white); }
.hero-stage { position: relative; display: flex; flex-direction: column; }
.hero-content { position: relative; z-index: 3; padding-top: calc(var(--header-h) + clamp(28px, 6vw, 64px)); display: grid; gap: 24px; justify-items: start; }
.hero-eyebrow { margin-bottom: 4px; }
.hero-title {
  font-family: var(--display); font-weight: 800; color: var(--navy);
  font-size: var(--fs-h1); line-height: 1.02; letter-spacing: -0.045em; max-width: 13.5ch; text-wrap: balance;
}
#hero-title { font-size: clamp(3rem, 1.2rem + 6vw, 6.75rem); line-height: .96; letter-spacing: -0.05em; max-width: 9ch; }
.lede { font-size: var(--fs-lede); color: var(--muted); max-width: 48ch; text-wrap: pretty; transition: opacity .3s, transform .3s; }
.lede.is-swapping { opacity: 0 !important; transform: translateY(6px) !important; }
.hero-ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .8rem; color: var(--muted); }
.hero-trust li { display: inline-flex; align-items: center; gap: 8px; }
.hero-trust li::before { content: ""; width: 5px; height: 16px; background: var(--teal); -webkit-mask: var(--bang) center / contain no-repeat; mask: var(--bang) center / contain no-repeat; }

/* Goal switcher */
.goal { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; }
.goal-label { font-family: var(--display); font-weight: 600; font-size: .88rem; color: var(--navy); }
.goal-switch { position: relative; display: inline-flex; padding: 5px; border-radius: 999px; background: var(--mist); border: 1px solid var(--line); }
.goal-switch button { position: relative; z-index: 1; padding: 10px 16px; border-radius: 999px; font-family: var(--display); font-weight: 600; font-size: .84rem; color: var(--muted); transition: color .4s; white-space: nowrap; }
.goal-switch button[aria-checked="true"] { color: #fff; }
.goal-pill { position: absolute; z-index: 0; top: 5px; bottom: 5px; left: 0; width: var(--pw, 0); transform: translateX(var(--px, 0)); background: var(--navy); border-radius: 999px; transition: transform .55s var(--ease), width .55s var(--ease); }

/* Media */
.hero-media { position: relative; overflow: hidden; background: var(--navy); }
.hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(var(--img-scale, 1.08)); transition: opacity .9s var(--ease); will-change: transform; }
.hero-media img.is-active { opacity: 1; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15, 23, 42, .05) 30%, rgba(15, 23, 42, .78)); opacity: var(--after, 0); }
.hero-after { position: absolute; left: var(--gutter); bottom: clamp(28px, 6vw, 72px); color: #fff; opacity: var(--after, 0); transform: translateY(calc((1 - var(--after, 0)) * 30px)); max-width: calc(100% - 2 * var(--gutter)); }
.hero-after-kicker { font-family: var(--display); font-weight: 600; font-size: .74rem; letter-spacing: .22em; text-transform: uppercase; color: rgba(255, 255, 255, .8); margin-bottom: 14px; }
.hero-after-title { font-family: var(--display); font-weight: 800; font-size: clamp(2.2rem, 1rem + 5vw, 6rem); line-height: .98; letter-spacing: -0.045em; }

.ticket {
  position: absolute; right: clamp(14px, 3vw, 48px); bottom: clamp(14px, 4vw, 72px);
  width: min(320px, calc(100% - 28px)); padding: 16px 18px; border-radius: 18px;
  background: rgba(255, 255, 255, .92); -webkit-backdrop-filter: blur(16px) saturate(150%); backdrop-filter: blur(16px) saturate(150%);
  box-shadow: 0 24px 50px -20px rgba(15, 23, 42, .55); font-size: .84rem; color: var(--navy);
  opacity: var(--ticket, 0); transform: translateY(calc((1 - var(--ticket, 0)) * 24px)) scale(calc(.96 + var(--ticket, 0) * .04));
}
.ticket-head { display: flex; gap: 12px; align-items: center; padding-bottom: 12px; border-bottom: 1px dashed var(--line); }
.ticket-head strong { display: block; font-family: var(--display); font-weight: 700; font-size: .9rem; }
.ticket-head small { color: var(--muted); font-size: .76rem; }
.ticket-check { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--teal); color: #fff; display: grid; place-items: center; }
.ticket-check svg { width: 18px; height: 18px; }
.ticket-rows { display: grid; gap: 6px; padding-top: 12px; }
.ticket-rows div { display: flex; justify-content: space-between; gap: 12px; }
.ticket-rows dt { color: var(--muted); }
.ticket-rows dd { font-weight: 600; font-variant-numeric: tabular-nums; }

.keyhole-ring { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; overflow: visible; display: none; }
.keyhole-ring path { fill: none; stroke: none; opacity: 0; }

.scroll-cue { display: none; }

/* Static (mobile, reduced motion, no JS) */
.hero:not(.is-pinned) { padding-bottom: var(--space-head); }
.hero:not(.is-pinned) .hero-content { order: -1; }
.hero:not(.is-pinned) .hero-media { margin: 36px var(--gutter) 0; aspect-ratio: 4 / 4.6; border-radius: var(--radius); }
.js .hero:not(.is-pinned) .hero-media { border-radius: 0; }
.hero:not(.is-pinned) .hero-after { left: 22px; bottom: 22px; }
.hero:not(.is-pinned) .hero-after-title { font-size: clamp(1.8rem, 1rem + 4vw, 3rem); }
.hero:not(.is-pinned) .ticket { top: 16px; right: 16px; bottom: auto; }
.hero:not(.is-pinned) .ticket-rows { display: none; }
.hero:not(.is-pinned) .ticket-head { padding-bottom: 0; border: 0; }
.hero:not(.is-pinned) .ticket { width: auto; max-width: calc(100% - 32px); padding: 12px 16px; }
@media (min-width: 900px) {
  .hero:not(.is-pinned) .hero-stage { display: grid; grid-template-columns: 1.1fr 1fr; align-items: end; max-width: 1360px; margin-inline: auto; }
  .hero:not(.is-pinned) .hero-media { margin: calc(var(--header-h) + 40px) var(--gutter) 0 0; aspect-ratio: 4 / 4.4; }
  .hero:not(.is-pinned) .hero-content { grid-column: 1; grid-row: 1; }
  .hero:not(.is-pinned) .hero-media { grid-column: 2; grid-row: 1; }
}

/* Pinned (desktop, motion OK) */
.hero.is-pinned { height: 280vh; }
.hero.is-pinned .hero-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: block; }
.hero.is-pinned .hero-media { position: absolute; inset: 0; }
.hero.is-pinned .keyhole-ring { display: block; }
.hero.is-pinned .hero-content {
  height: 100%; align-content: center; padding-top: calc(var(--header-h) + 8px); padding-bottom: 40px;
  opacity: var(--content, 1); transform: translateY(calc((1 - var(--content, 1)) * -50px));
  pointer-events: var(--content-pe, auto);
}
.hero.is-pinned .hero-content > * { max-width: min(640px, 52vw); }
.hero.is-pinned .hero-title { font-size: min(var(--fs-h1), 8.2vh); }
.hero.is-pinned #hero-title { font-size: min(clamp(3rem, 1.2rem + 6vw, 6.75rem), 12.5vh); max-width: min(780px, 58vw); }

/* Pinned on phones/tablets: compact copy on top, keyhole centered in the space below */
@media (max-width: 899px) {
  .hero.is-pinned { height: 240vh; height: 240svh; }
  .hero.is-pinned .hero-content { align-content: start; gap: 14px; padding-top: calc(var(--header-h) + 6px); padding-bottom: 0; }
  .hero.is-pinned .hero-content > * { max-width: 100%; }
  .hero.is-pinned #hero-title { font-size: min(clamp(2.5rem, 10.5vw, 4rem), 7vh); max-width: none; }
  .hero.is-pinned .lede { font-size: .98rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .hero.is-pinned .hero-trust, .hero.is-pinned .goal-label { display: none; }
  .hero.is-pinned .hero-ctas { gap: 10px 20px; }
  .hero.is-pinned .hero-after { left: 22px; bottom: 120px; }
  .hero.is-pinned .ticket { right: 14px; bottom: 18px; }
}
.hero.is-pinned .scroll-cue {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 3;
  font-family: var(--display); font-size: .68rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--muted);
  opacity: var(--content, 1);
}
.scroll-cue span { width: 1.5px; height: 36px; background: var(--line); position: relative; overflow: hidden; }
.scroll-cue span::after { content: ""; position: absolute; inset: 0; background: var(--teal); animation: cue 2s var(--ease-in-out) infinite; }
@keyframes cue { 0% { transform: translateY(-100%); } 60%, 100% { transform: translateY(100%); } }

/* ---------- Marquee ---------- */
.marquee { background: var(--navy); color: #fff; overflow: hidden; padding-block: clamp(20px, 2.4vw, 30px); }
.marquee-track { display: flex; width: max-content; animation: marquee 52s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee ul { display: flex; flex: none; }
.marquee li {
  display: inline-flex; align-items: center; gap: clamp(22px, 3vw, 44px); padding-right: clamp(22px, 3vw, 44px);
  font-family: var(--display); font-weight: 700; font-size: clamp(1.3rem, .9rem + 1.4vw, 2.2rem); letter-spacing: -0.02em; white-space: nowrap;
}
.marquee li::after { content: ""; width: 9px; height: .9em; background: var(--teal-light); -webkit-mask: var(--bang) center / contain no-repeat; mask: var(--bang) center / contain no-repeat; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ==========================================================================
   LOAN FINDER
   ========================================================================== */
.finder-filters { display: grid; gap: 14px; margin-bottom: clamp(28px, 3vw, 40px); }
.finder-filters-label { font-family: var(--display); font-weight: 700; color: var(--navy); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 10px 16px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff;
  font-family: var(--display); font-weight: 500; font-size: .84rem; color: var(--navy);
  transition: background .35s var(--ease), color .35s, border-color .35s, transform .35s var(--ease);
}
.chip:hover { border-color: var(--teal); color: var(--teal); }
.chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip:active { transform: scale(.96); }
.finder-status { font-size: .88rem; color: var(--teal); font-weight: 500; min-height: 1.4em; }

.finder { display: grid; gap: 28px; }
.finder > *, .finder-panels > * { min-width: 0; }
@media (min-width: 960px) { .finder { grid-template-columns: minmax(260px, 340px) 1fr; gap: 48px; align-items: start; } }

.finder-list { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-inline: calc(-1 * var(--gutter)); padding: 2px var(--gutter) 8px; scroll-snap-type: x proximity; }
.finder-list::-webkit-scrollbar { display: none; }
.finder-list button {
  position: relative; flex: none; display: flex; align-items: center; gap: 14px; scroll-snap-align: start;
  padding: 12px 18px; border-radius: 14px; text-align: left; background: var(--mist);
  font-family: var(--display); font-weight: 600; font-size: .95rem; color: var(--navy); white-space: nowrap;
  transition: background .35s, color .35s, opacity .45s var(--ease), transform .45s var(--ease);
}
.fl-num { font-size: .72rem; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; transition: color .3s; }
.finder-list button:hover { background: var(--teal-soft); }
.finder-list button[aria-selected="true"] { background: var(--navy); color: #fff; }
.finder-list button[aria-selected="true"] .fl-num { color: var(--teal-light); }
.finder-list button.is-dim { opacity: .32; }
.finder-list button.is-match::after {
  content: "Match"; margin-left: auto; padding: 3px 8px; border-radius: 999px; background: var(--teal); color: #fff;
  font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; animation: pop .45s var(--ease);
}
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
@media (min-width: 960px) {
  .finder-list { flex-direction: column; overflow: visible; margin: 0; padding: 0; gap: 4px; position: sticky; top: calc(var(--header-h) + 24px); }
  .finder-list button { white-space: normal; padding: 15px 18px; font-size: 1.02rem; background: transparent; border-radius: 14px; }
  .finder-list button[aria-selected="true"] { transform: translateX(6px); }
}

.finder-panels { display: grid; gap: 16px; }
.fp { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; border-radius: var(--radius); overflow: hidden; background: var(--mist); }
.fp[hidden] { display: none; }
.fp.is-active { animation: panel-in .7s var(--ease); }
@keyframes panel-in { from { opacity: 0; transform: translateY(16px); } }
.fp-img { aspect-ratio: 16 / 9; overflow: hidden; }
.fp-img img { width: 100%; height: 100%; object-fit: cover; }
.fp.is-active .fp-img img { animation: img-in 1.2s var(--ease); }
@keyframes img-in { from { transform: scale(1.12); } }
.fp-body { padding: clamp(24px, 3.5vw, 44px); display: grid; gap: 18px; justify-items: start; align-content: center; }
.fp-body h3 { font-family: var(--display); font-weight: 700; font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.3rem); letter-spacing: -0.035em; color: var(--navy); line-height: 1.1; }
.fp-body p { max-width: 58ch; }
.fp-facts { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; border-block: 1px solid var(--line); margin-block: 6px; }
.fp-facts div { padding: 16px 14px 16px 0; display: grid; gap: 4px; align-content: start; }
.fp-facts div + div { padding-left: 16px; border-left: 1px solid var(--line); }
.fp-facts dt { white-space: nowrap; font-family: var(--display); font-size: .62rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.fp-facts dd { font-family: var(--display); font-weight: 700; font-size: clamp(.98rem, .85rem + .5vw, 1.35rem); color: var(--navy); letter-spacing: -0.02em; line-height: 1.2; }
@media (min-width: 1200px) {
  .fp { grid-template-columns: .9fr 1.1fr; min-height: 520px; }
  .fp-img { aspect-ratio: auto; }
}

/* ==========================================================================
   LOCAL — horizontal gallery
   ========================================================================== */
.local { background: var(--navy); color: #fff; position: relative; }
.local .h2 { color: #fff; }
.local .accent { color: var(--teal-light); }
.local-stage { padding-block: var(--space-section); overflow: hidden; position: relative; }
.local-track {
  --local-pad: max(24px, var(--gutter));
  display: flex; gap: clamp(16px, 2vw, 28px); padding-inline: var(--local-pad); scroll-padding-inline: var(--local-pad);
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 8px;
}
.local-track::-webkit-scrollbar { display: none; }
.local-track::after { content: ""; flex: none; width: 1px; margin-left: calc(var(--local-pad) - 1px - clamp(16px, 2vw, 28px)); }
.local-intro { flex: none; width: min(calc(100vw - 2 * var(--local-pad)), 520px); display: grid; gap: var(--space-stack); align-content: center; justify-items: start; scroll-snap-align: start; padding-right: clamp(0px, 3vw, 48px); }
@media (max-width: 899px) { .local-intro { padding-right: 0; } }
.local-sub { color: rgba(255, 255, 255, .7); font-size: var(--fs-lede); max-width: 44ch; }
.lcard { flex: none; width: min(78vw, 380px); scroll-snap-align: start; display: grid; gap: 12px; align-content: start; }
.lcard figure { aspect-ratio: 4 / 4.6; border-radius: 20px; overflow: hidden; margin-bottom: 8px; }
.lcard img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); transition: transform 1.2s var(--ease); }
.lcard:hover img { transform: scale(1.12); }
.lcard-num { font-family: var(--display); font-weight: 700; font-size: .8rem; letter-spacing: .14em; color: var(--teal-light); }
.lcard h3 { font-family: var(--display); font-weight: 700; font-size: 1.4rem; letter-spacing: -0.03em; line-height: 1.15; }
.lcard p { color: rgba(255, 255, 255, .68); font-size: .98rem; }
.local-progress { display: none; }

.local.is-pinned .local-stage { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; flex-direction: column; justify-content: center; padding-block: calc(var(--header-h) + 10px) 40px; }
.local.is-pinned .local-track { overflow: visible; scroll-snap-type: none; transform: translate3d(var(--x, 0), 0, 0); will-change: transform; padding-left: max(var(--gutter), calc((100vw - 1360px) / 2 + var(--gutter))); }
.local.is-pinned .lcard { width: clamp(300px, 26vw, 400px); }
.local.is-pinned .lcard figure { aspect-ratio: auto; height: min(46vh, 480px); }
.local.is-pinned .local-progress { display: block; position: absolute; left: var(--gutter); right: var(--gutter); bottom: 32px; height: 2px; background: var(--line-light); max-width: 1264px; margin-inline: auto; }
.local-progress span { display: block; height: 100%; background: var(--teal-light); transform-origin: left; transform: scaleX(var(--hp, 0)); }

/* ==========================================================================
   PROCESS — stacking cards
   ========================================================================== */
.process { background: var(--sand); }
.stack { display: grid; gap: 28px; }
.stack-card {
  --i: 0;
  position: sticky; top: calc(var(--header-h) + 20px + var(--i) * 18px);
  display: grid; background: #fff; border-radius: 28px; overflow: hidden;
  box-shadow: 0 30px 60px -40px rgba(15, 23, 42, .45), 0 0 0 1px rgba(15, 23, 42, .04);
  transform-origin: 50% 0; transform: scale(var(--s, 1));
}
.stack-card:nth-child(2) { --i: 1; }
.stack-card:nth-child(3) { --i: 2; }
.stack-card:nth-child(4) { --i: 3; }
.stack-card::after { content: ""; position: absolute; inset: 0; background: var(--navy); opacity: var(--dim, 0); pointer-events: none; }
.stack-text { padding: clamp(26px, 4vw, 56px); display: grid; gap: 16px; align-content: center; }
.stack-num { font-family: var(--display); font-weight: 800; font-size: clamp(3rem, 2rem + 3vw, 5.5rem); line-height: .9; letter-spacing: -0.05em; color: var(--teal); }
.stack-text h3 { font-family: var(--display); font-weight: 700; font-size: clamp(1.5rem, 1.1rem + 1.3vw, 2.3rem); letter-spacing: -0.035em; color: var(--navy); line-height: 1.1; }
.stack-text p { max-width: 46ch; }
.stack-points { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.stack-points li { padding: 8px 14px; border-radius: 999px; background: var(--teal-soft); color: var(--teal); font-family: var(--display); font-weight: 600; font-size: .78rem; }
.stack-img { aspect-ratio: 16 / 10; overflow: hidden; }
.stack-img img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 900px) {
  .stack-card { grid-template-columns: 1fr 1.05fr; min-height: min(500px, 62vh); }
  .stack-img { aspect-ratio: auto; }
}

/* ==========================================================================
   CALCULATORS
   ========================================================================== */
.tabs { position: relative; display: inline-flex; padding: 5px; border-radius: 999px; background: var(--mist); border: 1px solid var(--line); margin-bottom: 24px; max-width: 100%; }
.tabs button { position: relative; z-index: 1; padding: 12px 20px; border-radius: 999px; font-family: var(--display); font-weight: 600; font-size: .88rem; color: var(--muted); transition: color .4s; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: #fff; }
.tabs-pill { position: absolute; z-index: 0; top: 5px; bottom: 5px; left: 0; width: var(--pw, 0); transform: translateX(var(--px, 0)); background: var(--teal); border-radius: 999px; transition: transform .55s var(--ease), width .55s var(--ease); }

.calc-card { display: grid; border-radius: 28px; overflow: hidden; border: 1px solid var(--line); background: var(--mist); }
.calc-card[hidden] { display: none; }
.calc-card.is-entering { animation: panel-in .6s var(--ease); }
@media (min-width: 1000px) { .calc-card { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } }
.calc-form { padding: clamp(24px, 4vw, 52px); display: grid; gap: 30px; align-content: start; }
.field { display: grid; gap: 10px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field label, .field legend { font-family: var(--display); font-weight: 500; font-size: .84rem; color: var(--muted); padding: 0; }
.field-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.field-top output { font-family: var(--display); font-weight: 700; font-size: clamp(1.25rem, 1rem + .9vw, 1.7rem); letter-spacing: -0.03em; color: var(--navy); font-variant-numeric: tabular-nums; }
.field-row { display: grid; gap: 22px; }
@media (min-width: 600px) { .field-row { grid-template-columns: 1fr 1.3fr; } }
.field-grid { display: grid; gap: 18px; padding-top: 22px; }
@media (min-width: 600px) { .field-grid { grid-template-columns: 1fr 1fr; } }

input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; cursor: pointer; --fill: 50%; }
input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--teal) var(--fill), rgba(15, 23, 42, .12) var(--fill)); }
input[type="range"]::-moz-range-track { height: 6px; border-radius: 6px; background: rgba(15, 23, 42, .12); }
input[type="range"]::-moz-range-progress { height: 6px; border-radius: 6px; background: var(--teal); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; margin-top: -10px; background: #fff; border: 2px solid var(--teal); box-shadow: 0 4px 14px rgba(0, 107, 143, .35); transition: transform .3s var(--ease); }
input[type="range"]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 2px solid var(--teal); }
input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.18); }

.input-affix { display: flex; align-items: center; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0 14px; height: 52px; transition: border-color .3s, box-shadow .3s; }
.input-affix:focus-within { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(0, 107, 143, .1); }
.input-affix input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-size: 1.05rem; font-variant-numeric: tabular-nums; height: 100%; color: var(--navy); }
.input-affix span { color: var(--muted); font-size: .9rem; }

.seg { display: grid; grid-template-columns: repeat(3, 1fr); background: rgba(15, 23, 42, .06); border-radius: var(--radius-sm); padding: 4px; height: 52px; }
.seg label { position: relative; display: grid; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: grid; place-items: center; border-radius: 9px; font-family: var(--display); font-weight: 600; font-size: .88rem; color: var(--muted); transition: background .35s var(--ease), color .35s, box-shadow .35s; }
.seg input:checked + span { background: #fff; color: var(--navy); box-shadow: 0 2px 8px rgba(15, 23, 42, .12); }
.seg input:focus-visible + span { outline: 2px solid var(--teal); outline-offset: 1px; }

.calc-more { border-top: 1px solid var(--line); padding-top: 22px; }
.calc-more summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-family: var(--display); font-weight: 600; color: var(--navy); }
.calc-more summary::-webkit-details-marker { display: none; }
.calc-more summary::after { content: "−"; font-size: 1.3rem; color: var(--teal); }
.calc-more:not([open]) summary::after { content: "+"; }

.calc-result { background: var(--navy); color: #fff; padding: clamp(28px, 4vw, 52px); display: grid; gap: 24px; align-content: start; }
.calc-label { font-family: var(--display); font-size: .72rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--teal-light); }
.calc-total { font-family: var(--display); font-weight: 800; font-size: clamp(3rem, 2rem + 3.4vw, 5rem); line-height: .95; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; margin-top: -8px; }
.calc-total small { font-size: 1rem; font-weight: 500; letter-spacing: 0; color: rgba(255, 255, 255, .55); margin-left: 6px; }

.donut-wrap { display: grid; grid-template-columns: 120px 1fr; gap: 22px; align-items: center; }
.donut { width: 120px; height: 120px; transform: rotate(-90deg); }
.donut circle { fill: none; stroke-width: 14; }
.donut .donut-bg { stroke: rgba(255, 255, 255, .08); }
.donut .seg-arc { transition: stroke-dasharray .8s var(--ease), stroke-dashoffset .8s var(--ease); }
@media (max-width: 420px) { .donut-wrap { grid-template-columns: 1fr; } .donut { width: 100px; height: 100px; } }

.calc-breakdown { display: grid; }
.calc-breakdown div { display: flex; justify-content: space-between; gap: 12px; padding-block: 8px; border-bottom: 1px solid var(--line-light); font-size: .92rem; transition: opacity .4s; }
.calc-breakdown div.is-zero { opacity: .35; }
.calc-breakdown dt { display: inline-flex; align-items: center; gap: 10px; color: rgba(255, 255, 255, .78); }
.calc-breakdown i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; flex: none; }
.calc-breakdown dd { font-variant-numeric: tabular-nums; font-weight: 500; }
[data-row="pi"] i, .i-teal { background: #2aa3cc; }
[data-row="tax"] i, .i-sand { background: #e9dcc5; }
[data-row="ins"] i, .i-sky { background: #8fd0e6; }
[data-row="pmi"] i { background: #9aa8c7; }
[data-row="hoa"] i { background: #f2a77a; }
.calc-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.calc-meta div { display: grid; gap: 2px; }
.calc-meta span { font-size: .76rem; color: rgba(255, 255, 255, .55); }
.calc-meta strong { font-family: var(--display); font-weight: 600; font-size: 1.1rem; font-variant-numeric: tabular-nums; }

.afford-meter { height: 12px; border-radius: 12px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.afford-fill { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #2aa3cc, #8fd0e6); transition: width .9s var(--ease); }

/* ==========================================================================
   VOICES
   ========================================================================== */
@keyframes bob { 50% { transform: translateY(-10px) rotate(-6deg); } }
.voices { background: var(--teal-soft); }
.stars { color: var(--teal); letter-spacing: .12em; font-size: 1rem; line-height: 1; }
.voices-summary { display: grid; gap: 10px; justify-items: start; }
.voices-summary .stars { font-size: 1.35rem; }
.voices-summary p { color: var(--muted); font-size: var(--fs-lede); max-width: 40ch; }
.voices-summary strong { color: var(--navy); font-family: var(--display); font-weight: 700; }

/* Auto-rotating slider with faded edges */
.reviews-slider {
  --rv-gap: clamp(14px, 1.6vw, 20px);
  overflow: hidden; padding-block: 8px 28px; margin-block: -8px -28px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 3%, #000 68%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 3%, #000 68%, transparent 100%);
}
.reviews-slider:not(.is-running) { overflow-x: auto; scrollbar-width: none; }
.reviews-slider::-webkit-scrollbar { display: none; }
.reviews-track { display: flex; width: max-content; }
.reviews-slider.is-running .reviews-track { animation: reviews-scroll var(--rv-dur, 60s) linear infinite; }
.reviews-slider.is-running:hover .reviews-track, .reviews-slider.is-running:focus-within .reviews-track { animation-play-state: paused; }
@keyframes reviews-scroll { to { transform: translateX(-50%); } }
.reviews { display: flex; flex: none; gap: var(--rv-gap); padding-right: var(--rv-gap); }
.review { flex: none; width: clamp(280px, 30vw, 390px); display: flex; flex-direction: column; gap: 18px; padding: clamp(22px, 2.4vw, 30px); border-radius: var(--radius); background: #fff; border: 1px solid var(--line); transition: transform .5s var(--ease), box-shadow .5s; }
.review:hover { transform: translateY(-4px); box-shadow: 0 30px 60px -36px rgba(15, 23, 42, .45); }
.review blockquote { flex: 1; }
.review blockquote p { color: var(--navy); font-size: 1.02rem; line-height: 1.6; text-wrap: pretty; }
.review blockquote p::before { content: "“"; }
.review blockquote p::after { content: "”"; }
.review-by { display: grid; gap: 2px; padding-top: 18px; border-top: 1px solid var(--line); }
.review-by strong { font-family: var(--display); font-weight: 700; color: var(--navy); font-size: .95rem; }
.review-by small { color: var(--muted); font-size: .85rem; }
@keyframes dot-fill { to { transform: scaleX(1); } }

/* ==========================================================================
   AREAS — expanding panels
   ========================================================================== */
.panels { display: flex; flex-direction: column; gap: 10px; }
.panel {
  position: relative; overflow: hidden; border-radius: 22px; cursor: pointer; isolation: isolate;
  height: 84px; flex: none; color: #fff; outline-offset: 4px;
  display: flex; flex-direction: column; justify-content: flex-end; padding: 18px 22px;
  transition: height .8s var(--ease), flex-grow .8s var(--ease);
}
.panel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transform: scale(1.08); transition: transform 1.4s var(--ease); }
.panel::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(15, 23, 42, .2) 10%, rgba(15, 23, 42, .88)); }
.panel.is-active { height: 460px; }
.panel.is-active img { transform: scale(1); }
.panel-label { display: grid; gap: 2px; }
.panel-label span { font-family: var(--display); font-weight: 600; font-size: .66rem; letter-spacing: .2em; text-transform: uppercase; color: var(--teal-light); }
.panel-label h3 { font-family: var(--display); font-weight: 800; font-size: clamp(1.4rem, 1rem + 1.6vw, 2.6rem); letter-spacing: -0.04em; line-height: 1.05; }
.panel-more { display: grid; gap: 14px; max-height: 0; overflow: hidden; opacity: 0; transform: translateY(12px); transition: max-height .8s var(--ease), opacity .4s, transform .7s var(--ease), margin .8s var(--ease); }
.panel-more p { max-width: 44ch; color: rgba(255, 255, 255, .88); font-size: .96rem; }
.panel-more ul { display: flex; flex-wrap: wrap; gap: 6px; }
.panel-more li { padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .16); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); font-size: .78rem; font-weight: 500; }
.panel.is-active .panel-more { max-height: 320px; opacity: 1; transform: none; margin-top: 14px; transition-delay: 0s, .25s, .2s, 0s; }
.panel::before { display: none; }

@media (min-width: 900px) {
  .panels { flex-direction: row; height: clamp(480px, 64vh, 620px); }
  .panel { height: auto; flex: 1 1 0; min-width: 0; padding: 30px 32px; }
  .panel.is-active { height: auto; flex-grow: 5.5; }
  .panel::before {
    display: block; content: attr(data-city); position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%) rotate(180deg);
    writing-mode: vertical-rl; font-family: var(--display); font-weight: 700; font-size: 1.25rem; letter-spacing: -0.02em; white-space: nowrap;
    transition: opacity .4s;
  }
  .panel.is-active::before { opacity: 0; }
  .panel-label, .panel-more { min-width: 380px; }
  .panel-label { transition: opacity .4s .25s; }
  .panel:not(.is-active) .panel-label { opacity: 0; transition-delay: 0s; }
  .panel:not(.is-active):hover img { transform: scale(1.14); }
}

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq { background: var(--mist); }
.faq-grid { display: grid; gap: var(--space-head); }
@media (min-width: 1000px) { .faq-grid { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: var(--space-cols); align-items: start; } .faq-head { position: sticky; top: calc(var(--header-h) + 40px); } }
.faq-head { display: grid; gap: var(--space-stack); }
.faq-list { display: grid; gap: 10px; }
.faq-item { background: #fff; border-radius: 18px; border: 1px solid var(--line); transition: box-shadow .4s, border-color .4s; }
.faq-item[open] { border-color: transparent; box-shadow: 0 20px 40px -24px rgba(15, 23, 42, .3); }
.faq-item summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px 24px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item h3 { font-family: var(--display); font-weight: 600; font-size: clamp(1.02rem, .95rem + .3vw, 1.18rem); letter-spacing: -0.02em; color: var(--navy); line-height: 1.35; }
.faq-icon { flex: none; width: 38px; height: 38px; border-radius: 50%; background: var(--teal-soft); color: var(--teal); position: relative; transition: background .4s, color .4s, transform .5s var(--ease); }
.faq-icon::before, .faq-icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 13px; height: 2px; border-radius: 2px; background: currentColor; transform: translate(-50%, -50%); transition: transform .5s var(--ease); }
.faq-icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq-item[open] .faq-icon { background: var(--teal); color: #fff; transform: rotate(180deg); }
.faq-item[open] .faq-icon::after { transform: translate(-50%, -50%) rotate(0); }
.faq-body { padding: 0 24px 24px; max-width: 66ch; }
.faq-item::details-content { block-size: 0; overflow: hidden; transition: block-size .5s var(--ease), content-visibility .5s allow-discrete; }
.faq-item[open]::details-content { block-size: auto; }

/* ==========================================================================
   CONTACT
   ========================================================================== */
.contact { position: relative; background: var(--navy); color: #fff; padding-block: var(--space-section); overflow: hidden; isolation: isolate; }
.contact-bg { position: absolute; inset: 0; z-index: -1; }
.contact-bg img { width: 100%; height: 120%; object-fit: cover; opacity: .22; transform: translateY(var(--py, 0)); }
.contact-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, var(--navy) 30%, rgba(15, 23, 42, .6)); }
.contact .h2 { color: #fff; }
.contact .accent { color: var(--teal-light); }
.contact-grid { display: grid; gap: var(--space-head); }
@media (min-width: 1000px) { .contact-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--space-cols); } }
.contact-copy { display: grid; gap: var(--space-stack); align-content: start; }
.contact-title { font-size: clamp(2.5rem, 1.4rem + 3.8vw, 4.8rem); }
.contact-sub { color: rgba(255, 255, 255, .74); font-size: var(--fs-lede); max-width: 44ch; }
.contact-direct { display: grid; margin-top: 10px; border-top: 1px solid var(--line-light); }
.contact-direct li { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding-block: 15px; border-bottom: 1px solid var(--line-light); }
.contact-direct span { color: rgba(255, 255, 255, .55); font-size: .86rem; padding-top: 2px; }
.contact-direct a { transition: color .3s; }
.contact-direct a:hover { color: var(--teal-light); }

.lead-form { background: #fff; color: var(--navy); border-radius: 28px; padding: clamp(24px, 4vw, 48px); box-shadow: 0 50px 100px -40px rgba(0, 0, 0, .6); align-self: start; }
.lead-fields { display: grid; gap: 14px; }
.lead-fields[hidden] { display: none; }
.lead-step { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 600; font-size: .82rem; color: var(--teal); margin-bottom: 4px; }
.lead-step .bang { width: 5px; height: 18px; }
.f-row { display: grid; gap: 14px; }
@media (min-width: 600px) { .f-row { grid-template-columns: 1fr 1fr; } }
.f { position: relative; }
.f input, .f select, .f textarea { width: 100%; background: var(--mist); border: 1.5px solid transparent; border-radius: var(--radius-sm); padding: 26px 16px 10px; font-size: 1rem; outline: none; resize: vertical; color: var(--navy); transition: border-color .3s, background .3s, box-shadow .3s; -webkit-appearance: none; appearance: none; }
.f textarea { min-height: 110px; }
.f label { position: absolute; left: 17px; top: 18px; color: var(--muted); font-size: 1rem; pointer-events: none; transform-origin: left top; transition: transform .35s var(--ease), color .3s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: calc(100% - 34px); }
.f input:focus, .f select:focus, .f textarea:focus { border-color: var(--teal); background: #fff; box-shadow: 0 0 0 4px rgba(0, 107, 143, .1); }
.f input:focus + label, .f textarea:focus + label, .f select:focus + label { color: var(--teal); }
.f input:not(:placeholder-shown) + label, .f input:focus + label, .f textarea:not(:placeholder-shown) + label, .f textarea:focus + label, .f select:focus + label, .f select.has-value + label { transform: translateY(-10px) scale(.74); }
.f-select::after { content: ""; position: absolute; right: 18px; top: 50%; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.f.is-invalid input, .f.is-invalid select { border-color: #c2410c; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: .78rem; line-height: 1.5; color: var(--muted); cursor: pointer; margin-block: 4px 8px; }
.consent input { flex: none; width: 18px; height: 18px; margin-top: 2px; accent-color: var(--teal); }
.consent.is-invalid { color: #c2410c; }
.form-error { color: #c2410c; font-size: .88rem; }
.form-error:empty { display: none; }
.lead-success { display: grid; gap: 14px; justify-items: start; padding-block: 24px; outline: none; }
.lead-success[hidden] { display: none; }
.lead-success svg { width: 64px; height: 64px; color: var(--teal); }
.lead-success circle { stroke-dasharray: 190; stroke-dashoffset: 190; animation: draw 1s var(--ease) forwards; }
.lead-success path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .6s var(--ease) .6s forwards; }
.lead-success h3 { font-family: var(--display); font-weight: 700; font-size: 2rem; letter-spacing: -0.035em; line-height: 1.1; }
.lead-success p { color: var(--muted); }
.lead-success a { border-bottom: 2px solid var(--teal); }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer { background: var(--navy-deep); color: #fff; padding-block: var(--space-section) 32px; --logo-accent: var(--teal-light); }
.footer-top { display: grid; gap: 24px; align-items: end; padding-bottom: var(--space-head); border-bottom: 1px solid var(--line-light); }
@media (min-width: 800px) { .footer-top { grid-template-columns: auto 1fr; gap: var(--space-cols); } }
.footer-logo { width: clamp(220px, 34vw, 440px); height: auto; aspect-ratio: 442 / 170; color: #fff; }
.footer-tag { font-family: var(--display); font-weight: 600; font-size: clamp(1.2rem, 1rem + .9vw, 1.8rem); letter-spacing: -0.03em; line-height: 1.25; max-width: 22ch; color: rgba(255, 255, 255, .85); justify-self: end; }
@media (max-width: 799px) { .footer-tag { justify-self: start; } }
.footer-grid { display: grid; gap: 36px; padding-block: var(--space-head); border-bottom: 1px solid var(--line-light); }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1.2fr; } }
.footer-brand { display: grid; align-content: start; justify-items: start; }
.footer-col h2 { font-family: var(--display); font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; font-weight: 600; color: var(--teal-light); margin-bottom: 16px; }
.footer-col ul { display: grid; gap: 8px; color: rgba(255, 255, 255, .78); }
.footer-col a { transition: color .3s; }
.footer-col a:hover { color: #fff; }
.footer-legal { display: grid; gap: 22px; padding-top: 32px; font-size: .8rem; color: rgba(255, 255, 255, .5); }
.footer-legal p { max-width: 110ch; line-height: 1.6; }
.footer-legal a { text-decoration: underline; text-underline-offset: 3px; }
.footer-legal a:hover { color: #fff; }
.ehl { display: inline-flex; align-items: center; gap: 10px; color: rgba(255, 255, 255, .8); }
.ehl svg { width: 32px; height: 32px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
.footer-bottom ul { display: flex; gap: 20px; }

/* ==========================================================================
   Motion (JS only)
   ========================================================================== */
.js [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform 1s var(--ease); transition-delay: var(--d, 0s); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

.js .hero-title .w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 .12em .16em 0; margin: 0 -.12em -.16em 0; }
.js .hero-title .w > span { display: inline-block; transform: translateY(110%); transition: transform 1.1s var(--ease); transition-delay: calc(.1s + var(--i) * 45ms); }
.js .hero-title.is-in .w > span { transform: none; }

.js .site-header { opacity: 0; transform: translateY(-12px); }
.js .site-header.is-ready { opacity: 1; transform: none; transition: opacity .8s var(--ease) .1s, transform .8s var(--ease) .1s, background-color .4s, box-shadow .4s; }
.js .site-header.is-ready.is-hidden { transform: translateY(-100%); transition: transform .6s var(--ease), background-color .4s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  .js [data-reveal], .js .hero-title .w > span { opacity: 1 !important; transform: none !important; }
  .marquee-track { animation: none; }
}
