/* AND Mortgages — luxury three.js edition.
   Deep charcoal + champagne gold; Fraunces display serif; Red Hat body.
   WebGL liquid-gold hero + a gold 3D accent in the experience band. */

@font-face {
  font-family: 'Fraunces';
  src: url('/assets/fonts/fraunces-latin.woff2') format('woff2');
  font-weight: 300 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Red Hat Text';
  src: url('/assets/fonts/red-hat-text-latin.woff2') format('woff2');
  font-weight: 400 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Red Hat Display';
  src: url('/assets/fonts/red-hat-display-latin.woff2') format('woff2');
  font-weight: 400 600; font-style: normal; font-display: swap;
}

:root {
  --bg: #0c0e0b;
  --bg-2: #121510;
  --panel: #151812;
  --ink: #f2ede2;
  --muted: #a49e8f;
  --faint: #6f6a5d;
  --gold: #d4af6a;
  --gold-2: #b8934f;
  --gold-soft: rgba(212, 175, 106, 0.16);
  --hairline: rgba(212, 175, 106, 0.20);
  --hairline-soft: rgba(242, 237, 226, 0.08);
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Red Hat Text', 'Red Hat Display', Arial, sans-serif;
  --disp: 'Red Hat Display', 'Red Hat Text', Arial, sans-serif;
  --wrap: 1200px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
::selection { background: var(--gold); color: #14120c; }
img, canvas { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 340; letter-spacing: -0.015em; line-height: 1.06; margin: 0; }
em { font-style: italic; color: var(--gold); }
.wrap { width: min(var(--wrap), 100% - 2 * clamp(20px, 5vw, 64px)); margin-inline: auto; }
main, section[id] { scroll-margin-top: 84px; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--gold); color: #14120c; padding: 12px 18px; border-radius: 8px;
  font-weight: 600; text-decoration: none; transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 16px; }

/* eyebrow */
.eyebrow {
  font: 500 12px/1.5 var(--disp); letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--gold); display: flex; align-items: center; gap: 14px; margin: 0 0 22px;
}
.eyebrow::before { content: ""; width: 34px; height: 1px; background: var(--gold); opacity: 0.7; flex: none; }

/* header */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), backdrop-filter 0.4s;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(12, 14, 11, 0.72); backdrop-filter: blur(14px);
  border-bottom-color: var(--hairline-soft);
}
.site-header__bar { display: flex; align-items: center; gap: 28px; padding-block: 18px; }
.brand { display: inline-flex; align-items: baseline; gap: 10px; text-decoration: none; }
.brand__mark { font: 600 22px/1 var(--disp); letter-spacing: 0.02em; color: var(--ink); }
.brand__sub { font: 500 11px/1 var(--disp); letter-spacing: 0.34em; text-transform: uppercase; color: var(--gold); }
.site-nav { flex: 1; }
.site-nav__list { display: flex; justify-content: flex-end; gap: 30px; list-style: none; margin: 0; padding: 0; }
.site-nav__link {
  font: 500 14px/1 var(--sans); color: var(--muted); text-decoration: none;
  padding-block: 12px; letter-spacing: 0.02em; transition: color 0.25s;
}
.site-nav__link:hover { color: var(--gold); }
.site-header__phone {
  font: 500 13px/1 var(--sans); color: var(--gold); text-decoration: none;
  border: 1px solid var(--hairline); border-radius: 999px; padding: 11px 18px;
  transition: border-color 0.25s, background 0.25s; white-space: nowrap;
}
.site-header__phone:hover { border-color: var(--gold); background: var(--gold-soft); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: 500 15px/1 var(--sans); letter-spacing: 0.02em; text-decoration: none;
  padding: 16px 30px; border-radius: 999px; border: 1px solid transparent;
  transition: transform 0.3s var(--ease), background 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.3s;
  cursor: pointer;
}
.btn--gold { background: linear-gradient(135deg, #e6c887, var(--gold) 45%, var(--gold-2)); color: #171308; box-shadow: 0 8px 30px rgba(212,175,106,0.22); }
.btn--gold:hover { transform: translateY(-2px); box-shadow: 0 14px 40px rgba(212,175,106,0.32); }
.btn--ghost { border-color: var(--hairline); color: var(--ink); background: transparent; }
.btn--ghost:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-2px); }
.btn-row { display: flex; flex-wrap: wrap; gap: 16px; }

/* hero */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; overflow: hidden; isolation: isolate; }
.hero__gl { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.hero__scrim {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(120% 90% at 78% 42%, transparent 30%, rgba(12,14,11,0.55) 78%),
    linear-gradient(90deg, rgba(12,14,11,0.82) 0%, rgba(12,14,11,0.45) 42%, rgba(12,14,11,0.12) 72%, rgba(12,14,11,0.35) 100%),
    linear-gradient(0deg, rgba(12,14,11,0.85) 0%, transparent 30%);
}
.hero__inner { position: relative; padding-block: clamp(120px, 18vh, 200px) clamp(80px, 12vh, 140px); max-width: var(--wrap); }
.hero__title {
  font-size: clamp(52px, 8.4vw, 118px); font-weight: 320; line-height: 0.98;
  letter-spacing: -0.02em; margin: 0 0 28px; max-width: 12ch;
}
.hero__title em { font-weight: 340; }
.hero__lead { max-width: 46ch; color: var(--muted); font-size: clamp(16px, 1.4vw, 19px); margin: 0 0 36px; }
.hero__direct { margin: 26px 0 0; }
.hero__direct a {
  font: 500 16px/1 var(--sans); color: var(--gold); text-decoration: none;
  border-bottom: 1px solid var(--hairline); padding-bottom: 5px; transition: border-color 0.25s;
}
.hero__direct a:hover { border-color: var(--gold); }
.hero__qualifier { max-width: 52ch; color: var(--faint); font-size: 13px; margin: 22px 0 0; }
.hero__cue {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font: 500 10px/1 var(--disp); letter-spacing: 0.3em; text-transform: uppercase; color: var(--faint);
}
.hero__cue span { width: 1px; height: 44px; background: linear-gradient(var(--gold), transparent); animation: cue 2.4s var(--ease) infinite; }
@keyframes cue { 0% { transform: scaleY(0); transform-origin: top; } 45% { transform: scaleY(1); transform-origin: top; } 55% { transform: scaleY(1); transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* sections */
.section { position: relative; padding-block: clamp(88px, 13vh, 150px); }
.section-head { margin-bottom: clamp(40px, 6vh, 64px); }
.section-head h2 { font-size: clamp(34px, 4.6vw, 60px); max-width: 20ch; }
.section-lede { color: var(--muted); max-width: 62ch; margin: 22px 0 0; font-size: 17px; }

/* services tiles */
.services__track {
  display: flex; gap: clamp(18px, 2.4vw, 30px); overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 8px max(clamp(20px, 5vw, 64px), calc((100% - var(--wrap)) / 2)) 30px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin; scrollbar-color: var(--gold-2) transparent;
}
.services__track:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.tile {
  flex: 0 0 clamp(300px, 40vw, 480px); scroll-snap-align: start;
  display: flex; flex-direction: column; min-height: 440px;
  background: linear-gradient(160deg, var(--panel), var(--bg-2));
  border: 1px solid var(--hairline-soft); border-radius: 20px;
  padding: clamp(28px, 3vw, 42px); position: relative; overflow: hidden;
  transition: transform 0.5s var(--ease), border-color 0.5s, box-shadow 0.5s;
}
.tile::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: 0.5;
}
.tile:hover { transform: translateY(-6px); border-color: var(--hairline); box-shadow: 0 30px 60px rgba(0,0,0,0.45), 0 0 0 1px var(--gold-soft); }
.tile__num { font: 500 12px/1 var(--disp); letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); margin: 0 0 22px; }
.tile__title { font-size: clamp(24px, 2.4vw, 32px); font-weight: 360; margin: 0 0 20px; }
.tile__body { color: var(--muted); margin: 0; font-size: 15.5px; line-height: 1.62; }
.tile__note { color: var(--faint); font-size: 12.5px; margin: 18px 0 0; }
.tile__cta {
  margin-top: auto; align-self: flex-start; padding-top: 26px;
  font: 500 14px/1 var(--sans); color: var(--gold); text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
}
.tile__cta::after { content: "→"; transition: transform 0.3s var(--ease); }
.tile__cta:hover::after { transform: translateX(5px); }

/* experience */
.experience { overflow: hidden; isolation: isolate; border-block: 1px solid var(--hairline-soft); background: radial-gradient(90% 120% at 50% 0%, #14170f 0%, var(--bg) 70%); }
.experience__gl { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: 0.9; }
.experience__inner { position: relative; }
.experience__statement { font-size: clamp(30px, 4.4vw, 56px); font-weight: 330; line-height: 1.18; letter-spacing: -0.01em; max-width: 640px; }
.experience__support { color: var(--muted); max-width: 560px; margin: 30px 0 0; }

/* scenarios */
.scenarios__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 4vw, 56px); }
.scenario { border-top: 1px solid var(--hairline); padding-top: 26px; }
.scenario h3 { font-size: clamp(21px, 2vw, 26px); font-weight: 380; margin: 0 0 16px; color: var(--gold); }
.scenario p { color: var(--muted); margin: 0; font-size: 15.5px; }

/* contact */
.contact__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 6vw, 90px); align-items: start; }
.contact__invite h2 { font-size: clamp(34px, 4.4vw, 56px); max-width: 14ch; }
.contact__lede { color: var(--muted); max-width: 44ch; margin: 24px 0 0; }
.contact__direct { display: grid; gap: 14px; margin-top: 36px; justify-items: start; }
.contact__phone { font: 340 clamp(24px, 2.4vw, 32px)/1.2 var(--serif); color: var(--gold); text-decoration: none; }
.contact__email { font-weight: 500; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--hairline); padding-bottom: 3px; }
.contact__email:hover { border-color: var(--gold); color: var(--gold); }
.contact__hours { color: var(--muted); margin: 0; }
.contact__privacy { margin: 0; }
.contact__privacy a { color: var(--muted); font-size: 14px; }

.form {
  background: linear-gradient(160deg, var(--panel), var(--bg-2));
  border: 1px solid var(--hairline-soft); border-radius: 22px;
  padding: clamp(28px, 3.4vw, 46px); display: grid; gap: 22px;
}
.form__title { font-size: 26px; font-weight: 380; margin: 0 0 4px; }
.field { display: grid; gap: 9px; }
.field label { font: 500 13px/1.4 var(--sans); letter-spacing: 0.04em; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; background: rgba(12,14,11,0.6); color: var(--ink);
  border: 1px solid var(--hairline-soft); border-radius: 12px;
  padding: 14px 16px; font: 400 16px/1.4 var(--sans);
  transition: border-color 0.25s, box-shadow 0.25s; appearance: none;
}
.field textarea { resize: vertical; min-height: 96px; }
.field select { background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.field--consent { grid-template-columns: 20px 1fr; gap: 12px; align-items: start; }
.field--consent input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--gold); }
.field--consent label { font-size: 12.5px; line-height: 1.5; color: var(--faint); }
.form__actions { margin-top: 4px; }
.form__status { margin: 0; font-size: 14px; color: var(--gold); min-height: 1em; }
.form__status.is-error { color: #e08a6a; }

/* privacy + footer */
.privacy { border-top: 1px solid var(--hairline-soft); }
.privacy h2 { font-size: clamp(26px, 3vw, 38px); }
.privacy__copy { color: var(--muted); max-width: 72ch; margin: 24px 0 0; font-size: 15px; }
.footer { border-top: 1px solid var(--hairline-soft); padding-block: 64px 48px; background: var(--bg-2); }
.footer__lede { font: 340 clamp(24px, 3vw, 36px)/1.25 var(--serif); max-width: 26ch; margin: 0 0 36px; }
.footer__contact { display: flex; flex-wrap: wrap; gap: 14px 40px; margin-bottom: 40px; }
.footer__contact p { margin: 0; color: var(--muted); }
.footer__contact a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--hairline-soft); }
.footer__contact a:hover { color: var(--gold); border-color: var(--gold); }
.footer__legal { display: flex; flex-wrap: wrap; gap: 12px 36px; padding-top: 28px; border-top: 1px solid var(--hairline-soft); font-size: 13px; color: var(--faint); }
.footer__legal p { margin: 0; }
.footer__legal a { color: var(--muted); }
.credits-line { flex-basis: 100%; }

/* reveal motion */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__cue span { animation: none; }
  .tile, .btn { transition: none; }
}

/* responsive */
@media (max-width: 1023px) {
  .contact__grid { grid-template-columns: 1fr; }
  .scenarios__grid { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 767px) {
  .site-nav { display: none; }
  .site-header__bar { justify-content: space-between; }
  .hero__inner { padding-block: 130px 90px; }
  .hero__title { max-width: 100%; }
  .btn-row .btn { width: 100%; }
  .tile { flex-basis: 84vw; min-height: 400px; }
  .experience__statement { font-size: clamp(27px, 7vw, 38px); }
}
