/* =============================================================================
   Sterling West Escrow — concept redesign by rainearcher
   Token contract from docs/design-system (escrow/financial-trust skin:
   deep navy authority + warm gold concierge accent, Fraunces + Inter).
   Component CSS references SEMANTIC tokens only.
   ========================================================================== */

:root {
  --font-display: 'Fraunces', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;

  --bg:           #FBFAF7;
  --surface:      #FFFFFF;
  --surface-alt:  #F1EEE7;
  --line:         #E3DDD0;

  --text:         #16202E;
  --text-muted:   #4F5A66;
  --text-faint:   #8A93A0;

  --inverse-bg:   #0E2336;   /* deep navy authority */
  --inverse-bg-2: #15324C;
  --inverse-text: #F6F4EF;
  --inverse-muted:#A8B6C6;

  --brand:        #B68A4E;   /* warm gold / concierge */
  --brand-strong: #1C3A57;   /* navy — primary action */
  --brand-hover:  #122A41;
  --accent:       #C9A368;

  --cta-bg:       var(--brand-strong);
  --cta-text:     #FFFFFF;
  --cta-shadow:   rgba(28, 58, 87, 0.28);

  --radius:       14px;
  --radius-sm:    9px;

  --shadow-soft:  0 2px 20px rgba(14, 35, 54, 0.07);
  --shadow-card:  0 4px 24px rgba(14, 35, 54, 0.10);
  --shadow-hover: 0 8px 36px rgba(14, 35, 54, 0.17);

  --ease:         cubic-bezier(0.4, 0, 0.2, 1);
  --t-fast:       0.15s;
  --t-med:        0.30s;

  --glow-1:       rgba(182, 138, 78, 0.16);
  --glow-2:       rgba(201, 163, 104, 0.12);

  --step-eyebrow: 12px;
  --step-h3:  clamp(19px, 3vw, 24px);
  --step-h2:  clamp(25px, 4.6vw, 40px);
  --step-h1:  clamp(28px, 5.4vw, 54px);
  --space-sm: 14px;
  --space-md: 26px;
  --space-lg: 52px;
  --space-xl: 80px;

  --maxw: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.62;
  font-size: 17px;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.01em;
  overflow-wrap: break-word;
  margin: 0 0 0.5em;
}
h1 { font-size: var(--step-h1); }
h2 { font-size: var(--step-h2); }
h3 { font-size: var(--step-h3); }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.eyebrow {
  font-size: var(--step-eyebrow);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--brand);
  margin: 0 0 14px;
}
.muted { color: var(--text-muted); }
.section { padding: var(--space-lg) 0; }
.section--xl { padding: var(--space-xl) 0; }
.center { text-align: center; }
.lead { font-size: clamp(17px, 2.2vw, 20px); color: var(--text-muted); }

/* ---- Buttons ---------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 13px 26px;
  font-family: var(--font-body); font-weight: 600; font-size: 16px;
  border-radius: var(--radius-sm); border: 1.5px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease),
              background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.btn--primary { background: var(--cta-bg); color: var(--cta-text); box-shadow: 0 6px 22px var(--cta-shadow); }
.btn--primary:hover { background: var(--brand-hover); transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.btn--gold { background: var(--brand); color: #1c1407; box-shadow: 0 6px 22px var(--glow-1); }
.btn--gold:hover { background: var(--accent); transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--brand); color: var(--brand-hover); }
.btn--on-dark { background: transparent; color: var(--inverse-text); border-color: rgba(255,255,255,.35); }
.btn--on-dark:hover { background: rgba(255,255,255,.10); border-color: #fff; }

/* ---- Header ----------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251,250,247,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 66px; }
.brand-logo img { height: 40px; width: auto; }
.nav { display: none; align-items: center; gap: 26px; }
.nav a { text-decoration: none; font-weight: 500; font-size: 15px; color: var(--text-muted); transition: color var(--t-fast); }
.nav a:hover { color: var(--brand-hover); }
.header-cta { display: none; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.nav-toggle {
  display: inline-flex; flex-direction: column; gap: 5px;
  background: none; border: 0; padding: 10px; cursor: pointer;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: transform var(--t-fast), opacity var(--t-fast); }
.mobile-nav {
  display: none; flex-direction: column; gap: 4px;
  padding: 10px 20px 18px; border-bottom: 1px solid var(--line); background: var(--surface);
}
.mobile-nav.open { display: flex; }
.mobile-nav a { text-decoration: none; padding: 12px 6px; font-weight: 500; color: var(--text); border-bottom: 1px solid var(--line); }
.mobile-nav a:last-child { border-bottom: 0; }
.mobile-nav .btn { margin-top: 10px; }

/* ---- Hero ------------------------------------------------------------- */
.hero { position: relative; color: var(--inverse-text); isolation: isolate; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: url("assets/hero-sunset.jpg") center/cover no-repeat;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(14,35,54,0.86) 0%, rgba(14,35,54,0.72) 45%, rgba(18,42,65,0.90) 100%);
}
.hero-inner { padding: clamp(56px, 12vw, 110px) 0 clamp(48px, 9vw, 88px); max-width: 720px; }
.hero .eyebrow { color: var(--accent); }
.hero h1 { color: #fff; }
.hero p.lead { color: var(--inverse-text); opacity: 0.94; max-width: 560px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.hero-trust { margin-top: 30px; font-size: 14px; color: var(--inverse-muted); display: flex; align-items: center; gap: 10px; }
.hero-trust strong { color: #fff; font-weight: 600; }

/* ---- Trust bar -------------------------------------------------------- */
.trustbar { background: var(--inverse-bg-2); color: var(--inverse-text); }
.trustbar ul { list-style: none; margin: 0; padding: 18px 0; display: grid; grid-template-columns: 1fr; gap: 12px; }
.trustbar li { display: flex; align-items: center; gap: 10px; font-size: 14.5px; font-weight: 500; }
.trustbar svg { flex: 0 0 auto; color: var(--accent); }

/* ---- Generic content layouts ----------------------------------------- */
.split { display: grid; grid-template-columns: 1fr; gap: var(--space-md); align-items: center; }
.split img { border-radius: var(--radius); box-shadow: var(--shadow-card); }
.media-frame { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-card); }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-soft); }

/* Why independent — compare */
.section--navy { background: var(--inverse-bg); color: var(--inverse-text); }
.section--navy .eyebrow { color: var(--accent); }
.section--navy h2 { color: #fff; }
.compare { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 28px; }
.compare-card { border-radius: var(--radius); padding: 24px; }
.compare-card h3 { font-size: 20px; margin-bottom: 10px; }
.compare-card.is-them { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12); color: var(--inverse-muted); }
.compare-card.is-them h3 { color: var(--inverse-text); }
.compare-card.is-us { background: var(--brand); color: #1c1407; }
.compare-card.is-us h3 { color: #1c1407; }
.compare-card p { margin: 0; font-size: 15.5px; line-height: 1.55; }

/* Audience cards */
.cards { display: grid; grid-template-columns: 1fr; gap: 18px; margin-top: var(--space-md); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-soft); transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease); }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.card .ic { width: 44px; height: 44px; border-radius: 11px; background: var(--surface-alt); display: grid; place-items: center; color: var(--brand-strong); margin-bottom: 16px; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--text-muted); font-size: 15.5px; margin: 0 0 14px; }
.card a.textlink { color: var(--brand-strong); font-weight: 600; text-decoration: none; font-size: 15px; }
.card a.textlink:hover { color: var(--brand-hover); text-decoration: underline; }

/* Founder */
.founder { display: grid; grid-template-columns: 1fr; gap: var(--space-md); align-items: center; }
.founder img { border-radius: var(--radius); box-shadow: var(--shadow-card); }
.founder .name { font-family: var(--font-display); font-size: 22px; margin-top: 18px; }
.founder .role { color: var(--brand); font-weight: 600; font-size: 14px; letter-spacing: 0.04em; }

/* Team band */
.team-band { margin: var(--space-lg) 0 0; }
.team-band img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow-card); }
.team-band figcaption { margin-top: 14px; text-align: center; font-size: 14.5px; color: var(--text-faint); }

/* Contact link wrapping safety on narrow phones */
.contact-grid a, .contact-grid div { min-width: 0; }
.contact-grid a, .contact-grid div { overflow-wrap: anywhere; }

/* Pricing */
.pricing-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 30px 26px; max-width: 640px; margin: var(--space-md) auto 0; }
.price-row { display: flex; justify-content: space-between; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
.price-row:last-of-type { border-bottom: 0; }
.price-row .k { color: var(--text-muted); }
.price-row .v { font-weight: 600; font-family: var(--font-display); white-space: nowrap; }
.price-example { background: var(--surface-alt); border-radius: var(--radius-sm); padding: 16px 18px; margin-top: 18px; font-size: 15px; }
.price-example strong { color: var(--brand-strong); }

/* Testimonials */
.quotes { display: grid; grid-template-columns: 1fr; gap: 18px; margin-top: var(--space-md); }
.quote { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--brand); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-soft); }
.quote p { font-size: 16px; font-style: italic; color: var(--text); margin: 0 0 14px; }
.quote .who { font-weight: 600; font-size: 14.5px; }
.quote .who span { display: block; color: var(--text-faint); font-weight: 400; font-style: normal; font-size: 13px; }

/* Diagram / what is escrow */
.escrow-explain .media-frame { background: #fff; padding: 14px; }

/* Final CTA */
.final-cta { background: var(--inverse-bg); color: var(--inverse-text); text-align: center; }
.final-cta .eyebrow { color: var(--accent); }
.final-cta h2 { color: #fff; }
.final-cta .lead { color: var(--inverse-muted); max-width: 560px; margin-inline: auto; }
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 14px; margin: 28px auto 0; max-width: 440px; text-align: left; }
.contact-grid a, .contact-grid div { display: flex; align-items: center; gap: 12px; color: var(--inverse-text); text-decoration: none; font-size: 15.5px; }
.contact-grid svg { color: var(--accent); flex: 0 0 auto; }
.final-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 28px; }

/* Community line */
.community { font-size: 14.5px; color: var(--text-muted); text-align: center; }
.community strong { color: var(--text); }

/* Footer */
.site-footer { background: #0a1a29; color: var(--inverse-muted); padding: 40px 0 120px; font-size: 14px; }
.footer-top { display: grid; grid-template-columns: 1fr; gap: 22px; }
.site-footer a { color: var(--inverse-muted); text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; }
.footer-social { display: flex; gap: 14px; }
.footer-social a { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid rgba(255,255,255,0.16); border-radius: 9px; }
.footer-social a:hover { border-color: var(--accent); color: var(--accent); }
.footer-legal { border-top: 1px solid rgba(255,255,255,0.12); margin-top: 26px; padding-top: 20px; display: flex; flex-direction: column; gap: 6px; }
.footer-legal .credit { color: var(--brand); }

/* ---- Sticky mobile CTA ------------------------------------------------ */
.mobile-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: flex; gap: 10px; padding: 10px 14px;
  background: rgba(251,250,247,0.96); backdrop-filter: blur(8px);
  border-top: 1px solid var(--line); box-shadow: 0 -4px 20px rgba(14,35,54,0.08);
}
.mobile-bar .btn { flex: 1; min-height: 48px; padding: 12px 14px; font-size: 15px; }

/* ---- Reveal animation ------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---- Responsive ------------------------------------------------------- */
@media (min-width: 700px) {
  .trustbar ul { grid-template-columns: repeat(2, 1fr); gap: 14px 28px; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .compare { grid-template-columns: 1fr 1fr; }
  .quotes { grid-template-columns: repeat(2, 1fr); }
  .split, .founder { grid-template-columns: 1fr 1fr; gap: var(--space-lg); }
  .founder.reverse > div:first-child { order: 2; }
  .contact-grid { grid-template-columns: 1fr 1fr; max-width: 620px; }
  .footer-top { grid-template-columns: 1.4fr 1fr; align-items: start; }
}
@media (min-width: 920px) {
  .nav { display: flex; }
  .header-cta { display: inline-flex; }
  .nav-toggle { display: none; }
  .mobile-nav { display: none !important; }
  .mobile-bar { display: none; }
  .site-footer { padding-bottom: 40px; }
  .trustbar ul { grid-template-columns: repeat(4, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
