/* dmortgage.ca — Nataliia Dmytruk, Mortgage Specialist
   Palette and type ported 1:1 from the Claude Design canvas. */

:root {
  --navy:        #16324f;
  --navy-deep:   #0f2438;
  --gold:        #c9a227;
  --gold-light:  #e8c766;
  --cream:       #faf7f0;
  --band:        #eee6d3;
  --ink:         #1c2b3a;
  --muted:       #5c6b78;
  --muted-light: #9fb0bf;
  --on-navy:     #c7d2dc;
  --line:        #d8dee3;
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans:  'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  overflow-x: hidden;
}

a { color: var(--navy); }
a:hover { color: var(--gold); }

img { max-width: 100%; }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}
.site-header :focus-visible,
.hero :focus-visible,
#contact :focus-visible {
  outline-color: var(--gold-light);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--gold);
  color: var(--navy);
  padding: 12px 20px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 0 0 8px 0;
}
.skip-link:focus {
  left: 0;
  color: var(--navy);
}

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

/* ---------- Seminar banner (remove after 28 Nov 2026) ---------- */

.seminar-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 16px;
  padding: 10px 24px;
  background: var(--gold);
  color: var(--navy-deep);
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
}
.seminar-bar:hover { color: var(--navy-deep); background: var(--gold-light); }
.seminar-bar-cta { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  gap: 16px 24px;
  flex-wrap: wrap;
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand:hover { color: inherit; }

.brand-badge {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 19px;
  color: var(--navy);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: var(--serif); font-weight: 600; font-size: 20px; color: #fff; }
.brand-role {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--gold-light);
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  gap: 18px 24px;
  flex-wrap: wrap;
  order: 3;
  flex-basis: 100%;
  justify-content: center;
}
.site-nav a { color: #fff; text-decoration: none; font-size: 15px; }
.site-nav a:hover { color: var(--gold-light); }

.header-actions { display: flex; align-items: center; gap: 14px; }

.lang-switch {
  display: flex;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  overflow: hidden;
}
.lang-btn {
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: transparent;
  text-decoration: none;
  line-height: 1.2;
}
.lang-btn:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.lang-btn[aria-current="true"] {
  background: var(--gold);
  color: var(--navy);
  font-weight: 700;
}
.lang-btn[aria-current="true"]:hover { background: var(--gold); color: var(--navy); }

.header-phone {
  color: var(--gold-light);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

/* ---------- Hero ---------- */

.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%);
  padding: 64px 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 40px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(201, 162, 39, 0.15);
  border: 1px solid var(--gold);
  border-radius: 999px;
  padding: 6px 16px;
  margin-bottom: 24px;
  color: var(--gold-light);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.hero-title {
  font-family: var(--serif);
  font-size: clamp(34px, 6vw, 56px);
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
  margin: 0 0 20px;
  max-width: 640px;
}

.hero-sub {
  font-size: 19px;
  color: var(--on-navy);
  line-height: 1.6;
  max-width: 520px;
  margin: 0 0 36px;
}

.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }

.btn-primary {
  background: var(--gold);
  color: var(--navy);
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
}
.btn-primary:hover { background: var(--gold-light); color: var(--navy); }

.btn-ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }

#hero-photo-wrap {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
}
#hero-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 38%;
  display: block;
  transform: scale(1.2);
}

/* ---------- Why ---------- */

.why { background: var(--navy-deep); padding: 56px 24px; }

.why-title {
  font-family: var(--serif);
  color: #fff;
  text-align: center;
  font-size: 32px;
  font-weight: 600;
  margin: 0 0 44px;
}

.why-grid {
  max-width: 1160px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 32px;
}

.why-item { text-align: center; padding: 0 8px; }
.why-dot {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--gold);
  margin: 0 auto 16px;
}
.why-item h3 { color: #fff; font-weight: 600; font-size: 17px; margin: 0 0 8px; }
.why-item p { color: var(--muted-light); font-size: 14.5px; line-height: 1.55; margin: 0; }

/* ---------- Sections ---------- */

.section { padding: 64px 24px; max-width: 1200px; margin: 0 auto; }

.section-head { text-align: center; margin-bottom: 52px; }
.section-title {
  font-family: var(--serif);
  font-size: clamp(28px, 5vw, 38px);
  font-weight: 600;
  color: var(--navy);
  margin: 0 0 12px;
}
.section-sub { color: var(--muted); font-size: 17px; margin: 0; }

/* ---------- Services ---------- */

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}

.service-card {
  background: #fff;
  border-radius: 14px;
  padding: 32px 28px;
  border-top: 4px solid var(--gold);
  box-shadow: 0 8px 24px rgba(22, 50, 79, 0.06);
}
.service-card h3 { font-size: 19px; font-weight: 700; color: var(--navy); margin: 0 0 10px; }
.service-card p { font-size: 15px; color: var(--muted); line-height: 1.6; margin: 0; }

/* ---------- Calculator ---------- */

.calculator { background: var(--band); padding: 64px 24px; }
.calc-inner { max-width: 1100px; margin: 0 auto; }
.calc-inner .section-head { margin-bottom: 40px; }

.calc-card {
  background: #fff;
  border-radius: 20px;
  padding: clamp(24px, 5vw, 44px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  align-items: center;
  box-shadow: 0 20px 50px rgba(22, 50, 79, 0.08);
}

.calc-controls { display: flex; flex-direction: column; gap: 26px; }

.calc-field-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 14.5px;
  color: var(--navy);
  font-weight: 600;
}
.calc-field-head label { cursor: pointer; }

/* Typed values beside each slider. */
.calc-num-wrap { display: inline-flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.calc-pct { font-variant-numeric: tabular-nums; }
.calc-num {
  font: inherit;
  font-variant-numeric: tabular-nums;
  color: var(--navy);
  text-align: right;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px 8px;
  margin: -5px 0; /* keep the row the same height as plain text */
  transition: border-color 0.15s;
}
.calc-num:hover { border-color: var(--gold); }
.calc-num:focus { border-color: var(--gold); outline: 2px solid var(--gold); outline-offset: 0; }
.calc-num--money { width: 8.5em; }
.calc-num--rate  { width: 5em; }
.calc-num--years { width: 3.5em; }

.calc-controls input[type="range"] {
  width: 100%;
  accent-color: var(--gold);
}

.calc-result {
  background: var(--navy);
  border-radius: 16px;
  padding: 36px 28px;
  text-align: center;
}
.calc-result-label {
  color: var(--muted-light);
  font-size: 13.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}
.calc-result-value {
  display: block;
  font-family: var(--serif);
  font-size: 44px;
  font-weight: 700;
  color: var(--gold-light);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.calc-insured {
  color: var(--gold-light);
  font-size: 12.5px;
  line-height: 1.5;
  margin-top: 16px;
}
.calc-insured[hidden] { display: none; }
.calc-cta { display: inline-block; margin-top: 22px; }
.calc-disclaimer {
  /* was #7d8fa0 — lightened to clear WCAG AA at this size */
  color: #a8b8c6;
  font-size: 12.5px;
  margin-top: 18px;
  line-height: 1.5;
}

/* ---------- FAQ ---------- */

.faq { padding: 64px 24px; max-width: 820px; margin: 0 auto; }
.faq .section-title { text-align: center; margin: 0 0 48px; }

.faq-list { display: flex; flex-direction: column; gap: 14px; }

.faq-item {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(22, 50, 79, 0.06);
  overflow: hidden;
}

.faq-item summary {
  padding: 20px 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  font-weight: 600;
  color: var(--navy);
  font-size: 16px;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { background: #fcfaf5; }

.faq-mark {
  color: var(--gold);
  font-size: 20px;
  font-weight: 700;
  flex-shrink: 0;
  line-height: 1;
}
.faq-mark::after { content: "+"; }
.faq-item[open] .faq-mark::after { content: "\2212"; }

.faq-answer {
  padding: 0 26px 22px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
}

/* ---------- Contact ---------- */

.contact { background: var(--navy); padding: 64px 24px; }

.contact-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
}

.contact-title {
  font-family: var(--serif);
  font-size: clamp(28px, 5vw, 36px);
  font-weight: 600;
  color: #fff;
  margin: 0 0 14px;
}
.contact-sub { color: var(--on-navy); font-size: 16px; line-height: 1.6; margin: 0 0 32px; }

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: 15.5px;
}
.contact-details a { color: var(--gold-light); text-decoration: none; }
.contact-details a:hover { color: #fff; text-decoration: underline; }

.contact-direct {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--muted-light);
  font-size: 13.5px;
}

.contact-form {
  background: #fff;
  border-radius: 16px;
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.contact-form[hidden] { display: none; }
.contact-form label {
  font-size: 13.5px;
  color: var(--navy);
  font-weight: 600;
  display: block;
  margin-bottom: 6px;
}
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 15px;
  font-family: var(--sans);
  color: var(--ink);
  background: #fff;
}
.contact-form textarea { resize: vertical; }
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid var(--gold); }
.contact-form ::placeholder { color: #9aa7b3; }

.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  opacity: 0;
}

.form-consent { font-size: 12.5px; color: var(--muted); line-height: 1.5; margin: 0; }

.form-error {
  background: #fdecec;
  border: 1px solid #e0b4b4;
  color: #a33;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 14px;
}
.form-error[hidden] { display: none; }

.submit-btn {
  background: var(--gold);
  color: var(--navy);
  border: none;
  padding: 15px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 16px;
  font-family: var(--sans);
  cursor: pointer;
  margin-top: 6px;
}
.submit-btn:hover { background: var(--gold-light); }
.submit-btn[disabled] { background: #d9cfa8; cursor: default; }

.contact-thanks {
  background: #fff;
  border-radius: 16px;
  padding: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
}
.contact-thanks[hidden] { display: none; }
.thanks-dot { width: 52px; height: 52px; border-radius: 50%; background: var(--gold); }
.thanks-title {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 600;
  color: var(--navy);
  margin: 0;
}
.thanks-body { color: var(--muted); font-size: 15px; margin: 0; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--navy-deep);
  padding: 28px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  text-align: center;
  color: #8fa0b0;
  font-size: 13.5px;
}
.site-footer a { color: #8fa0b0; }
.site-footer a:hover { color: var(--gold-light); }
.footer-legal { flex-basis: 100%; order: 3; text-align: center; line-height: 1.6; }

/* ---------- Legal pages ---------- */

.prose { max-width: 760px; margin: 0 auto; padding: 56px 24px 72px; }
.prose h1 {
  font-family: var(--serif);
  font-size: clamp(30px, 5vw, 40px);
  font-weight: 600;
  color: var(--navy);
  margin: 0 0 8px;
}
.prose .updated { color: var(--muted); font-size: 14px; margin: 0 0 36px; }
.prose h2 {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 600;
  color: var(--navy);
  margin: 36px 0 10px;
}
.prose p, .prose li { color: var(--muted); font-size: 15.5px; line-height: 1.7; }
.prose ul { padding-left: 22px; }

/* ---------- Mobile ---------- */

@media (max-width: 700px) {
  #hero-photo-wrap {
    order: -1;
    aspect-ratio: 1 / 1;
    max-width: 380px;
    margin: 0 auto;
  }
  #hero-text { text-align: center; }
  #hero-text .hero-badge { margin-left: auto; margin-right: auto; }
  #hero-text p { margin-left: auto; margin-right: auto; }
  #hero-text .hero-cta { justify-content: center; }
  .field-pair { grid-template-columns: 1fr; }
  .contact-form { padding: 28px 22px; }
  .site-footer { justify-content: center; }
}

/* ---------- 404 ---------- */

.error-actions { margin-top: 28px; }
.error-actions .btn-primary { display: inline-block; }
