/* theomortgage.ca | One Link Mortgage & Financial
   Layout idea: navy masthead and footer framing cream "paper" pages; gold hairlines mark
   structure; one reading column with a facts rail where the content calls for it. */
:root {
  --navy: #0e2238;
  --navy-2: #17324f;
  --gold: #c9a227;
  --gold-deep: #8f6f0e;
  --cream: #f6f1e6;
  --paper: #fffdf8;
  --ink: #1a2330;
  --muted: #566070;
  --line: #e0d6c0;
  --display: "EB Garamond", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --body: "Inter", "Helvetica Neue", Arial, sans-serif;
  --wrap: 1120px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy-2); text-underline-offset: 3px; }
a:hover { color: var(--gold-deep); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.15; text-wrap: balance; margin: 0; color: var(--navy); }
h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
h3 { font-size: 1.35rem; }
p { margin: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.stack > * + * { margin-top: 1rem; }
.eyebrow { font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600; color: var(--gold-deep); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: var(--paper); padding: 8px 12px; z-index: 10; }

/* Masthead */
.masthead { background: var(--navy); color: #fff; border-bottom: 3px solid var(--gold); }
.masthead .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 16px; padding-bottom: 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 18px; text-decoration: none; color: #fff; }
.brand img { width: 190px; }
.brand-who { border-left: 1px solid rgba(255,255,255,0.28); padding-left: 18px; font-size: 0.86rem; line-height: 1.35; }
.brand-who strong { display: block; font-family: var(--display); font-size: 1.12rem; font-weight: 500; letter-spacing: 0.01em; }
.brand-who span { color: #d9dee6; }
.masthead-call { color: #fff; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; display: grid; line-height: 1.4; }
.masthead-call a { color: #fff; text-decoration: none; }
.masthead-call a:hover { color: var(--gold); }
.masthead-call small { display: block; font-weight: 400; color: #d9dee6; font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; }
.nav { background: var(--navy-2); }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 26px; }
.nav a { display: block; padding: 12px 0; color: #eef1f5; text-decoration: none; font-size: 0.92rem; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--gold); color: #fff; }

/* Buttons */
.btn { display: inline-block; padding: 14px 24px; border-radius: 3px; font-weight: 600; text-decoration: none; font-size: 1rem; border: 2px solid var(--gold); }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: #dbb53a; color: var(--navy); }
.btn-line { color: #fff; }
.btn-line:hover { background: rgba(255,255,255,0.08); color: #fff; }
.btn-navy { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn-navy:hover { background: var(--navy-2); color: #fff; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* Home hero */
.hero { background: var(--navy); color: #fff; }
.hero .wrap { display: grid; grid-template-columns: 1.25fr 0.75fr; gap: 56px; align-items: end; padding-top: 64px; }
.hero h1 { color: #fff; }
.hero .eyebrow { color: var(--gold); }
.hero-copy { padding-bottom: 64px; }
.hero-copy > * + * { margin-top: 1.25rem; }
.hero-lede { font-size: 1.16rem; color: #e3e8ee; max-width: 34em; }
.hero-photo img { width: 100%; border-top: 3px solid var(--gold); }
.hero-licensed { font-size: 0.9rem; color: #c8d0da; }

/* Sections */
.section { padding: 72px 0; }
.section-paper { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 44em; margin-bottom: 36px; }
.section-head > * + * { margin-top: 0.75rem; }
.lede { font-size: 1.14rem; color: var(--muted); }

/* Focus list (home) */
.focus { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.focus-group { background: var(--paper); border: 1px solid var(--line); border-top: 3px solid var(--gold); padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.section-paper .focus-group { background: var(--cream); }
.focus-group ul { list-style: none; margin: 0; padding: 0; }
.focus-group li { border-top: 1px solid var(--line); }
.focus-group li a { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; text-decoration: none; font-weight: 600; color: var(--navy); }
.focus-group li a::after { content: "\2192"; color: var(--gold-deep); }
.focus-group li a:hover { color: var(--gold-deep); }
.focus-group p { color: var(--muted); font-size: 0.98rem; }

/* Principles */
.principles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 56px; }
.principles div { padding: 22px 0; border-top: 1px solid var(--line); }
.principles h3 { margin-bottom: 6px; }
.principles p { color: var(--muted); }

/* Advisor band */
.band { background: var(--navy-2); color: #fff; }
.band .wrap { display: grid; grid-template-columns: 1.4fr 0.6fr; gap: 40px; align-items: center; padding-top: 56px; padding-bottom: 56px; }
.band h2 { color: #fff; }
.band p { color: #dfe5ec; margin-top: 0.75rem; max-width: 40em; }
.band .actions { justify-content: flex-end; }

/* Contact */
.contact { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 56px; align-items: start; }
.contact-direct { list-style: none; padding: 0; margin: 24px 0 0; }
.contact-direct li { padding: 14px 0; border-top: 1px solid var(--line); }
.contact-direct span { display: block; font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.contact-direct a, .contact-direct strong { font-size: 1.1rem; font-weight: 600; color: var(--navy); text-decoration: none; font-variant-numeric: tabular-nums; }
.form-card { background: var(--paper); border: 1px solid var(--line); border-top: 3px solid var(--gold); padding: 28px; min-height: 320px; }
.form-card .form-fallback { margin-top: 16px; font-size: 0.92rem; color: var(--muted); }
.form-preview { border: 2px dashed var(--line); padding: 40px 24px; text-align: center; color: var(--muted); background: var(--cream); }

/* Article pages */
.page-head { background: var(--navy); color: #fff; padding: 56px 0 48px; }
.page-head h1 { color: #fff; max-width: 20em; }
.page-head .eyebrow { color: var(--gold); margin-bottom: 14px; }
.page-head .answer { font-size: 1.18rem; color: #e3e8ee; max-width: 40em; margin-top: 20px; }
.byline { margin-top: 28px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.22); font-size: 0.9rem; color: #c8d0da; display: flex; flex-wrap: wrap; gap: 6px 22px; }
.byline strong { color: #fff; font-weight: 600; }
.facts { background: var(--paper); border-bottom: 1px solid var(--line); }
.facts dl { margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); }
.facts div { padding: 24px 24px 24px 0; border-left: 1px solid var(--line); padding-left: 24px; }
.facts div:first-child { border-left: 0; padding-left: 0; }
.facts dt { font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 6px 0 0; font-family: var(--display); font-size: 1.5rem; color: var(--navy); line-height: 1.2; font-variant-numeric: tabular-nums; }
.facts small { display: block; font-family: var(--body); font-size: 0.82rem; color: var(--muted); margin-top: 4px; line-height: 1.4; }
.article { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 64px; padding-top: 56px; padding-bottom: 72px; align-items: start; }
.prose { max-width: 42em; }
.prose > section + section { margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--line); }
.prose h2 { margin-bottom: 16px; }
.prose h3 { margin: 28px 0 8px; }
.prose p + p, .prose p + ul, .prose ul + p, .prose p + ol, .prose ol + p, .prose .table-scroll + p, .prose p + .table-scroll { margin-top: 1rem; }
.prose ul, .prose ol { margin: 0; padding-left: 1.3rem; }
.prose li + li { margin-top: 0.4rem; }
.steps { list-style: none; padding: 0 !important; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding: 16px 0 16px 56px; border-top: 1px solid var(--line); margin: 0 !important; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 14px; width: 36px; height: 36px; border: 1.5px solid var(--gold); border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-size: 1.15rem; color: var(--navy); }
.steps strong { display: block; color: var(--navy); }
.note { background: var(--paper); border-left: 3px solid var(--gold); padding: 18px 22px; margin-top: 1.25rem; }
.note p { color: var(--ink); }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; min-width: 560px; }
th, td { text-align: left; padding: 12px 14px 12px 0; border-top: 1px solid var(--line); vertical-align: top; }
thead th { border-top: 0; font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
tbody th { color: var(--navy); font-weight: 600; }
.faq h3 { padding-top: 22px; border-top: 1px solid var(--line); margin-top: 22px; }
.faq h3:first-of-type { border-top: 0; padding-top: 0; }
.sources { font-size: 0.92rem; color: var(--muted); }
.sources li + li { margin-top: 0.5rem; }
.disclaimer { font-size: 0.88rem; color: var(--muted); }
.rail { position: sticky; top: 24px; display: grid; gap: 24px; }
.rail-card { background: var(--paper); border: 1px solid var(--line); border-top: 3px solid var(--gold); padding: 24px; }
.rail-card > * + * { margin-top: 12px; }
.rail-card img { width: 96px; height: 96px; object-fit: cover; object-position: 50% 18%; border-radius: 50%; }
.rail-card p { font-size: 0.95rem; color: var(--muted); }
.rail-card .btn { width: 100%; text-align: center; }
.rail-card ul { list-style: none; padding: 0; margin: 12px 0 0; font-size: 0.94rem; }
.rail-card li { border-top: 1px solid var(--line); }
.rail-card li a { display: block; padding: 9px 0; text-decoration: none; }
.cta { background: var(--navy); color: #fff; }
.cta .wrap { padding-top: 56px; padding-bottom: 56px; display: grid; gap: 20px; }
.cta h2 { color: #fff; }
.cta p { color: #dfe5ec; max-width: 40em; }

/* Footer */
.footer { background: var(--navy); color: #c8d0da; font-size: 0.88rem; border-top: 3px solid var(--gold); }
.footer .wrap { padding-top: 48px; padding-bottom: 40px; display: grid; gap: 32px; }
.footer-top { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 40px; }
.footer img { width: 170px; margin-bottom: 14px; }
.footer h2 { font-family: var(--body); font-size: 0.76rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); font-weight: 600; margin-bottom: 10px; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li + li { margin-top: 5px; }
.footer a { color: #fff; }
.footer-legal { border-top: 1px solid rgba(255,255,255,0.18); padding-top: 20px; display: grid; gap: 8px; font-size: 0.82rem; }

@media (max-width: 900px) {
  .hero .wrap, .band .wrap, .contact, .article { grid-template-columns: minmax(0, 1fr); }
  .hero .wrap { gap: 0; padding-top: 44px; }
  .hero-copy { padding-bottom: 40px; }
  .hero-photo { max-width: 340px; }
  .focus, .footer-top { grid-template-columns: 1fr; }
  .principles { grid-template-columns: 1fr; }
  .facts dl { grid-template-columns: 1fr 1fr; }
  .facts div { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); }
  .facts div:nth-child(-n+2) { border-top: 0; }
  .band .actions { justify-content: flex-start; }
  .rail { position: static; }
  .section { padding: 52px 0; }
  .nav ul { gap: 0 20px; }
  .nav a { padding: 9px 0; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .wrap { padding: 0 18px; }
  .brand img { width: 150px; }
  .brand-who { display: none; }
  .facts dl { grid-template-columns: 1fr; }
  .facts div:nth-child(2) { border-top: 1px solid var(--line); }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
