/* Mortgage Protection Solutions — implementation of "Mortgage Protection.dc.html" */

:root {
  --paper:        #FAF5EC;  /* page background          */
  --card:         #FFFDF8;  /* raised surfaces          */
  --band:         #F3ECDF;  /* tinted section bands     */
  --line:         #E6DDCC;  /* hairline rules & borders */
  --ink:          #2B2620;  /* primary text             */
  --ink-muted:    #5C544A;  /* body copy                */
  --ink-faint:    #8A7F70;  /* captions, eyebrows       */
  --green:        #2F5B45;  /* brand green              */
  --green-dark:   #1F4231;  /* link hover               */
  --green-card:   #35644D;  /* card on green            */
  --green-line:   #4A7561;  /* border on green          */
  --on-green:     #F4EFE4;
  --on-green-sub: #BFCFC4;
  --on-green-tag: #A9C3B4;
  --on-green-body:#D3E0D7;
  --on-dark-sub:  #B3A996;

  --serif: Newsreader, Georgia, "Times New Roman", serif;
  --sans:  Karla, system-ui, -apple-system, "Segoe UI", sans-serif;

  --shell: 1120px;
  --gutter: 32px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

::selection { background: #E3D9C6; }

a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-dark); }

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 500; margin: 0; }

.wrap {
  max-width: var(--shell);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 245, 236, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  padding-block: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.brand:hover { color: var(--ink); }

.brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 7px 7px 7px 2px;
  background: var(--green);
  display: block;
  flex: none;
}

.brand-name {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 15px;
}

.nav a:not(.btn) { color: var(--ink-muted); }
.nav a:not(.btn):hover { color: var(--green); }

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

.btn {
  display: inline-block;
  border-radius: 999px;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.btn-primary {
  background: var(--green);
  color: var(--paper);
  padding: 16px 30px;
  font-size: 17px;
}
.btn-primary:hover { background: var(--green-dark); color: var(--paper); }

.btn-sm { padding: 11px 20px; font-size: 15px; }

.btn-light {
  background: var(--on-green);
  color: var(--ink);
  padding: 18px 34px;
  font-size: 17px;
  font-weight: 700;
}
.btn-light:hover { background: #FFFFFF; color: var(--ink); }

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

.hero {
  padding-block: 92px 72px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 64px;
  align-items: center;
  scroll-margin-top: 80px;
}

.eyebrow {
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 600;
  margin: 0 0 22px;
}

.hero h1 {
  font-size: clamp(38px, 5.6vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  margin: 0 0 26px;
  text-wrap: balance;
}

.lead {
  font-size: 19px;
  line-height: 1.6;
  color: var(--ink-muted);
  margin: 0 0 36px;
  max-width: 30em;
  text-wrap: pretty;
}

.cta-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.cta-note { font-size: 15px; color: var(--ink-faint); }

/* ---------- rate card ---------- */

.rate-card {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 24px 48px -32px rgba(43, 38, 32, 0.35);
}

.rate-title {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.35;
  margin: 0 0 24px;
}

/* 1px gap + shared background paints the row rules */
.rate-table {
  display: grid;
  gap: 2px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.rate-head,
.rate-row { display: grid; grid-template-columns: 1fr 1fr 1fr; }

.rate-head {
  background: var(--band);
  padding: 12px 16px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 700;
}

.rate-row {
  background: var(--card);
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 600;
}

.rate-age { color: var(--ink-muted); font-weight: 400; }

.rate-note {
  font-size: 13px;
  color: var(--ink-faint);
  line-height: 1.5;
  margin: 18px 0 0;
}

/* ---------- trust strip ---------- */

.trust-strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--band);
}

.trust-inner {
  padding-block: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 40px;
  justify-content: space-between;
  font-size: 15px;
  color: var(--ink-muted);
}

/* ---------- generic section ---------- */

.section { padding-block: 88px; scroll-margin-top: 72px; }

.section h2 {
  font-size: clamp(30px, 4vw, 44px);
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}

.section h2.h2-tight { margin-bottom: 48px; }

.section-sub {
  font-size: 18px;
  color: var(--ink-muted);
  margin: 0 0 48px;
  max-width: 34em;
}

.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* ---------- how it works ---------- */

.card {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 18px;
  padding: 30px;
}

.step-n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: var(--green);
  color: var(--paper);
  font-family: var(--serif);
  font-size: 19px;
  margin-bottom: 22px;
}

.card h3 { font-size: 25px; margin: 0 0 12px; }

.card p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-muted);
  margin: 0;
  text-wrap: pretty;
}

/* ---------- coverage (green band) ---------- */

.band-green { background: var(--green); color: var(--on-green); }
.band-green .section-sub { color: var(--on-green-sub); }

.product {
  border: 1px solid var(--green-line);
  border-radius: 18px;
  padding: 30px;
  background: var(--green-card);
}

.product-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.product-head h3 { font-size: 27px; margin: 0; }

.product-tag {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--on-green-tag);
  font-weight: 700;
  white-space: nowrap;
}

.product p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--on-green-body);
  margin: 0;
  text-wrap: pretty;
}

/* ---------- audiences ---------- */

.audience { border-top: 2px solid var(--green); padding: 22px 0 0; }

.audience h3 {
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 10px;
}

.audience p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-muted);
  margin: 0;
  text-wrap: pretty;
}

/* ---------- testimonials ---------- */

.band-cream {
  background: var(--band);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.quote {
  margin: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.quote blockquote {
  margin: 0;
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.45;
  font-style: italic;
  color: var(--ink);
  text-wrap: pretty;
}

.quote figcaption { font-size: 14px; color: var(--ink-faint); margin-top: auto; }

/* ---------- faq ---------- */

.faq {
  max-width: 820px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.faq h2 { margin-bottom: 40px; }

.faq-list { border-top: 1px solid var(--line); }

.faq-item { border-bottom: 1px solid var(--line); }

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 500;
  color: var(--ink);
}

.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--green); }

.faq-sign {
  font-family: var(--sans);
  font-size: 26px;
  color: var(--ink-faint);
  line-height: 1;
  flex: none;
}

.faq-sign::before { content: "+"; }
.faq-item[open] .faq-sign::before { content: "–"; }

.faq-item > p {
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-muted);
  margin: 0;
  padding: 0 0 26px;
  max-width: 42em;
  text-wrap: pretty;
}

/* ---------- closing cta ---------- */

.band-dark { background: var(--ink); color: var(--on-green); }

.closer {
  padding-block: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  flex-wrap: wrap;
}

.closer h2 {
  font-size: clamp(30px, 3.8vw, 42px);
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}

.closer p { font-size: 18px; color: var(--on-dark-sub); margin: 0; max-width: 32em; }

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

.site-footer {
  padding-block: 40px 60px;
  display: flex;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--ink-faint);
  line-height: 1.6;
}

.site-footer .disclaimer { max-width: 46em; }

/* ---------- responsive ---------- */

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 48px; padding-block: 64px 56px; }
  .grid-3, .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); gap: 28px 20px; }
  .section { padding-block: 68px; }
  .closer { gap: 32px; }
}

@media (max-width: 720px) {
  :root { --gutter: 20px; }
  .nav { gap: 0; }
  .nav a:not(.btn) { display: none; }
  .brand-name { font-size: 17px; }
  .grid-3, .grid-2, .grid-4 { grid-template-columns: 1fr; }
  .rate-card { padding: 24px; }
  .card, .product, .quote { padding: 24px; }
  .lead { font-size: 17px; }
  .section-sub { font-size: 17px; margin-bottom: 36px; }
  .faq-item summary { font-size: 20px; gap: 16px; }
  .closer { padding-block: 64px; }
  .btn-primary, .btn-light { padding: 15px 26px; font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0.01ms !important; }
}

/* =========================================================================
   Appointments page — implementation of "Appointments.dc.html"
   ========================================================================= */

.site-header.is-static {
  position: static;
  background: var(--paper);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.back-link { font-size: 15px; color: var(--ink-muted); }
.back-link:hover { color: var(--green); }

.noscript-note {
  padding-block: 32px;
  font-size: 16px;
  color: var(--ink-muted);
}

/* ---------- intro ---------- */

.booking-intro { padding-block: 64px 24px; }

.booking-intro h1 {
  font-size: clamp(34px, 4.8vw, 56px);
  letter-spacing: -0.025em;
  line-height: 1.06;
  margin: 0 0 18px;
  max-width: 16em;
}

.booking-lead {
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-muted);
  margin: 0;
  max-width: 40em;
  text-wrap: pretty;
}

.booking-grid {
  padding-block: 40px 100px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

.panel {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 20px;
  padding: 30px;
}

.panel h2 { font-size: 26px; margin: 0; }

/* ---------- calendar ---------- */

.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.cal-nav { display: flex; gap: 8px; }

.cal-arrow {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink-muted);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

.cal-arrow:hover { border-color: var(--green); color: var(--green); }

.cal-daynames,
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.cal-daynames { margin-bottom: 8px; }

.cal-daynames span {
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #A2988A;
  font-weight: 700;
  padding: 6px 0;
}

.cal-cell {
  border-radius: 10px;
  height: 44px;
  font-family: var(--sans);
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.cal-cell.is-pad { border: none; background: transparent; }

.cal-cell.is-open {
  border: 1px solid #E2D8C4;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  font-weight: 500;
}

.cal-cell.is-open:hover { border-color: var(--green); color: var(--green); }

.cal-cell.is-selected {
  border: 1px solid var(--green);
  background: var(--green);
  color: var(--paper);
  font-weight: 700;
  cursor: pointer;
}

.cal-cell.is-closed {
  border: 1px solid transparent;
  background: transparent;
  color: #C6BCA9;
  cursor: default;
}

.cal-legend {
  display: flex;
  gap: 22px;
  margin-top: 22px;
  font-size: 13px;
  color: var(--ink-faint);
}

.cal-legend > span { display: flex; align-items: center; gap: 7px; }

.dot { width: 9px; height: 9px; border-radius: 999px; display: block; }
.dot-selected { background: var(--green); }
.dot-unavailable { background: #D9CDB6; }

/* ---------- time slots ---------- */

.slots-block {
  margin-top: 30px;
  border-top: 1px solid var(--line);
  padding-top: 26px;
}

.slots-block h3 { font-size: 21px; margin: 0 0 6px; }

.slots-note { font-size: 13px; color: var(--ink-faint); margin: 0 0 18px; }

.slots-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

.slot {
  border-radius: 999px;
  padding: 11px 4px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
}

.slot.is-open {
  border: 1px solid #D9CDB6;
  background: var(--paper);
  color: var(--green);
  cursor: pointer;
}

.slot.is-open:hover { border-color: var(--green); }

.slot.is-selected {
  border: 1px solid var(--green);
  background: var(--green);
  color: var(--paper);
  cursor: pointer;
}

.slot.is-closed {
  border: 1px dashed var(--line);
  background: transparent;
  color: #C6BCA9;
  cursor: default;
  text-decoration: line-through;
}

/* ---------- form ---------- */

.form-panel { display: flex; flex-direction: column; gap: 20px; }

.form-panel h2 { margin-bottom: 6px; }
.form-sub { font-size: 14px; color: var(--ink-faint); margin: 0; }

.selection-box {
  background: var(--band);
  border-radius: 12px;
  padding: 16px 18px;
  font-size: 15px;
  color: var(--ink-muted);
  line-height: 1.5;
}

.selection-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 700;
  margin-bottom: 5px;
}

.selection-box strong { color: var(--ink); font-size: 16px; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.field,
.field-legend {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6E6558;
}

.field { display: flex; flex-direction: column; gap: 7px; }

.field-legend { display: block; margin-bottom: 9px; }

.field input,
.field select {
  border: 1px solid #DDD2BE;
  background: var(--card);
  border-radius: 10px;
  padding: 12px 14px;
  font-family: var(--sans);
  font-size: 16px;
  color: var(--ink);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  width: 100%;
}

.field input:focus,
.field select:focus {
  outline: 2px solid var(--green);
  outline-offset: 1px;
}

.field input:user-invalid { border-color: #B4553F; }

.toggle-row { display: flex; gap: 10px; }

.toggle {
  flex: 1;
  border-radius: 10px;
  padding: 12px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid #DDD2BE;
  background: var(--paper);
  color: var(--ink-muted);
}

.toggle:hover { border-color: var(--green); }

.toggle.is-selected {
  border-color: var(--green);
  background: var(--green);
  color: var(--paper);
}

.submit-btn {
  border: none;
  border-radius: 999px;
  padding: 17px;
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 700;
  background: var(--green);
  color: var(--paper);
  cursor: pointer;
}

.submit-btn:hover:not(:disabled) { background: var(--green-dark); }

.submit-btn:disabled {
  background: var(--line);
  color: #A2988A;
  cursor: not-allowed;
}

.form-disclaimer { font-size: 12px; color: #A2988A; margin: 0; line-height: 1.55; }

/* ---------- confirmation ---------- */

.confirmation { padding-block: 120px 160px; text-align: center; max-width: 640px; }

.check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: var(--green);
  color: var(--paper);
  font-size: 26px;
  margin-bottom: 28px;
}

.confirmation h1 {
  font-size: clamp(34px, 4.4vw, 48px);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 18px;
}

.confirm-line { font-size: 19px; line-height: 1.6; color: var(--ink-muted); margin: 0 0 32px; }

.confirm-box {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 18px;
  padding: 28px;
  text-align: left;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-muted);
}

.confirm-box strong { color: var(--ink); }

.confirm-actions { margin-top: 32px; }

.ghost-btn {
  background: none;
  border: 1px solid #C9BDA6;
  color: var(--ink-muted);
  padding: 13px 26px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 15px;
  cursor: pointer;
}

.ghost-btn:hover { border-color: var(--green); color: var(--green); }

.appt-footer {
  border-top: 1px solid var(--line);
  padding-block: 32px;
  font-size: 13px;
  color: var(--ink-faint);
}

/* ---------- responsive ---------- */

@media (max-width: 960px) {
  .booking-grid { grid-template-columns: 1fr; padding-block: 32px 72px; }
  .booking-intro { padding-block: 48px 16px; }
  .confirmation { padding-block: 80px 110px; }
}

@media (max-width: 720px) {
  .panel { padding: 22px; }
  .booking-lead { font-size: 17px; }
  .cal-daynames, .cal-grid { gap: 4px; }
  .cal-cell { height: 40px; font-size: 14px; }
  .cal-daynames span { font-size: 10px; }
  .slots-grid { grid-template-columns: repeat(2, 1fr); }
  .field-row { grid-template-columns: 1fr; }
  .confirm-box { padding: 22px; }
}
