/* ============================================================
   Appraisal Valet: home variant 3, Skyline
   Source: WPA home mockup Option A (make_mockups.py BASE_CSS +
   option_a), Deloitte-pattern mega menu (deloitte-nav-wpa.html),
   scroll reveal per Movement And Fade/scroll-reveal-prompt.md
   ============================================================ */

:root {
  --navy: #123854;
  --navy-dark: #0e2c43;
  --navy-deep: #0a2233;          /* footer, one step under the CTA band */
  --blue: #359ff4;
  --blue-light: #80d6fc;
  --blue-text: #1a74c0;          /* blue that passes AA on white for small type */
  --ink: #222222;
  --gray: #5b6670;
  --line: #e3e8ee;
  --rail: #f3f6f9;
  --header-h: 72px;
  --util-h: 36px;
  --radius: 4px;
  --radius-lg: 10px;
  --ease-panel: cubic-bezier(.4, 0, .2, 1);
  --font-head: "Montserrat", system-ui, sans-serif;
  --font-body: "Lato", system-ui, sans-serif;
}

/* ---------- reset (WPA BASE_CSS) ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font-body); font-size: 17px; color: var(--ink); background: #fff; -webkit-font-smoothing: antialiased; line-height: 1.6; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
ul { list-style: none; margin: 0; padding: 0; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { font-family: var(--font-head); margin: 0; line-height: 1.15; letter-spacing: -.01em; color: var(--navy); }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
body.is-locked { overflow: hidden; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 3001; background: #fff; color: var(--navy); padding: 10px 16px; font-family: var(--font-head); font-weight: 700; border-radius: var(--radius); }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 40px; }
@media (max-width: 1023.98px) { .wrap { padding: 0 24px; } }
@media (max-width: 599.98px) { .wrap { padding: 0 20px; } }

/* ---------- buttons (B2B: 4px radius, Montserrat 600 15px) ---------- */
/* navy-dark on brand blue keeps the brand fill and passes AA (5:1) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-head); font-weight: 600; font-size: 15px; line-height: 1.2;
  padding: 13px 24px; min-height: 48px; border-radius: var(--radius);
  background: var(--blue); color: var(--navy-dark); border: 1.5px solid transparent;
  white-space: nowrap; transition: background-color .2s, transform .2s, box-shadow .2s, color .2s;
}
.btn svg { width: 18px; height: 18px; flex: 0 0 auto; }
.btn .arw { width: 16px; height: 16px; transition: transform .25s ease; }
.btn--sm { font-size: 13px; padding: 9px 16px; min-height: 40px; }
.btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.85); }
.btn--ghost-dark { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn--navy { background: var(--navy); color: #fff; }
@media (hover: hover) {
  .btn:hover { background: var(--blue-light); transform: translateY(-1px); box-shadow: 0 8px 22px -8px rgba(53,159,244,.6); }
  .btn:hover .arw { transform: translateX(4px); }
  .btn--ghost:hover { background: rgba(255,255,255,.12); border-color: #fff; box-shadow: none; }
  .btn--ghost-dark:hover { background: var(--rail); box-shadow: none; }
  .btn--navy:hover { background: var(--navy-dark); color: #fff; box-shadow: 0 8px 22px -8px rgba(18,56,84,.6); }
}

.kicker { display: block; font-family: var(--font-head); font-weight: 700; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--blue-text); margin-bottom: 14px; }
.sec { padding: clamp(64px, 8vw, 104px) 0; }

/* ============================================================
   HEADER  (WPA .hdr: fixed 72px, transparent over the hero,
   solid on scroll; utility row on top collapses, T&P pattern)
   ============================================================ */
.hdr {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 2001; color: #fff;
  background: transparent; transition: background-color .35s ease, box-shadow .35s ease;
}
.hdr.is-solid, .hdr.is-open { background: rgba(14,44,67,.97); box-shadow: 0 1px 0 rgba(255,255,255,.08); }

.hdr__util { height: var(--util-h); overflow: hidden; border-bottom: 1px solid rgba(255,255,255,.14); transition: height .3s ease, border-color .3s ease; }
.hdr.is-solid .hdr__util { height: 0; border-color: transparent; }
.hdr__util-in { max-width: 1400px; height: var(--util-h); margin: 0 auto; padding: 0 40px; display: flex; justify-content: flex-end; align-items: center; gap: 28px; }
.hdr__util a { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-head); font-weight: 600; font-size: 12.5px; letter-spacing: .04em; color: rgba(255,255,255,.85); transition: color .2s; }
.hdr__util svg { width: 15px; height: 15px; }

.hdr__in { max-width: 1400px; height: var(--header-h); margin: 0 auto; padding: 0 40px; display: flex; align-items: center; gap: 40px; }
.hdr__logo { flex: 0 0 auto; display: block; }
.hdr__logo img { width: 200px; height: auto; }
.nav { flex: 1 1 auto; display: flex; align-items: center; }
.nav__list { display: flex; gap: 30px; }
.nav__link {
  position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 8px 0;
  font-family: var(--font-head); font-weight: 600; font-size: 14.5px; white-space: nowrap; color: #fff;
}
/* 2px accent underline growing from the left */
.nav__link::before { content: ""; position: absolute; left: 0; bottom: 2px; width: 0; height: 2px; background: var(--blue); opacity: 0; transition: width .4s ease, opacity .4s ease; }
.nav__item.is-active .nav__link::before { width: 100%; opacity: 1; }
.nav__link svg { width: 10px; height: 10px; transition: transform .3s; }
.nav__item.is-active .nav__link svg { transform: rotate(180deg); }
.hdr__cta { margin-left: auto; padding: 10px 20px; min-height: 42px; font-size: 14px; }
.burger { display: none; }
@media (hover: hover) {
  .hdr__util a:hover { color: var(--blue-light); }
  .nav__link:hover::before { width: 100%; opacity: 1; }
}

/* ---------- mega menu (Deloitte pattern, click to open) ---------- */
.mega { position: absolute; left: 0; top: 100%; width: 100%; display: none; background: #fff; color: var(--ink); border-top: 1px solid var(--line); box-shadow: 0 24px 40px -20px rgba(11,31,51,.3); }
.nav__item.is-active .mega { display: block; }
.mega__in { max-width: 1400px; margin: 0 auto; display: flex; min-height: 260px; }
.rail { flex: 0 0 320px; background: var(--rail); padding: 36px 0 36px 40px; }
.rail__item {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%;
  padding: 11px 22px 11px 16px; border-radius: 6px 0 0 6px; background: #fff; color: var(--blue-text);
  font-family: var(--font-head); font-weight: 600; font-size: 17px; line-height: 1.3;
}
.rail__item svg { width: 10px; height: 10px; transition: transform .3s; }
.content { flex: 1 1 auto; display: flex; justify-content: space-between; gap: 40px; padding: 36px 40px; }
.cols { display: flex; flex-direction: column; gap: 16px; }
.cols li { font-size: 16px; line-height: 1.35; }
.cols a { display: inline; color: var(--ink); background-image: linear-gradient(var(--blue), var(--blue)); background-position: 0 100%; background-repeat: no-repeat; background-size: 0 2px; transition: background-size .4s; }
.promo { flex: 0 0 260px; border-left: 2px solid var(--blue); padding-left: 36px; display: flex; flex-direction: column; align-items: flex-start; }
.promo__img { width: 100%; aspect-ratio: 3 / 2; border-radius: 6px; margin-bottom: 16px; object-fit: cover; }
.promo__kicker { font-family: var(--font-head); font-weight: 700; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--blue-text); margin-bottom: 14px; }
@media (hover: hover) {
  .rail__item:hover svg { transform: translateX(4px); }
  .cols a:hover { background-size: 100% 2px; }
}
.overlay { position: fixed; inset: 0; z-index: 2000; background: rgba(11,31,51,.35); display: none; }
.overlay.is-open { display: block; }

/* ---------- mobile drawer: stacked drill-down panels ---------- */
.drawer {
  position: fixed; top: var(--header-h); right: 0; bottom: 0; width: 100%; z-index: 2010;
  display: none; overflow: hidden; background: #fff; color: var(--ink);
  transform: translateX(100%); visibility: hidden;
  transition: transform .3s ease-in-out, visibility 0s linear .3s;
  box-shadow: -20px 0 40px -20px rgba(11,31,51,.3);
}
.drawer.is-open { transform: none; visibility: visible; transition: transform .3s ease-in-out, visibility 0s; }
.panel {
  position: absolute; inset: 0; background: #fff; display: flex; flex-direction: column; overflow: hidden;
  transform: translateX(100%); visibility: hidden;
  transition: transform .3s var(--ease-panel), visibility 0s linear .3s;
}
.panel.is-root, .panel.is-in { transform: none; visibility: visible; transition: transform .3s var(--ease-panel), visibility 0s; }
.panel.is-root.is-under, .panel.is-in.is-under { visibility: hidden; transition: visibility 0s linear .3s; }
.panel__scroll { flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.panel__hd { display: flex; align-items: stretch; flex: 0 0 auto; border-bottom: 1px solid var(--line); }
.panel__back { width: 60px; flex: 0 0 60px; min-height: 56px; display: flex; align-items: center; justify-content: center; border-right: 1px solid var(--line); color: var(--blue-text); }
.panel__back svg { width: 18px; height: 18px; }
.panel__titles { padding: 14px 20px; min-width: 0; display: flex; align-items: center; }
.panel__title { font-family: var(--font-head); font-weight: 700; font-size: 18px; line-height: 1.2; color: var(--navy); }
.m-list { padding: 20px 20px 28px; display: flex; flex-direction: column; gap: 6px; }
.m-list--root { gap: 8px; padding-top: 16px; }
.m-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; min-height: 48px; padding: 10px 4px; border-radius: 6px; text-align: left; font-size: 17px; line-height: 1.3; color: var(--ink); }
.m-list--root .m-row { font-family: var(--font-head); font-weight: 600; font-size: 22px; color: var(--navy); }
.m-row svg { width: 14px; height: 14px; color: var(--blue-text); flex: 0 0 auto; }
.m-row:active { background: var(--rail); }
.m-promo { margin: 4px 20px 28px; padding: 18px; border-radius: 8px; background: var(--rail); }
.m-promo .promo__img { aspect-ratio: 16 / 7; margin-bottom: 14px; }
.m-util { flex: 0 0 auto; border-top: 1px solid var(--line); padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 4px; background: #fff; font-family: var(--font-head); font-weight: 600; font-size: 15px; }
.m-util > a { display: flex; align-items: center; gap: 14px; min-height: 44px; color: var(--navy); }
.m-util svg { width: 20px; height: 20px; color: var(--blue-text); }
.m-util__btns { display: flex; gap: 12px; margin-top: 10px; }

@media (min-width: 768px) and (max-width: 1023.98px) { .drawer { width: 50%; } }
@media (max-width: 1023.98px) {
  .hdr__util { display: none; }
  .hdr__in { padding: 0 20px; gap: 16px; justify-content: space-between; }
  .hdr__logo img { width: 180px; }
  .nav, .hdr__cta { display: none; }
  .burger { display: inline-flex; position: relative; width: 44px; height: 44px; align-items: center; justify-content: center; margin-right: -8px; }
  .burger span { position: absolute; left: 11px; right: 11px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .3s, opacity .3s, top .3s; }
  .burger span:nth-child(1) { top: 15px; }
  .burger span:nth-child(2) { top: 21px; }
  .burger span:nth-child(3) { top: 27px; }
  .burger.is-active span:nth-child(1) { top: 21px; transform: rotate(45deg); }
  .burger.is-active span:nth-child(2) { opacity: 0; }
  .burger.is-active span:nth-child(3) { top: 21px; transform: rotate(-45deg); }
  .drawer { display: block; }
  .mega, .overlay { display: none !important; }
}

/* ============================================================
   HERO  (WPA Option A: full-bleed media, navy shade, left H1)
   ============================================================ */
.hero { position: relative; min-height: 92svh; display: flex; align-items: flex-end; color: #fff; overflow: hidden; background: var(--navy-dark); }
.hero__bg { position: absolute; inset: 0; }
.hero__bg img, .hero__bg video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* poster sits underneath; the video appears on its first frame, no fade (fades ghost) */
.hero__video { visibility: hidden; }
.hero__video.is-ready { visibility: visible; }
.hero__shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(14,44,67,.62) 0%, rgba(14,44,67,.28) 38%, rgba(14,44,67,.9) 100%),
    linear-gradient(90deg, rgba(14,44,67,.6) 0%, rgba(14,44,67,0) 72%);
}
.hero__in { position: relative; padding-top: 200px; padding-bottom: 136px; }
.hero h1 { color: #fff; font-size: clamp(38px, 5.4vw, 70px); font-weight: 800; line-height: 1.03; letter-spacing: -.02em; max-width: 17ch; }
.hero h1 em { white-space: nowrap; font-style: normal; box-shadow: inset 0 -.14em 0 0 var(--blue); padding: 0 .04em; }
.hero p { font-size: clamp(17px, 1.5vw, 20px); line-height: 1.55; max-width: 58ch; color: rgba(255,255,255,.88); margin: 26px 0 34px; }
.hero p a { color: var(--blue-light); font-weight: 700; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; }
@media (hover: hover) { .hero p a:hover { color: #fff; } }

/* ---------- floating card over the hero bottom (WPA .statband) ---------- */
.statband {
  position: relative; z-index: 2; margin-top: -56px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 30px 60px -30px rgba(11,31,51,.35);
  padding: 44px 48px; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 40px;
}
.statband__h { font-size: clamp(22px, 2vw, 28px); font-weight: 800; color: var(--navy); white-space: nowrap; padding-right: 40px; border-right: 1px solid var(--line); line-height: 1.1; }
.statband__h::before { content: ""; display: block; width: 32px; height: 3px; background: var(--blue); margin-bottom: 14px; }

/* contained marquee (C9L strand: duplicated track, -50%, edge mask) */
.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; width: max-content; animation: mq 70s linear infinite; will-change: transform; }
.marquee__set { display: flex; align-items: center; flex: 0 0 auto; }
.marquee__set img { height: 80px; width: auto; margin-right: 36px; object-fit: contain; flex: 0 0 auto; }
@keyframes mq { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .marquee__track { animation: none; width: auto; }
  .marquee__set { flex-wrap: wrap; justify-content: center; gap: 16px 32px; flex: 1 1 auto; }
  .marquee__set img { margin: 0; height: 52px; }
  .marquee__set[aria-hidden="true"] { display: none; }
}

/* ============================================================
   WHY APPRAISAL VALET  (WPA alternating .feature split)
   ============================================================ */
.why { padding-top: clamp(72px, 9vw, 112px); }
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.feature + .feature { margin-top: 96px; }
.feature--flip .feature__media { order: 2; }
.feature__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-lg); }
.feature h2 { font-size: clamp(28px, 3.2vw, 42px); font-weight: 700; margin-bottom: 18px; }
.feature h3 { font-size: clamp(22px, 2.2vw, 30px); font-weight: 700; line-height: 1.25; margin-bottom: 18px; max-width: 24ch; }
.feature__lead { font-family: var(--font-head); font-size: clamp(19px, 1.7vw, 23px); font-weight: 500; line-height: 1.4; color: var(--gray); margin-bottom: 22px; }
.feature__lead strong { display: block; font-weight: 800; color: var(--navy); }
.feature p:not(.feature__lead) { color: var(--gray); max-width: 60ch; }
.btns { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }

/* ============================================================
   CTA BAND  (WPA Option A navy band)
   ============================================================ */
.cta-band { background: var(--navy); color: #fff; padding: 88px 0; }
.cta-band .wrap { display: flex; justify-content: space-between; align-items: center; gap: 40px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; font-size: clamp(26px, 3vw, 40px); font-weight: 700; max-width: 20ch; }
.cta-band__btns { display: flex; gap: 12px; flex-wrap: wrap; }

/* ============================================================
   FOOTER  (WPA Option A 4-column, base content only)
   ============================================================ */
.foot { background: var(--navy-deep); color: rgba(255,255,255,.75); font-size: 15px; }
.foot__top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 48px; padding: 72px 0 56px; border-bottom: 1px solid rgba(255,255,255,.1); }
.foot__brand img { width: 230px; height: auto; }
.foot ul { display: flex; flex-direction: column; gap: 4px; }
.foot ul a { display: inline-flex; align-items: center; min-height: 36px; font-family: var(--font-head); font-weight: 600; font-size: 14px; transition: color .2s; }
.foot__bot { padding: 26px 0 34px; display: flex; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; font-size: 13px; color: rgba(255,255,255,.5); }
.foot__bot a { color: rgba(255,255,255,.8); }
@media (hover: hover) { .foot a:hover { color: #fff; } }

/* ============================================================
   LOGIN MODAL  (base behavior, restyled)
   ============================================================ */
.modal { position: fixed; inset: 0; z-index: 3000; display: none; overflow-y: auto; }
.modal.open { display: block; }
.modal__overlay { position: fixed; inset: 0; background: rgba(9,24,38,.72); }
.modal__box { position: relative; z-index: 1; background: #fff; max-width: 640px; margin: 8vh auto; border-radius: 12px; border-top: 3px solid var(--blue); padding: 46px 40px; box-shadow: 0 30px 60px -30px rgba(11,31,51,.5); text-align: center; }
.modal__box h2 { font-size: 26px; font-weight: 700; margin-bottom: 18px; }
.modal__box p { color: var(--gray); }
.modal__box p a { color: var(--blue-text); font-weight: 700; }
.modal__logins { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }
.modal__close { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; font-size: 28px; line-height: 1; color: var(--gray); }

/* ============================================================
   SCROLL REVEAL  (Ethan's locked spec: fade + 16px rise, .7s)
   ============================================================ */
@keyframes fadeInRise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@media (scripting: enabled) {
  .r-in--rise { opacity: 0; }
  .r-in--rise.is-in { animation: fadeInRise .7s cubic-bezier(.33, 1, .68, 1) both; }
}
@media (prefers-reduced-motion: reduce) {
  .r-in--rise, .r-in--rise.is-in { opacity: 1; animation: none; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1023.98px) {
  .foot__top { grid-template-columns: 1fr 1fr; }
  .foot__brand { grid-column: 1 / -1; }
}
@media (max-width: 899.98px) {
  .feature { grid-template-columns: 1fr; gap: 32px; }
  .feature--flip .feature__media { order: 0; }
  .feature + .feature { margin-top: 64px; }
  .statband { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .statband__h { border-right: 0; padding-right: 0; }
}
@media (max-width: 767.98px) {
  .cta-band { padding: 64px 0; }
}
@media (max-width: 599.98px) {
  .hero { min-height: 88svh; }
  .hero__in { padding-top: 130px; padding-bottom: 104px; }
  .hero__cta .btn, .cta-band__btns .btn { flex: 1 1 auto; }
  .statband { padding: 28px 22px; margin-top: -40px; }
  .marquee__set img { height: 50px; margin-right: 32px; }
  .foot__top { grid-template-columns: 1fr; gap: 28px; padding: 56px 0 40px; }
  .foot ul a { min-height: 44px; }
  .modal__box { margin: 4vh 16px; padding: 44px 22px 30px; }
  .modal__logins .btn { flex: 1 1 100%; }
}

/* footer bottom: Terms + Cloud Nine Labs credit sit together on the right */
.foot__legal { display: inline-flex; flex-wrap: wrap; gap: 4px 28px; }
@media (max-width: 599.98px) { .foot__legal { justify-content: center; } }
