/* ==========================================================================
   Nabreet Ghumman — mortgage site
   Single stylesheet. Palette lives in :root; change it once, changes
   everywhere. Sections below map to the components used in the templates.
   ========================================================================== */

:root {
  --green:        #0E4B40;   /* primary — buttons, links, accents */
  --green-dark:   #0A3830;   /* button hover */
  --green-deep:   #12332C;   /* dark section backgrounds */
  --green-ink:    #12211D;   /* headings */
  --mint:         #8FC3B2;   /* accent on dark */
  --mint-pale:    #C4D6CF;   /* body text on dark */
  --body:         #4A5652;   /* body text on light */
  --muted:        #5B6763;   /* labels, captions */
  --faint:        #8C9591;   /* fine print */
  --cream:        #FAF7F2;   /* page background */
  --cream-warm:   #F4EFE6;   /* hero wash */
  --cream-deep:   #EFEAE1;   /* panels */
  --sand:         #E6DFD4;   /* borders */
  --sand-dark:    #D8D0C4;   /* input borders */
  --white:        #fff;

  --sans: 'Plus Jakarta Sans', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --wrap: 1180px;
  --gutter: clamp(32px, 6vw, 80px);
  --radius: 24px;
  --shadow: 0 18px 44px rgba(18, 33, 29, 0.07);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* --- reset ---------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--body);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { margin: 0; color: var(--green-ink); line-height: 1.12; letter-spacing: -0.03em; font-weight: 800; text-wrap: balance; }
p  { margin: 0; text-wrap: pretty; }
ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, svg { max-width: 100%; display: block; }
img { height: auto; }

a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-dark); }
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--green); color: var(--white);
  padding: 14px 22px; border-radius: 0 0 12px 0; font-weight: 700;
}
.skip-link:focus { left: 0; color: var(--white); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* --- layout --------------------------------------------------------------- */

.wrap { width: min(var(--wrap), 100% - var(--gutter)); margin-inline: auto; }
.wrap--narrow { max-width: 760px; }
.wrap--mid    { max-width: 820px; }

.section        { padding-block: clamp(56px, 6vw, 96px); }
.section--tight { padding-block: clamp(36px, 4vw, 56px); }
.section--lead  { padding: clamp(56px, 6vw, 92px) 0 clamp(28px, 3vw, 44px);
                  background: linear-gradient(180deg, var(--cream-warm) 0%, var(--cream) 100%); }
.section--dark  { background: var(--green-deep); color: var(--mint-pale); }
.section--dark h1, .section--dark h2, .section--dark h3 { color: var(--white); }

.stack   { display: grid; gap: 20px; }
.stack-l { display: grid; gap: 34px; }
.row     { display: flex; flex-wrap: wrap; gap: 14px; }

.grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); }
/* The modifiers carry display:grid themselves — templates use them standalone
   (class="wrap grid--split") and a missing base .grid class silently turned
   every two-column section into a single stacked block. */
.grid--wide  { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: clamp(32px, 4.5vw, 72px); }
.grid--split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: clamp(36px, 5vw, 80px); align-items: start; }

/* --- type ----------------------------------------------------------------- */

.eyebrow {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--green); margin-bottom: 18px;
}
.eyebrow--light { color: var(--mint); }

.h-hero    { font-size: clamp(40px, 5.6vw, 72px); line-height: 1.02; letter-spacing: -0.035em; }
.h-page    { font-size: clamp(34px, 4.6vw, 60px); line-height: 1.05; letter-spacing: -0.035em; }
.h-section { font-size: clamp(30px, 3.9vw, 50px); line-height: 1.08; letter-spacing: -0.032em; }
.h-sub     { font-size: clamp(26px, 3vw, 38px); }
.h-card    { font-size: 21px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.28; }
.h-card a  { color: inherit; }
.h-card a:hover { color: var(--green); }

.lead { font-size: clamp(17px, 1.3vw, 19.5px); line-height: 1.65; color: var(--body); }
.fine { font-size: 12.5px; line-height: 1.6; color: var(--faint); }
.measure { max-width: 56ch; }

.accent { color: var(--green); }

/* --- buttons -------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px 28px; border: none; border-radius: 999px;
  font: inherit; font-weight: 700; font-size: 16px; cursor: pointer;
  transition: background .25s ease, transform .25s var(--ease), color .25s ease;
}
.btn--primary { background: var(--green); color: var(--white); box-shadow: 0 8px 22px rgba(14, 75, 64, .2); }
.btn--primary:hover { background: var(--green-dark); color: var(--white); transform: translateY(-2px); }
.btn--ghost { background: var(--white); color: var(--green-ink); border: 1px solid var(--sand-dark); }
.btn--ghost:hover { color: var(--green-ink); border-color: var(--green); transform: translateY(-2px); }
.btn--onDark { background: var(--white); color: var(--green-deep); }
.btn--onDark:hover { color: var(--green-deep); transform: translateY(-2px); }
.btn--outlineDark { border: 1px solid #4A7268; color: var(--white); background: none; }
.btn--outlineDark:hover { background: #1A473C; color: var(--white); }

.link-arrow { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; font-size: 16px; }
.link-back  { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14.5px; }

/* --- header / nav --------------------------------------------------------- */

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250, 247, 242, .88);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--sand);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 76px; }

.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand__mark {
  display: grid; place-items: center; width: 38px; height: 38px;
  border-radius: 11px; background: var(--green); color: var(--white);
  font-weight: 800; font-size: 15px; letter-spacing: -0.02em;
}
.brand__name { font-weight: 800; font-size: 16px; letter-spacing: -0.02em; color: var(--green-ink); }
.brand__role { font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  padding: 9px 13px; border-radius: 9px;
  font-size: 14.5px; font-weight: 600; color: #3C4A46;
  transition: background .2s ease, color .2s ease;
}
.nav a:hover { background: var(--cream-deep); color: var(--green-ink); }
.nav a[aria-current="page"] { background: var(--cream-deep); color: var(--green-ink); }

.nav-toggle { display: none; }

@media (max-width: 1149px) {
  .nav, .header-cta { display: none; }
  .nav-toggle {
    display: inline-flex; align-items: center; gap: 9px;
    padding: 11px 16px; border-radius: 999px;
    border: 1px solid var(--sand-dark); background: var(--white);
    font: inherit; font-weight: 700; font-size: 14.5px; color: var(--green-ink); cursor: pointer;
  }
  .site-header[data-open="true"] .nav {
    display: grid; gap: 2px;
    position: absolute; left: 0; right: 0; top: 76px;
    background: var(--cream); border-top: 1px solid var(--sand);
    padding: 14px var(--gutter) 22px;
  }
  .site-header[data-open="true"] .nav a { padding: 13px 12px; border-radius: 11px; font-size: 16px; font-weight: 700; color: var(--green-ink); }
}

/* Narrow desktops: the eight nav items plus the CTA only just fit. Tighten
   them so the row never overflows and forces a horizontal scrollbar. */
@media (min-width: 1150px) and (max-width: 1319px) {
  .nav { gap: 0; }
  .nav a { padding: 9px 10px; font-size: 14px; }
  .header-cta { padding: 14px 22px; font-size: 15px; }
}

/* Safety net: nothing on this site is designed to scroll sideways. If a long
   unbreakable string ever exceeds the viewport, clip it rather than shifting
   every section out of alignment. */
html { overflow-x: clip; }

/* --- cards ---------------------------------------------------------------- */

.card {
  background: var(--white); border: 1px solid var(--sand);
  border-radius: 18px; padding: 22px 24px;
}
.card--pad { border-radius: 26px; padding: clamp(26px, 3vw, 42px); box-shadow: var(--shadow); }

.tile {
  background: var(--white); border: 1px solid var(--sand);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .3s var(--ease), box-shadow .3s ease;
}
.tile:hover { transform: translateY(-5px); box-shadow: 0 20px 44px rgba(18, 33, 29, .10); }
.tile__cover { display: block; aspect-ratio: 16 / 9; background: var(--cream-deep); }
.tile__cover img { width: 100%; height: 100%; object-fit: cover; }
.tile__body { padding: 26px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.tile__meta { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--green); }
.tile__desc { font-size: 15px; line-height: 1.6; flex: 1; }
.tile__link { font-size: 15px; font-weight: 700; }

.bullets { display: grid; gap: 11px; }
.bullets li { display: flex; gap: 12px; font-size: 16.5px; line-height: 1.62; }
.bullets li::before { content: "\00B7"; color: var(--green); font-weight: 800; flex: 0 0 auto; }

/* --- article -------------------------------------------------------------- */

.article__cover { margin-top: 34px; aspect-ratio: 21 / 9; border-radius: 22px; overflow: hidden; }
.article__cover img { width: 100%; height: 100%; object-fit: cover; }

.prose { display: grid; gap: 20px; }
.prose h2 { margin-top: 14px; font-size: clamp(21px, 2.3vw, 27px); line-height: 1.22; letter-spacing: -0.025em; }
.prose p  { font-size: 17px; line-height: 1.72; }
.prose ul { display: grid; gap: 11px; }
.prose li { display: flex; gap: 12px; font-size: 16.5px; line-height: 1.62; }
.prose li::before { content: "\00B7"; color: var(--green); font-weight: 800; flex: 0 0 auto; }
.prose strong { color: var(--green-ink); font-weight: 700; }

.note {
  border-left: 3px solid var(--green); background: #F1F5F3;
  border-radius: 0 16px 16px 0; padding: 20px 24px;
}
.note p { font-size: 16px; line-height: 1.65; color: var(--green-deep); }

.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13.5px; color: var(--muted); margin-bottom: 20px; }
.breadcrumbs li::after { content: "/"; margin-left: 8px; color: var(--faint); }
.breadcrumbs li:last-child::after { content: ""; }

/* --- forms ---------------------------------------------------------------- */

.field { display: grid; gap: 8px; }
.field label { font-size: 13.5px; font-weight: 700; color: var(--green-ink); }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 15px;
  border: 1px solid var(--sand-dark); border-radius: 13px;
  background: #FCFAF7; font: inherit; font-size: 16px; color: var(--green-ink);
}
.field textarea { resize: vertical; line-height: 1.5; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 18px; }

.calc__output { display: grid; gap: 4px; }
.calc__figure { font-size: clamp(30px, 3.4vw, 44px); font-weight: 800; letter-spacing: -0.03em; color: var(--green-ink); font-variant-numeric: tabular-nums; }
.calc__label  { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 16px 18px; border-bottom: 1px solid var(--sand); font-size: 15.5px; }
.table th { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.table td { font-variant-numeric: tabular-nums; }

/* --- footer --------------------------------------------------------------- */

.site-footer { background: var(--green-deep); color: var(--mint-pale); padding-block: clamp(48px, 6vw, 80px) 30px; }
.site-footer a { color: var(--mint-pale); }
.site-footer a:hover { color: var(--white); }
.site-footer h2, .site-footer p strong { color: var(--white); }
.footer__cols { display: grid; gap: 34px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.footer__head { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #6E8B83; margin-bottom: 14px; }
.footer__links { display: grid; gap: 9px; font-size: 15px; }
.footer__legal { padding-top: 26px; display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: space-between; align-items: baseline; }
.footer__legal p { font-size: 12.5px; line-height: 1.65; color: #8AA49C; }

.social { display: flex; flex-wrap: wrap; gap: 10px; }
.social a {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 16px; border: 1px solid #1E4038; border-radius: 999px;
  font-size: 14px; transition: background .2s ease, border-color .2s ease;
}
.social a:hover { background: #1A473C; border-color: #2E574C; }

/* --- home hero ------------------------------------------------------------ */

.hero { padding-block: clamp(44px, 5vw, 84px) clamp(56px, 6vw, 96px);
        background: linear-gradient(180deg, var(--cream-warm) 0%, var(--cream) 70%); }
.hero__inner { align-items: center; }

.pill {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 8px 16px 8px 12px; margin-bottom: 26px;
  border: 1px solid var(--sand); border-radius: 999px; background: var(--white);
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted);
}
.pill__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }

.trust {
  margin-top: 34px; display: flex; flex-wrap: wrap; gap: 10px 22px;
  font-size: 13.5px; font-weight: 600; color: var(--muted);
}
.trust li { display: flex; align-items: center; gap: 8px; }
.trust li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--mint); }

.hero__visual { position: relative; display: grid; place-items: center; padding: clamp(20px, 4vw, 50px); }
.hero__visual::before {
  content: ""; position: absolute; inset: 0; margin: auto;
  width: min(100%, 420px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, #DCEAE3 0%, #EFEAE1 70%);
}
.hero__visual img { position: relative; width: min(70%, 320px); height: auto; }

.compare {
  position: relative; margin: -40px 0 0 0; justify-self: start;
  background: var(--white); border: 1px solid var(--sand);
  border-radius: 18px; padding: 18px 22px; box-shadow: var(--shadow); min-width: 250px;
}
.compare__label { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.compare__rows { display: grid; gap: 6px; margin-top: 12px; }
.compare__rows > div { display: flex; justify-content: space-between; gap: 14px; font-size: 14px; }
.compare__rows dt { color: var(--muted); }
.compare__rows dd { font-weight: 700; color: var(--green-ink); font-variant-numeric: tabular-nums; }
.compare__save {
  display: flex; justify-content: space-between; gap: 14px; align-items: baseline;
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--sand);
  font-size: 14px; color: var(--muted);
}
.compare__save strong { font-size: 19px; color: var(--green); font-variant-numeric: tabular-nums; }

/* --- process steps -------------------------------------------------------- */

.steps { display: grid; gap: 26px; margin-top: clamp(32px, 4vw, 48px);
         grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.step { border-top: 2px solid #2E574C; padding-top: 24px; }
.step__num { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; color: var(--mint); }
.step h3 { margin-top: 14px; color: var(--white); }
.step p { margin-top: 10px; font-size: 15.5px; line-height: 1.62; color: var(--mint-pale); }

/* --- misc page bits ------------------------------------------------------- */

.portrait { border-radius: var(--radius); aspect-ratio: 4/5; object-fit: cover; width: 100%; }

.glance { display: grid; gap: 14px; margin-top: 18px; }
.glance > div { display: grid; gap: 2px; padding-bottom: 14px; border-bottom: 1px solid var(--sand); }
.glance > div:last-child { border-bottom: 0; padding-bottom: 0; }
.glance dt { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.glance dd { font-size: 16px; font-weight: 600; color: var(--green-ink); }

.calc__rows { display: grid; gap: 10px; padding-top: 16px; border-top: 1px solid var(--sand); }
.calc__rows > div { display: flex; justify-content: space-between; gap: 14px; font-size: 15px; }
.calc__rows dt { color: var(--muted); }
.calc__rows dd { font-weight: 700; color: var(--green-ink); font-variant-numeric: tabular-nums; }

.contact__value { font-size: 18px; font-weight: 700; color: var(--green-ink); }
.contact__value:hover { color: var(--green); }

.tag {
  display: inline-block; margin-left: 8px; padding: 3px 9px;
  border-radius: 999px; background: #E7EFEB; color: var(--green);
  font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
}

.service { border-top: 1px solid var(--sand); padding-top: clamp(28px, 3vw, 40px); }
.service:first-child { border-top: 0; padding-top: 0; }

output { display: inline; }

/* .stack sets display:grid, which would otherwise beat the UA rule for [hidden] */
[hidden] { display: none !important; }

.notice {
  border-left: 3px solid var(--green); background: #F1F5F3;
  border-radius: 0 12px 12px 0; padding: 14px 18px; margin-bottom: 20px;
  font-size: 14.5px; line-height: 1.55; color: var(--green-deep);
}
.notice strong { color: var(--green-deep); }
input[type="range"] { accent-color: var(--green); padding: 0; border: 0; background: none; }

@media (max-width: 700px) {
  .table thead { display: none; }
  .table tr { display: grid; gap: 4px; padding: 16px 0; border-bottom: 1px solid var(--sand); }
  .table th, .table td { padding: 0; border: 0; }
  .table th[scope="row"] { font-family: var(--sans); font-size: 17px; font-weight: 800; letter-spacing: -0.02em; color: var(--green-ink); text-transform: none; }
}

/* --- FAQ (home) ------------------------------------------------------------ */

.faq { display: grid; gap: 12px; }
.faq details { background: var(--white); border: 1px solid var(--sand); border-radius: 18px; padding: 4px 24px; }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; cursor: pointer; font-size: 16.5px; font-weight: 700; letter-spacing: -0.015em; color: var(--green-ink); list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq-chev { flex: 0 0 auto; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #E7EFEB; transition: transform .25s var(--ease); }
.faq details[open] .faq-chev { transform: rotate(180deg); }
.faq details > p { padding: 0 0 20px; font-size: 15.5px; line-height: 1.65; color: var(--body); max-width: 60ch; }

/* --- sticky mobile action bar ---------------------------------------------- */

.mobile-cta { display: none; }
@media (max-width: 1149px) {
  .mobile-cta {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 95;
    display: flex; gap: 10px;
    padding: 10px clamp(14px, 4vw, 24px) calc(10px + env(safe-area-inset-bottom));
    background: rgba(250, 247, 242, .94);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--sand);
    box-shadow: 0 -10px 30px rgba(18, 33, 29, .08);
  }
  .mobile-cta a {
    flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 48px; padding: 12px 10px; border-radius: 999px;
    border: 1px solid var(--sand-dark); background: var(--white);
    color: var(--green-ink); font-weight: 700; font-size: 14.5px;
  }
  .mobile-cta a:hover { color: var(--green-ink); }
  .mobile-cta__primary.mobile-cta__primary { flex: 1.4; background: var(--green); border-color: var(--green); color: var(--white); box-shadow: 0 8px 22px rgba(14, 75, 64, .24); }
  .mobile-cta__primary.mobile-cta__primary:hover { color: var(--white); }
  body { padding-bottom: 78px; }
}
