/* ==========================================================================
   The Friendly Mortgage Broker — Design System
   Palette: Teal-Ink + Emerald   ·   Type: Space Grotesk + Inter
   Single source of truth. Restyle the whole site from :root below.
   ========================================================================== */

:root {
  /* ---- Brand palette ---- */
  --primary-color:   #0E2A33;  /* ink — nav, headings, footer */
  --primary-deep:    #0A1F26;  /* darker ink — footer base, gradients */
  --surface-deep:    #12343B;  /* raised dark surface (cards on dark) */
  --secondary-color: #1FB57A;  /* emerald — CTAs, links, highlights */
  --secondary-dark:  #178A5E;  /* emerald hover/pressed */
  --secondary-glow:  rgba(31,181,122,0.18);
  --mint-soft:       #E8F5EF;  /* soft mint — chips, callouts, tints */
  --mint-line:       #CDE9DD;  /* mint hairline */

  /* ---- Neutrals ---- */
  --text-dark:   #0E2A33;
  --text-body:   #33474D;
  --text-muted:  #5A6B6F;
  --bg-light:    #F7F9F8;
  --bg-panel:    #FFFFFF;
  --border:      #E3EAE8;
  --border-strong:#CBD6D3;
  --white:       #FFFFFF;

  /* ---- Type ---- */
  --font-head: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --num: 'Inter', system-ui, sans-serif; /* tabular figures applied per-element */

  /* ---- Shape & depth ---- */
  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(14,42,51,0.04), 0 2px 8px rgba(14,42,51,0.04);
  --shadow:    0 6px 24px rgba(14,42,51,0.08);
  --shadow-lg: 0 18px 50px rgba(14,42,51,0.14);
  --ring: 0 0 0 3px var(--secondary-glow);

  /* ---- Motion ---- */
  --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  --t-fast: all 0.2s ease;

  /* ---- Layout ---- */
  --maxw: 1180px;
  --gutter: 8%;
}

/* ==========================================================================
   Reset & base
   ========================================================================== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  font-family: var(--font-body);
  line-height: 1.7;
  color: var(--text-body);
  background: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, .logo {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.12;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2.3rem, 5.2vw, 3.7rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.45rem); }
p  { color: var(--text-body); }

a { color: var(--secondary-dark); text-decoration: none; transition: var(--t-fast); }
a:hover { color: var(--secondary-color); }

img, svg { max-width: 100%; display: block; }

/* tabular figures helper — money & big numbers stay column-aligned */
.tnum, .calc *, .stat-num { font-feature-settings: "tnum" 1, "cv01" 1; font-variant-numeric: tabular-nums; }

/* ==========================================================================
   Layout helpers
   ========================================================================== */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section-tint { background: var(--bg-light); }
.section-ink  { background: var(--primary-color); color: #DCE7E6; }
.section-ink h2, .section-ink h3 { color: var(--white); }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-head); font-weight: 500; font-size: .8rem;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--secondary-dark);
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--secondary-color); border-radius: 2px; }
.section-ink .eyebrow { color: var(--secondary-color); }
.section-head { max-width: 640px; margin-bottom: 2.8rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head p { margin-top: .9rem; color: var(--text-muted); font-size: 1.05rem; }
.section-ink .section-head p { color: #A9BFBE; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font-family: var(--font-head); font-weight: 500; font-size: 1rem;
  padding: .92rem 1.6rem; border-radius: var(--radius-sm);
  border: 1px solid transparent; cursor: pointer; transition: var(--transition);
  white-space: nowrap; line-height: 1;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--secondary-color); color: #04130C; box-shadow: 0 8px 20px var(--secondary-glow); }
.btn-primary:hover { background: var(--secondary-dark); color: var(--white); transform: translateY(-2px); box-shadow: 0 12px 26px var(--secondary-glow); }
.btn-ghost { background: transparent; color: var(--primary-color); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--primary-color); background: var(--primary-color); color: var(--white); transform: translateY(-2px); }
/* Ghost buttons on any dark surface get white text (not dark-on-dark). */
.section-ink .btn-ghost, .hero .btn-ghost, .cta-strip .btn-ghost, .page-hero .btn-ghost { color: var(--white); border-color: rgba(255,255,255,.28); }
.section-ink .btn-ghost:hover, .hero .btn-ghost:hover, .cta-strip .btn-ghost:hover, .page-hero .btn-ghost:hover { background: var(--white); color: var(--primary-color); }
.btn-lg { padding: 1.05rem 2rem; font-size: 1.06rem; }
.btn-block { width: 100%; }

/* ==========================================================================
   Skip link / noscript
   ========================================================================== */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 2000;
  background: var(--primary-color); color: #fff; padding: .8rem 1.2rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }
.noscript-banner { background: var(--secondary-dark); color: #fff; text-align: center; padding: .7rem 1rem; font-size: .95rem; }
.noscript-banner a { color: #fff; text-decoration: underline; }

/* ==========================================================================
   Navigation (PINNED LTR — guards against forced RTL translate)
   ========================================================================== */
nav {
  background: rgba(255,255,255,0.86);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  padding: 1rem var(--gutter);
  display: flex; justify-content: space-between; align-items: center;
  position: sticky; top: 0; z-index: 1000;
  border-bottom: 1px solid var(--border);
  direction: ltr;
}
.nav-links, .nav-links .dropdown-menu { direction: ltr; text-align: left; }

.logo { display: inline-flex; align-items: center; gap: .6rem; font-size: 1.18rem; font-weight: 700; color: var(--primary-color); letter-spacing: -0.03em; }
.logo .logo-mark { width: 34px; height: 34px; flex: none; }
.logo b { color: var(--secondary-dark); font-weight: 700; }

.nav-links { list-style: none; display: flex; align-items: center; gap: .35rem; }
.nav-links > li > a {
  display: inline-flex; align-items: center; gap: .3rem;
  font-family: var(--font-head); font-weight: 500; font-size: .95rem;
  color: var(--text-dark); padding: .55rem .8rem; border-radius: 8px;
}
.nav-links > li > a:hover, .nav-links > li > a.active { color: var(--secondary-dark); background: var(--mint-soft); }
.nav-cta { margin-left: .4rem; }
.nav-cta a { background: var(--secondary-color); color: #04130C !important; padding: .6rem 1.1rem !important; }
.nav-cta a:hover { background: var(--secondary-dark); color: #fff !important; }

/* Dropdown */
.has-dropdown { position: relative; }
.dropdown-chevron { transition: var(--t-fast); }
.dropdown-menu {
  list-style: none; position: absolute; top: calc(100% + .4rem); left: 0; min-width: 256px;
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: .5rem; opacity: 0; visibility: hidden;
  transform: translateY(8px); transition: var(--transition);
}
.dropdown-menu li a { display: block; padding: .7rem .8rem; border-radius: 8px; color: var(--text-dark); font-weight: 500; font-size: .94rem; }
.dropdown-menu li a small { display: block; font-weight: 400; color: var(--text-muted); font-family: var(--font-body); font-size: .8rem; margin-top: .1rem; }
.dropdown-menu li a:hover { background: var(--mint-soft); color: var(--secondary-dark); }
@media (min-width: 1101px) {
  .has-dropdown:hover .dropdown-menu, .has-dropdown:focus-within .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
  .has-dropdown:hover .dropdown-chevron { transform: rotate(180deg); }
}

/* Hamburger */
.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.hamburger span { width: 26px; height: 2px; background: var(--primary-color); border-radius: 2px; transition: var(--t-fast); }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-backdrop { position: fixed; inset: 0; background: rgba(10,31,38,.45); opacity: 0; visibility: hidden; transition: var(--t-fast); z-index: 998; }
.nav-backdrop.active { opacity: 1; visibility: visible; }

@media (max-width: 1100px) {
  .hamburger { display: flex; }
  .nav-links {
    position: fixed; top: 0; right: 0; height: 100dvh; width: min(82vw, 340px);
    background: var(--white); flex-direction: column; align-items: stretch; gap: .2rem;
    padding: 5rem 1.4rem 2rem; box-shadow: var(--shadow-lg);
    transform: translateX(100%); transition: transform 0.4s cubic-bezier(0.165,0.84,0.44,1), visibility 0.4s;
    overflow-y: auto; z-index: 999;
    /* Closed drawer must never render a sliver or create horizontal overflow. */
    visibility: hidden; pointer-events: none;
  }
  .nav-links.open { transform: translateX(0); visibility: visible; pointer-events: auto; }
  .nav-links > li > a { padding: .85rem .8rem; font-size: 1.05rem; }
  .nav-cta { margin: .6rem 0 0; }
  .nav-cta a { justify-content: center; }
  .dropdown-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; border-left: 2px solid var(--mint-line); border-radius: 0; margin: 0 0 .4rem .8rem; max-height: 0; overflow: hidden; padding: 0 .5rem; transition: max-height .35s ease; }
  .has-dropdown.open .dropdown-menu { max-height: 420px; padding: .3rem .5rem; }
  .has-dropdown.open .dropdown-chevron { transform: rotate(180deg); }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative; background: var(--primary-color);
  background-image:
    radial-gradient(1100px 520px at 78% -8%, rgba(31,181,122,0.20), transparent 60%),
    radial-gradient(700px 420px at 8% 110%, rgba(31,181,122,0.10), transparent 55%);
  color: #DCE7E6; overflow: hidden;
}
.hero::after { /* subtle grid like a dashboard */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 46px 46px; mask-image: radial-gradient(80% 60% at 50% 30%, #000, transparent);
}
.hero .container { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; gap: 3.5rem; align-items: center; padding-top: clamp(3rem,7vw,5.5rem); padding-bottom: clamp(3rem,7vw,5.5rem); }
.hero h1 { color: var(--white); margin: 1.1rem 0 1.1rem; }
.hero h1 .accent { color: var(--secondary-color); }
.hero-lead { font-size: 1.18rem; color: #B7CCCB; max-width: 34ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 1.8rem; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 1.6rem; margin-top: 2.2rem; padding-top: 1.6rem; border-top: 1px solid rgba(255,255,255,.12); }
.hero-trust div { line-height: 1.25; }
.hero-trust .stat-num { font-family: var(--font-head); font-size: 1.7rem; color: var(--white); font-weight: 700; }
.hero-trust small { color: #93AAA9; font-size: .82rem; }

/* Hero portrait + floating rate card */
.hero-visual { position: relative; }
.hero-portrait {
  position: relative; width: 100%; aspect-ratio: 4/5; overflow: hidden;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, #1c4a4f, #0f2c34);
  border: 1px solid rgba(255,255,255,.1); box-shadow: var(--shadow-lg);
  transform: translate(34px, -22px) scale(.92); transform-origin: top right;
  display: flex; align-items: flex-end; justify-content: center;
}
/* Transparent cutout: the teal gradient shows through behind him, with natural
   breathing room above his head — no white box. */
.hero-portrait img { width: 100%; height: 100%; object-fit: contain; object-position: center bottom; display: block; }
.portrait-fallback { display: flex; align-items: flex-end; padding: 1.6rem; color: #6f8d8c; }
.rate-card {
  position: absolute; left: 6px; bottom: -22px; width: 208px;
  background: rgba(16,42,51,.5);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  color: var(--white); border-radius: var(--radius);
  padding: 1rem 1.1rem; box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255,255,255,.18);
}
.rate-card .rc-row { display: flex; justify-content: space-between; align-items: baseline; }
.rate-card .rc-label { font-size: .76rem; color: rgba(255,255,255,.72); text-transform: uppercase; letter-spacing: .08em; }
.rate-card .rc-num { font-family: var(--font-head); font-weight: 700; font-size: 1.9rem; color: var(--white); }
.rate-card .rc-pill { font-size: .72rem; font-weight: 600; color: var(--secondary-color); background: rgba(31,181,122,.16); padding: .25rem .55rem; border-radius: 999px; white-space: nowrap; border: 1px solid rgba(31,181,122,.38); }
.rate-card .rc-bar { height: 6px; border-radius: 999px; background: rgba(255,255,255,.16); margin-top: .8rem; overflow: hidden; }
.rate-card .rc-bar i { display: block; height: 100%; width: 68%; background: var(--secondary-color); border-radius: 999px; }

@media (max-width: 920px) {
  .hero .container { grid-template-columns: 1fr; gap: 2.2rem; }
  /* Stack the portrait above a clean, full-width standalone rate card. */
  .hero-visual { max-width: 420px; margin-inline: auto; }
  .hero-portrait { transform: none; }
  .rate-card { position: static; width: 100%; left: auto; right: auto; bottom: auto; margin-top: 1.1rem; }
}

/* ==========================================================================
   Trust bar (logos / proof strip)
   ========================================================================== */
.proof-strip { background: var(--white); border-bottom: 1px solid var(--border); }
.proof-strip .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.2rem; padding-top: 1.4rem; padding-bottom: 1.4rem; }
.proof-item { display: flex; align-items: center; gap: .6rem; color: var(--text-muted); font-size: .92rem; }
.proof-item .stars { color: #F0A431; letter-spacing: 2px; }
.proof-item strong { color: var(--text-dark); font-family: var(--font-head); }

/* ==========================================================================
   Cards & grids
   ========================================================================== */
.grid { display: grid; gap: 1.4rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 880px) { .grid-3 { grid-template-columns: 1fr; } .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.7rem; transition: var(--transition); position: relative;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--mint-line); }
.card .card-icon {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: var(--mint-soft); color: var(--secondary-dark); margin-bottom: 1.1rem;
}
.card .card-icon svg { width: 24px; height: 24px; }
.card h3 { margin-bottom: .5rem; }
.card p { color: var(--text-muted); font-size: .96rem; }
.card .learn-more { display: inline-flex; align-items: center; gap: .4rem; margin-top: 1rem; font-family: var(--font-head); font-weight: 500; font-size: .9rem; color: var(--secondary-dark); }
.card:hover .learn-more { gap: .65rem; }

/* numbered "how it works" */
.step { counter-increment: step; }
.step .step-num {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 700; color: var(--white);
  background: var(--secondary-color); margin-bottom: 1rem;
}
.step .step-num::before { content: counter(step); }

/* stats band */
.stat-band { display: grid; grid-template-columns: repeat(4,1fr); gap: 1.2rem; text-align: center; }
.stat-band .stat-num { font-family: var(--font-head); font-weight: 700; font-size: clamp(1.8rem,4vw,2.6rem); color: var(--secondary-color); display: block; }
.stat-band small { color: #A9BFBE; font-size: .88rem; }
@media (max-width: 720px) { .stat-band { grid-template-columns: repeat(2,1fr); gap: 2rem 1rem; } }

/* ==========================================================================
   Mortgage Calculator
   ========================================================================== */
.calc-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); background: var(--white); }
.calc-inputs { padding: clamp(1.6rem, 3vw, 2.4rem); }
.calc-result { padding: clamp(1.6rem, 3vw, 2.4rem); background: var(--primary-color); color: #DCE7E6; display: flex; flex-direction: column; }
@media (max-width: 860px) { .calc-wrap { grid-template-columns: 1fr; } }

.calc-field { margin-bottom: 1.5rem; }
.calc-field label { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--font-head); font-weight: 500; font-size: .92rem; color: var(--text-dark); margin-bottom: .55rem; }
.calc-field .field-val { font-weight: 700; color: var(--secondary-dark); font-variant-numeric: tabular-nums; }
.calc-input-money { position: relative; }
.calc-input-money::before { content: "$"; position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-weight: 600; }
.calc-field input[type="text"], .calc-field input[type="number"], .calc-field select {
  width: 100%; font-family: var(--num); font-size: 1.05rem; font-variant-numeric: tabular-nums;
  padding: .8rem .9rem .8rem 1.7rem; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--bg-light); color: var(--text-dark); transition: var(--t-fast);
}
.calc-field select { padding-left: .9rem; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%235A6B6F' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; }
.calc-field input:focus, .calc-field select:focus { outline: none; border-color: var(--secondary-color); box-shadow: var(--ring); background: var(--white); }

input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 999px; background: var(--mint-soft); margin-top: .2rem; cursor: pointer; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--secondary-color); border: 3px solid #fff; box-shadow: var(--shadow-sm); cursor: pointer; }
input[type="range"]::-moz-range-thumb { width: 22px; height: 22px; border: 3px solid #fff; border-radius: 50%; background: var(--secondary-color); cursor: pointer; }
.range-scale { display: flex; justify-content: space-between; font-size: .76rem; color: var(--text-muted); margin-top: .4rem; }

.seg { display: flex; gap: .4rem; background: var(--bg-light); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .3rem; }
.seg button { flex: 1; border: 0; background: none; font-family: var(--font-head); font-weight: 500; font-size: .9rem; padding: .55rem; border-radius: 6px; cursor: pointer; color: var(--text-muted); transition: var(--t-fast); }
.seg button[aria-pressed="true"] { background: var(--white); color: var(--secondary-dark); box-shadow: var(--shadow-sm); }

.calc-result .result-label { font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; color: #93AAA9; }
.calc-result .result-payment { font-family: var(--font-head); font-weight: 700; font-size: clamp(2.6rem, 7vw, 3.6rem); color: var(--white); font-variant-numeric: tabular-nums; line-height: 1; margin: .4rem 0 .2rem; }
.calc-result .result-payment small { font-size: 1rem; color: #93AAA9; font-weight: 400; }
.result-breakdown { margin-top: auto; padding-top: 1.6rem; }
.result-row { display: flex; justify-content: space-between; align-items: center; padding: .7rem 0; border-top: 1px solid rgba(255,255,255,.1); font-size: .95rem; }
.result-row span:first-child { color: #A9BFBE; display: inline-flex; align-items: center; gap: .5rem; }
.result-row .dot { width: 10px; height: 10px; border-radius: 3px; }
.result-row b { font-variant-numeric: tabular-nums; color: var(--white); font-family: var(--num); }
.result-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; margin-top: 1.1rem; background: rgba(255,255,255,.08); }
.result-bar i { display: block; height: 100%; }
.calc-note { font-size: .8rem; color: #7E9594; margin-top: 1.2rem; }
.calc-result .btn { margin-top: 1.4rem; }

/* ==========================================================================
   Reviews / testimonials
   ========================================================================== */
.review-card { background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.7rem; display: flex; flex-direction: column; }
.review-card .stars { color: #F0A431; letter-spacing: 2px; margin-bottom: .9rem; }
.review-card blockquote { font-size: 1.04rem; color: var(--text-dark); line-height: 1.65; }
.review-card .reviewer { display: flex; align-items: center; gap: .8rem; margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px solid var(--border); }
.review-card .avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--mint-soft); color: var(--secondary-dark); display: grid; place-items: center; font-family: var(--font-head); font-weight: 700; }
.review-card .reviewer b { display: block; color: var(--text-dark); font-size: .95rem; }
.review-card .reviewer small { color: var(--text-muted); font-size: .82rem; }
.review-source { margin-left: auto; opacity: .7; }

/* ==========================================================================
   FAQ accordion
   ========================================================================== */
.faq { max-width: 800px; margin-inline: auto; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q { width: 100%; text-align: left; background: none; border: 0; cursor: pointer; padding: 1.3rem 2.5rem 1.3rem 0; position: relative; font-family: var(--font-head); font-weight: 500; font-size: 1.08rem; color: var(--text-dark); }
.faq-q::after { content: "+"; position: absolute; right: .2rem; top: 50%; transform: translateY(-50%); font-size: 1.6rem; color: var(--secondary-color); font-weight: 400; transition: var(--t-fast); }
.faq-item.open .faq-q::after { content: "−"; }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .4s ease; }
.faq-a p { padding: 0 0 1.4rem; color: var(--text-muted); }

/* ==========================================================================
   CTA strip
   ========================================================================== */
.cta-strip { background: var(--primary-color); background-image: radial-gradient(800px 360px at 85% 0%, rgba(31,181,122,.22), transparent 60%); color: #DCE7E6; text-align: center; border-radius: var(--radius-lg); padding: clamp(2.4rem,5vw,3.6rem); }
.cta-strip h2 { color: var(--white); }
.cta-strip p { color: #A9BFBE; max-width: 52ch; margin: .8rem auto 1.7rem; }
.cta-strip .btn-row { display: flex; gap: .9rem; justify-content: center; flex-wrap: wrap; }

/* ==========================================================================
   Page hero (sub-pages) + breadcrumb
   ========================================================================== */
.page-hero { background: var(--primary-color); background-image: radial-gradient(900px 400px at 80% -20%, rgba(31,181,122,.18), transparent 60%); color: #DCE7E6; padding: clamp(2.4rem,6vw,4rem) 0 clamp(2.4rem,6vw,3.4rem); }
.page-hero h1 { color: var(--white); margin: .6rem 0; max-width: 18ch; }
.page-hero .lead { font-size: 1.15rem; color: #B7CCCB; max-width: 60ch; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: .4rem; font-size: .85rem; color: #93AAA9; list-style: none; }
.breadcrumb a { color: #A9BFBE; }
.breadcrumb a:hover { color: var(--secondary-color); }
.breadcrumb li[aria-current] { color: var(--white); }
.breadcrumb li:not(:last-child)::after { content: "/"; margin-left: .4rem; opacity: .5; }

/* prose for service/legal pages */
.prose { max-width: 760px; }
.prose > * + * { margin-top: 1.1rem; }
.prose h2 { margin-top: 2.4rem; }
.prose h3 { margin-top: 1.6rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-top: .5rem; }
.prose li::marker { color: var(--secondary-color); }
.info-callout { background: var(--mint-soft); border: 1px solid var(--mint-line); border-left: 4px solid var(--secondary-color); border-radius: var(--radius-sm); padding: 1.2rem 1.4rem; }
.info-callout h4 { margin-bottom: .4rem; }

/* two-column with sticky aside */
.layout-aside { display: grid; grid-template-columns: 1fr 320px; gap: 3rem; align-items: start; }
.aside-card { position: sticky; top: 90px; background: var(--bg-light); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
@media (max-width: 900px) { .layout-aside { grid-template-columns: 1fr; } .aside-card { position: static; } }

/* ==========================================================================
   Contact
   ========================================================================== */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 2.6rem; align-items: start; }
@media (max-width: 880px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-method { display: flex; gap: .9rem; align-items: flex-start; padding: 1rem 0; }
.contact-method .cm-icon { width: 44px; height: 44px; flex: none; border-radius: 12px; background: var(--mint-soft); color: var(--secondary-dark); display: grid; place-items: center; }
.contact-method > div { min-width: 0; }  /* let long values wrap instead of overflowing */
.contact-method b { display: block; color: var(--text-dark); font-family: var(--font-head); }
.contact-method a, .contact-method span { color: var(--text-muted); overflow-wrap: anywhere; }

.contact-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .contact-form .row { grid-template-columns: 1fr; } }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-family: var(--font-head); font-weight: 500; font-size: .9rem; margin-bottom: .4rem; color: var(--text-dark); }
.form-group input, .form-group textarea {
  width: 100%; font-family: var(--font-body); font-size: 1rem; padding: .8rem .9rem;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--white); color: var(--text-dark);
}
.form-group textarea { min-height: 130px; resize: vertical; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--secondary-color); box-shadow: var(--ring); }
#formStatus { margin-top: .9rem; font-size: .95rem; }
#formStatus.ok { color: var(--secondary-dark); }
#formStatus.err { color: #c0392b; }

/* ==========================================================================
   Footer
   ========================================================================== */
footer { background: var(--primary-deep); color: #9FB4B3; padding: clamp(3rem,6vw,4.5rem) 0 2rem; }
.footer-top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2rem; }
.footer-brand .logo { color: #fff; margin-bottom: 1rem; }
.footer-brand p { color: #7E9594; max-width: 34ch; font-size: .94rem; }
.footer-links h4 { color: #fff; font-size: .95rem; margin-bottom: 1rem; }
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: .6rem; }
.footer-links a, .footer-links span { color: #9FB4B3; font-size: .92rem; }
.footer-links a:hover { color: var(--secondary-color); }
.footer-bottom { margin-top: 2.6rem; padding-top: 1.6rem; border-top: 1px solid rgba(255,255,255,.08); display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; justify-content: space-between; font-size: .82rem; color: #6F8584; }
.footer-bottom a { color: #9FB4B3; }
.footer-disclaimer { font-size: .78rem; color: #5E7372; margin-top: 1rem; max-width: 90ch; }
@media (max-width: 820px) { .footer-top { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* ==========================================================================
   Floating UI: quick-contact + scroll-top
   ========================================================================== */
.floating-contact { position: fixed; right: 18px; bottom: 18px; z-index: 950; display: flex; flex-direction: column; gap: .7rem; }
.fc-btn { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; box-shadow: var(--shadow-lg); position: relative; }
.fc-btn svg { width: 22px; height: 22px; }
.fc-primary { background: var(--secondary-color); color: #04130C; }
.fc-primary:hover { background: var(--secondary-dark); color: #fff; }
.fc-secondary { background: var(--white); color: var(--primary-color); border: 1px solid var(--border); }
.fc-pulse { position: absolute; inset: 0; border-radius: 50%; background: var(--secondary-color); animation: pulse 2.2s infinite; z-index: -1; }
@keyframes pulse { 0% { transform: scale(1); opacity: .6; } 70% { transform: scale(1.6); opacity: 0; } 100% { opacity: 0; } }
.scroll-top { position: fixed; right: 18px; bottom: 84px; z-index: 949; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--border); background: var(--white); color: var(--primary-color); cursor: pointer; display: grid; place-items: center; opacity: 0; visibility: hidden; transform: translateY(10px); transition: var(--transition); box-shadow: var(--shadow); }
.scroll-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
@media (max-width: 1100px) { .scroll-top { bottom: 150px; } }

/* ==========================================================================
   Accessibility widget
   ========================================================================== */
.accessibility-widget { position: fixed; left: 18px; bottom: 18px; z-index: 950; }
.acc-btn { width: 50px; height: 50px; border-radius: 50%; border: 0; background: var(--primary-color); color: #fff; cursor: pointer; display: grid; place-items: center; box-shadow: var(--shadow-lg); }
.acc-btn svg { width: 24px; height: 24px; }
.acc-menu { position: absolute; left: 0; bottom: 62px; width: 250px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 1rem; opacity: 0; visibility: hidden; transform: translateY(10px); transition: var(--transition); }
.acc-menu.active { opacity: 1; visibility: visible; transform: translateY(0); }
.acc-menu h4 { font-size: .95rem; margin-bottom: .7rem; }
.acc-option { display: flex; justify-content: space-between; align-items: center; padding: .55rem .2rem; cursor: pointer; border-radius: 6px; font-size: .92rem; color: var(--text-dark); }
.acc-option:hover, .acc-option:focus { background: var(--mint-soft); outline: none; }
.acc-option[aria-checked="true"] { color: var(--secondary-dark); font-weight: 600; }
#accReset { width: 100%; margin-top: .7rem; padding: .55rem; border: 1px solid var(--border); background: var(--bg-light); border-radius: 6px; cursor: pointer; font-family: var(--font-head); font-size: .85rem; color: var(--text-muted); }

/* Accessibility states */
body.large-text { font-size: 1.18rem; }
body.high-contrast { --bg-light: #fff; --text-body: #000; --text-muted: #1a1a1a; --border: #000; --border-strong: #000; }
body.high-contrast .hero, body.high-contrast .page-hero, body.high-contrast footer, body.high-contrast .calc-result, body.high-contrast .cta-strip, body.high-contrast .section-ink { background: #000 !important; color: #fff !important; }
body.high-contrast .btn-primary { background: #006b3c; color: #fff; }
body.highlight-links a { text-decoration: underline !important; text-underline-offset: 2px; outline: 1px dashed var(--secondary-dark); outline-offset: 2px; }

/* Visible focus everywhere */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--secondary-color); outline-offset: 2px; border-radius: 4px;
}

/* utility */
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; } .mt-2 { margin-top: 2rem; }
.chip { display: inline-block; background: var(--mint-soft); color: var(--secondary-dark); font-family: var(--font-head); font-weight: 500; font-size: .8rem; padding: .35rem .75rem; border-radius: 999px; }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(0.165,0.84,0.44,1); }
.reveal.in { opacity: 1; transform: none; }
/* Never leave content hidden when motion is reduced. */
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1 !important; transform: none !important; transition: none; } }
