/* Allegiant Mortgage — shared site styles.
   Palette + type matched to Rose's Wix template:
     IVORY  #f8f4ec    GREEN  #4f6a64
   Serif display, sans body, square corners. */

:root {
  --green-900: #1e2826;
  --green-800: #2d3d39;
  --green-700: #3d534e;
  --green-600: #4f6a64;   /* primary — Rose's exact green */
  --green-500: #5d7d76;
  --green-400: #7e9a93;
  --green-100: #c4d3cf;
  --green-50:  #e7eeec;

  --ivory:     #f8f4ec;
  --ivory-200: #efe9d8;

  --stone-900: #1c1d1f;
  --stone-800: #2d2e30;
  --stone-700: #5a5b5d;
  --stone-600: #7d7e80;
  --stone-500: #9d9e9f;
  --stone-400: #bdbec0;
  --stone-300: #d8d9da;
  --stone-200: #e7e6df;
  --stone-100: #f1f0ea;
  --stone-50:  #f8f4ec;  /* alias to ivory */
  --white: #ffffff;
  --black: #0a0a0a;

  --shadow-sm: 0 1px 2px rgba(28,29,31,0.06);
  --shadow-md: 0 2px 6px rgba(28,29,31,0.08);
  --shadow-lg: 0 8px 20px rgba(28,29,31,0.10);
  --shadow-xl: 0 14px 32px rgba(28,29,31,0.16);

  /* Square corners per Rose's direction. Keep tiny radius reserved for inputs only. */
  --radius-sm: 0;
  --radius:    0;
  --radius-lg: 0;
  --radius-xl: 0;
  --radius-input: 2px;

  --container: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 18px;
  line-height: 1.7;
  color: var(--stone-800);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--green-600); text-decoration: none; }
a:hover { color: var(--green-700); }

h1, h2, h3, h4 {
  font-family: 'Cormorant Garamond', 'Cardo', Georgia, 'Times New Roman', serif;
  color: var(--green-700);
  line-height: 1.1;
  letter-spacing: -0.005em;
  margin: 0 0 .5em;
  font-weight: 600;
}
h1 { font-size: clamp(3rem, 6vw, 5.25rem); }
h2 { font-size: clamp(2.5rem, 4.4vw, 3.75rem); }
h3 { font-size: 1.75rem; font-weight: 600; }
p  { margin: 0 0 1em; color: var(--stone-800); font-size: 1.05rem; }
.lead { font-size: 1.25rem; color: var(--stone-700); max-width: 62ch; }

/* (Section underline removed per feedback.) */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 32px;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--ivory);
  border-bottom: 1px solid var(--stone-200);
}
.nav-inner {
  display: grid; grid-template-columns: auto 1fr auto;
  align-items: center; height: 140px; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-logo { height: 120px; width: auto; display: block; }
.brand-mark { display: none; }
.brand-name { display: none; } /* per Rose: no wordmark text in nav */
.nav-links {
  display: flex; gap: 36px; align-items: center; justify-content: center;
}
.nav-links a {
  color: var(--stone-800); font-weight: 500; font-size: .98rem;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.15rem;
}
.nav-links a:hover { color: var(--green-600); }
.nav-cta { display: flex; gap: 12px; align-items: center; justify-content: flex-end; }
.menu-btn {
  display: none; background: none; border: 0; font-size: 1.6rem; color: var(--stone-900);
  cursor: pointer;
}
@media (max-width: 980px) {
  .nav-links { display: none; }
  .nav-cta .btn-ghost { display: none; }
  .menu-btn { display: block; }
  .nav-links.open {
    display: flex; flex-direction: column; position: absolute;
    top: 140px; left: 0; right: 0;
    background: var(--ivory); padding: 18px 32px;
    border-bottom: 1px solid var(--stone-200);
    gap: 14px;
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px; border-radius: 0;
  font-weight: 500; font-size: .98rem;
  border: 1px solid transparent; cursor: pointer; transition: all .18s ease;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.1rem;
  text-decoration: none; white-space: nowrap;
}
.btn-primary {
  background: var(--green-600); color: var(--ivory);
  border-color: var(--green-600);
}
.btn-primary:hover { background: var(--green-700); border-color: var(--green-700); color: var(--ivory); }
.btn-dark {
  background: var(--black); color: var(--ivory); border-color: var(--black);
}
.btn-dark:hover { background: var(--stone-800); color: var(--ivory); }
.btn-ghost {
  background: transparent; color: var(--stone-900);
  border: 1px solid var(--stone-900);
}
.btn-ghost:hover { background: var(--stone-900); color: var(--ivory); }
.btn-ivory {
  background: var(--white); color: var(--green-700); border: 1px solid var(--white);
}
.btn-ivory:hover { background: var(--green-700); color: var(--white); border-color: var(--green-700); }
.btn-lg { padding: 18px 34px; font-size: 1.2rem; }
.btn-block { width: 100%; }

/* ---------- Hero ---------- */
.hero {
  background: var(--ivory);
  padding: 80px 0 100px;
  border-bottom: 1px solid var(--stone-200);
}
.hero-grid {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 64px; align-items: center;
}
.hero h1 { margin-bottom: 18px; color: var(--green-700); }
.hero .lead { font-size: 1.2rem; margin-bottom: 32px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 28px; }
.hero-trust {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  color: var(--stone-700); font-size: .92rem;
}
.hero-trust .dot { width: 4px; height: 4px; background: var(--stone-400); }
.hero-trust strong { color: var(--stone-900); }

.rate-card {
  background: var(--white);
  border: 1px solid var(--stone-200);
  padding: 32px;
  box-shadow: var(--shadow-lg);
  position: relative;
}
.rate-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--green-600);
}
.rate-card-label {
  font-size: .72rem; font-weight: 600; letter-spacing: .18em;
  color: var(--green-700); text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 10px;
}
.rate-card-label::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green-600);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(79,106,100,0.25); }
  50%      { box-shadow: 0 0 0 7px rgba(79,106,100,0.05); }
}
.rate-card h3 { margin: 18px 0 4px; color: var(--green-700); }
.rate-rows { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 20px; }
.rate-row {
  background: var(--ivory);
  padding: 16px 18px; border: 1px solid var(--stone-200);
}
.rate-row .label { font-size: .72rem; color: var(--stone-600); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.rate-row .value { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 2rem; font-weight: 600; color: var(--green-700); margin-top: 4px; }
.rate-row .sub { font-size: .72rem; color: var(--stone-500); }
.rate-disclaimer { font-size: .72rem; color: var(--stone-500); margin-top: 16px; line-height: 1.5; }

@media (max-width: 980px) {
  .hero { padding: 56px 0 72px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
}

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-tight { padding: 64px 0; }
.section-dark { background: var(--black); color: var(--ivory); }
.section-dark h2, .section-dark h3 { color: var(--ivory); }
.section-dark p { color: var(--stone-300); }
.section-green { background: var(--green-600); color: var(--ivory); }
.section-green h2, .section-green h3 { color: var(--ivory); }
.section-green p { color: rgba(248,244,236,0.86); }
.section-ivory { background: var(--ivory); }
.section-stone { background: var(--ivory-200); }

.section-head { text-align: center; max-width: 760px; margin: 0 auto 56px; }
.eyebrow {
  font-size: 2.4rem; font-weight: 600; letter-spacing: .08em;
  color: var(--green-600); text-transform: uppercase; margin-bottom: 16px;
  font-family: 'Cormorant Garamond', Georgia, serif;
}
.section-head h2 { margin-bottom: 14px; }
.section-head p { font-size: 1.1rem; color: var(--stone-700); }

/* ---------- Loan programs: edge-to-edge, image bg ---------- */
.products {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  border-top: 1px solid var(--stone-300);
  border-bottom: 1px solid var(--stone-300);
}
.product {
  position: relative; padding: 56px 32px;
  min-height: 320px;
  text-decoration: none; color: var(--ivory);
  display: flex; flex-direction: column; justify-content: flex-end;
  overflow: hidden;
  border-right: 1px solid rgba(248,244,236,0.18);
  isolation: isolate;
}
.product:last-child { border-right: 0; }
.product::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background-image: url("/assets/programs-bg.jpg"), linear-gradient(135deg, var(--green-700), var(--green-600));
  background-size: cover; background-position: center;
}
.product::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(30,40,38,0.55) 0%, rgba(30,40,38,0.85) 100%);
  transition: opacity .25s ease;
}
.product:hover::after { background: linear-gradient(180deg, rgba(30,40,38,0.35) 0%, rgba(30,40,38,0.78) 100%); }
.product h3 { color: var(--ivory); margin: 0 0 8px; font-size: 1.85rem; }
.product p { color: rgba(248,244,236,0.86); margin: 0; font-size: .95rem; }
.product .arrow {
  color: var(--ivory); font-family: 'Cormorant Garamond', serif;
  margin-top: 14px; font-size: 1.05rem; letter-spacing: .04em;
}
@media (max-width: 980px) { .products { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .products { grid-template-columns: 1fr; } }

/* ---------- How It Works: full-bleed photo background ---------- */
.howitworks {
  position: relative;
  isolation: isolate;
  padding: 100px 0 120px;
  overflow: hidden;
}
.howitworks::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: url("/assets/howitworks-bg.jpg") center / cover no-repeat;
}
.howitworks::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(28,29,31,0.55) 0%, rgba(28,29,31,0.72) 100%);
}
.howitworks .section-head .eyebrow { color: var(--ivory); }
.howitworks .section-head h2 { color: var(--ivory) !important; }
.howitworks .section-head p { color: rgba(248,244,236,0.85); }

.steps {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  max-width: var(--container); margin: 0 auto; padding: 0 32px;
}
.step {
  background: var(--black); color: var(--ivory);
  padding: 56px 40px;
  aspect-ratio: 1 / 1;
  display: flex; flex-direction: column; justify-content: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.step-num {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 3.2rem; font-weight: 500; color: var(--green-400);
  line-height: 1; margin-bottom: 18px;
}
.step h3 { color: var(--ivory); margin: 0 0 10px; font-size: 1.7rem; }
.step p { color: rgba(248,244,236,0.78); margin: 0; }
@media (max-width: 880px) {
  .steps { grid-template-columns: 1fr; }
  .step { aspect-ratio: auto; }
}

/* ---------- Calculator widget ---------- */
.calc-card {
  background: var(--white); border: 1px solid var(--stone-200);
  padding: 40px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px;
  box-shadow: var(--shadow-md);
}
.calc-fields { display: grid; gap: 20px; }
.field label {
  display: block; font-size: .82rem; font-weight: 600; color: var(--stone-700);
  margin-bottom: 6px; letter-spacing: .04em;
}
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-input);
  border: 1px solid var(--stone-300); background: var(--white);
  font-size: 1rem; font-family: inherit; color: var(--stone-900);
  transition: border-color .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--green-600);
  box-shadow: 0 0 0 2px rgba(79,106,100,0.18);
}
.calc-output {
  background: var(--black); color: var(--ivory);
  padding: 32px;
  display: flex; flex-direction: column; justify-content: center;
  position: relative;
}
.calc-output .label { font-size: .82rem; color: rgba(248,244,236,0.65); margin-bottom: 8px; letter-spacing: .12em; text-transform: uppercase; }
.calc-output .big {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 3.4rem; font-weight: 500; color: var(--green-400);
  letter-spacing: -0.01em; line-height: 1;
}
.calc-output .breakdown {
  margin-top: 24px; padding-top: 22px; border-top: 1px solid rgba(248,244,236,0.12);
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
.calc-output .breakdown div { font-size: .82rem; color: rgba(248,244,236,0.65); }
.calc-output .breakdown strong { color: var(--ivory); display: block; font-family: 'Cormorant Garamond', serif; font-size: 1.2rem; margin-top: 4px; font-weight: 500; }
@media (max-width: 980px) { .calc-card { grid-template-columns: 1fr; padding: 28px; gap: 24px; } }

/* ---------- Team: edge-to-edge, hover-reveal ---------- */
.team-strip {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
}
.team-tile {
  position: relative; aspect-ratio: 3 / 4;
  overflow: hidden; background: var(--green-700);
  isolation: isolate;
}
.team-tile img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 18%;
  display: block;
  transition: transform .6s cubic-bezier(.2,.6,.2,1);
}
.team-tile img[alt="Lauren Buttrey"] { object-position: center 50%; }
.team-tile:hover img { transform: scale(1.04); }
.team-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(30,40,38,0) 35%, rgba(30,40,38,0.96) 100%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 32px;
  opacity: 1; transition: background .25s ease;
}
.team-overlay .name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.6rem; color: var(--ivory); font-weight: 500;
  margin: 0;
}
.team-overlay .role {
  color: rgba(248,244,236,0.82); font-size: .88rem; margin-top: 2px;
  letter-spacing: .04em;
}
.team-contact {
  margin-top: 16px; opacity: 0; max-height: 0; overflow: hidden;
  transition: opacity .35s ease, max-height .45s ease;
  color: rgba(248,244,236,0.88); font-size: .9rem;
}
.team-tile:hover .team-overlay { background: linear-gradient(180deg, rgba(30,40,38,0.35) 0%, rgba(30,40,38,0.96) 100%); }
.team-tile:hover .team-contact { opacity: 1; max-height: 240px; }
.team-contact div { padding: 3px 0; }
.team-contact a { color: var(--ivory); border-bottom: 1px solid rgba(248,244,236,0.4); }
.team-contact a:hover { color: var(--green-400); border-bottom-color: var(--green-400); }
.team-contact .nmls { font-size: .78rem; color: rgba(248,244,236,0.66); letter-spacing: .06em; }
@media (max-width: 880px) {
  .team-strip { grid-template-columns: 1fr; }
  .team-tile { aspect-ratio: 4 / 3; }
}

/* Legacy team-grid (other pages) — keep square photos, no rounding */
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.team-card { background: var(--white); border: 1px solid var(--stone-200); overflow: hidden; transition: all .2s ease; }
.team-card:hover { box-shadow: var(--shadow-lg); }
.team-photo { aspect-ratio: 4 / 3; background: var(--green-100); overflow: hidden; position: relative; }
.team-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; display: block; }
.team-photo img[alt="Lauren Buttrey"] { object-position: center 50%; }
.team-body { padding: 24px; }
.team-body h3 { margin: 0 0 4px; }
.team-role { font-size: .9rem; color: var(--green-600); font-weight: 600; margin-bottom: 12px; letter-spacing: .04em; }
.team-meta { font-size: .9rem; color: var(--stone-700); }
.team-meta div { margin-bottom: 4px; }
.team-meta a { color: var(--stone-900); }
.team-cta { margin-top: 16px; }
@media (max-width: 880px) { .team-grid { grid-template-columns: 1fr; } }

/* ---------- Stats: Empowering Homeownership ---------- */
.stats-band {
  background: var(--green-600); color: var(--ivory);
  padding: 72px 0;
}
.stats-band h2 { color: var(--ivory); text-align: center; margin-bottom: 48px; }
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; text-align: center; }
.stats-row > div { padding: 20px; border-right: 1px solid rgba(248,244,236,0.2); }
.stats-row > div:last-child { border-right: 0; }
.stats-row .num {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 4rem; line-height: 1; font-weight: 500; color: var(--ivory);
  margin-bottom: 6px;
}
.stats-row .lbl { font-size: .92rem; letter-spacing: .04em; color: rgba(248,244,236,0.85); }
@media (max-width: 760px) {
  .stats-row { grid-template-columns: 1fr; }
  .stats-row > div { border-right: 0; border-bottom: 1px solid rgba(248,244,236,0.2); }
  .stats-row > div:last-child { border-bottom: 0; }
}

/* ---------- Testimonials — dynamic editorial cards ---------- */
.tests { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.test {
  background: var(--white);
  padding: 48px 36px 36px;
  position: relative;
  border-top: 4px solid var(--green-600);
  box-shadow: 0 4px 18px rgba(28,29,31,0.06);
  display: flex; flex-direction: column;
}
.test::before {
  content: "\201C";  /* opening curly quote */
  position: absolute; top: 4px; right: 24px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 7rem; line-height: 1;
  color: var(--green-100); font-weight: 600;
  pointer-events: none;
  z-index: 0;
}
.test .stars {
  color: var(--green-600); letter-spacing: 6px; font-size: 1.15rem;
  margin-bottom: 16px; position: relative; z-index: 1;
}
.test blockquote {
  margin: 0 0 24px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.4rem; line-height: 1.45; color: var(--stone-800);
  position: relative; z-index: 1; flex: 1;
}
.test .who {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600; color: var(--green-700); font-size: 1.25rem;
  border-top: 1px solid var(--stone-200); padding-top: 18px;
  letter-spacing: .01em;
}
.test .where { color: var(--stone-600); font-size: .92rem; margin-top: 4px; font-family: 'Inter', sans-serif; }
@media (max-width: 880px) { .tests { grid-template-columns: 1fr; gap: 20px; } }

/* ---------- Footer wire-fraud — plain text, no yellow ---------- */
.fraud-warning {
  background: transparent; border: 0; border-top: 1px solid var(--stone-300);
  padding: 24px 0; color: var(--stone-700);
}
.fraud-warning h4 {
  margin: 0 0 6px; color: var(--stone-900);
  font-family: 'Cormorant Garamond', Georgia, serif; font-size: 1.1rem; font-weight: 600;
  letter-spacing: .02em;
}
.fraud-warning p { color: var(--stone-700); margin: 0; font-size: .88rem; line-height: 1.55; }

/* ---------- CTA strip ---------- */
.cta-strip {
  background: var(--green-600); color: var(--ivory);
  padding: 72px 56px; text-align: center;
}
.cta-strip h2 { color: var(--ivory); margin-bottom: 14px; }
.cta-strip p { color: rgba(248,244,236,0.9); margin-bottom: 28px; font-size: 1.1rem; }

/* ---------- Footer ---------- */
.footer { background: var(--black); color: var(--stone-300); padding: 72px 0 28px; }
.footer-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 48px;
  margin-bottom: 36px;
  align-items: start;
}
.footer h4 {
  color: var(--ivory); font-size: .82rem; letter-spacing: .18em;
  text-transform: uppercase; margin-bottom: 18px; font-family: 'Inter', sans-serif; font-weight: 600;
}
.footer a { color: var(--stone-300); display: block; padding: 5px 0; font-size: .95rem; }
.footer a:hover { color: var(--green-400); }
.footer .brand { display: inline-block !important; margin-bottom: 0 !important; }
.footer .brand-logo {
  filter: brightness(0) invert(1); opacity: .9;
  height: 212px; width: auto;
  display: block; margin: -10px auto 24px;
}
.footer-bottom {
  border-top: 1px solid rgba(248,244,236,0.12);
  padding-top: 22px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: .82rem; color: var(--stone-500);
}
.footer-bottom a { color: var(--stone-400); display: inline; padding: 0; margin-left: 18px; }
.equal-housing {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--stone-400); font-size: .82rem;
}
@media (max-width: 880px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Sticky mobile CTA bar ---------- */
.mobile-cta {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--ivory); border-top: 1px solid var(--stone-300);
  padding: 10px 16px; display: none;
  gap: 10px; z-index: 40;
}
.mobile-cta .btn { flex: 1; padding: 14px; font-size: 1rem; }
@media (max-width: 760px) {
  .mobile-cta { display: flex; }
  body { padding-bottom: 84px; }
}

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-4 { margin-top: 24px; }
.fade-in { opacity: 0; transform: translateY(20px); animation: fadeIn .8s ease forwards; }
@keyframes fadeIn { to { opacity: 1; transform: translateY(0); } }
