/* =====================================================================
   William Laflamme — mortgage broker site.
   "Warm & approachable" design system. Because every page extends
   base.html and loads this file, these tokens/components cascade site-wide.
   ===================================================================== */

:root {
  /* Brand green (kept) */
  --primary: #055c2b;
  --primary-600: #0a6b38;
  --primary-hover: #044621;
  --primary-color: #055c2b;          /* legacy alias, still referenced in places */

  /* Warm accent (honey/amber) — the missing "warmth" */
  --accent: #e0912f;
  --accent-600: #c77c1c;
  --accent-soft: #fbecd3;

  /* Warm neutrals (replace the cold greys) */
  --cream: #faf6ef;
  --cream-2: #f3ebdd;
  --ink: #2b2823;
  --muted: #6f695f;
  --surface: #ffffff;
  --green-soft: #e8f1ea;

  /* Depth */
  --shadow-sm: 0 2px 10px rgba(31, 27, 20, .05);
  --shadow: 0 14px 38px -14px rgba(31, 27, 20, .18);
  --shadow-hover: 0 22px 48px -16px rgba(31, 27, 20, .26);
  --radius: 18px;
  --radius-sm: 12px;

  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-head: 'Poppins', var(--font-body);
}

/* ---------- Base typography ---------- */
/* Large-gutter (g-5) rows protrude ~12px past the container padding on narrow
   screens, causing horizontal scroll. `clip` (not `hidden`) removes it without
   creating a scroll container, so position: sticky keeps working. */
html, body { overflow-x: clip; }

body {
  background-color: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6, .navbar-brand { font-family: var(--font-head); letter-spacing: -.01em; }
h1, h2 { font-weight: 700; }
.lead { font-weight: 400; }
.text-muted { color: var(--muted) !important; }
a { text-decoration-thickness: .08em; text-underline-offset: .15em; }

/* ---------- Brand color utility overrides ---------- */
.bg-primary { background-color: var(--primary) !important; }
.text-primary { color: var(--primary) !important; }
.text-accent { color: var(--accent) !important; }
.bg-cream { background-color: var(--cream) !important; }
.bg-cream-2 { background-color: var(--cream-2) !important; }

.btn { border-radius: 11px; font-weight: 600; }
.btn-lg { padding: .7rem 1.5rem; }
.btn-primary {
  background-color: var(--primary); border-color: var(--primary);
  box-shadow: 0 8px 20px -8px rgba(5, 92, 43, .55);
}
.btn-primary:hover, .btn-primary:focus {
  background-color: var(--primary-hover); border-color: var(--primary-hover);
}
.btn-outline-primary { color: var(--primary); border-color: var(--primary); }
.btn-outline-primary:hover { background-color: var(--primary); border-color: var(--primary); }
.btn-accent {
  background-color: var(--accent); border-color: var(--accent); color: #fff;
  box-shadow: 0 8px 20px -8px rgba(224, 145, 47, .6);
}
.btn-accent:hover, .btn-accent:focus { background-color: var(--accent-600); border-color: var(--accent-600); color: #fff; }
.navbar-brand.text-primary:hover { color: var(--primary-hover) !important; }

/* ---------- Navbar ---------- */
.navbar { box-shadow: 0 1px 0 rgba(31,27,20,.06), 0 6px 24px -20px rgba(31,27,20,.4); }
.navbar .nav-link { font-weight: 500; }
.navbar .nav-link:hover { color: var(--primary) !important; }

/* ---------- Cards & depth ---------- */
.card {
  border-radius: var(--radius);
  border: 1px solid rgba(31, 27, 20, .05);
  box-shadow: var(--shadow-sm);
  background: var(--surface);
  transition: transform .18s ease, box-shadow .18s ease;
}
.card-hover:hover, a.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }

/* ---------- Icon chip (upgrades the thin generic icons) ---------- */
.icon-chip {
  width: 56px; height: 56px; border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.6rem; color: var(--primary);
  background: var(--green-soft);
}
.icon-chip.accent { color: var(--accent-600); background: var(--accent-soft); }
.icon-chip.lg { width: 66px; height: 66px; font-size: 1.9rem; }

/* ---------- Section headings with an accent underline ---------- */
.section-eyebrow {
  display: inline-block; font-family: var(--font-head); font-weight: 600;
  font-size: .8rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent-600); margin-bottom: .5rem;
}
.section-title { position: relative; }
.section-title.center-underline::after {
  content: ""; display: block; width: 54px; height: 4px; border-radius: 4px;
  background: var(--accent); margin: .75rem auto 0;
}

/* ---------- Hero ---------- */
/* .hero-section is the legacy class other pages use; keep it an alias of .hero. */
.hero, .hero-section {
  position: relative; overflow: hidden;
  background: radial-gradient(1200px 500px at 15% -10%, var(--primary-600) 0%, transparent 60%),
              linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
}
.hero-blob { position: absolute; border-radius: 50%; filter: blur(8px); opacity: .18; pointer-events: none; }
.hero-blob-1 { width: 340px; height: 340px; background: var(--accent); top: -120px; right: -60px; opacity: .22; }
.hero-blob-2 { width: 260px; height: 260px; background: #fff; bottom: -120px; left: -80px; opacity: .08; }
.hero-eyebrow {
  display: inline-block; font-family: var(--font-head); font-weight: 600; font-size: .82rem;
  letter-spacing: .08em; text-transform: uppercase; color: #ffe4bd;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18);
  padding: .32rem .8rem; border-radius: 999px;
}
.hero-pill {
  display: inline-flex; align-items: center; gap: .4rem;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18);
  color: #fff; font-size: .86rem; font-weight: 500;
  padding: .38rem .8rem; border-radius: 999px;
}
.hero-pill i { color: #ffcf8a; }

/* Hero visual card (illustrated placeholder — looks finished, no photo needed yet) */
.hero-visual {
  position: relative; border-radius: 22px; padding: 2rem;
  background: linear-gradient(160deg, #fff 0%, var(--cream) 100%);
  box-shadow: var(--shadow);
}
.hero-visual svg { width: 100%; height: auto; display: block; }
.stat-chip {
  position: absolute; background: #fff; border-radius: 14px;
  box-shadow: var(--shadow); padding: .6rem .85rem; display: flex; align-items: center; gap: .55rem;
}
.stat-chip .icon-chip { width: 40px; height: 40px; font-size: 1.15rem; border-radius: 10px; }
.stat-chip .sc-num { font-family: var(--font-head); font-weight: 700; line-height: 1; color: var(--ink); }
.stat-chip .sc-lbl { font-size: .72rem; color: var(--muted); }
.stat-chip-tl { top: 8px; left: -18px; }
.stat-chip-br { bottom: 10px; right: -14px; }
@media (max-width: 575px) { .stat-chip-tl { left: 4px; } .stat-chip-br { right: 4px; } }

/* ---------- Trust bar ---------- */
.trust-item { display: flex; align-items: center; gap: .6rem; justify-content: center; }
.trust-item .icon-chip { width: 42px; height: 42px; font-size: 1.15rem; border-radius: 11px; }

/* ---------- Process timeline ---------- */
.process-step-num {
  width: 54px; height: 54px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--primary); color: #fff; font-weight: 700; font-size: 1.25rem;
  font-family: var(--font-head); box-shadow: 0 0 0 6px var(--green-soft); position: relative; z-index: 1;
}
/* (6-step process now wraps to 2 rows, so no single-row connector line.) */

/* ---------- Meet William placeholder photo ---------- */
.meet-photo {
  aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(160deg, var(--green-soft), var(--accent-soft));
  border: 2px dashed rgba(5,92,43,.25);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--primary); text-align: center; gap: .5rem;
}
.meet-photo i { font-size: 3.2rem; opacity: .55; }
.meet-photo span { font-size: .85rem; color: var(--muted); font-weight: 500; }
.signature { font-family: var(--font-head); font-weight: 700; color: var(--primary); }

/* ---------- Accordion ---------- */
.accordion-item { border-radius: var(--radius-sm) !important; overflow: hidden; margin-bottom: .6rem; border: 1px solid rgba(31,27,20,.08); }
.accordion-button { font-weight: 600; }
.accordion-button:not(.collapsed) { color: var(--primary); background-color: var(--green-soft); }
.accordion-button:focus { box-shadow: 0 0 0 .2rem rgba(5, 92, 43, .15); }

/* ---------- Calculator results panel ---------- */
@media (min-width: 992px) { .calc-results { position: sticky; top: 90px; } }

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: #fff; border-top: 1px solid rgba(31,27,20,.1); z-index: 1080;
  box-shadow: 0 -8px 30px -18px rgba(31,27,20,.4);
}

/* ---------- Extra spacing utility (Bootstrap stops at 5) ---------- */
.py-6 { padding-top: 5rem; padding-bottom: 5rem; }
@media (min-width: 992px) { .py-lg-6 { padding-top: 5.5rem; padding-bottom: 5.5rem; } }

/* ---------- Footer accent ---------- */
footer .link-light:hover { color: #fff !important; }
