/* =====================================================================
   Three Keys Mortgages - "Threshold" design system
   ---------------------------------------------------------------------
   Palette is taken from the brand mark (teal keys, slate shafts) and from
   the thing the brand is actually about: a painted front door and its
   brass furniture. Deep petrol-teal ground, jade key accent, brass warmth,
   plaster-white paper.

   Type: Newsreader (editorial display serif) / Instrument Sans (body)
         IBM Plex Mono (labels, rates, anything the reader will compare)

   Signature: the key-cut rule and the three-keys readout - deposit,
   income, record - the three locks every lender turns.
   ===================================================================== */

/* ---------- tokens ---------- */
:root {
  /* brand */
  --ink:        #0E1F26;
  --ink-2:      #16303A;
  --ink-3:      #1E4451;
  --jade:       #4CDBC3;
  --jade-deep:  #0C7365;   /* accent text on light: >=4.5:1 on every light surface */
  --brass:      #C08A3E;
  --brass-lt:   #E3BE84;
  --brass-ink:  #835F24;   /* brass readable as text on light surfaces */
  --rust-lt:    #E88C6A;   /* rust readable as text on dark surfaces */
  --chalk:      #F8F6F1;
  --paper:      #FFFFFF;
  --slate:      #55686F;
  --rust:       #9A4A2B;

  /* semantic - flipped by section variants */
  --bg:      var(--chalk);
  --fg:      var(--ink);
  --muted:   var(--slate);
  --rule:    rgba(14, 31, 38, .13);
  --rule-2:  rgba(14, 31, 38, .07);
  --accent:  var(--jade-deep);
  --surface: var(--paper);
  --surface-2: #F1EDE5;

  /* type */
  --display: "Newsreader", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* rhythm */
  --gutter: clamp(1.15rem, 4vw, 2.5rem);
  --section-y: clamp(4rem, 9vw, 7.5rem);
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 1px 2px rgba(14,31,38,.05), 0 12px 34px -18px rgba(14,31,38,.30);
  --shadow-lg: 0 2px 6px rgba(14,31,38,.06), 0 34px 70px -30px rgba(14,31,38,.42);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5.5rem; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--body);
  font-size: clamp(1rem, .96rem + .18vw, 1.075rem);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 500; line-height: 1.06; letter-spacing: -.021em; margin: 0; }
h1 { font-size: clamp(2.5rem, 1.5rem + 4.3vw, 4.5rem); }
h2 { font-size: clamp(1.95rem, 1.3rem + 2.7vw, 3.1rem); }
h3 { font-size: clamp(1.28rem, 1.1rem + .8vw, 1.65rem); }
h4 { font-size: 1.1rem; letter-spacing: -.01em; }
p { margin: 0 0 1.1rem; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0 0 1.1rem; padding-left: 1.15rem; }
strong { font-weight: 600; }
:focus-visible { outline: 3px solid var(--jade); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--ink); color: #fff; padding: .8rem 1.2rem; border-radius: 0 0 10px 0;
}
.skip:focus { left: 0; }

/* ---------- layout ---------- */
.wrap { width: min(1200px, 100% - (var(--gutter) * 2)); margin-inline: auto; }
.wrap--narrow { width: min(760px, 100% - (var(--gutter) * 2)); }
.wrap--mid { width: min(960px, 100% - (var(--gutter) * 2)); }

.section { padding-block: var(--section-y); background: var(--bg); color: var(--fg); position: relative; }
.section--paper { --bg: var(--paper); --surface: var(--chalk); --surface-2: #EFEBE2; }
.section--tint  { --bg: #EFEAE0; --surface: var(--paper); --surface-2: #F7F4EE; }
.section--ink {
  --bg: var(--ink); --fg: #EAF2F1; --muted: #9DB2B6;
  --rule: rgba(255,255,255,.16); --rule-2: rgba(255,255,255,.08);
  --accent: var(--jade); --surface: var(--ink-2); --surface-2: #1B3946;
  --brass-ink: var(--brass-lt); --rust-ink: var(--rust-lt);
}
.section--deep {
  --bg: #0A181D; --fg: #EAF2F1; --muted: #96ACB1;
  --rule: rgba(255,255,255,.14); --rule-2: rgba(255,255,255,.07);
  --accent: var(--jade); --surface: var(--ink-2); --surface-2: #17343F;
  --brass-ink: var(--brass-lt); --rust-ink: var(--rust-lt);
}
.section--tight { padding-block: clamp(2.6rem, 5vw, 4rem); }

.grid { display: grid; gap: clamp(1.1rem, 2.2vw, 1.75rem); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 285px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 215px), 1fr)); }
.cluster { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; }
/* Grid and flex children default to min-width:auto, so a wide child (a table
   inside .table-wrap, a long code string) can push the whole page sideways.
   Pinning them to 0 lets the child scroll inside its own box instead. */
.grid > *, .split > *, .calc__grid > *, .hero__grid > *, .tags > *, .foot__top > * { min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 1rem; list-style: none; padding-left: 0; margin: 0; }
.center { text-align: center; }
.mx-auto { margin-inline: auto; }
.u-muted { color: var(--muted); }

/* ---------- eyebrow + section heads ---------- */
.kicker {
  font-family: var(--mono); font-size: .72rem; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase; color: var(--accent);
  display: flex; align-items: center; gap: .6rem; margin: 0 0 .9rem;
}
.kicker::before {
  content: ""; width: 26px; height: 1px; background: currentColor; flex: none; opacity: .75;
}
.kicker--center { justify-content: center; }
.kicker--plain::before { display: none; }

.sec-head { max-width: 62ch; margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.sec-head--center { margin-inline: auto; text-align: center; }
.sec-head--center .kicker { justify-content: center; }
.sec-head__lead { font-size: clamp(1.05rem, 1rem + .3vw, 1.22rem); color: var(--muted); margin-top: 1.1rem; }
.lead { font-size: clamp(1.08rem, 1rem + .45vw, 1.3rem); line-height: 1.55; color: var(--muted); }

/* ---------- the key-cut rule (signature) ---------- */
/* A hairline whose profile is a cut key: shaft, then bitting teeth. Used to
   separate movements in a page the way the brand mark separates its keys. */
.keycut {
  height: 15px; width: 100%; border: 0; margin: 0; padding: 0;
  background-repeat: repeat-x; background-position: left center; background-size: 46px 15px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='46' height='15'%3E%3Cpath d='M0 7h9v-4h5v4h6v4h5v-4h7v-5h5v5h9' fill='none' stroke='%234CDBC3' stroke-width='1.4' stroke-linejoin='round'/%3E%3C/svg%3E");
  opacity: .5;
}
.keycut--brass {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='46' height='15'%3E%3Cpath d='M0 7h9v-4h5v4h6v4h5v-4h7v-5h5v5h9' fill='none' stroke='%23C08A3E' stroke-width='1.4' stroke-linejoin='round'/%3E%3C/svg%3E");
  opacity: .6;
}
.keycut--short { width: 148px; }

/* ---------- buttons ---------- */
.btn {
  --btn-bg: var(--ink); --btn-fg: #fff; --btn-bd: var(--ink);
  display: inline-flex; align-items: center; gap: .55rem;
  background: var(--btn-bg); color: var(--btn-fg); border: 1.5px solid var(--btn-bd);
  padding: .78rem 1.35rem; border-radius: 999px; text-decoration: none;
  font-weight: 600; font-size: .95rem; letter-spacing: -.005em; cursor: pointer;
  transition: transform .2s var(--ease), background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -14px rgba(14,31,38,.6); }
.btn:active { transform: translateY(0); }
.btn__arrow { transition: transform .25s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(4px); }

.btn--key   { --btn-bg: var(--jade); --btn-fg: #06231F; --btn-bd: var(--jade); }
.btn--key:hover { --btn-bg: #6BE7D2; --btn-bd: #6BE7D2; }
.btn--brass { --btn-bg: var(--brass); --btn-fg: #221503; --btn-bd: var(--brass); }
.btn--brass:hover { --btn-bg: var(--brass-lt); --btn-bd: var(--brass-lt); }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--fg); --btn-bd: var(--rule); }
.btn--ghost:hover { --btn-bd: currentColor; --btn-bg: color-mix(in srgb, var(--fg) 6%, transparent); }
.btn--lg { padding: .95rem 1.7rem; font-size: 1.02rem; }
.btn--block { width: 100%; justify-content: center; }

.textlink {
  display: inline-flex; align-items: center; gap: .45rem; text-decoration: none;
  font-weight: 600; color: var(--accent); font-size: .95rem;
  border-bottom: 1.5px solid color-mix(in srgb, var(--accent) 35%, transparent);
  padding-bottom: 2px; transition: border-color .2s var(--ease), gap .2s var(--ease);
}
.textlink:hover { border-color: currentColor; gap: .7rem; }

/* ---------- header ---------- */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 100; }
/* Inner pages open under the fixed header, so their first section carries the offset. */
.page-head { padding-top: clamp(7.5rem, 11vw, 10rem); }
.nav {
  display: flex; align-items: center; gap: 1.25rem;
  width: min(1200px, 100% - (var(--gutter) * 2)); margin-inline: auto;
  padding-block: 1rem; position: relative;
}
.site-header::before {
  content: ""; position: absolute; inset: 0; background: rgba(248,246,241,.86);
  backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid transparent; opacity: 0; transition: opacity .3s var(--ease), border-color .3s var(--ease);
}
.site-header.is-stuck::before { opacity: 1; border-bottom-color: rgba(14,31,38,.1); }
/* pages that open on a dark hero get a light header until it sticks */
body.hero-dark .site-header:not(.is-stuck) { color: #EAF2F1; }
body.hero-dark .site-header:not(.is-stuck) .btn--ghost { --btn-bd: rgba(255,255,255,.3); }

.nav__brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; flex: none; }
.nav__brand img { width: 40px; height: 40px; }
.nav__brand-txt { display: flex; flex-direction: column; line-height: 1; }
.nav__brand-txt strong {
  font-family: var(--display); font-weight: 600; font-size: 1.16rem; letter-spacing: -.02em;
}
.nav__brand-txt em {
  font-family: var(--mono); font-style: normal; font-size: .6rem;
  letter-spacing: .26em; text-transform: uppercase; color: var(--jade-deep); margin-top: 3px;
}
body.hero-dark .site-header:not(.is-stuck) .nav__brand-txt em { color: var(--jade); }

.nav__links { display: flex; gap: 1.5rem; margin-left: auto; }
.nav__link {
  text-decoration: none; font-weight: 500; font-size: .95rem; position: relative; padding-block: .3rem;
}
.nav__link::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1.5px;
  background: currentColor; transition: right .25s var(--ease);
}
.nav__link:hover::after, .nav__link[aria-current="page"]::after { right: 0; }

.nav__actions { display: flex; align-items: center; gap: .9rem; }
.nav__phone { font-family: var(--mono); font-size: .85rem; text-decoration: none; white-space: nowrap; }
.nav__phone:hover { color: var(--accent); }
.nav__actions .btn { padding: .62rem 1.15rem; font-size: .88rem; }

.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer; padding: .5rem; margin-left: auto;
  flex-direction: column; gap: 5px;
}
.nav-toggle span { display: block; width: 24px; height: 2px; background: currentColor; transition: transform .25s var(--ease), opacity .2s; }
.nav[data-open="true"] .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav[data-open="true"] .nav-toggle span:nth-child(2) { opacity: 0; }
.nav[data-open="true"] .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav__drawer {
  position: fixed; inset: 4.6rem 0 0; background: var(--ink); color: #EAF2F1;
  padding: 2rem var(--gutter) 3rem; display: flex; flex-direction: column; gap: .3rem;
  transform: translateY(-12px); opacity: 0; pointer-events: none;
  transition: opacity .25s var(--ease), transform .25s var(--ease); overflow-y: auto;
}
.nav__drawer[data-open="true"] { opacity: 1; transform: none; pointer-events: auto; }
.nav__drawer a {
  text-decoration: none; font-family: var(--display); font-size: 1.5rem; font-weight: 500;
  padding: .65rem 0; border-bottom: 1px solid rgba(255,255,255,.1);
}
.nav__drawer .btn { font-family: var(--body); font-size: .95rem; border-bottom: 0; margin-top: 1.4rem; align-self: flex-start; }
.nav__drawer .nav__phone { font-size: 1rem; border-bottom: 0; margin-top: .8rem; }

@media (max-width: 1040px) {
  .nav__links { display: none; }
  .nav-toggle { display: flex; }
  .nav__actions { display: none; }
}
@media (max-width: 420px) {
  .nav__brand img { width: 34px; height: 34px; }
  .nav__brand-txt strong { font-size: 1.02rem; }
  .nav__brand-txt em { font-size: .54rem; letter-spacing: .2em; }
}

/* ---------- hero ---------- */
.hero {
  position: relative; background: var(--ink); color: #EAF2F1; overflow: hidden;
  padding-top: clamp(6rem, 12vw, 9rem); padding-bottom: clamp(3.5rem, 7vw, 6rem);
  /* --fg must be set, not just `color`: .btn--ghost reads var(--fg) for its
     text, so a dark block that only sets `color` renders invisible buttons. */
  --fg: #EAF2F1; --muted: #9DB2B6; --rule: rgba(255,255,255,.16); --accent: var(--jade);
}
/* the light over a front door: warm brass fanlight, cool jade spill */
.hero::before {
  content: ""; position: absolute; top: -30%; right: -10%; width: 78vw; height: 78vw;
  max-width: 1000px; max-height: 1000px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(192,138,62,.34), rgba(192,138,62,.10) 42%, transparent 68%);
}
.hero::after {
  content: ""; position: absolute; bottom: -45%; left: -18%; width: 70vw; height: 70vw;
  max-width: 900px; max-height: 900px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(76,219,195,.20), transparent 66%);
}
.hero .wrap { position: relative; z-index: 1; }
.hero__grid { display: grid; gap: clamp(2.5rem, 5vw, 4.5rem); align-items: center; }
@media (min-width: 1000px) { .hero__grid { grid-template-columns: 1.08fr .92fr; } }

.hero__title { margin: 0 0 1.4rem; }
.hero__title em {
  font-style: italic; color: var(--jade);
  /* keep the descender of the italic from clipping */
  padding-right: .06em;
}
.hero__lead { font-size: clamp(1.08rem, 1rem + .5vw, 1.3rem); color: #C4D4D6; max-width: 46ch; margin-bottom: 2rem; }
.hero__trust {
  display: flex; flex-wrap: wrap; gap: .55rem 1.5rem; margin-top: 2.4rem;
  font-family: var(--mono); font-size: .75rem; letter-spacing: .07em; text-transform: uppercase; color: #8FA6AB;
}
.hero__trust span { display: flex; align-items: center; gap: .45rem; }
.hero__trust span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--jade); flex: none; }

/* ---------- three keys readout (signature) ---------- */
.keys3 { display: grid; gap: .9rem; margin: 0; padding: 0; list-style: none; }
@media (min-width: 560px) { .keys3 { grid-template-columns: repeat(3, 1fr); } }
.key3 {
  border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.1rem 1.15rem;
  background: color-mix(in srgb, var(--surface) 70%, transparent); position: relative;
}
.key3__n {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent); display: block; margin-bottom: .55rem;
}
.key3__t { font-family: var(--display); font-size: 1.24rem; font-weight: 500; margin: 0 0 .35rem; }
.key3__d { font-size: .9rem; color: var(--muted); margin: 0; line-height: 1.5; }

/* ---------- hero calculator widget ---------- */
.widget {
  background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius-lg); padding: clamp(1.4rem, 3vw, 2rem);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 40px 80px -40px rgba(0,0,0,.7);
}
.widget__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; }
.widget__title { font-family: var(--display); font-size: 1.4rem; font-weight: 500; margin: 0; }
.widget__note { font-family: var(--mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: #8FA6AB; }
.widget__out {
  margin-top: 1.5rem; padding-top: 1.35rem; border-top: 1px solid rgba(255,255,255,.15);
  display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.widget__fig { font-family: var(--display); font-size: clamp(2.2rem, 1.4rem + 3vw, 3.1rem); font-weight: 500; line-height: 1; letter-spacing: -.03em; color: var(--jade); font-variant-numeric: tabular-nums; }
.widget__cap { font-size: .82rem; color: #93A9AE; margin: .5rem 0 0; max-width: 30ch; }

/* ---------- fields ---------- */
.field { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1rem; }
.field__label { font-family: var(--mono); font-size: .7rem; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); }
.field__input, .field select, .field textarea {
  font: inherit; font-family: var(--body); color: var(--fg);
  background: var(--surface); border: 1.5px solid var(--rule); border-radius: 10px;
  padding: .72rem .9rem; width: 100%; transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field__input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
.field__hint { font-size: .8rem; color: var(--muted); }
.widget .field__input, .widget select {
  background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.2); color: #EAF2F1;
}
.widget .field__input::placeholder { color: #7F969B; }
.widget .field__label { color: #A6BABE; }
.field--money { position: relative; }
.field--money .field__input { padding-left: 2rem; }
/* Anchor the currency mark from the TOP of the field, so a hint line or a
   stretched grid row underneath the input cannot drag it out of the box. */
.field--money::after {
  content: "\00A3"; position: absolute; left: .9rem;
  /* Sit exactly over the input box: label line + gap down, input-height tall,
     glyph centred inside it. A hint line below can no longer move it. */
  top: calc(.7rem * 1.62 + .4rem);
  height: calc(.72rem * 2 + 1.62em + 3px);
  display: grid; align-items: center;
  font-family: var(--mono); font-size: .95rem; line-height: 1;
  color: var(--muted); pointer-events: none;
}
.widget .field--money::after { color: #A6BABE; }

input[type="range"] { width: 100%; accent-color: var(--accent); height: 26px; }

/* ---------- cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--rule-2); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--rule); }
.card__media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card:hover .card__media img { transform: scale(1.045); }
.card__body { padding: 1.4rem 1.4rem 1.6rem; display: flex; flex-direction: column; flex: 1; }
.card__meta { font-family: var(--mono); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 0 0 .6rem; }
.card__title { font-size: 1.32rem; margin: 0 0 .6rem; }
.card__text { color: var(--muted); font-size: .95rem; margin: 0 0 1.2rem; }
.card__link { margin-top: auto; align-self: flex-start; text-decoration: none; font-weight: 600; font-size: .92rem; color: var(--accent); display: inline-flex; gap: .4rem; align-items: center; }
.card__link:hover .btn__arrow { transform: translateX(4px); }
a.card { text-decoration: none; color: inherit; }

/* ---------- key tag (signature route card) ---------- */
/* Four doors, four different products. Shaped like the fob on a key ring:
   punched hole top-left, brass eyelet, the route's real numbers underneath. */
.tags { display: grid; gap: clamp(1rem, 2vw, 1.4rem); }
@media (min-width: 640px) { .tags { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .tags { grid-template-columns: repeat(3, 1fr); } }

.tag-card {
  position: relative; display: flex; flex-direction: column; text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--rule); border-radius: 6px 6px var(--radius) var(--radius);
  padding: 2.9rem 1.35rem 1.5rem; overflow: hidden; isolation: isolate;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.tag-card::before { /* the punched eyelet */
  content: ""; position: absolute; top: 1.15rem; left: 1.35rem;
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--brass);
  transition: border-color .35s var(--ease), transform .35s var(--ease);
}
.tag-card::after { /* the reinforcing strap across the top of the fob */
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--brass) 0%, var(--brass-lt) 45%, transparent 100%);
  opacity: .55; transition: opacity .35s var(--ease);
}
.tag-card:hover { transform: translateY(-5px) rotate(-.5deg); box-shadow: var(--shadow-lg); border-color: var(--brass); }
.tag-card:hover::before { border-color: var(--jade-deep); transform: scale(1.12); }
.tag-card:hover::after { opacity: 1; }
.tag-card__bit { /* the key bitting: how many teeth = how complex the case is */
  position: absolute; top: 1.35rem; right: 1.3rem; display: flex; gap: 3px; align-items: flex-end; height: 15px;
}
.tag-card__bit i { display: block; width: 4px; background: var(--brass); border-radius: 1px; opacity: .5; }
.tag-card__title { font-size: 1.35rem; margin: 0 0 .5rem; }
.tag-card__text { color: var(--muted); font-size: .92rem; margin: 0 0 1.2rem; }
.tag-card__facts { list-style: none; margin: auto 0 1.2rem; padding: 0; display: flex; flex-direction: column; gap: .35rem; border-top: 1px solid var(--rule-2); padding-top: .9rem; }
.tag-card__facts li { display: flex; justify-content: space-between; gap: .8rem; font-size: .82rem; }
.tag-card__facts dt, .tag-card__facts span:first-child { color: var(--muted); }
.tag-card__facts b { font-family: var(--mono); font-weight: 500; font-variant-numeric: tabular-nums; }
.tag-card__go { font-weight: 600; font-size: .9rem; color: var(--accent); display: inline-flex; align-items: center; gap: .4rem; }
.tag-card:hover .btn__arrow { transform: translateX(4px); }

/* ---------- module / index cards ---------- */
.module-card {
  display: flex; flex-direction: column; gap: .55rem; text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--rule-2); border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0; padding: 1.5rem 1.4rem;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-left-color .3s var(--ease);
}
.module-card:hover { transform: translateX(5px); box-shadow: var(--shadow); border-left-color: var(--brass); }
.module-card__num { font-family: var(--mono); font-size: .68rem; letter-spacing: .15em; text-transform: uppercase; color: var(--accent); }
.module-card__title { font-size: 1.24rem; margin: 0; }

/* ---------- split ---------- */
.split { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; } }
.split--wide-media { }
@media (min-width: 900px) { .split--wide-media { grid-template-columns: 1.15fr .85fr; } }
.split__media { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); }
.split__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.split--flip .split__media { order: 2; }
@media (max-width: 899px) { .split--flip .split__media { order: 0; } }

/* ---------- stats ---------- */
.stats { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
@media (min-width: 560px) { .stats { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .stats--4 { grid-template-columns: repeat(4, 1fr); } .stats--3 { grid-template-columns: repeat(3, 1fr); } }
.stat { background: var(--bg); padding: 1.6rem 1.4rem; }
.stat__fig { font-family: var(--display); font-size: clamp(2rem, 1.4rem + 2vw, 2.9rem); font-weight: 500; line-height: 1; letter-spacing: -.03em; color: var(--accent); font-variant-numeric: tabular-nums; }
.stat__lab { display: block; margin-top: .6rem; font-size: .88rem; color: var(--muted); }

/* ---------- prose ---------- */
.prose { max-width: 68ch; }
.prose h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.15rem); margin: 2.6rem 0 1rem; }
.prose h3 { margin: 2rem 0 .75rem; }
.prose h2:first-child, .prose h3:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--muted); }
.prose li { margin-bottom: .45rem; }
.prose ul { list-style: none; padding-left: 0; }
.prose ul li { position: relative; padding-left: 1.5rem; }
.prose ul li::before {
  content: ""; position: absolute; left: 0; top: .62em; width: 7px; height: 7px;
  border-radius: 50%; border: 1.5px solid var(--accent);
}
.prose ol { padding-left: 1.3rem; }
.prose ol li { padding-left: .3rem; }
.prose ol li::marker { font-family: var(--mono); color: var(--accent); font-size: .9em; }
.prose strong { color: var(--fg); }
.prose a { color: var(--accent); text-decoration: none; border-bottom: 1.5px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.prose a:hover { border-color: currentColor; }
.prose blockquote {
  margin: 2rem 0; padding: .3rem 0 .3rem 1.5rem; border-left: 3px solid var(--brass);
  font-family: var(--display); font-size: 1.25rem; font-style: italic; color: var(--fg);
}

/* ---------- callouts ---------- */
.callout {
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 1.4rem 1.5rem; margin: 1.8rem 0; border-left: 3px solid var(--accent);
}
.callout__title { font-family: var(--mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 0 0 .7rem; }
.callout p { color: var(--muted); }
.callout p:last-child { margin-bottom: 0; }
.callout--warn { border-left-color: var(--rust); }
.callout--warn .callout__title { color: var(--rust-ink, var(--rust)); }
.callout--brass { border-left-color: var(--brass); }
.callout--brass .callout__title { color: var(--brass-ink); }

/* ---------- honest sequences ---------- */
/* Numbers here mean something: these really do happen in this order.
   list-style is killed so the badge is the only number on screen. */
.steps { counter-reset: step; list-style: none; padding-left: 0; margin: 0; display: flex; flex-direction: column; gap: 1.6rem; }
.steps > li { position: relative; padding-left: 3.6rem; list-style: none; }
.steps > li::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: 0; width: 2.5rem; height: 2.5rem;
  display: grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--rule); background: var(--surface);
  font-family: var(--mono); font-size: .78rem; font-weight: 500; color: var(--accent);
}
.steps > li::after {
  content: ""; position: absolute; left: 1.25rem; top: 2.9rem; bottom: -1.6rem; width: 1px;
  background: var(--rule);
}
.steps > li:last-child::after { display: none; }
.steps h3 { margin: .35rem 0 .5rem; }
.steps p { color: var(--muted); margin-bottom: 0; }
.prose ol.steps { padding-left: 0; }
.prose ol.steps > li { list-style: none; padding-left: 3.6rem; }
.prose ol.steps > li::marker { content: none; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1.8rem 0; border: 1px solid var(--rule); border-radius: var(--radius); }
table.data { width: 100%; border-collapse: collapse; font-size: .93rem; min-width: 540px; background: var(--surface); }
table.data caption { text-align: left; padding: 1rem 1.1rem; font-family: var(--mono); font-size: .7rem; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--rule); }
table.data th, table.data td { padding: .85rem 1.1rem; text-align: left; border-bottom: 1px solid var(--rule-2); vertical-align: top; }
table.data thead th { font-family: var(--mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 500; background: var(--surface-2); border-bottom-color: var(--rule); }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data td.num, table.data th.num { font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data tbody th { font-weight: 600; color: var(--fg); }
table.data .yes { color: var(--jade-deep); font-weight: 600; }
table.data .no { color: var(--rust-ink, var(--rust)); font-weight: 600; }
.section--ink table.data .yes, .section--deep table.data .yes { color: var(--jade); }
.section--ink table.data .no, .section--deep table.data .no { color: var(--rust-lt); }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  cursor: pointer; list-style: none; padding: 1.25rem 2.5rem 1.25rem 0; position: relative;
  font-family: var(--display); font-size: clamp(1.1rem, 1rem + .4vw, 1.3rem); font-weight: 500;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: .35rem; top: 1.7rem; width: 13px; height: 13px;
  border-right: 1.8px solid var(--accent); border-bottom: 1.8px solid var(--accent);
  transform: rotate(45deg); transition: transform .28s var(--ease); transform-origin: 70% 70%;
}
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq summary:hover { color: var(--accent); }
.faq__a { padding: 0 2.5rem 1.5rem 0; color: var(--muted); }
.faq__a p:last-child { margin-bottom: 0; }

/* ---------- testimonials ---------- */
.quote {
  background: var(--surface); border: 1px solid var(--rule-2); border-radius: var(--radius);
  padding: 1.7rem 1.6rem; display: flex; flex-direction: column; gap: 1rem; box-shadow: var(--shadow);
}
.quote__mark { font-family: var(--display); font-size: 2.6rem; line-height: .6; color: var(--brass); }
.quote__text { font-family: var(--display); font-size: 1.15rem; line-height: 1.45; margin: 0; }
.quote__who { font-family: var(--mono); font-size: .72rem; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); margin: auto 0 0; }

/* ---------- lender strip ---------- */
.lenders { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 1.5rem 2rem; align-items: center; }
.lenders img {
  max-height: 40px; width: auto; margin-inline: auto; opacity: .62;
  filter: grayscale(1) contrast(.85); transition: opacity .3s var(--ease), filter .3s var(--ease);
}
.lenders img:hover { opacity: 1; filter: none; }
.section--ink .lenders img, .section--deep .lenders img { filter: grayscale(1) brightness(2.4) contrast(.7); opacity: .55; }
.section--ink .lenders img:hover, .section--deep .lenders img:hover { opacity: .95; }

/* ---------- pills ---------- */
.pill {
  display: inline-flex; align-items: center; gap: .4rem; padding: .38rem .85rem;
  border: 1px solid var(--rule); border-radius: 999px; font-size: .82rem; color: var(--muted);
  background: color-mix(in srgb, var(--surface) 60%, transparent);
}
.pill--accent { border-color: color-mix(in srgb, var(--accent) 45%, transparent); color: var(--accent); }
/* In a vertical stack a pill should hug its text, not stretch into a row. */
.stack > .pill { align-self: flex-start; }

/* ---------- CTA band ---------- */
.cta-band {
  position: relative; overflow: hidden; border-radius: var(--radius-lg);
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.5rem, 4vw, 3.5rem); text-align: center;
  background: var(--ink); color: #EAF2F1; isolation: isolate;
  --fg: #EAF2F1; --muted: #A2B7BB; --accent: var(--jade); --rule: rgba(255,255,255,.18);
}
.cta-band__bg { position: absolute; inset: 0; z-index: -1; opacity: .2; }
.cta-band__bg img { width: 100%; height: 100%; object-fit: cover; }
.cta-band::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at 70% 0%, rgba(192,138,62,.35), transparent 62%);
}
.cta-band h2 { max-width: 22ch; margin-inline: auto; }

/* ---------- calculators ---------- */
.calc {
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-lg);
  padding: clamp(1.4rem, 3vw, 2.2rem); box-shadow: var(--shadow); scroll-margin-top: 6rem;
}
.calc__head { margin-bottom: 1.6rem; }
.calc__title { font-size: clamp(1.4rem, 1.2rem + .9vw, 1.9rem); margin: 0 0 .5rem; }
.calc__intro { color: var(--muted); font-size: .95rem; margin: 0; max-width: 60ch; }
.calc__grid { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); }
@media (min-width: 820px) { .calc__grid { grid-template-columns: 1fr 1fr; align-items: start; } }
.calc__inputs { display: grid; gap: 0; }
@media (min-width: 480px) { .calc__inputs--2 { grid-template-columns: 1fr 1fr; gap: 0 1rem; } }
.calc__result {
  background: var(--ink); color: #EAF2F1; border-radius: var(--radius); padding: 1.5rem 1.5rem 1.6rem;
  --fg: #EAF2F1; --muted: #9DB2B6; --rule: rgba(255,255,255,.16);
}
.calc__result-lab { font-family: var(--mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: #93A9AE; margin: 0 0 .5rem; }
.calc__fig { font-family: var(--display); font-size: clamp(2.1rem, 1.4rem + 2.6vw, 3rem); font-weight: 500; line-height: 1; letter-spacing: -.03em; color: var(--jade); font-variant-numeric: tabular-nums; }
.calc__fig--sm { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 1.95rem); }
.calc__rows { list-style: none; margin: 1.35rem 0 0; padding: 1.25rem 0 0; border-top: 1px solid rgba(255,255,255,.16); display: flex; flex-direction: column; gap: .65rem; }
.calc__rows li { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; font-size: .9rem; }
.calc__rows span { color: #9DB2B6; }
.calc__rows b { font-family: var(--mono); font-weight: 500; font-variant-numeric: tabular-nums; color: #EAF2F1; }
.calc__rows li.is-key b { color: var(--jade); }
.calc__note { font-size: .8rem; color: var(--muted); margin: 1.2rem 0 0; }
.calc__foot { margin-top: 1.6rem; padding-top: 1.4rem; border-top: 1px solid var(--rule); display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; }
.seg { display: flex; flex-wrap: wrap; gap: .4rem; }
.seg button {
  border: 1.5px solid var(--rule); background: transparent; color: var(--muted);
  padding: .45rem .85rem; border-radius: 999px; font-size: .82rem; cursor: pointer;
  transition: all .2s var(--ease);
}
.seg button:hover { border-color: var(--accent); color: var(--accent); }
.seg button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.section--ink .seg button[aria-pressed="true"], .calc__result .seg button[aria-pressed="true"] { background: var(--jade); border-color: var(--jade); color: #06231F; }

/* LTV / affordability meter */
.meter { margin-top: 1.2rem; }
.meter__bar { height: 8px; border-radius: 999px; background: rgba(255,255,255,.16); overflow: hidden; }
.meter__fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--jade), var(--brass-lt)); transition: width .45s var(--ease); }
.meter__scale { display: flex; justify-content: space-between; font-family: var(--mono); font-size: .66rem; color: #8FA6AB; margin-top: .5rem; letter-spacing: .08em; }

/* ---------- forms ---------- */
.form { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-lg); padding: clamp(1.4rem, 3vw, 2.2rem); box-shadow: var(--shadow); }
.form__row { display: grid; gap: 0 1rem; }
@media (min-width: 560px) { .form__row { grid-template-columns: 1fr 1fr; } }
.form__consent { display: flex; gap: .7rem; align-items: flex-start; font-size: .85rem; color: var(--muted); margin: .4rem 0 1.3rem; }
.form__consent input { margin-top: .25rem; flex: none; width: 18px; height: 18px; accent-color: var(--jade-deep); }
.form__status { margin-top: 1rem; font-size: .92rem; min-height: 1.4em; }
.form__status[data-state="ok"] { color: var(--jade-deep); font-weight: 600; }
.form__status[data-state="err"] { color: var(--rust); font-weight: 600; }
.section--ink .form__status[data-state="ok"] { color: var(--jade); }

/* ---------- table of contents ---------- */
.toc { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.3rem 1.5rem; margin-bottom: 2.5rem; }
.toc h2 { font-family: var(--mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 .8rem; font-weight: 500; }
.toc ol { margin: 0; padding-left: 1.1rem; display: flex; flex-direction: column; gap: .4rem; }
.toc li { color: var(--muted); }
.toc li::marker { font-family: var(--mono); font-size: .82em; color: var(--accent); }
.toc a { color: var(--fg); text-decoration: none; border-bottom: 1px solid transparent; }
.toc a:hover { border-bottom-color: var(--accent); color: var(--accent); }

/* ---------- article header ---------- */
.artmeta { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; font-family: var(--mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: 1.6rem; }

/* ---------- footer ---------- */
.site-foot { background: var(--ink); color: #C7D6D8; padding-block: clamp(3rem, 6vw, 5rem) 2rem; font-size: .93rem; }
.foot__top { display: grid; gap: 2.5rem; }
@media (min-width: 780px) { .foot__top { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.foot__brand img { width: 56px; height: 56px; margin-bottom: 1rem; }
.foot__tag { font-family: var(--display); font-size: 1.25rem; color: #EAF2F1; margin: 0 0 .7rem; font-style: italic; }
.foot__blurb { color: #93A9AE; max-width: 38ch; font-size: .9rem; }
.foot__contact { display: flex; flex-direction: column; gap: .35rem; margin: 1.2rem 0; font-family: var(--mono); font-size: .85rem; }
.foot__contact a { color: var(--jade); text-decoration: none; }
.foot__contact a:hover { text-decoration: underline; }
.foot__addr { font-style: normal; color: #8299A0; font-size: .85rem; line-height: 1.6; }
.foot__h { font-family: var(--mono); font-size: .7rem; letter-spacing: .15em; text-transform: uppercase; color: #EAF2F1; margin: 0 0 1rem; font-weight: 500; }
.foot__col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .55rem; }
.foot__col a { color: #A6BABE; text-decoration: none; font-size: .89rem; }
.foot__col a:hover { color: var(--jade); }
.foot__legal { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid rgba(255,255,255,.13); }
.foot__legal p { color: #8299A0; font-size: .78rem; line-height: 1.65; max-width: 92ch; margin-bottom: .8rem; }
.foot__legal p strong { color: #C7D6D8; }
.foot__base { margin-top: 2rem; padding-top: 1.4rem; border-top: 1px solid rgba(255,255,255,.13); display: flex; flex-wrap: wrap; gap: .8rem 1.5rem; justify-content: space-between; font-size: .8rem; color: #7A9198; }
.foot__base p { margin: 0; }
.foot__base-links { display: flex; gap: 1.3rem; }
.foot__base-links a { color: #7A9198; text-decoration: none; }
.foot__base-links a:hover { color: var(--jade); }

/* ---------- reveal (gated on .js so no-JS and crawlers always see content) ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .reveal[data-delay="1"] { transition-delay: .09s; }
.js .reveal[data-delay="2"] { transition-delay: .18s; }
.js .reveal[data-delay="3"] { transition-delay: .27s; }
.js .reveal[data-delay="4"] { transition-delay: .36s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- print ---------- */
@media print {
  .site-header, .nav__drawer, .cta-band, .site-foot .foot__top { display: none; }
  body { background: #fff; color: #000; }
}

/* =====================================================================
   v2 - "Threshold" turned up.
   Everything below is additive: a film-grain ground, a drawn-on
   architectural hero, scroll-driven mask reveals, the readiness wizard,
   the glossary, and a docked call-to-action rail on small screens.
   ===================================================================== */

/* ---------- editorial type, one step bolder ---------- */
h1 { font-size: clamp(2.7rem, 1.4rem + 5.2vw, 5.4rem); letter-spacing: -.035em; line-height: .99; }
h2 { font-size: clamp(2.05rem, 1.3rem + 3.1vw, 3.5rem); letter-spacing: -.028em; line-height: 1.02; }
.sec-head__title, .hero__title { text-wrap: balance; }
.display-xl {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(3.2rem, 1.5rem + 7vw, 7rem); line-height: .92; letter-spacing: -.045em;
}

/* ---------- film grain over the whole page ---------- */
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .5; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.42'/%3E%3C/svg%3E");
}
@media (prefers-reduced-motion: reduce) { .grain { opacity: .3; } }

/* ---------- hero v2: the drawn doorway ---------- */
.hero { padding-bottom: clamp(4rem, 8vw, 7rem); }
.hero__stage { position: relative; }
.hero__art {
  position: absolute; right: -4%; top: 50%; transform: translateY(-50%);
  width: min(46%, 560px); pointer-events: none; z-index: 0;
  filter: drop-shadow(0 40px 90px rgba(0,0,0,.55));
  -webkit-mask-image: radial-gradient(ellipse 78% 82% at 52% 46%, #000 58%, transparent 96%);
          mask-image: radial-gradient(ellipse 78% 82% at 52% 46%, #000 58%, transparent 96%);
}
.hero__art svg { width: 100%; height: auto; }
.hero__grid { position: relative; z-index: 1; }
@media (max-width: 1099px) {
  .hero__art { position: static; transform: none; width: min(80%, 380px); margin: 2.5rem auto 0; opacity: .9; }
}

/* the line work draws itself on once, then rests */
.js .doorart .ln { stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: draw 1.5s var(--ease) forwards; }
.js .doorart .ln.s1 { animation-delay: .15s; }
.js .doorart .ln.s2 { animation-delay: .45s; }
.js .doorart .ln.s3 { animation-delay: .75s; }
.js .doorart .a-glow, .js .doorart .a-fan { opacity: 0; animation: fadein 1.6s var(--ease) .9s forwards; }
.js .doorart .a-key { opacity: 0; animation: keylight 1.2s var(--ease) 1.5s forwards; }
.js .doorart .a-ray { opacity: 0; animation: fadein 2.4s var(--ease) calc(1.5s + var(--i) * .12s) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadein { to { opacity: 1; } }
@keyframes keylight { 0% { opacity: 0; transform: scale(.7); } 60% { opacity: 1; transform: scale(1.14); } 100% { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .js .doorart .ln { stroke-dashoffset: 0; animation: none; }
  .js .doorart .a-glow, .js .doorart .a-fan, .js .doorart .a-key, .js .doorart .a-ray { opacity: 1; animation: none; }
}

/* headline lands line by line */
.js .hero__title .line { display: block; overflow: hidden; }
.js .hero__title .line > span {
  display: block; transform: translateY(105%);
  animation: rise .95s cubic-bezier(.19,1,.22,1) forwards;
}
.js .hero__title .line:nth-child(1) > span { animation-delay: .06s; }
.js .hero__title .line:nth-child(2) > span { animation-delay: .16s; }
.js .hero__title .line:nth-child(3) > span { animation-delay: .26s; }
@keyframes rise { to { transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .js .hero__title .line > span { transform: none; animation: none; } }

/* ---------- reveal, upgraded to a wipe ---------- */
.js .reveal--wipe { opacity: 1; transform: none; clip-path: inset(0 100% 0 0); transition: clip-path 1s var(--ease); }
.js .reveal--wipe.is-in { clip-path: inset(0 0 0 0); }
.js .reveal--rise { opacity: 0; transform: translateY(34px) scale(.985); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal--rise.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal--wipe { clip-path: none; }
  .js .reveal--rise { opacity: 1; transform: none; }
}

/* ---------- parallax media ---------- */
.par { overflow: hidden; }
.par img { will-change: transform; transition: transform .1s linear; }

/* ---------- lender marquee ---------- */
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee__track { display: flex; gap: 3.5rem; width: max-content; animation: slide 42s linear infinite; align-items: center; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee img { max-height: 30px; width: auto; opacity: .78; flex: none; transition: opacity .3s var(--ease), transform .3s var(--ease); }
.marquee img:hover { opacity: 1; transform: scale(1.06); }
.section--ink .marquee img, .section--deep .marquee img, .hero .marquee img {
  filter: grayscale(1) brightness(2.3) contrast(.7); opacity: .5;
}
@keyframes slide { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee__track { animation: none; flex-wrap: wrap; width: 100%; justify-content: center; } }

/* ---------- number band ---------- */
.figband { display: grid; gap: 1px; background: var(--rule); border-block: 1px solid var(--rule); }
@media (min-width: 700px) { .figband { grid-template-columns: repeat(4, 1fr); } }
.figband__cell { background: var(--bg); padding: clamp(1.5rem, 3vw, 2.4rem) 1.4rem; }
.figband__n {
  font-family: var(--display); font-weight: 500; letter-spacing: -.04em; line-height: 1;
  font-size: clamp(2.4rem, 1.6rem + 3vw, 3.9rem); color: var(--accent); font-variant-numeric: tabular-nums;
  display: block;
}
.figband__l { display: block; margin-top: .7rem; font-size: .88rem; color: var(--muted); max-width: 22ch; }

/* ---------- route cards, art edition ---------- */
.tag-card__art {
  margin: -2.9rem -1.35rem 1.2rem; aspect-ratio: 16 / 10; overflow: hidden;
  background: #0B1D24; border-bottom: 1px solid var(--rule);
}
.tag-card__art img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease), opacity .5s var(--ease); }
.tag-card:hover .tag-card__art img { transform: scale(1.06); }
/* With a photograph in the card the eyelet reads as a punched hole in the
   image itself, so both markers sit over the art rather than under the copy. */
.tag-card--art { padding-top: 0; overflow: hidden; }
.tag-card--art::before { top: 1.15rem; left: 1.35rem; background: rgba(11,29,36,.55); border-color: var(--brass-lt); z-index: 2; }
.tag-card--art::after { z-index: 3; }
.tag-card--art .tag-card__bit { top: 1.35rem; right: 1.3rem; bottom: auto; left: auto; z-index: 2; }
.tag-card--art .tag-card__bit i { background: var(--brass-lt); opacity: .85; }
.tag-card__art { position: relative; }
.tag-card__art::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,29,36,.34) 0%, rgba(11,29,36,0) 40%, rgba(11,29,36,.18) 100%);
}

/* ---------- section rail (long reads) ---------- */
.rail { position: fixed; left: 1.4rem; top: 50%; transform: translateY(-50%); z-index: 40; display: none; }
@media (min-width: 1320px) { .rail { display: block; } }
.rail ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .85rem; }
.rail a {
  display: flex; align-items: center; gap: .6rem; text-decoration: none; font-size: .74rem;
  font-family: var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); opacity: .55;
  transition: opacity .25s var(--ease), color .25s var(--ease);
}
.rail a::before { content: ""; width: 16px; height: 1.5px; background: currentColor; transition: width .25s var(--ease); }
.rail a:hover, .rail a[aria-current="true"] { opacity: 1; color: var(--accent); }
.rail a[aria-current="true"]::before { width: 30px; }

/* ---------- docked CTA rail (small screens) ---------- */
.dockbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; display: none;
  gap: .6rem; padding: .6rem .8rem calc(.6rem + env(safe-area-inset-bottom));
  background: rgba(11, 24, 30, .93); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid rgba(255,255,255,.12);
  transform: translateY(110%); transition: transform .35s var(--ease);
}
.dockbar[data-show="true"] { transform: none; }
@media (max-width: 900px) { .dockbar { display: flex; } body { padding-bottom: 0; } }
.dockbar__call, .dockbar__cta {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  border-radius: 999px; text-decoration: none; font-weight: 600; font-size: .92rem; padding: .78rem 1rem;
}
.dockbar__call { color: #EAF2F1; border: 1.5px solid rgba(255,255,255,.25); flex: 0 0 auto; }
.dockbar__cta { background: var(--jade); color: #06231F; flex: 1; }

/* ---------- the readiness wizard ---------- */
.wiz {
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); overflow: hidden; position: relative;
}
.wiz__bar { height: 4px; background: var(--rule-2); }
.wiz__bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--jade), var(--brass)); transition: width .5s var(--ease); }
.wiz__inner { padding: clamp(1.5rem, 4vw, 3rem); }
.wiz__step { display: none; }
.wiz__step[data-active="true"] { display: block; animation: wizin .45s var(--ease); }
@keyframes wizin { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .wiz__step[data-active="true"] { animation: none; } }
.wiz__count { font-family: var(--mono); font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.wiz__q { font-family: var(--display); font-size: clamp(1.5rem, 1.1rem + 1.7vw, 2.3rem); font-weight: 500; margin: .7rem 0 .5rem; letter-spacing: -.025em; }
.wiz__help { color: var(--muted); font-size: .95rem; max-width: 52ch; margin-bottom: 1.6rem; }
.opts { display: grid; gap: .7rem; }
@media (min-width: 640px) { .opts--2 { grid-template-columns: 1fr 1fr; } }
.opt {
  display: flex; align-items: flex-start; gap: .85rem; text-align: left; width: 100%;
  background: transparent; border: 1.5px solid var(--rule); border-radius: 12px;
  padding: 1rem 1.1rem; cursor: pointer; transition: all .22s var(--ease);
}
.opt:hover { border-color: var(--accent); transform: translateX(3px); }
.opt[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.opt__key {
  flex: none; width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center;
  border: 1.5px solid var(--rule); font-family: var(--mono); font-size: .72rem; color: var(--muted);
}
.opt[aria-pressed="true"] .opt__key { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.opt__t { font-weight: 600; display: block; }
.opt__d { display: block; color: var(--muted); font-size: .87rem; margin-top: .15rem; }
.wiz__nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.8rem; padding-top: 1.4rem; border-top: 1px solid var(--rule-2); }
.wiz__back { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: .92rem; padding: .5rem 0; }
.wiz__back:hover { color: var(--fg); }
.wiz__back[hidden] { visibility: hidden; }

/* the three-key verdict readout */
.verdict { display: grid; gap: 1rem; margin: 1.6rem 0; }
@media (min-width: 640px) { .verdict { grid-template-columns: repeat(3, 1fr); } }
.vkey { border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.2rem; position: relative; overflow: hidden; }
.vkey__n { font-family: var(--mono); font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.vkey__t { font-family: var(--display); font-size: 1.3rem; margin: .35rem 0 .6rem; }
.vkey__d { font-size: .88rem; color: var(--muted); margin: 0; }
.vkey__dial { height: 6px; border-radius: 999px; background: var(--rule-2); margin-bottom: .9rem; overflow: hidden; }
.vkey__dial i { display: block; height: 100%; width: 0; border-radius: 999px; transition: width .9s var(--ease); }
.vkey[data-grade="good"] .vkey__dial i { background: var(--jade); }
.vkey[data-grade="ok"]   .vkey__dial i { background: var(--brass); }
.vkey[data-grade="poor"] .vkey__dial i { background: #E88C6A; }
.vkey[data-grade="good"] { border-color: color-mix(in srgb, var(--jade) 45%, transparent); }

.score { display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.score__n { font-family: var(--display); font-size: clamp(3rem, 2rem + 4vw, 5rem); line-height: 1; letter-spacing: -.04em; color: var(--accent); font-variant-numeric: tabular-nums; }
.score__l { font-family: var(--mono); font-size: .72rem; letter-spacing: .15em; text-transform: uppercase; color: var(--muted); }

/* ---------- glossary ---------- */
.az { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: 2.5rem; }
.az a {
  display: grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 8px;
  border: 1px solid var(--rule); text-decoration: none; font-family: var(--mono); font-size: .82rem;
  color: var(--muted); transition: all .2s var(--ease);
}
.az a:hover { border-color: var(--accent); color: var(--accent); }
.az a[data-empty="true"] { opacity: .28; pointer-events: none; }
.gloss-group { margin-bottom: 2.5rem; scroll-margin-top: 7rem; }
.gloss-group__l { font-family: var(--display); font-size: 2.4rem; color: var(--accent); margin: 0 0 1rem; line-height: 1; }
.gloss { display: grid; gap: 0; border-top: 1px solid var(--rule); }
.gloss__row { padding: 1.1rem 0; border-bottom: 1px solid var(--rule-2); display: grid; gap: .3rem; }
@media (min-width: 780px) { .gloss__row { grid-template-columns: 15rem 1fr; gap: 1.5rem; } }
.gloss__t { font-weight: 600; }
.gloss__d { color: var(--muted); font-size: .95rem; margin: 0; }

/* ---------- magnetic / spotlight buttons ---------- */
.btn--key, .btn--brass { position: relative; overflow: hidden; }
.btn--key::after, .btn--brass::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(circle 70px at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,.45), transparent 70%);
  transition: opacity .3s var(--ease);
}
.btn--key:hover::after, .btn--brass:hover::after { opacity: 1; }

/* ---------- misc v2 ---------- */
.eyebrow-big {
  font-family: var(--mono); font-size: .78rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--accent); display: block; margin-bottom: 1.2rem;
}
.bleed-quote {
  font-family: var(--display); font-size: clamp(1.7rem, 1.1rem + 2.6vw, 3rem); line-height: 1.14;
  letter-spacing: -.025em; max-width: 24ch;
}
.hairline { height: 1px; background: var(--rule); border: 0; margin: 0; }
.card, .tag-card, .module-card, .quote, .calc, .form, .wiz { position: relative; z-index: 1; }

/* ---------- readiness result bits ---------- */
.field__input.is-bad { border-color: var(--rust-ink, #9A4A2B); box-shadow: 0 0 0 3px rgba(154,74,43,.18); }
#rz-actions { margin-top: 1rem; }
#rz-actions h3 { font-size: 1.15rem; margin: .1rem 0 .4rem; }
#rz-actions p { font-size: .93rem; }
.wiz .calc__rows li { border: 0; }
.wiz .calc__rows span { color: var(--muted); }
.wiz .calc__rows b { color: var(--fg); }
.wiz .calc__rows li.is-key b { color: var(--accent); font-size: 1.15rem; }
.section--deep .wiz { --surface: #12303A; }

/* ---------- the floating borrowing widget ---------- */
.widget--float {
  margin-top: clamp(-7rem, -6vw, -3rem); position: relative; z-index: 3;
  background: var(--ink); border-color: rgba(255,255,255,.14);
  --fg: #EAF2F1; --muted: #9DB2B6; --accent: var(--jade);
}
.widget__grid { display: grid; gap: 0 1.4rem; align-items: end; }
@media (min-width: 820px) { .widget__grid { grid-template-columns: 1fr 1fr 1.25fr; } }
.widget__fig-wrap { padding-bottom: 1rem; }
@media (min-width: 820px) {
  .widget__fig-wrap { border-left: 1px solid rgba(255,255,255,.15); padding-left: 1.6rem; padding-bottom: .2rem; }
}
.widget--float .widget__head { border-bottom: 1px solid rgba(255,255,255,.13); padding-bottom: 1.1rem; }
.widget--float .widget__fig { font-size: clamp(2.1rem, 1.4rem + 2.4vw, 2.9rem); }

/* ---------- hero copy column ---------- */
.hero__copy { max-width: 34rem; }
@media (min-width: 1100px) { .hero__copy { max-width: min(54%, 40rem); } }
.hero__copy .hero__lead { max-width: 44ch; margin-top: 1.6rem; }
.hero__copy .cluster { margin-top: 2.2rem; }
/* .widget--float sits on the ink even inside a light section, so it has to
   set `color` too - the --fg token alone does not paint the text. */
.widget--float { color: #EAF2F1; }
.widget--float .widget__title { color: #EAF2F1; }

/* ---------- give the doorway room so its steps are not clipped ---------- */
@media (min-width: 1100px) {
  /* only the hero that carries the doorway needs the extra height */
  .hero--art { min-height: 86vh; display: grid; align-items: stretch; }
  /* the stage must fill the hero, otherwise the centred artwork is measured
     against the copy block and its steps get clipped off the bottom */
  .hero--art > .hero__stage { width: 100%; display: grid; align-items: center; }
  .hero__art { width: min(41%, 500px); }
}
