/* ============================================================
   NorthStar Mortgage Advisory — Design System v2
   Refined palette: deep navy anchor, warm neutrals,
   muted amber accent used sparingly for conversion points.
   ============================================================ */

:root {
  --navy: #1f3a5f;
  --navy-deep: #16283f;
  --navy-ink: #101d2e;
  --accent: #b45309;          /* muted amber — CTAs only */
  --accent-dark: #92400e;
  --gold: #d4a24c;            /* soft gold — highlights */
  --gold-soft: #f3e9d7;       /* cream chip background */
  --cream: #faf8f4;
  --grey-bg: #f4f3f0;
  --grey-line: #e4e2dd;
  --text: #333d4d;
  --text-light: #616c7d;
  --white: #ffffff;
  --radius: 10px;
  --shadow: 0 4px 16px rgba(16, 29, 46, 0.07);
  --shadow-lg: 0 10px 32px rgba(16, 29, 46, 0.12);
  --font-head: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); color: var(--text); line-height: 1.7; background: var(--white); font-size: 16.5px; }
img { max-width: 100%; display: block; }
a { color: var(--navy); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
[id] { scroll-margin-top: 96px; }

.container { width: min(1140px, 92%); margin: 0 auto; }
.section { padding: 80px 0; }
.section-alt { background: var(--grey-bg); }

h1, h2, h3, h4 { font-family: var(--font-head); color: var(--navy-deep); line-height: 1.22; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4.2vw, 3rem); font-weight: 700; }
h2 { font-size: clamp(1.55rem, 2.8vw, 2.15rem); margin-bottom: 14px; }
h3 { font-size: 1.22rem; margin-bottom: 8px; }
.section-intro { max-width: 640px; color: var(--text-light); margin-bottom: 44px; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.76rem; font-weight: 700; color: var(--accent); margin-bottom: 12px; display: block; }

/* Buttons */
.btn { display: inline-block; padding: 14px 28px; border-radius: 8px; font-weight: 600; text-decoration: none; border: none; cursor: pointer; font-size: 0.98rem; transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--white); }
.btn-primary:hover { background: var(--accent-dark); }
.btn-secondary { background: transparent; color: var(--navy); border: 1.5px solid var(--navy); }
.btn-secondary:hover { background: var(--navy); color: var(--white); }
.btn-light { background: var(--white); color: var(--navy-deep); border: 1.5px solid var(--grey-line); }
.btn-light:hover { border-color: var(--gold); }
.btn-lg { padding: 16px 34px; font-size: 1.02rem; }

/* ============ Top utility bar ============ */
.topbar { background: var(--navy-ink); color: #a9b6c9; font-size: 0.82rem; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; gap: 16px; }
.topbar a { color: #dbe4f0; text-decoration: none; font-weight: 600; }
.topbar a:hover { color: var(--gold); }
.topbar-links { display: flex; gap: 22px; }
.topbar-tag { letter-spacing: 0.06em; }

/* ============ Header ============ */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255, 255, 255, 0.96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--grey-line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img, .brand svg { height: 48px; width: auto; }
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: 1.22rem; color: var(--navy-deep); letter-spacing: 0.01em; }
.brand-name small { display: block; font-family: var(--font-body); font-size: 0.6rem; letter-spacing: 0.3em; color: var(--accent); text-transform: uppercase; font-weight: 600; }

.main-nav ul { display: flex; gap: 26px; list-style: none; align-items: center; }
.main-nav a { text-decoration: none; color: var(--navy-deep); font-weight: 500; font-size: 0.94rem; padding: 6px 2px; border-bottom: 2px solid transparent; }
.main-nav a:hover, .main-nav a[aria-current="page"] { border-bottom-color: var(--gold); }
.nav-cta { background: var(--navy); color: var(--white) !important; padding: 11px 20px !important; border-radius: 8px; border-bottom: none !important; font-weight: 600 !important; }
.nav-cta:hover { background: var(--navy-deep); }

.nav-toggle { display: none; background: none; border: none; font-size: 1.8rem; color: var(--navy); cursor: pointer; }

/* ============ Hero ============ */
.hero { background: var(--navy-deep); color: var(--white); padding: 92px 0 100px; position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 900px 500px at 78% 18%, rgba(212, 162, 76, 0.12), transparent 60%); }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; position: relative; z-index: 1; }
.hero h1 { color: var(--white); margin-bottom: 20px; }
.hero h1 em { color: var(--gold); font-style: italic; }
.hero p.lead { font-size: 1.12rem; color: #b9c5d6; margin-bottom: 32px; max-width: 540px; line-height: 1.75; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 40px; }
.hero-ctas .btn-light { border-color: rgba(255,255,255,0.25); background: transparent; color: var(--white); }
.hero-ctas .btn-light:hover { border-color: var(--gold); color: var(--gold); }
.hero-portrait { justify-self: center; }
.hero-portrait img, .hero-portrait .portrait-placeholder { width: 330px; height: 330px; border-radius: 50%; object-fit: cover; border: 4px solid rgba(212, 162, 76, 0.55); box-shadow: var(--shadow-lg); background: var(--cream); }
.portrait-placeholder { display: flex; align-items: center; justify-content: center; text-align: center; color: var(--navy); font-weight: 600; padding: 30px; }

.trust-strip { display: flex; gap: 36px; flex-wrap: wrap; border-top: 1px solid rgba(255,255,255,0.12); padding-top: 26px; }
.trust-item { font-size: 0.88rem; color: #93a2b8; }
.trust-item strong { display: block; color: var(--gold); font-size: 1.5rem; font-family: var(--font-head); margin-bottom: 2px; }

/* ============ Cards ============ */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.card { background: var(--white); border: 1px solid var(--grey-line); border-radius: var(--radius); padding: 32px 28px; transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.card:hover { border-color: var(--gold); box-shadow: var(--shadow); }
.card .icon { width: 48px; height: 48px; border-radius: 10px; background: var(--gold-soft); display: flex; align-items: center; justify-content: center; font-size: 1.35rem; margin-bottom: 18px; }
.card p { color: var(--text-light); font-size: 0.94rem; }
.card .card-link { display: inline-block; margin-top: 16px; font-weight: 600; color: var(--accent); text-decoration: none; font-size: 0.92rem; }
.card .card-link:hover { text-decoration: underline; }

/* ============ Steps ============ */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.step { background: var(--white); border-radius: var(--radius); padding: 30px 26px; border: 1px solid var(--grey-line); border-top: 3px solid var(--gold); }
.step .step-num { font-family: var(--font-head); font-size: 1.7rem; color: var(--gold); font-weight: 700; margin-bottom: 6px; }
.step p { color: var(--text-light); font-size: 0.92rem; }

/* ============ Testimonials ============ */
.testimonial-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.testimonial { background: var(--cream); border: 1px solid var(--grey-line); border-radius: var(--radius); padding: 30px; }
.testimonial .stars { color: var(--gold); letter-spacing: 3px; margin-bottom: 14px; font-size: 0.95rem; }
.testimonial blockquote { font-style: italic; color: var(--text); margin-bottom: 16px; font-family: var(--font-head); font-size: 1.02rem; line-height: 1.65; }
.testimonial cite { font-style: normal; font-weight: 600; color: var(--navy); font-size: 0.88rem; }

/* ============ CTA band ============ */
.cta-band { background: var(--navy-deep); color: var(--white); text-align: center; padding: 72px 0; position: relative; overflow: hidden; }
.cta-band::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 700px 350px at 50% 0%, rgba(212, 162, 76, 0.14), transparent 65%); }
.cta-band > .container { position: relative; }
.cta-band h2 { color: var(--white); }
.cta-band p { max-width: 560px; margin: 12px auto 30px; color: #b9c5d6; }
.cta-band .btn-light { background: var(--accent); color: var(--white); border: none; }
.cta-band .btn-light:hover { background: var(--accent-dark); }

/* ============ Forms ============ */
.form-card { background: var(--white); border: 1px solid var(--grey-line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 36px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
label { font-weight: 600; font-size: 0.88rem; color: var(--navy-deep); display: block; margin-bottom: 6px; }
input, select, textarea { width: 100%; padding: 12px 14px; border: 1.5px solid var(--grey-line); border-radius: 8px; font-family: inherit; font-size: 1rem; background: var(--white); color: var(--text); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(31, 58, 95, 0.12); }
.form-note { font-size: 0.8rem; color: var(--text-light); margin-top: 12px; }
.form-success { display: none; background: #eef6ef; border: 1.5px solid #4c8a5f; color: #2b5e3d; padding: 16px; border-radius: 8px; margin-top: 16px; font-weight: 600; }

/* ============ Calculators ============ */
.calc-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
.calc-result { background: var(--navy-deep); color: var(--white); border-radius: var(--radius); padding: 34px; text-align: center; }
.calc-result .big { font-family: var(--font-head); font-size: clamp(2rem, 4vw, 2.7rem); color: var(--gold); margin: 8px 0; }
.calc-result .sub { color: #a9b6c9; font-size: 0.9rem; }
.calc-result hr { border: none; border-top: 1px solid rgba(255,255,255,0.14); margin: 20px 0; }
.range-row { display: flex; justify-content: space-between; font-size: 0.82rem; color: var(--text-light); margin-top: 4px; }
input[type="range"] { accent-color: var(--navy); padding: 0; }
.calc-tabs { display: flex; gap: 8px; margin-bottom: 32px; flex-wrap: wrap; }
.calc-tab { padding: 12px 24px; border-radius: 8px; border: 1.5px solid var(--grey-line); background: var(--white); color: var(--navy); font-weight: 600; cursor: pointer; font-size: 0.94rem; }
.calc-tab:hover { border-color: var(--navy); }
.calc-tab.active { background: var(--navy); border-color: var(--navy); color: var(--white); }
.calc-panel { display: none; }
.calc-panel.active { display: block; }
.calc-disclaimer { font-size: 0.79rem; color: var(--text-light); margin-top: 28px; max-width: 760px; }

/* ============ FAQ ============ */
.faq details { background: var(--white); border: 1px solid var(--grey-line); border-radius: 10px; margin-bottom: 12px; padding: 18px 22px; }
.faq summary { font-weight: 600; color: var(--navy-deep); cursor: pointer; font-size: 1rem; }
.faq details[open] { border-color: var(--gold); }
.faq details[open] summary { margin-bottom: 10px; }
.faq p { color: var(--text-light); font-size: 0.94rem; }

/* ============ Page hero (inner pages) ============ */
.page-hero { background: var(--navy-deep); color: var(--white); padding: 60px 0; position: relative; overflow: hidden; }
.page-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 700px 300px at 80% 0%, rgba(212, 162, 76, 0.1), transparent 60%); }
.page-hero > .container { position: relative; }
.page-hero h1 { color: var(--white); }
.page-hero p { color: #b9c5d6; max-width: 620px; margin-top: 12px; }

/* ============ About ============ */
.about-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 48px; align-items: center; }
.about-grid img, .about-grid .portrait-placeholder { border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.badge-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.badge { background: var(--gold-soft); border: 1px solid var(--gold); color: var(--navy-deep); border-radius: 999px; padding: 7px 16px; font-size: 0.82rem; font-weight: 600; }

/* ============ Contact ============ */
.contact-layout { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: start; }
.contact-info h3 { margin-top: 26px; font-size: 1.05rem; }
.contact-info p { color: var(--text-light); }
.contact-info a:not(.btn) { color: var(--accent); font-weight: 600; }
.contact-info .btn-primary { color: var(--white); }
.contact-info .btn-primary:hover { color: var(--white); background: var(--accent-dark); }

/* ============ Footer ============ */
.site-footer { background: var(--navy-ink); color: #93a2b8; padding: 60px 0 26px; font-size: 0.89rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 36px; margin-bottom: 38px; }
.site-footer h4 { color: var(--white); margin-bottom: 14px; font-size: 0.98rem; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: #93a2b8; text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.footer-compliance { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 22px; font-size: 0.76rem; line-height: 1.7; color: #6d7d94; }
.footer-compliance strong { color: #b4c1d4; }

/* ============ Article / Guides ============ */
.article { max-width: 760px; }
.article h2 { margin-top: 44px; }
.article h3 { margin-top: 28px; }
.article p { margin-bottom: 16px; }
.article ul, .article ol { margin: 0 0 16px 22px; }
.article li { margin-bottom: 8px; }
.article .highlight-box { background: var(--gold-soft); border-left: 4px solid var(--gold); border-radius: 0 8px 8px 0; padding: 20px 24px; margin: 24px 0; }
.article .highlight-box p { margin: 0; }
.article table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 0.92rem; }
.article th, .article td { border: 1px solid var(--grey-line); padding: 10px 14px; text-align: left; }
.article th { background: var(--grey-bg); font-weight: 600; color: var(--navy-deep); }
.article-meta { color: var(--text-light); font-size: 0.85rem; margin-bottom: 28px; }
.article .inline-cta { background: var(--navy-deep); color: #b9c5d6; border-radius: var(--radius); padding: 26px 28px; margin: 32px 0; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.article .inline-cta strong { color: var(--white); font-family: var(--font-head); font-size: 1.08rem; display: block; margin-bottom: 4px; }
.guide-disclaimer { font-size: 0.79rem; color: var(--text-light); border-top: 1px solid var(--grey-line); margin-top: 40px; padding-top: 18px; }

/* ============ Responsive ============ */
@media (max-width: 860px) {
  .hero-grid, .about-grid, .contact-layout, .calc-layout { grid-template-columns: 1fr; }
  .hero { padding: 64px 0 72px; }
  .hero-portrait { order: -1; }
  .hero-portrait img, .hero-portrait .portrait-placeholder { width: 200px; height: 200px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .topbar-tag { display: none; }
  .topbar-inner { justify-content: center; }
  .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--white); box-shadow: var(--shadow-lg); border-bottom: 1px solid var(--grey-line); }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; padding: 12px 0; }
  .main-nav li { width: 100%; text-align: center; padding: 10px 0; }
  .nav-toggle { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn:hover, .card:hover { transform: none; }
}
