/* ============================================================
   MortgageReady.ie — redesign (2026)
   Mobile-first, accessible, no frameworks
   ============================================================ */

:root {
  --green-900: #0b3d2e;
  --green-800: #10493a;
  --green-700: #14614c;
  --green-100: #e3f2ec;
  --green-50:  #f2faf6;
  --gold-500:  #d9a441;
  --gold-100:  #faf3e3;
  --ink:       #1c2b26;
  --ink-soft:  #466057;
  --paper:     #fdfdfb;
  --white:     #ffffff;
  --line:      #dbe7e1;
  --danger:    #b3402e;
  --radius:    14px;
  --shadow:    0 2px 10px rgba(11, 61, 46, .08);
  --shadow-lg: 0 10px 30px rgba(11, 61, 46, .14);
  --max-w: 1120px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 1rem;
}

img, svg { max-width: 100%; height: auto; }

/* ---------- Accessibility helpers ---------- */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--gold-500); color: var(--green-900);
  padding: .6rem 1rem; z-index: 100; font-weight: 700;
}
.skip-link:focus { left: .5rem; top: .5rem; }

:focus-visible { outline: 3px solid var(--gold-500); outline-offset: 2px; }

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

/* ---------- Layout ---------- */
.container { width: min(100% - 2.5rem, var(--max-w)); margin-inline: auto; }

.section { padding: 3.5rem 0; }
.section--tint { background: var(--green-50); }

.section-head { max-width: 640px; margin-bottom: 2rem; }
.section-head h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); color: var(--green-900); line-height: 1.25; }
.section-head p  { color: var(--ink-soft); margin-top: .5rem; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.nav-bar {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 64px; gap: 1rem;
}
.brand {
  display: flex; align-items: center; gap: .55rem;
  font-weight: 800; font-size: 1.15rem; color: var(--green-900);
  text-decoration: none; letter-spacing: -.01em;
}
.brand .dot {
  width: 30px; height: 30px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--gold-500), var(--green-700));
  flex: none;
}
.brand span em { font-style: normal; color: var(--green-700); }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line);
  border-radius: 8px; padding: .45rem .6rem; cursor: pointer;
}
.nav-toggle svg { display: block; }

.nav-links {
  display: flex; align-items: center; gap: .25rem;
  list-style: none;
}
.nav-links a {
  display: block; padding: .5rem .75rem; border-radius: 8px;
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem;
}
.nav-links a:hover { background: var(--green-100); color: var(--green-900); }
.nav-links a[aria-current="page"] { color: var(--green-800); background: var(--green-100); }
.nav-links .nav-cta { margin-left: .5rem; }

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--white); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; padding: .75rem 1rem 1rem;
    box-shadow: var(--shadow-lg);
  }
  .nav-links.open { display: flex; }
  .nav-links .nav-cta { margin-left: 0; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: .8rem 1.4rem; border-radius: 999px;
  font-weight: 700; text-decoration: none; border: 2px solid transparent;
  cursor: pointer; font-size: 1rem; transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn--primary { background: var(--green-800); color: var(--white); }
.btn--primary:hover { background: var(--green-700); }
.btn--gold { background: var(--gold-500); color: var(--green-900); }
.btn--ghost { border-color: var(--green-800); color: var(--green-800); background: transparent; }
.btn--ghost:hover { background: var(--green-100); }
.btn--light { background: var(--white); color: var(--green-900); }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1000px 400px at 85% -10%, rgba(217,164,65,.18), transparent 60%),
    linear-gradient(160deg, var(--green-900) 0%, var(--green-800) 70%, var(--green-700) 100%);
  color: var(--white);
  padding: 4rem 0 4.5rem;
}
.hero-grid { display: grid; gap: 2.5rem; }
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.15fr .85fr; align-items: center; }
}
.hero h1 {
  font-size: clamp(2rem, 5.5vw, 3.2rem); line-height: 1.12; letter-spacing: -.02em;
}
.hero h1 .accent { color: var(--gold-500); }
.hero p.lede { margin-top: 1rem; color: #d7e8e0; font-size: 1.1rem; max-width: 34rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.75rem; }

.hero-facts {
  display: grid; grid-template-columns: 1fr 1fr; gap: .8rem;
}
.fact-card {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius); padding: 1rem 1.1rem;
}
.fact-card .num { font-size: 1.45rem; font-weight: 800; color: var(--gold-500); }
.fact-card .lbl { font-size: .85rem; color: #cfe3da; margin-top: .15rem; }
@media (min-width: 480px) { .hero-facts { grid-template-columns: 1fr 1fr; } }

/* ---------- Cards ---------- */
.cards-3 { display: grid; gap: 1.25rem; }
@media (min-width: 760px) { .cards-3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow);
}
.card h3 { color: var(--green-900); font-size: 1.1rem; margin-bottom: .5rem; }
.card p { color: var(--ink-soft); font-size: .95rem; }
.card .icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--green-100); color: var(--green-800);
  font-size: 1.3rem; font-weight: 800; margin-bottom: 1rem;
}
.card--gold .icon { background: var(--gold-100); color: var(--gold-500); }

.card-link { display: inline-block; margin-top: .9rem; font-weight: 700; color: var(--green-700); text-decoration: none; }
.card-link:hover { text-decoration: underline; }

/* ---------- Steps (readiness journey) ---------- */
.steps { display: grid; gap: 1.25rem; counter-reset: step; }
@media (min-width: 760px) { .steps { grid-template-columns: 1fr 1fr; } }

.step {
  position: relative; background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.5rem 1.5rem 1.5rem 4.2rem; box-shadow: var(--shadow);
}
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 1.1rem; top: 1.35rem;
  width: 2.1rem; height: 2.1rem; border-radius: 50%;
  background: var(--green-800); color: var(--white);
  display: grid; place-items: center; font-weight: 800;
}
.step h3 { color: var(--green-900); font-size: 1.08rem; }
.step p { color: var(--ink-soft); font-size: .95rem; margin-top: .35rem; }
.step ul { margin: .6rem 0 0 1.1rem; color: var(--ink-soft); font-size: .93rem; }
.step ul li { margin: .2rem 0; }

/* ---------- Checklist ---------- */
.checklist { list-style: none; display: grid; gap: .55rem; }
.checklist li {
  padding-left: 2rem; position: relative; color: var(--ink-soft);
}
.checklist li::before {
  content: "✓"; position: absolute; left: 0; top: .05rem;
  width: 1.3rem; height: 1.3rem; border-radius: 50%;
  background: var(--green-100); color: var(--green-800);
  display: grid; place-items: center; font-size: .8rem; font-weight: 800;
}

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); background: var(--white); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 560px; }
caption { text-align: left; padding: .9rem 1rem .2rem; font-weight: 700; color: var(--green-900); }
th, td { padding: .8rem 1rem; text-align: left; border-bottom: 1px solid var(--line); }
thead th { background: var(--green-900); color: var(--white); font-weight: 700; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:nth-child(even) { background: var(--green-50); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Calculator ---------- */
.calc-grid { display: grid; gap: 2rem; }
@media (min-width: 900px) { .calc-grid { grid-template-columns: 1fr 1fr; align-items: start; } }

.calc-form {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow);
}
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 700; font-size: .92rem; margin-bottom: .3rem; color: var(--green-900); }
.field .hint { font-weight: 400; color: var(--ink-soft); font-size: .85rem; }
.field input[type="number"], .field select {
  width: 100%; padding: .7rem .85rem; border: 1.5px solid var(--line);
  border-radius: 10px; font-size: 1rem; background: var(--white); color: var(--ink);
}
.field input:focus, .field select:focus { border-color: var(--green-700); }
.field .range-val { float: right; font-weight: 800; color: var(--green-800); }
.field input[type="range"] { width: 100%; accent-color: var(--green-700); }
.radio-row { display: flex; gap: .6rem; flex-wrap: wrap; }
.radio-row label {
  flex: 1; text-align: center; padding: .6rem .5rem; border: 1.5px solid var(--line);
  border-radius: 10px; cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--ink-soft);
}
.radio-row input { position: absolute; opacity: 0; }
.radio-row input:checked + span { color: var(--green-900); }
.radio-row label:has(input:checked) { border-color: var(--green-700); background: var(--green-100); color: var(--green-900); }
.check-row { display: flex; align-items: flex-start; gap: .55rem; font-size: .95rem; color: var(--ink-soft); }
.check-row input { width: 1.15rem; height: 1.15rem; margin-top: .2rem; accent-color: var(--green-700); }

.calc-results {
  background: linear-gradient(165deg, var(--green-900), var(--green-700));
  color: var(--white); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow-lg);
}
.calc-results h3 { font-size: 1.1rem; margin-bottom: 1rem; color: var(--gold-500); }
.result-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: .75rem 0; border-bottom: 1px solid rgba(255,255,255,.15);
}
.result-row:last-of-type { border-bottom: none; }
.result-row .k { color: #cfe3da; font-size: .92rem; }
.result-row .v { font-weight: 800; font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.result-note { margin-top: .9rem; font-size: .85rem; color: #cfe3da; }

/* ---------- FAQ ---------- */
.faq-item { border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); margin-bottom: .8rem; overflow: hidden; box-shadow: var(--shadow); }
.faq-item summary {
  padding: 1rem 1.2rem; font-weight: 700; color: var(--green-900); cursor: pointer;
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.3rem; color: var(--gold-500); flex: none; }
.faq-item[open] summary::after { content: "–"; }
.faq-item .faq-body { padding: 0 1.2rem 1.1rem; color: var(--ink-soft); font-size: .96rem; }

/* ---------- Callout / notice ---------- */
.notice {
  background: var(--gold-100); border: 1px solid #ecd9a8; border-radius: var(--radius);
  padding: 1rem 1.2rem; font-size: .9rem; color: #6b5416; margin-top: 1.5rem;
}
.notice strong { color: #574310; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(160deg, var(--green-900), var(--green-700));
  color: var(--white); border-radius: calc(var(--radius) * 1.4);
  padding: 2.5rem 1.75rem; text-align: center; box-shadow: var(--shadow-lg);
}
.cta-band h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
.cta-band p { color: #d7e8e0; margin: .6rem auto 1.4rem; max-width: 36rem; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: 1.25rem; }
@media (min-width: 760px) { .contact-grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Footer ---------- */
.site-footer { background: var(--green-900); color: #bcd6cc; padding: 3rem 0 2rem; margin-top: 3.5rem; font-size: .9rem; }
.footer-grid { display: grid; gap: 2rem; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.site-footer h3 { color: var(--white); font-size: 1rem; margin-bottom: .7rem; }
.site-footer ul { list-style: none; }
.site-footer li { margin: .35rem 0; }
.site-footer a { color: #d7e8e0; text-decoration: none; }
.site-footer a:hover { color: var(--gold-500); text-decoration: underline; }
.footer-note { margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid rgba(255,255,255,.14); color: #8fb3a7; font-size: .82rem; }

/* ---------- Utility ---------- */
.mt-1 { margin-top: .75rem; } .mt-2 { margin-top: 1.5rem; } .mt-3 { margin-top: 2.5rem; }
.text-center { text-align: center; }
