/* ==========================================================================
   Vernon Spence -- Residential Landing Page Styles
   Extends css/styles.css. Does not override committed commercial rules
   except via scoped .res-* classes on body.residential.
   ========================================================================== */

/* body background warm at top (page loads with off-white feel above fold) */
body.residential {
  background-color: var(--off-white);
  color: var(--dark-text);
}

/* ---------- Residential Nav tweaks ---------- */
/* At top of page (pre-scroll) nav sits on light hero -> use dark text */
body.residential .nav:not(.scrolled) .nav__brand {
  color: var(--navy-deep);
}
body.residential .nav:not(.scrolled) .nav__brand span {
  color: var(--gold);
}
body.residential .nav:not(.scrolled) .nav__link {
  color: rgba(17,29,53,0.8);
}
body.residential .nav:not(.scrolled) .nav__cta {
  color: var(--navy-deep);
  border-color: var(--navy-deep);
}
body.residential .nav:not(.scrolled) .nav__cta:hover {
  background-color: var(--navy-deep);
  color: var(--white);
}

body.residential .nav__brand span.nav__brand-tag {
  color: var(--gold);
  font-weight: 500;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  text-transform: uppercase;
  font-family: var(--font-body);
}

body.residential .nav__links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

body.residential .nav__link {
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.78);
  transition: color var(--transition-base);
}

body.residential .nav__link:hover { color: var(--gold); }

@media (max-width: 640px) {
  body.residential .nav__links .nav__link { display: none; }
}

/* ---------- Residential Hero (warm, lighter) ---------- */
.res-hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--off-white);
}

.res-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.res-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 55%;
}

.res-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    100deg,
    rgba(245, 243, 238, 0.95) 0%,
    rgba(245, 243, 238, 0.82) 38%,
    rgba(245, 243, 238, 0.35) 72%,
    rgba(245, 243, 238, 0.15) 100%
  );
}

.res-hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 140px 2rem 80px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 4rem;
  align-items: center;
}

.res-hero__text { max-width: 640px; }

.res-hero__eyebrow {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 1.4rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.res-hero__eyebrow::before {
  content: '';
  width: 2.5rem;
  height: 1px;
  background-color: var(--gold);
}

.res-hero__headline {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.1;
  font-size: clamp(2.1rem, 4.2vw, 3.5rem);
  color: var(--navy-deep);
  margin-bottom: 1.4rem;
}
.res-hero__headline em {
  font-style: italic;
  color: var(--gold);
}

.res-hero__sub {
  font-size: 1.08rem;
  line-height: 1.7;
  color: rgba(17, 29, 53, 0.78);
  margin-bottom: 2.2rem;
  max-width: 540px;
}

.res-hero__cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.res-hero__micro {
  font-size: 0.82rem;
  color: rgba(17, 29, 53, 0.55);
  letter-spacing: 0.02em;
}

.res-hero__visual {
  position: relative;
  height: 100%;
  min-height: 420px;
  display: none;
}

@media (min-width: 960px) {
  .res-hero__visual { display: block; }
}

.res-hero__card {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 82%;
  background: rgba(255,255,255,0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(17,29,53,0.08);
  padding: 2.2rem 2rem;
  box-shadow: 0 30px 60px rgba(17, 29, 53, 0.15);
  border-radius: 2px;
}

.res-hero__card-label {
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 0.85rem;
}

.res-hero__card-quote {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.35rem;
  line-height: 1.45;
  color: var(--navy-deep);
}

.res-hero__card-attr {
  margin-top: 1.1rem;
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(17,29,53,0.6);
}

/* ---------- Light-mode buttons on residential ---------- */
body.residential .btn--outline {
  border-color: var(--navy);
  color: var(--navy-deep);
}
body.residential .btn--outline:hover {
  background-color: var(--navy);
  color: var(--white);
}

/* ---------- Generic light section (residential) ---------- */
.res-section {
  padding: 110px 2rem;
  position: relative;
}
.res-section--light { background-color: var(--off-white); color: var(--dark-text); }
.res-section--cream { background-color: #FAF8F3; color: var(--dark-text); }
.res-section--navy {
  background-color: var(--navy-deep);
  color: var(--light-text);
}
.res-section--navy-mid {
  background-color: var(--navy);
  color: var(--light-text);
}

.res-section h2 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0.01em;
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
}

.res-section--light h2,
.res-section--cream h2 {
  color: var(--navy-deep);
}

.res-section--navy h2,
.res-section--navy-mid h2 {
  color: var(--white);
}

/* ---------- Trust strip ---------- */
.res-trust {
  padding: 48px 2rem;
  background-color: var(--off-white);
  border-top: 1px solid rgba(17,29,53,0.08);
  border-bottom: 1px solid rgba(17,29,53,0.08);
}
.res-trust__inner {
  max-width: var(--container-wide);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
  justify-content: center;
}
.res-trust__label {
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(17,29,53,0.55);
  font-weight: 700;
}
.res-trust__logos {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2rem;
  align-items: center;
  justify-content: center;
}
.res-trust__logo {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: rgba(17,29,53,0.75);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.res-trust__logo img { height: 56px; width: auto; }
.res-trust__logo--img { display: inline-flex; align-items: center; }
.res-trust__divider {
  width: 1px;
  height: 22px;
  background-color: rgba(17,29,53,0.18);
}
.res-trust__text {
  text-align: center;
  max-width: 720px;
  margin: 18px auto 0;
  color: rgba(17,29,53,0.7);
  font-size: 0.92rem;
}

/* ---------- Reality (problem) section on light ---------- */
.res-reality__inner {
  max-width: var(--container-wide);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 4rem;
  align-items: start;
}
.res-reality__text p {
  color: rgba(17,29,53,0.8);
  font-size: 1.05rem;
  line-height: 1.85;
  margin-bottom: 1.2rem;
  max-width: 620px;
}
.res-reality__text p:last-child { margin-bottom: 0; }

.res-reality__headline {
  color: var(--navy-deep);
  margin: 1rem 0 1.8rem;
}

.res-reality__quote {
  position: relative;
  padding: 2rem 1.5rem 2rem 2rem;
  border-left: 3px solid var(--gold);
  background: #FAF8F3;
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.3rem;
  line-height: 1.5;
  color: var(--navy-deep);
}

@media (max-width: 840px) {
  .res-reality__inner { grid-template-columns: 1fr; gap: 2.5rem; }
}

/* ---------- How Vernon Works (5 steps on navy) ---------- */
.res-how__header {
  max-width: var(--container-wide);
  margin: 0 auto 4rem;
  text-align: center;
}
.res-how__header h2 { margin: 0.8rem auto 0.8rem; }
.res-how__sub {
  color: rgba(224,224,224,0.7);
  font-size: 1.05rem;
}
.res-how__steps {
  max-width: var(--container-wide);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}
.res-step {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(201,168,76,0.18);
  padding: 2rem 1.8rem;
  position: relative;
  transition: transform var(--transition-base), border-color var(--transition-base);
}
.res-step:hover {
  transform: translateY(-4px);
  border-color: rgba(201,168,76,0.45);
}
.res-step__num {
  font-family: var(--font-heading);
  font-size: 2.4rem;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 0.8rem;
  font-weight: 500;
}
.res-step__title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--white);
  margin-bottom: 0.7rem;
  font-weight: 600;
}
.res-step__desc {
  font-size: 0.96rem;
  line-height: 1.65;
  color: rgba(224,224,224,0.75);
}

.res-how__cta {
  margin-top: 3rem;
  text-align: center;
}

/* ---------- Who Vernon Helps (4 cards on cream) ---------- */
.res-who__header {
  max-width: var(--container-wide);
  margin: 0 auto 3rem;
  text-align: center;
}
.res-who__grid {
  max-width: var(--container-wide);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}
.res-who__card {
  background: var(--white);
  border: 1px solid rgba(17,29,53,0.08);
  padding: 2.2rem 1.8rem;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.res-who__card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(17,29,53,0.08);
}
.res-who__icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1.2rem;
  color: var(--gold);
}
.res-who__title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  color: var(--navy-deep);
  margin-bottom: 0.8rem;
  font-weight: 600;
}
.res-who__desc {
  font-size: 0.96rem;
  line-height: 1.7;
  color: rgba(17,29,53,0.72);
}

/* ---------- North Shore Market Snapshot ---------- */
.res-market__header {
  max-width: var(--container-wide);
  margin: 0 auto 3rem;
  text-align: center;
}
.res-market__intro {
  max-width: 720px;
  margin: 1rem auto 0;
  color: rgba(17,29,53,0.72);
  font-size: 1.05rem;
}
.res-market__grid {
  max-width: var(--container-wide);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
}
.res-village {
  background: var(--white);
  border: 1px solid rgba(17,29,53,0.08);
  border-left: 3px solid var(--gold);
  padding: 1.8rem 1.6rem;
  transition: transform var(--transition-base);
}
.res-village:hover { transform: translateY(-3px); }
.res-village__name {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--navy-deep);
  font-weight: 600;
  margin-bottom: 0.6rem;
}
.res-village__note {
  font-size: 0.94rem;
  line-height: 1.65;
  color: rgba(17,29,53,0.72);
}

.res-market__map {
  max-width: 860px;
  margin: 3.2rem auto 0;
  padding: 1rem;
  background: var(--white);
  border: 1px solid rgba(17,29,53,0.08);
  border-radius: 2px;
}
.res-market__map svg { display: block; width: 100%; height: auto; }

/* ---------- Meet Vernon (deep navy, gravitas) ---------- */
.res-vernon__inner {
  max-width: var(--container-wide);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 4rem;
  align-items: center;
}
.res-vernon__image {
  position: relative;
  overflow: hidden;
}
.res-vernon__image img {
  width: 100%;
  height: auto;
  display: block;
  filter: saturate(0.95) contrast(1.02);
}
.res-vernon__text p {
  color: rgba(224,224,224,0.82);
  font-size: 1.04rem;
  line-height: 1.85;
  margin-bottom: 1.2rem;
  max-width: 640px;
}
.res-vernon__headline { margin: 1rem 0 1.8rem; }
.res-vernon__cta { margin-top: 2rem; }

@media (max-width: 880px) {
  .res-vernon__inner { grid-template-columns: 1fr; gap: 2.5rem; }
}

/* ---------- Testimonials (CSS avatars) ---------- */
.res-testimonials__header {
  max-width: var(--container-wide);
  margin: 0 auto 3rem;
  text-align: center;
}
.res-testimonials__grid {
  max-width: var(--container-wide);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.res-testimonial {
  background: #FAF8F3;
  border: 1px solid rgba(17,29,53,0.08);
  padding: 2.2rem 1.8rem;
  display: flex;
  flex-direction: column;
}
.res-testimonial__quote {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.08rem;
  line-height: 1.6;
  color: var(--navy-deep);
  margin-bottom: 1.4rem;
  flex-grow: 1;
}
.res-testimonial__attr {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.res-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--navy-deep);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  flex-shrink: 0;
}
.res-testimonial__who {
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: rgba(17,29,53,0.7);
  letter-spacing: 0.04em;
}

/* ---------- Residential FAQ (light variant) ---------- */
.res-faq__header {
  max-width: 920px;
  margin: 0 auto 3rem;
  text-align: center;
}
.res-faq__list {
  max-width: 920px;
  margin: 0 auto;
}
.res-faq-item {
  border-bottom: 1px solid rgba(17,29,53,0.14);
}
.res-faq-item:first-child {
  border-top: 1px solid rgba(17,29,53,0.14);
}
.res-faq-item__q {
  width: 100%;
  text-align: left;
  padding: 1.6rem 2.5rem 1.6rem 0;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--navy-deep);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  cursor: pointer;
}
.res-faq-item__icon {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
}
.res-faq-item__icon::before,
.res-faq-item__icon::after {
  content: '';
  position: absolute;
  background-color: var(--gold);
  transition: transform var(--transition-base);
}
.res-faq-item__icon::before {
  top: 50%; left: 0; width: 100%; height: 2px;
  transform: translateY(-50%);
}
.res-faq-item__icon::after {
  left: 50%; top: 0; width: 2px; height: 100%;
  transform: translateX(-50%);
}
.res-faq-item.active .res-faq-item__icon::after {
  transform: translateX(-50%) scaleY(0);
}
.res-faq-item__a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease-out-quart);
}
.res-faq-item__a-inner {
  padding: 0 0 1.6rem;
  color: rgba(17,29,53,0.78);
  font-size: 1rem;
  line-height: 1.75;
  max-width: 820px;
}

/* ---------- Final CTA (navy-deep, warm spotlight) ---------- */
.res-final {
  padding: 120px 2rem;
  background: var(--navy-deep);
  background-image:
    radial-gradient(ellipse 60% 80% at 50% 40%, rgba(201,168,76,0.18) 0%, transparent 70%);
  text-align: center;
}
.res-final__inner {
  max-width: 820px;
  margin: 0 auto;
}
.res-final__headline {
  color: var(--white);
  font-family: var(--font-heading);
  font-size: clamp(2.1rem, 4.5vw, 3.3rem);
  margin-bottom: 1.2rem;
}
.res-final__sub {
  color: rgba(224,224,224,0.78);
  font-size: 1.1rem;
  margin-bottom: 2.2rem;
}
.res-final__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

/* ---------- Residential Footer ---------- */
.res-footer {
  background-color: #0B1525;
  color: rgba(224,224,224,0.6);
  padding: 48px 2rem;
  font-size: 0.88rem;
}
.res-footer__inner {
  max-width: var(--container-wide);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  align-items: start;
}
.res-footer a { color: var(--gold); }
.res-footer a:hover { color: var(--gold-light); }
.res-footer__links { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.res-footer__credit {
  grid-column: 1 / -1;
  font-size: 0.7rem;
  opacity: 0.5;
  text-align: center;
  margin-top: 1rem;
}

/* ---------- Mobile polish ---------- */
@media (max-width: 720px) {
  .res-hero__content { padding: 120px 1.25rem 60px; grid-template-columns: 1fr; }
  .res-section { padding: 80px 1.25rem; }
  .res-hero__headline { font-size: 2.1rem; }
  .res-trust { padding: 32px 1.25rem; }
  .res-final { padding: 90px 1.25rem; }
}

/* ---------- Mortgage Calculator ---------- */
.res-calc__header { text-align: center; max-width: 720px; margin: 0 auto 2.5rem; }
.res-calc__header h2 { font-family: 'Cormorant Garamond', serif; font-size: clamp(1.75rem, 3.5vw, 2.5rem); margin: 0.5rem 0 1rem; line-height: 1.15; color: var(--navy, #1B2A4A); }
.res-calc__intro { font-size: 1rem; line-height: 1.6; color: var(--navy, #1B2A4A); opacity: 0.85; }

.res-calc {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  max-width: 1080px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.55);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid rgba(27, 42, 74, 0.08);
}

.res-calc__inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; align-content: start; }
.res-calc__field { display: flex; flex-direction: column; gap: 0.4rem; }
.res-calc__field label { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--navy, #1B2A4A); opacity: 0.7; }
.res-calc__input-wrap {
  display: flex;
  align-items: center;
  border: 1px solid rgba(27, 42, 74, 0.15);
  border-radius: 6px;
  background: #fff;
  transition: border-color 0.15s ease;
}
.res-calc__input-wrap:focus-within { border-color: var(--gold, #C9A84C); }
.res-calc__input-wrap input {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 0.6rem 0.5rem;
  font-size: 1rem;
  font-family: 'DM Sans', sans-serif;
  color: var(--navy, #1B2A4A);
  outline: none;
  width: 100%;
}
.res-calc__prefix, .res-calc__suffix {
  padding: 0 0.6rem;
  font-size: 0.95rem;
  color: var(--navy, #1B2A4A);
  opacity: 0.6;
}

.res-calc__output { display: flex; flex-direction: column; gap: 0.9rem; }
.res-calc__result {
  background: #fff;
  border: 1px solid rgba(27, 42, 74, 0.08);
  border-radius: 6px;
  padding: 1rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.res-calc__result-label { font-size: 0.85rem; color: var(--navy, #1B2A4A); opacity: 0.75; font-weight: 500; }
.res-calc__result-value { font-family: 'Cormorant Garamond', serif; font-size: 1.6rem; font-weight: 600; color: var(--navy, #1B2A4A); }
.res-calc__result--highlight { background: var(--navy, #1B2A4A); border-color: var(--navy, #1B2A4A); }
.res-calc__result--highlight .res-calc__result-label { color: #fff; opacity: 0.85; }
.res-calc__result--highlight .res-calc__result-value { color: var(--gold, #C9A84C); }

.res-calc__schedule {
  background: rgba(27, 42, 74, 0.04);
  border-radius: 6px;
  padding: 1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.res-calc__schedule-row { display: flex; justify-content: space-between; font-size: 0.9rem; color: var(--navy, #1B2A4A); }
.res-calc__schedule-row span:last-child { font-weight: 600; font-variant-numeric: tabular-nums; }

.res-calc__disclaimer { font-size: 0.78rem; line-height: 1.5; color: var(--navy, #1B2A4A); opacity: 0.55; margin-top: 0.5rem; }

@media (max-width: 820px) {
  .res-calc { grid-template-columns: 1fr; padding: 1.5rem; gap: 1.75rem; }
  .res-calc__inputs { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .res-calc__inputs { grid-template-columns: 1fr; }
  .res-calc__result { flex-direction: column; align-items: flex-start; gap: 0.4rem; }
  .res-calc__result-value { font-size: 1.4rem; }
}

/* ---------- Local Tax CTA ---------- */
.res-taxcta__inner { max-width: 820px; margin: 0 auto; text-align: center; }
.res-taxcta__inner h2 { font-family: 'Cormorant Garamond', serif; font-size: clamp(1.6rem, 3.2vw, 2.25rem); margin: 0.5rem 0 1rem; line-height: 1.2; color: var(--navy, #1B2A4A); }
.res-taxcta__inner p { font-size: 1rem; line-height: 1.65; color: var(--navy, #1B2A4A); opacity: 0.85; max-width: 720px; margin: 0 auto 1.5rem; }
.res-taxcta__cta { display: flex; justify-content: center; }
