/*
Theme Name: Spire Bridge
Description: Custom theme for Spire Mortgage Team. Carries the original site design, with terracotta calls to action. Built October 2026.
Author: Spire Mortgage Team
Version: 1.0.0
Text Domain: spire
*/

:root {
  --teal: #204048;
  --teal-deep: #17333a;
  --teal-line: #2d4a52;
  --cream: #f2eee6;
  --terracotta: #c1683d;
  --terracotta-dark: #9e5530;
  --ink: #204048;
  --body: #4c5a6c;
  --mist: #c1c9ca;
  --slate-light: #a7b3c4;
  --card-grey: #f6f6f6;
  --white: #ffffff;
  --font-head: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Work Sans', 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--body);
  background: var(--white);
}

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

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

h1, h2, h3, h4, h5 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.2;
  padding: 15px 30px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--terracotta-dark); color: var(--white) !important; }
.btn-primary:hover { background: var(--terracotta); color: var(--white) !important; }
.btn-outline { border: 2px solid var(--teal); color: var(--teal) !important; padding: 13px 30px; }
.btn-outline:hover { background: var(--teal); color: var(--white) !important; }
.btn-outline-light { border: 2px solid var(--white); color: var(--white) !important; padding: 13px 30px; }
.btn-outline-light:hover { background: var(--white); color: var(--teal) !important; }
.btn-teal { background: var(--teal); color: var(--white) !important; }
.btn-teal:hover { background: var(--teal-deep); color: var(--white) !important; }

/* ---------- Header / nav ---------- */
.site-header {
  background: var(--teal);
  position: relative;
  z-index: 50;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
  max-width: 1320px;
}
.site-logo img { height: 52px; width: auto; display: block; }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 26px; height: 3px;
  background: var(--white);
  margin: 5px 0;
  border-radius: 2px;
}

.site-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.site-nav > .nav-item { position: relative; }
.site-nav > .nav-item > a {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 500;
  color: #e8ecec;
  padding: 10px 12px;
  border-radius: 6px;
}
.site-nav > .nav-item > a:hover { color: var(--white); background: rgba(255,255,255,.08); }
.site-nav .nav-apply { margin-left: 10px; }
.site-nav .nav-apply a {
  background: var(--terracotta-dark);
  color: var(--white);
  padding: 11px 22px;
  border-radius: 8px;
  font-weight: 600;
}
.site-nav .nav-apply a:hover { background: var(--terracotta); }

.sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: var(--white);
  border-radius: 10px;
  box-shadow: 0 14px 40px rgba(16, 36, 42, .18);
  padding: 10px 0;
  margin: 0;
  list-style: none;
}
.nav-item:hover > .sub-menu,
.nav-item:focus-within > .sub-menu { display: block; }
.sub-menu a {
  display: block;
  padding: 9px 20px;
  font-size: 15px;
  color: var(--ink);
}
.sub-menu a:hover { background: var(--cream); color: var(--terracotta-dark); }

@media (max-width: 1020px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--teal);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 20px 24px;
    border-top: 1px solid var(--teal-line);
    max-height: calc(100vh - 80px);
    overflow-y: auto;
  }
  .site-nav.open { display: flex; }
  .site-nav > .nav-item > a { display: block; padding: 12px 4px; font-size: 17px; }
  .sub-menu {
    display: block;
    position: static;
    background: none;
    box-shadow: none;
    padding: 0 0 6px 16px;
  }
  .sub-menu a { color: var(--mist); padding: 7px 0; }
  .sub-menu a:hover { background: none; color: var(--white); }
  .site-nav .nav-apply { margin: 14px 0 0; }
  .site-nav .nav-apply a { display: block; text-align: center; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--teal);
  background-size: cover;
  background-position: center 18%;
  min-height: 64vh;
  display: flex;
  align-items: center;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(23, 40, 46, .62), rgba(23, 40, 46, .5));
}
.hero .wrap {
  position: relative;
  text-align: center;
  padding-top: 90px;
  padding-bottom: 90px;
  max-width: 900px;
}
.hero .eyebrow {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #e9c9b4;
  margin-bottom: 18px;
}
.hero h1 {
  color: var(--white);
  font-size: clamp(34px, 5vw, 54px);
  font-weight: 700;
  margin-bottom: 20px;
}
.hero p {
  color: #dfe6e6;
  font-size: 19px;
  max-width: 620px;
  margin: 0 auto 32px;
}
.hero .cta-row { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }

/* ---------- Stats band ---------- */
.stats-band { background: var(--teal); padding: 52px 0; }
.stats-band .wrap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  text-align: center;
}
.stat-number {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(34px, 3.4vw, 44px);
  line-height: 1;
  color: var(--white);
}
.stat-label {
  margin-top: 10px;
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--mist);
}
a.stat:hover .stat-number { color: #e9c9b4; }
@media (max-width: 760px) {
  .stats-band .wrap { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Sections ---------- */
.section { padding: 84px 0; }
.section-cream { background: var(--cream); }
.section-teal { background: var(--teal); }
.section h2 { font-size: clamp(30px, 3.4vw, 38px); font-weight: 700; margin-bottom: 14px; }
.section .section-intro { max-width: 720px; font-size: 18px; margin-bottom: 40px; }

/* Advantage trio */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  background: var(--white);
  border-radius: 14px;
  padding: 32px;
}
.card h3 { font-size: 21px; font-weight: 600; margin: 14px 0 4px; }
.card .card-sub {
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 600;
  color: var(--terracotta-dark);
  margin: 0 0 10px;
}
.card p { margin: 0; font-size: 16px; }
.card svg { display: block; }
@media (max-width: 920px) { .card-grid { grid-template-columns: 1fr; } }
.section-cta-row { margin-top: 44px; display: flex; flex-wrap: wrap; gap: 16px; }

/* SPIRE Advantage (about) */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr);
  gap: 56px;
  align-items: center;
}
.about-grid p { font-size: 17px; }
.about-photo img {
  display: block;
  width: 100%;
  max-height: 560px;
  object-fit: cover;
  object-position: center top;
  border-radius: 16px;
}
.about-photo { position: relative; }
.about-photo::after {
  content: "";
  position: absolute;
  inset: 22px -22px -22px 22px;
  background: var(--cream);
  border-radius: 16px;
  z-index: -1;
}
.section-teal .about-photo::after { background: rgba(255,255,255,.08); }
@media (max-width: 920px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-photo { max-width: 440px; }
  .about-photo::after { inset: 14px -14px -14px 14px; }
}

/* Situations grid */
.situations-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.situation-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--card-grey);
  border-radius: 14px;
  padding: 28px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.situation-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(16, 36, 42, .1);
}
.situation-card h3 { font-size: 20px; font-weight: 600; margin: 0; }
.situation-card p { margin: 0; font-size: 15px; color: var(--body); }
.situation-card .card-link {
  margin-top: auto;
  padding-top: 10px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 15px;
  color: var(--terracotta-dark);
}
.situation-card:hover .card-link { color: var(--terracotta); }
@media (max-width: 920px) { .situations-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .situations-grid { grid-template-columns: 1fr; } }
.situations-more { margin-top: 28px; font-size: 15px; }

/* Reviews rotator */
.reviews-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 36px;
}
.reviews-head h2 { margin: 0; }
.reviews-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--cream);
  border-radius: 999px;
  padding: 10px 22px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 15px;
  color: var(--ink) !important;
}
.reviews-badge:hover { background: #e9e2d2; }
.badge-score { font-size: 18px; font-weight: 700; }
.badge-stars { color: var(--terracotta); letter-spacing: 2px; }
.badge-count { color: var(--body); text-decoration: underline; text-underline-offset: 3px; }
.review-rotator { position: relative; }
.review-slide {
  display: none;
  background: var(--cream);
  border-radius: 16px;
  padding: 44px 48px 36px;
}
.review-slide.is-active { display: block; animation: review-fade .5s ease; }
@keyframes review-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.review-text {
  margin: 0 0 18px;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.6;
  color: var(--ink);
  max-width: 900px;
}
.review-meta {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 15px;
  color: var(--body);
}
.review-stars { color: var(--terracotta); letter-spacing: 2px; margin-right: 8px; }
.review-dots { display: flex; gap: 10px; margin-top: 22px; }
.review-dot {
  width: 11px; height: 11px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: #d8d2c4;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.review-dot.is-active { background: var(--terracotta-dark); transform: scale(1.2); }
@media (max-width: 640px) { .review-slide { padding: 28px 24px 26px; } }

/* Partner strip */
.partner-strip { background: var(--white); border-top: 1px solid #e7e7e7; border-bottom: 1px solid #e7e7e7; padding: 34px 0; }
.partner-strip .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.partner-strip .strip-title { font-family: var(--font-head); font-weight: 600; font-size: 18px; color: var(--ink); }
.partner-strip a { font-family: var(--font-head); font-weight: 600; font-size: 16px; color: var(--terracotta-dark); }

/* Closing CTA */
.cta-final { background: var(--teal); padding: 96px 0; text-align: center; }
.cta-final h2 { color: var(--white); font-size: clamp(32px, 4vw, 44px); margin-bottom: 14px; }
.cta-final p { color: var(--mist); font-size: 18px; max-width: 560px; margin: 0 auto 32px; }
.cta-final .cta-row { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }

/* ---------- Footer ---------- */
.site-footer { background: var(--teal-deep); padding: 64px 0 36px; color: var(--slate-light); font-size: 14px; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 48px; justify-content: space-between; margin-bottom: 40px; }
.footer-brand { max-width: 300px; }
.footer-brand img { height: 72px; width: auto; margin-bottom: 16px; }
.footer-cols { display: flex; flex-wrap: wrap; gap: 48px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col .footer-head { font-family: var(--font-head); font-weight: 600; color: var(--white); font-size: 15px; margin-bottom: 2px; }
.footer-col a { color: var(--slate-light); }
.footer-col a:hover { color: var(--white); }
.footer-legal { border-top: 1px solid var(--teal-line); padding-top: 24px; font-size: 13px; line-height: 1.7; color: #8f9bab; }
.footer-legal a { color: #aab6c4; }

/* ---------- Interior pages: migrated SS sections, Bridge reskin ----------
   Layout and flow stay EXACTLY as the live site (Renée's ask); only the
   palette/type change. Section colors map from Squarespace section themes:
   light-bold = page hero band (teal) · white/white-bold = white content ·
   black/dark-bold = deep teal band · bright-inverse = cream band. */

.content-page { padding: 0; }

/* Fallback head band, used only when the content carries no h1 of its own */
.page-head { background: var(--teal); padding: 64px 20px; text-align: center; }
.page-head h1 { color: var(--white); font-size: clamp(30px, 3.6vw, 42px); max-width: 880px; margin: 0 auto; }
.page-head .post-meta { color: var(--mist); font-size: 14px; margin-top: 12px; }

/* Non-section content (plain pages, blog posts) gets a centered measure */
.entry-content > :not(.sections) { max-width: 780px; margin-left: auto; margin-right: auto; padding-left: 20px; padding-right: 20px; }
.entry-content { padding-bottom: 0; }
.entry-content.plain-content { padding: 48px 0 84px; }

/* Section shells */
.entry-content .page-section { padding: 60px 20px; min-height: 0 !important; position: relative; }
.entry-content .section-border, .entry-content .section-background, .entry-content .section-background-overlay { display: none; }
.entry-content .content-wrapper { max-width: 1040px; margin: 0 auto; padding: 0 !important; }
.entry-content .content-width--narrow .content-wrapper { max-width: 760px; }
/* SS 'horizontal-alignment--center' centers the content BOX, not the text.
   Body copy stays left-aligned like the live site; only hero bands center. */
.entry-content [data-section-theme="light-bold"], .entry-content [data-section-theme="light"] { text-align: center; }

/* Theme map (her section rhythm, Bridge colors) */
.entry-content [data-section-theme="white"], .entry-content [data-section-theme="white-bold"], .entry-content [data-section-theme=""] { background: var(--white); }
.entry-content [data-section-theme="light-bold"], .entry-content [data-section-theme="light"] { background: var(--teal); padding: 76px 20px; }
.entry-content [data-section-theme="black"], .entry-content [data-section-theme="dark-bold"], .entry-content [data-section-theme="dark"] { background: var(--teal-deep); padding: 68px 20px; }
.entry-content [data-section-theme="bright-inverse"], .entry-content [data-section-theme="bright"] { background: var(--cream); }

/* Text on teal bands */
.entry-content [data-section-theme="light-bold"] :is(h1,h2,h3,h4,p,li,span,div,strong,em,b,i),
.entry-content [data-section-theme="light"] :is(h1,h2,h3,h4,p,li,span,div,strong,em,b,i),
.entry-content [data-section-theme="black"] :is(h1,h2,h3,h4,p,li,span,div,strong,em,b,i),
.entry-content [data-section-theme="dark-bold"] :is(h1,h2,h3,h4,p,li,span,div,strong,em,b,i),
.entry-content [data-section-theme="dark"] :is(h1,h2,h3,h4,p,li,span,div,strong,em,b,i) { color: var(--white); }
.entry-content [data-section-theme="light-bold"] a:not(.sqs-block-button-element),
.entry-content [data-section-theme="black"] a:not(.sqs-block-button-element),
.entry-content [data-section-theme="dark-bold"] a:not(.sqs-block-button-element) { color: var(--cream); text-decoration: underline; }

/* Typography inside migrated content */
.entry-content h1 { font-size: clamp(30px, 3.8vw, 44px); line-height: 1.15; margin: 0 0 14px; }
.entry-content h2 { font-size: clamp(25px, 3vw, 33px); line-height: 1.2; margin: 1.3em 0 0.5em; }
.entry-content h3 { font-size: clamp(20px, 2.4vw, 25px); line-height: 1.25; margin: 1.3em 0 0.4em; }
.entry-content h1, .entry-content h2, .entry-content h3 { color: var(--ink); font-family: var(--font-head); }
/* SS content uses h4 as a lede/paragraph, not a heading */
.entry-content h4 { font-family: var(--font-body); font-size: 18px; font-weight: 500; line-height: 1.65; color: var(--body); margin: 0.4em 0 0.9em; }
.entry-content p, .entry-content li { font-size: 16.5px; line-height: 1.75; color: var(--body); }
.entry-content strong { color: var(--ink); }
.entry-content a { color: var(--terracotta-dark); text-decoration: underline; }
.entry-content ol, .entry-content ul { padding-left: 1.3em; }
.entry-content blockquote { border-left: 3px solid var(--terracotta); margin: 1.4em 0; padding: 4px 0 4px 20px; font-style: italic; color: var(--ink); }

/* Blocks */
.entry-content .sqs-block { margin-bottom: 14px; }
.entry-content img { border-radius: 12px; max-width: 100%; height: auto; }
.entry-content .sqs-block-image img { margin: 0 auto; display: block; max-height: 620px; width: auto; }
.entry-content .sqs-block-horizontalrule hr, .entry-content hr { border: 0; border-top: 1px solid #dfe4e6; margin: 44px auto; }
.entry-content .sqs-block-button { margin: 10px 0 18px; }
.entry-content .sqs-block-button-element, .entry-content .sqs-button-element--primary {
  display: inline-block; background: var(--terracotta-dark); color: var(--white) !important;
  font-family: var(--font-head); font-weight: 600; font-size: 15px; letter-spacing: 0.02em;
  padding: 13px 26px; border-radius: 6px; text-decoration: none !important; transition: background 0.2s;
}
.entry-content .sqs-block-button-element:hover { background: var(--terracotta); }
.entry-content .sqs-block-button--medium, .entry-content .sqs-block-button--small { font-size: 15px; }

/* Classic editor columns */
.entry-content .sqs-row { display: flex; flex-wrap: wrap; gap: 36px; align-items: flex-start; }
.entry-content .sqs-row > .col { flex: 1 1 0; min-width: 0; }
.entry-content .sqs-row > .sqs-col-12 { flex-basis: 100%; }

/* Fluid-engine blocks stack in reading order (grid data didn't survive export) */
.entry-content .fluid-engine { display: block !important; }
.entry-content .fe-block { margin-bottom: 14px; }

/* Newsletter / form leftovers: keep her layout, make it presentable (wiring = wk-2 days 3-4) */
.entry-content input[type="text"], .entry-content input[type="email"] { border: 1px solid var(--mist); border-radius: 6px; padding: 10px 14px; font-family: var(--font-body); font-size: 15px; }

@media (max-width: 760px) {
  .entry-content .page-section { padding: 44px 18px; }
  .entry-content .sqs-row { display: block; }
  .entry-content .sqs-row > .col { margin-bottom: 20px; }
}
