/* Valencia Mortgage Solutions — shared design system (Direction A · Editorial Trust) */

*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --navy: #0F2540;
  --navy-deep: #0A1A2E;
  --navy-soft: #1A3554;
  --sage: #7A9988;
  --sage-deep: #5C7F6F;
  --sage-tint: #E8EFEA;
  --bone: #F4EFE6;
  --paper: #FAF7F1;
  --ink: #1B232E;
  --ink-soft: #4A5460;
  --ink-mute: #7E8794;
  --rule: #E5DFD2;
}
html, body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
}
body { max-width: 1280px; margin: 0 auto; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.serif { font-family: 'Cormorant Garamond', Georgia, serif; }

/* TYPOGRAPHY helpers */
.eyebrow {
  font-size: 11px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase;
  color: var(--sage-deep);
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before { content:""; width: 24px; height: 1px; background: var(--sage-deep); display:inline-block; }

.section-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 500;
  font-size: 52px; line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--navy-deep);
  margin-top: 16px;
  text-wrap: balance;
}
.section-title em { font-style: italic; color: var(--sage-deep); font-weight: 500; }
.section-lead {
  font-size: 16px; line-height: 1.65; color: var(--ink-soft);
  max-width: 460px;
}
.section-head {
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px;
  align-items: end; margin-bottom: 64px;
}

/* NAV */
nav.top {
  display: grid; grid-template-columns: auto 1fr auto;
  align-items: center; gap: 32px;
  padding: 16px 48px; border-bottom: 1px solid var(--rule);
  background: var(--paper);
  position: sticky; top: 0; z-index: 50;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-logo { height: 40px; width: auto; display: block; }
.brand-mark {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--navy); color: var(--bone);
  display:flex; align-items:center; justify-content:center;
  font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 600; font-size: 20px;
  letter-spacing: -0.02em;
}
.brand-name { font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 500; font-size: 18px; letter-spacing: -0.01em; line-height: 1.05; }
.brand-sub { font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-mute); margin-top: 2px; }
.nav-links { display: flex; gap: 24px; justify-content: center; font-size: 13px; color: var(--ink-soft); list-style: none; white-space: nowrap; }
.nav-links a { transition: color .2s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--navy); }
.nav-links a[aria-current="page"] { position: relative; }
.nav-links a[aria-current="page"]::after {
  content:""; position: absolute; left:0; right:0; bottom: -8px; height: 1px; background: var(--sage-deep);
}
.nav-cta {
  border: 1px solid var(--navy); color: var(--navy);
  padding: 10px 18px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; letter-spacing: .02em;
  display: inline-flex; align-items: center; gap: 8px;
  transition: all .2s;
}
.nav-cta:hover { background: var(--navy); color: var(--bone); }
.btn-arrow { width: 14px; height: 14px; }

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: 999px;
  font-size: 13.5px; font-weight: 600;
  transition: all .2s;
  cursor: pointer; border: none;
  font-family: inherit;
}
.btn-primary { background: var(--navy); color: var(--bone); }
.btn-primary:hover { background: var(--navy-soft); }
.btn-ghost { background: transparent; border: 1px solid var(--rule); color: var(--navy); }
.btn-ghost:hover { border-color: var(--navy); }
.btn-cream { background: var(--bone); color: var(--navy-deep); }
.btn-cream:hover { background: white; }
.btn-outline { background: transparent; border: 1px solid rgba(244,239,230,.25); color: var(--bone); }
.btn-outline:hover { border-color: var(--bone); }

/* PAGE HEADER (inner pages) */
.page-head {
  padding: 80px 64px 64px;
  display: grid; grid-template-columns: 1fr auto;
  gap: 48px; align-items: end;
  border-bottom: 1px solid var(--rule);
}
.page-head h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 500;
  font-size: 76px; line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--navy-deep);
  margin: 22px 0 24px;
  max-width: 800px;
}
.page-head h1 em { font-style: italic; font-weight: 500; color: var(--sage-deep); }
.page-head .lead {
  font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 350;
  font-size: 19px; line-height: 1.55; color: var(--ink-soft);
  max-width: 540px;
}
.page-head .crumb { font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-mute); }
.page-head-side { display: flex; flex-direction: column; gap: 12px; }

section { padding: 96px 64px; }

/* CONTACT CTA (used at bottom of inner pages) */
.contact-cta {
  background: var(--navy-deep); color: var(--bone);
  padding: 100px 64px;
  display: grid; grid-template-columns: 1.05fr .95fr;
  gap: 64px; align-items: center;
}
.contact-cta .eyebrow { color: var(--sage); }
.contact-cta .eyebrow::before { background: var(--sage); }
.contact-cta-title {
  font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 350;
  font-size: 56px; line-height: 1.02; color: var(--bone);
  letter-spacing: -0.03em; margin: 18px 0 22px;
}
.contact-cta-title em { font-style: italic; color: var(--sage); }
.contact-cta-lead { font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 350; font-size: 18px; line-height: 1.55; color: rgba(244,239,230,.7); max-width: 420px; margin-bottom: 32px; }
.contact-cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.contact-card {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(244,239,230,.12);
  border-radius: 6px;
  padding: 32px 36px;
}
.contact-card-row { display: grid; grid-template-columns: 1fr 2fr; padding: 16px 0; border-bottom: 1px solid rgba(244,239,230,.08); align-items: center; }
.contact-card-row:last-child { border-bottom: none; }
.contact-card-label { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: rgba(244,239,230,.5); }
.contact-card-value { font-size: 14.5px; color: var(--bone); font-weight: 500; }
.contact-card-value small { display: block; font-weight: 400; color: rgba(244,239,230,.55); margin-top: 4px; font-size: 12px; }

/* FOOTER */
footer.bottom {
  background: var(--navy-deep);
  color: rgba(244,239,230,.55);
  padding: 56px 64px 28px;
  border-top: 1px solid rgba(244,239,230,.08);
  font-size: 12px;
  display: flex; flex-direction: column; gap: 28px;
}
footer.bottom strong { color: var(--bone); font-weight: 600; display: block; }

footer.bottom .foot-top {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 32px; flex-wrap: wrap;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(244,239,230,.1);
}
footer.bottom .foot-brand {
  display: flex; align-items: center; gap: 18px;
}
footer.bottom .foot-mark {
  color: var(--bone);
  opacity: .92;
  flex-shrink: 0;
}
footer.bottom .foot-sub {
  display: block;
  font-size: 11px; color: rgba(244,239,230,.55);
  letter-spacing: .14em; text-transform: uppercase;
  font-weight: 500;
  margin-top: 3px;
}
footer.bottom .foot-contact {
  display: flex; flex-direction: column; gap: 6px;
  text-align: right;
  font-size: 13px;
}
footer.bottom .foot-contact a {
  color: var(--bone);
  text-decoration: none;
  font-weight: 500;
  transition: color .15s;
}
footer.bottom .foot-contact a:hover { color: var(--sage); }
footer.bottom .foot-contact span { color: rgba(244,239,230,.65); }
footer.bottom .foot-social {
  display: flex; gap: 10px; margin-top: 8px;
  justify-content: flex-end;
}
footer.bottom .foot-social a {
  width: 34px; height: 34px;
  border: 1px solid rgba(244,239,230,.22);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: rgba(244,239,230,.75);
  transition: all .18s;
}
footer.bottom .foot-social a:hover {
  border-color: var(--sage);
  color: var(--sage);
  background: rgba(122,153,136,.08);
}

footer.bottom .foot-compliance {
  display: flex; justify-content: space-between; align-items: center;
  gap: 32px; flex-wrap: wrap;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(244,239,230,.1);
}
footer.bottom .foot-licenses {
  display: flex; flex-direction: column; gap: 6px;
  flex: 1; min-width: 320px;
}
footer.bottom .foot-lic-row {
  display: flex; gap: 18px; flex-wrap: wrap;
  font-size: 12.5px;
  color: rgba(244,239,230,.7);
}
footer.bottom .foot-lic-k {
  color: var(--bone);
  font-weight: 600;
  min-width: 220px;
}
footer.bottom .foot-eho {
  display: flex; align-items: center; gap: 12px;
  color: rgba(244,239,230,.6);
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  font-weight: 500;
}
footer.bottom .foot-eho svg {
  color: rgba(244,239,230,.5);
  flex-shrink: 0;
}

footer.bottom .foot-disclaimer {
  font-size: 11px;
  color: rgba(244,239,230,.45);
  line-height: 1.6;
}

footer.bottom .foot-meta {
  display: flex; justify-content: space-between; align-items: center;
  gap: 24px; flex-wrap: wrap;
  font-size: 11.5px;
  color: rgba(244,239,230,.45);
}
footer.bottom .foot-links { display: flex; gap: 20px; }
footer.bottom .foot-links a {
  color: rgba(244,239,230,.55);
  text-decoration: none;
  transition: color .15s;
}
footer.bottom .foot-links a:hover { color: var(--sage); }

/* ──────────────────────────────────────────────────────────────────────
   MOBILE / TABLET STYLES
   Handles shared chrome (nav, footer, page-head, contact-cta, office)
   Per-page styles live in each page's <style> block.
   Breakpoints: 900px (tablet shift), 640px (phone shift)
   ────────────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  /* Section spacing */
  section { padding: 56px 28px; }
  .page-head { padding: 48px 28px 40px; grid-template-columns: 1fr; gap: 28px; }
  .page-head h1 { font-size: 48px; }
  .page-head .lead { font-size: 17px; }
  .page-head-side { flex-direction: row; flex-wrap: wrap; }
  .section-head { grid-template-columns: 1fr; gap: 20px; margin-bottom: 36px; }
  .section-title { font-size: 36px; }

  /* Nav */
  nav.top {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    gap: 12px;
    grid-template-columns: none;
  }
  .nav-links { display: none; }   /* hide mid-nav, brand + hamburger visible */
  .brand-logo { height: 36px; }
  .nav-cta { padding: 9px 14px; font-size: 11.5px; }

  /* Contact CTA */
  .contact-cta { padding: 60px 28px; grid-template-columns: 1fr; gap: 36px; }
  .contact-cta-title { font-size: 38px; }
  .contact-cta-lead { font-size: 16px; }
  .contact-cta-actions { flex-direction: column; align-items: stretch; }
  .contact-cta-actions .btn { justify-content: center; }
  .contact-card { padding: 24px; }
  .contact-card-row { grid-template-columns: 90px 1fr; padding: 12px 0; }
  .contact-card-label { font-size: 10px; }
  .contact-card-value { font-size: 13.5px; }

  /* Footer */
  footer.bottom { padding: 36px 24px 24px; }
  footer.bottom .foot-top { flex-direction: column; gap: 20px; }
  footer.bottom .foot-contact { text-align: left; }
  footer.bottom .foot-social { justify-content: flex-start; margin-top: 12px; }
  footer.bottom .foot-compliance { flex-direction: column; align-items: flex-start; gap: 18px; }
  footer.bottom .foot-eho { align-self: flex-start; }
  footer.bottom .foot-licenses { min-width: 0; }
  footer.bottom .foot-lic-row { flex-direction: column; gap: 2px; }
  footer.bottom .foot-lic-k { min-width: 0; }
  footer.bottom .foot-meta { flex-direction: column; align-items: flex-start; gap: 12px; }

  /* Buttons */
  .btn { padding: 12px 18px; font-size: 13px; }
}

@media (max-width: 640px) {
  /* Even tighter on phones */
  section { padding: 44px 20px; }
  .page-head { padding: 36px 20px 30px; }
  .page-head h1 { font-size: 40px; line-height: 1.08; }
  .page-head .lead { font-size: 16px; }
  .section-title { font-size: 30px; line-height: 1.12; }
  .section-lead { font-size: 15px; }

  nav.top { padding: 12px 16px; }
  .brand-logo { height: 32px; }

  .contact-cta { padding: 48px 20px; }
  .contact-cta-title { font-size: 32px; }
  .contact-card-row { grid-template-columns: 1fr; gap: 4px; padding: 12px 0; }
  .contact-card-value { font-size: 14px; }

  footer.bottom { padding: 28px 18px 20px; }
}

/* ──────────────────────────────────────────────────────────────────────
   MOBILE NAV — Hamburger button + slide-out drawer
   Hidden on desktop, only visible below 900px.
   ────────────────────────────────────────────────────────────────────── */
.nav-toggle {
  display: none;       /* hidden on desktop */
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 8px;
  width: 42px;
  height: 42px;
  padding: 0;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  transition: border-color .15s, background .15s;
}
.nav-toggle:hover { border-color: var(--navy); }
.nav-toggle-bar {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--navy);
  border-radius: 1px;
  transition: transform .2s, opacity .2s;
}

/* Mobile menu drawer — hidden by default, animates in when .is-open */
.mobile-menu {
  position: fixed; inset: 0;
  z-index: 200;
  visibility: hidden;
  pointer-events: none;
}
.mobile-menu.is-open { visibility: visible; pointer-events: auto; }

.mobile-menu-backdrop {
  position: absolute; inset: 0;
  background: rgba(10, 26, 46, 0.42);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity .25s ease;
}
.mobile-menu.is-open .mobile-menu-backdrop { opacity: 1; }

.mobile-menu-panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 88%;
  max-width: 380px;
  background: var(--paper);
  box-shadow: -20px 0 60px -20px rgba(15, 37, 64, 0.35);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .28s ease;
  padding: 16px 0;
  overflow-y: auto;
}
.mobile-menu.is-open .mobile-menu-panel { transform: translateX(0); }

.mobile-menu-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 22px 18px;
  border-bottom: 1px solid var(--rule);
}
.mobile-menu-head .brand-logo { height: 34px; }
.mobile-menu-close {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--navy);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, border-color .15s;
}
.mobile-menu-close:hover { background: var(--bone); border-color: var(--navy); }

.mobile-menu-links {
  display: flex;
  flex-direction: column;
  padding: 18px 22px 6px;
  gap: 0;
}
.mobile-menu-links a {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 22px;
  font-weight: 500;
  color: var(--navy-deep);
  letter-spacing: -0.015em;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
  transition: color .15s, padding-left .15s;
}
.mobile-menu-links a:last-child { border-bottom: none; }
.mobile-menu-links a:hover,
.mobile-menu-links a:active { color: var(--sage-deep); }
.mobile-menu-links a[aria-current="page"] {
  color: var(--sage-deep);
}
.mobile-menu-links a[aria-current="page"]::before {
  content: "—";
  margin-right: 10px;
  color: var(--sage-deep);
}

.mobile-menu-cta {
  padding: 22px 22px 14px;
  display: flex; flex-direction: column; gap: 10px;
  border-top: 1px solid var(--rule);
  margin-top: 8px;
}
.mobile-menu-cta .btn {
  width: 100%;
  justify-content: center;
  padding: 13px 18px;
  font-size: 13.5px;
}

.mobile-menu-contact {
  display: flex; flex-direction: column; gap: 4px;
  padding: 14px 22px 22px;
  font-size: 13.5px;
}
.mobile-menu-contact a {
  color: var(--ink-soft);
  padding: 6px 0;
}
.mobile-menu-contact a:hover { color: var(--navy); }

/* Show hamburger, hide desktop CTA below 900px */
@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .nav-cta { display: none; }
}
