/* ============================================================
   S.O.S. LOANS, INC. — CANONICAL DESIGN TOKENS
   Private Mortgage & Equity Brokers
   ------------------------------------------------------------
   SINGLE SOURCE OF TRUTH for color, type, spacing, radius,
   shadow. Every page links THIS file. Do not hardcode hex
   values in pages — reference these variables instead.

   Distilled from the live site (index / pricing / meet-broker
   / contact), which already shared one palette + Inter + a
   1280px container. Values verified against actual usage.
   ============================================================ */

:root {
  /* ----------------------------------------------------------
     BRAND COLORS
     ---------------------------------------------------------- */
  --sos-primary:          #00341c;  /* emerald forest — logo green. Buttons, links, eyebrows, icons, dark grounds. PRIMARY brand color. */
  --sos-primary-dark:     #004d2c;  /* darker emerald — hover/pressed on primary */
  --sos-primary-tint:     #92d5a9;  /* light emerald — on-dark accents, subtle fills */

  --sos-cta:              #f5b820;  /* warm marigold yellow — the "do this next" CTA color. ONE loud color, used sparingly. */
  --sos-cta-hover:        #f8c84d;  /* LIGHTER yellow — hover/pressed (yellow lightens on hover, doesn't darken) */
  --sos-cta-text:         #3d2b0f;  /* dark brown-ink — required text color ON the yellow CTA for contrast */

  --sos-gold:             #c19b2e;  /* heritage gold — hairline rules, accent words, seasoning only */

  /* ----------------------------------------------------------
     TEXT / INK
     ---------------------------------------------------------- */
  --sos-ink:              #1a1a1a;  /* neutral near-black — headlines & body. No color cast, no blue tint. */
  --sos-ink-subtle:       #404942;  /* muted slate — labels, secondary text, captions */
  --sos-on-dark:          #ffffff;  /* text on emerald / photo grounds */

  /* ----------------------------------------------------------
     SURFACES / NEUTRALS  (calm warm slate family, no cold grey)
     ---------------------------------------------------------- */
  --sos-page:             #ffffff;  /* page background — crisp white. Lets cards float on real white. */
  --sos-surface-slate:    #f8fafc;  /* faint slate — optional alternating section tint, used sparingly */
  --sos-card:             #ffffff;  /* card / panel background */
  --sos-hairline:         #bfc9bf;  /* thin slate borders / dividers */

  /* MINT — the signature soft eyebrow badge fill (matches the
     "CALIFORNIA PROPERTY DIVISION SOLUTIONS" pill on the live site).
     Text on mint uses --sos-primary. */
  --sos-mint:             #e1f5ee;
  --sos-mint-text:        #00341c;

  /* ----------------------------------------------------------
     SEMANTIC
     ---------------------------------------------------------- */
  --sos-success:          #7bbd93;  /* check-circles, positive states */
  --sos-error:            #ba1a1a;  /* form errors */
  --sos-info:             #002967;  /* support navy — result panels, charts */

  /* ----------------------------------------------------------
     TYPOGRAPHY
     One family sitewide: Inter (matches the live site).
     ---------------------------------------------------------- */
  --sos-font:             'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Type scale — weights & sizes pulled from live headlines/body */
  --sos-display:    800 clamp(2.5rem, 5vw, 4.5rem)/1.08 var(--sos-font);  /* hero headline */
  --sos-title:      800 clamp(1.75rem, 3vw, 2.75rem)/1.15 var(--sos-font); /* section title */
  --sos-headline:   700 1.375rem/1.35 var(--sos-font);                     /* card / sub heads */
  --sos-body:       400 1rem/1.65 var(--sos-font);                         /* body copy */
  --sos-eyebrow:    700 0.8125rem/1 var(--sos-font);                       /* ALL-CAPS overline */

  --sos-tracking-tight:   -0.022em;  /* heavy headlines tracked in */
  --sos-tracking-eyebrow:  0.14em;   /* eyebrows tracked out */

  /* ----------------------------------------------------------
     SPACING  (8px rhythm, large 96px section gaps)
     ---------------------------------------------------------- */
  --sos-space-1:   8px;
  --sos-space-2:   16px;
  --sos-space-3:   24px;
  --sos-space-4:   32px;   /* grid gutter */
  --sos-space-6:   28px;   /* card inner padding — balanced (was 48px) */
  --sos-space-section: 96px;  /* vertical gap between sections */

  --sos-container:  1280px; /* max content width */
  --sos-gutter:     32px;   /* page side padding */

  /* ----------------------------------------------------------
     RADIUS
     ---------------------------------------------------------- */
  --sos-radius-input:  10px;   /* inputs, small controls */
  --sos-radius-card:   6px;    /* standard card — tight, crisp corners (was 16px) */
  --sos-radius-xl:     8px;    /* large feature panel — slightly larger than card, still tight */
  --sos-radius-btn:    10px;   /* BUTTONS — soft, not pill (was 9999px) */
  --sos-radius-pill:   9999px; /* buttons, chips, badges */

  /* ----------------------------------------------------------
     SHADOWS  (emerald-tinted, never neutral black)
     ---------------------------------------------------------- */
  --sos-shadow-sm:  0 2px 8px -2px rgba(0, 52, 28, 0.10);   /* hairline-level lift */
  --sos-shadow-md:  0 16px 32px -12px rgba(0, 52, 28, 0.16); /* DEFAULT card shadow */
  --sos-shadow-lg:  0 24px 48px -12px rgba(0, 52, 28, 0.20); /* prominent/floating elements */

  /* ----------------------------------------------------------
     MOTION
     ---------------------------------------------------------- */
  --sos-ease:       cubic-bezier(0.4, 0, 0.2, 1);
  --sos-duration:   130ms;  /* snappy, not lazy — was 200ms */
}

/* ============================================================
   OPTIONAL BASE HELPERS
   Lightweight, framework-agnostic. Safe to delete if your
   pages style everything via Tailwind classes instead.
   ============================================================ */

body {
  font: var(--sos-body);
  color: var(--sos-ink);
  background: var(--sos-page);
}

h1, h2, h3 {
  color: var(--sos-ink);
  letter-spacing: var(--sos-tracking-tight);
}

/* Accent word inside a headline: <span class="sos-ac">…</span> */
.sos-ac { color: var(--sos-cta); white-space: nowrap; }
.sos-ac--green { color: var(--sos-primary); white-space: nowrap; }

/* Eyebrow / overline (plain — text only) */
.sos-eyebrow {
  font: var(--sos-eyebrow);
  letter-spacing: var(--sos-tracking-eyebrow);
  text-transform: uppercase;
  color: var(--sos-primary);
}

/* Eyebrow pill — the signature soft mint badge.
   Use for section labels like "OUR SOLUTIONS" or
   "CALIFORNIA PROPERTY DIVISION SOLUTIONS". */
.sos-eyebrow-pill {
  display: inline-block;
  font: var(--sos-eyebrow);
  letter-spacing: var(--sos-tracking-eyebrow);
  text-transform: uppercase;
  color: var(--sos-mint-text);
  background: var(--sos-mint);
  border-radius: var(--sos-radius-pill);
  padding: 8px 16px;
}

/* Buttons — soft 10px corners (not pill). Medium size is the default. */
.sos-btn {
  font-family: var(--sos-font);
  font-weight: 600;
  font-size: 0.9375rem;
  border-radius: var(--sos-radius-btn);
  padding: 13px 26px;
  border: none;
  cursor: pointer;
  transition: background var(--sos-duration) var(--sos-ease),
              transform var(--sos-duration) var(--sos-ease);
}
.sos-btn:active { transform: scale(0.97); }

.sos-btn--primary { background: var(--sos-primary); color: #fff; }
.sos-btn--primary:hover { background: var(--sos-primary-dark); }  /* primary DARKENS on hover */

.sos-btn--cta { background: var(--sos-cta); color: var(--sos-cta-text); font-weight: 700; }
.sos-btn--cta:hover { background: var(--sos-cta-hover); }          /* CTA LIGHTENS on hover */

/* Card */
.sos-card {
  background: var(--sos-card);
  border: 1px solid var(--sos-hairline);
  border-radius: var(--sos-radius-card);
  padding: var(--sos-space-6);
  box-shadow: var(--sos-shadow-sm);
  transition: transform var(--sos-duration) var(--sos-ease),
              box-shadow var(--sos-duration) var(--sos-ease);
}
.sos-card:hover { transform: translateY(-2px); box-shadow: var(--sos-shadow-md); }

/* Gold tick rule under titles (brand motif) */
.sos-rule-gold {
  width: 64px; height: 3px;
  background: var(--sos-gold);
  border: none;
}

/* Icon chip — grey circle, medium-stroke icon inside */
.sos-icon-chip {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--sos-surface-slate);
  display: flex; align-items: center; justify-content: center;
  color: var(--sos-primary);
}
.sos-icon-chip svg { width: 24px; height: 24px; stroke-width: 1.75; }

/* Body links — soft underline, lower-opacity line */
.sos-link {
  color: var(--sos-primary);
  text-decoration: underline;
  text-decoration-color: rgba(0, 52, 28, 0.35);
  text-underline-offset: 2px;
}

/* Form field error state */
.sos-field--error input,
.sos-field--error select {
  border-color: var(--sos-error) !important;
}
.sos-field--error label { color: var(--sos-error); }
.sos-field--error .sos-field-msg { color: var(--sos-error); font-size: 0.6875rem; margin-top: 4px; }

/* Centered page container */
.sos-container {
  max-width: var(--sos-container);
  margin-inline: auto;
  padding-inline: var(--sos-gutter);
}

/* ============================================================
   SITE FOOTER — deep forest-green brand ground with a heritage-
   gold hairline on top. Text stays light (native white / slate
   utilities); the full-color logo sits on a soft white plate so
   its dark-green lettering stays legible on the dark ground.
   Applied via the .site-footer class on every page's <footer>.
   ============================================================ */
.site-footer {
  position: relative;
  /* Opens on the exact tone .close-cta fades to (#00200f) so the closing CTA
     and the footer read as one continuous surface with no seam between them,
     then deepens to a near-black forest for weight. */
  background: linear-gradient(180deg, #00200f 0%, #001409 52%, #000d06 100%) !important;
  border-top: none;
}

/* Closing CTA — pairs with .site-footer above; its final stop must stay in
   sync with the footer's opening stop. */
.close-cta { background: radial-gradient(120% 120% at 50% 0%, #0a4a2a 0%, #00341c 52%, #00200f 100%); }

/* ---- Footer interior ---- */
.site-footer .fcol-head {
  font-size: 11px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: rgba(255,255,255,0.45); margin-bottom: 18px;
}
.site-footer .flink { color: rgba(255,255,255,0.68); transition: color 130ms ease; }
.site-footer .flink:hover { color: #ffffff; }
.site-footer .frule {
  height: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.11) 22%, rgba(255,255,255,0.11) 78%, rgba(255,255,255,0) 100%);
}
.site-footer .social-ico { opacity: 0.62; transition: opacity 130ms ease, transform 130ms ease; }
.site-footer .social-ico:hover { opacity: 1; transform: translateY(-2px); }

/* Full-color logo on a soft white plate so the dark-green wordmark
   reads on the dark ground (the white logo is banned, so instead we
   light the backing rather than the mark). */
.footer-logo {
  background: #ffffff;
  padding: 13px 18px;
  border-radius: 12px;
  box-shadow: 0 14px 30px -16px rgba(0, 0, 0, 0.55);
}

/* Equal Housing Lender mark — render it white so it stays clearly
   visible on the dark footer. */
.site-footer img[alt="Equal Housing Lender"] {
  filter: brightness(0) invert(1);
}

/* Social icon buttons — soft glass circles that fill gold on hover. */
.social-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #ffffff;
  transition: background-color 160ms var(--sos-ease), border-color 160ms var(--sos-ease),
              color 160ms var(--sos-ease), transform 160ms var(--sos-ease);
}
.social-ico:hover {
  background: var(--sos-cta);
  border-color: var(--sos-cta);
  color: var(--sos-cta-text);
  transform: translateY(-2px);
}
.social-ico svg { width: 18px; height: 18px; fill: currentColor; }
@media (prefers-reduced-motion: reduce) { .social-ico:hover { transform: none; } }

/* ============================================================
   HEI DISCLOSURES MODAL — hidden by default; revealed when the
   footer "Disclosures" link targets #hei-disclosures (pure CSS,
   no JS). Close via the × or the backdrop (both link to "#").
   ============================================================ */
.disclosures-modal {
  display: none; position: fixed; inset: 0; z-index: 90;
  align-items: center; justify-content: center; padding: 24px;
}
.disclosures-modal:target { display: flex; }
.disclosures-backdrop { position: absolute; inset: 0; background: rgba(8,12,20,0.60); }
.disclosures-dialog {
  position: relative; z-index: 1; width: 100%; max-width: 880px;
  max-height: 85vh; overflow-y: auto; background: #ffffff; color: #1a1a1a;
  border-radius: 10px; padding: 34px 30px;
  box-shadow: 0 24px 60px -12px rgba(0,0,0,0.5);
}
.disclosures-dialog h3 { color: #00341c !important; }
.disclosures-dialog p  { color: #404942 !important; }
.disclosures-dialog p span { color: #1a1a1a !important; }
.disclosures-close {
  position: absolute; top: 12px; right: 16px; z-index: 2;
  font-size: 26px; line-height: 1; font-weight: 400;
  color: #404942 !important; text-decoration: none;
}
.disclosures-close:hover { color: #00341c !important; }

/* ============================================================
   SITE HEADER — quiet-luxury nav.
   Restraint at rest; the gold hairline (§3, heritage gold) is the
   only flourish, drawn under the item you're actually pointing at.
   Bar height is unchanged (78/86px) — every page hardcodes its own
   top padding to clear it, so it must not move.
   ============================================================ */
.nav-bar {
  background: rgba(255,255,255,0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  /* Hairline drawn as a shadow, not a border — a border would add 1px to the
     bar's height, and every page hardcodes its top padding to clear it. */
  box-shadow: 0 1px 0 rgba(191,201,191,0.45), 0 8px 24px -18px rgba(0,52,28,0.18);
}

.nav-item { position: relative; }

/* No caret, no underline. The item simply lifts onto a soft surface of its own
   when you point at it — the whole word becomes the target, which reads calmer
   and more deliberate than a rule drawn under it. */
.nav-link {
  position: relative;
  display: inline-flex; align-items: center;
  padding: 9px 14px; border-radius: 10px;
  font-size: 14.5px; font-weight: 500; letter-spacing: 0.012em;
  color: var(--sos-ink-subtle); white-space: nowrap;
  background: transparent;
  transition: color 200ms cubic-bezier(0.4, 0, 0.2, 1),
              background-color 200ms cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-item:hover > .nav-link,
.nav-item:focus-within > .nav-link,
.nav-link:focus-visible {
  color: var(--sos-primary);
  background: rgba(0, 52, 28, 0.045);
}
.nav-link:focus-visible { outline: 2px solid var(--sos-primary); outline-offset: 2px; }

/* Dropdown — a calm sheet, not a popup */
.nav-panel {
  position: absolute; left: -8px; top: 100%; padding-top: 14px; z-index: 50;
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity 200ms ease, transform 300ms cubic-bezier(0.16, 1, 0.3, 1), visibility 200ms;
}
.nav-item:hover .nav-panel,
.nav-item:focus-within .nav-panel { opacity: 1; visibility: visible; transform: translateY(0); }

.nav-panel-inner {
  position: relative; background: #fff; padding: 8px;
  min-width: 306px; border: 1px solid rgba(191,201,191,0.45); border-radius: 14px;
  box-shadow: 0 1px 2px rgba(0,52,28,0.04), 0 24px 48px -20px rgba(0,52,28,0.22);
}
.nav-opt {
  display: block; padding: 10px 14px; border-radius: 10px;
  transition: background-color 180ms ease;
}
.nav-opt:hover { background: #f4f9f6; }
.nav-opt-t {
  display: block; font-size: 14px; font-weight: 600; letter-spacing: -0.005em;
  color: var(--sos-ink); transition: color 180ms ease;
}
.nav-opt:hover .nav-opt-t { color: var(--sos-primary); }
.nav-opt-d {
  display: block; margin-top: 2px; font-size: 12.5px; line-height: 1.45;
  color: var(--sos-ink-subtle); opacity: 0.72;
}

/* Login steps down to a quiet outline — the marigold Apply stays the
   only loud button on the page (§3: CTA is the one loud colour). */
.nav-login {
  display: inline-block; padding: 11px 22px; border-radius: 10px;
  font-size: 14.5px; font-weight: 600; white-space: nowrap;
  color: var(--sos-primary); background: transparent;
  border: 1px solid rgba(0, 52, 28, 0.2);
  transition: border-color 200ms ease, background-color 200ms ease;
}
.nav-login:hover { border-color: var(--sos-primary); background: rgba(0, 52, 28, 0.04); }

@media (prefers-reduced-motion: reduce) {
  .nav-link, .nav-link::after, .nav-caret, .nav-panel, .nav-opt, .nav-login { transition: none; }
}

/* ============================================================
   MOBILE NAV — full-bleed forest panel.
   Not a dropdown under the bar: it takes the whole screen, the way a
   premium app sheet does. Big type, generous rhythm, the two actions
   parked at the foot as pills.
   ============================================================ */
#mobileMenu.mnav {
  position: fixed; inset: 0; z-index: 60;
  display: flex; flex-direction: column;
  background: linear-gradient(165deg, #00341c 0%, #002512 55%, #001b0d 100%);
  overflow-y: auto; overscroll-behavior: contain;
  animation: mnavIn 320ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
#mobileMenu.mnav.hidden { display: none; }
@keyframes mnavIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* Items rise in behind the panel, one after another */
.mnav-row { animation: mnavRow 420ms cubic-bezier(0.16, 1, 0.3, 1) both; }
.mnav-row:nth-child(1) { animation-delay: 40ms; }
.mnav-row:nth-child(2) { animation-delay: 85ms; }
.mnav-row:nth-child(3) { animation-delay: 130ms; }
.mnav-row:nth-child(4) { animation-delay: 175ms; }
.mnav-row:nth-child(5) { animation-delay: 220ms; }
@keyframes mnavRow { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.mnav-link {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 18px 0; background: none; border: 0;
  font-size: 22px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.2;
  color: #fff; text-align: left; cursor: pointer;
  transition: color 180ms ease;
}
.mnav-link:active { color: var(--sos-primary-tint, #92d5a9); }
.mnav-caret {
  font-size: 22px; font-variation-settings: 'wght' 300;
  color: rgba(255,255,255,0.45);
  transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1), color 180ms ease;
}

.mnav-sub a {
  display: block; padding: 11px 0 11px 2px;
  font-size: 15px; font-weight: 400; color: rgba(255,255,255,0.62);
  transition: color 180ms ease;
}
.mnav-sub a:active { color: #fff; }

.mnav-divider { height: 1px; background: rgba(255,255,255,0.09); }

/* Actions — marigold stays the one loud thing (§3) */
.mnav-cta {
  display: block; width: 100%; text-align: center;
  padding: 16px 24px; border-radius: 9999px;
  font-size: 16px; font-weight: 700; letter-spacing: -0.01em;
  background: var(--sos-cta, #f5b820); color: var(--sos-cta-text, #3d2b0f);
  transition: transform 130ms ease;
}
.mnav-cta:active { transform: scale(0.985); }
.mnav-login {
  display: block; width: 100%; text-align: center;
  padding: 16px 24px; border-radius: 9999px;
  font-size: 16px; font-weight: 600;
  color: var(--sos-cta, #f5b820);
  border: 1px solid rgba(245, 184, 32, 0.5);
  background: transparent;
  transition: background-color 180ms ease, border-color 180ms ease;
}
.mnav-login:active { background: rgba(245, 184, 32, 0.08); border-color: rgba(245, 184, 32, 0.9); }

/* Icon only — the glyph and the word "Close" said the same thing twice.
   Sized as a proper 44px touch target and given a surface to land on, since
   the bare mark no longer has a word beside it to make it feel deliberate. */
.mnav-close {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; margin-right: -8px;   /* optical alignment to the edge */
  border-radius: 9999px;
  color: rgba(255,255,255,0.75);
  background: transparent; border: 0; cursor: pointer;
  transition: color 200ms ease, background-color 200ms ease;
}
.mnav-close .material-symbols-outlined { font-size: 27px; }
.mnav-close:hover, .mnav-close:active {
  color: #fff; background: rgba(255,255,255,0.08);
}
.mnav-close:focus-visible { outline: 2px solid rgba(245,184,32,0.8); outline-offset: 2px; }
.mnav-close:active { color: #fff; }

/* Page must not scroll behind the panel */
body.mnav-open { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  #mobileMenu.mnav, .mnav-row { animation: none; }
  .mnav-link, .mnav-caret, .mnav-sub a, .mnav-cta, .mnav-login { transition: none; }
}

/* ============================================================
   Footer wordmark — "SOS" in CTA gold, "LOANS" in white, all caps.
   ============================================================ */
.sos-wm-sos, .sos-wm-loans { text-transform: uppercase; }
.sos-wm-sos { color: #f5b820; }
.sos-wm-loans { color: #ffffff; }
.sos-wm-tm { color: #ffffff; font-size: 0.62em; font-weight: 800; line-height: 1; align-self: flex-start; margin-left: 0.04em; margin-top: 0.05em; }
