/* ============================================================
   Nick Johnson · E Mortgage Capital
   Design system: "Open Door" — warm, welcoming, threshold motifs
   ============================================================ */

:root {
  /* Color */
  --sand:        #FBF3EC;   /* page background, warm peachy ivory */
  --sand-deep:   #F2E3D3;   /* section alt background */
  --ink:         #22303C;   /* primary text, deep warm navy-charcoal */
  --ink-soft:    #4B5A64;   /* secondary text */
  --brass:      #56AEE0;   /* EMC brand sky blue */
  --brass-deep: #2E86C1;   /* darker sky blue for hover/pressed */
  --pine:       #263C79;   /* EMC brand navy */
  --pine-soft:  #EAF4FB;   /* pale sky-blue tint for cards */
  --line:        #E4D6C4;   /* hairline dividers on sand */
  --white:       #FFFDF9;

  /* Type */
  --font-display: "Spectral", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius-arch: 200px 200px 12px 12px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 0.4em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); font-weight: 500; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; color: var(--ink-soft); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pine);
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  margin-bottom: 1em;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--pine);
  display: inline-block;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------------- Header / Nav ---------------- */

header.site {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(251, 243, 236, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  max-width: 1120px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--ink);
}

.brand-mark {
  width: 30px;
  height: 30px;
  flex: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  font-size: 0.95rem;
  color: var(--ink-soft);
  transition: color 0.15s ease;
  position: relative;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a[aria-current="page"] { color: var(--ink); font-weight: 600; }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--pine);
  color: var(--white) !important;
  padding: 10px 20px;
  border-radius: 100px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.15s ease, transform 0.15s ease;
  white-space: nowrap;
}
.nav-cta:hover { background: #163832; transform: translateY(-1px); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  margin: 5px 0;
}

@media (max-width: 760px) {
  .nav-links { 
    position: fixed;
    top: 66px; left: 0; right: 0;
    background: var(--sand);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 32px 28px;
    border-bottom: 1px solid var(--line);
    display: none;
    gap: 18px;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
}

/* ---------------- Buttons ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 28px;
  border-radius: 100px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.98rem;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  border: none;
  cursor: pointer;
}
.btn-primary {
  background: var(--brass);
  color: var(--white);
  box-shadow: 0 8px 20px -8px rgba(217, 142, 46, 0.6);
}
.btn-primary:hover { background: var(--brass-deep); transform: translateY(-2px); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--line);
}
.btn-ghost:hover { border-color: var(--pine); color: var(--pine); }

.btn-arrow { transition: transform 0.15s ease; }
.btn:hover .btn-arrow { transform: translateX(3px); }

/* ---------------- Arch motif (signature element) ---------------- */
/* The recurring "doorway" shape — every threshold is an opening */

.arch {
  border-radius: var(--radius-arch);
  overflow: hidden;
}

.arch-frame {
  position: relative;
  border-radius: var(--radius-arch);
  border: 1.5px solid var(--line);
  padding: 6px;
  background: var(--white);
}
.arch-frame > div, .arch-frame img {
  border-radius: 194px 194px 8px 8px;
}

/* ---------------- Hero ---------------- */

.hero {
  padding: 64px 0 40px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
}

.hero h1 { margin-bottom: 0.5em; }
.hero .lede { font-size: 1.15rem; max-width: 46ch; }

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 44px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.hero-stats .stat-num {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  color: var(--pine);
  font-weight: 600;
}
.hero-stats .stat-label {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.hero-visual {
  aspect-ratio: 4 / 5;
  background: linear-gradient(160deg, var(--pine) 0%, #17234A 100%);
  position: relative;
}
.hero-visual svg { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ---------------- Sections ---------------- */

section { padding: 88px 0; }
.section-alt { background: var(--sand-deep); }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* Value grid */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 860px) { .grid-3 { grid-template-columns: 1fr; } }

.value-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 32px 28px;
}
.value-card .icon-arch {
  width: 52px; height: 52px;
  border-radius: 26px 26px 4px 4px;
  background: var(--pine-soft);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.value-card h3 { margin-bottom: 8px; }
.value-card p { margin: 0; font-size: 0.96rem; }

/* Process (genuinely sequential — numbering earns its place) */
.process-list { counter-reset: step; }
.process-item {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
.process-item:first-child { padding-top: 0; }
.process-item:last-child { border-bottom: none; }
.process-num {
  font-family: var(--font-mono);
  color: var(--brass);
  font-size: 1.1rem;
  font-weight: 600;
}
.process-item h3 { margin-bottom: 6px; }
.process-item p { margin: 0; max-width: 60ch; }

/* Loan program cards */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
@media (max-width: 760px) { .grid-2 { grid-template-columns: 1fr; } }

.program-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 36px;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.program-card h3 { margin-bottom: 10px; }
.program-card ul {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  flex: 1;
}
.program-card li {
  padding: 10px 0 10px 26px;
  position: relative;
  font-size: 0.94rem;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
}
.program-card li:first-child { border-top: none; }
.program-card li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--brass);
}

/* Quote / testimonial */
.quote-block {
  background: var(--pine);
  color: var(--white);
  border-radius: 28px;
  padding: 56px;
  text-align: center;
}
.quote-block blockquote {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.6vw, 1.9rem);
  font-weight: 400;
  margin: 0 auto 20px;
  max-width: 46ch;
  line-height: 1.35;
}
.quote-block cite {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.75;
}

/* CTA band */
.cta-band {
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: 28px;
  padding: 56px;
  text-align: center;
}
.cta-band h2 { margin-bottom: 12px; }
.cta-band p { max-width: 50ch; margin-left: auto; margin-right: auto; }
.cta-band .hero-actions { justify-content: center; }

/* Team / person card */
.person-card {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px;
  align-items: start;
}
@media (max-width: 760px) { .person-card { grid-template-columns: 1fr; } }

.person-photo {
  aspect-ratio: 4/5;
  background: linear-gradient(160deg, #BFE0F5 0%, var(--pine) 100%);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.person-photo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 168px 168px 4px 4px;
}

.fact-row {
  display: flex;
  gap: 20px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  font-size: 0.94rem;
}
.fact-row:first-child { border-top: none; }
.fact-row dt { color: var(--ink-soft); width: 140px; flex: none; }
.fact-row dd { margin: 0; font-weight: 600; }

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 36px;
}
.contact-line {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
}
.contact-line:first-child { border-top: none; }
.contact-line .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--brass); flex: none;
}

/* ---------------- Review strip (rotating testimonials) ---------------- */

.review-strip {
  background: var(--pine-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 40px 0;
}

.review-strip-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 32px;
  text-align: center;
}

.review-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--pine);
  text-decoration: none;
  margin-bottom: 18px;
}
.review-badge .stars { color: var(--brass); letter-spacing: 1px; }
.review-badge:hover { text-decoration: underline; }

.review-slide-wrap {
  position: relative;
  min-height: 84px;
}

.review-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}
.review-slide.active {
  opacity: 1;
  pointer-events: auto;
  position: relative;
}

.review-slide blockquote {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--ink);
  margin: 0 0 8px;
  line-height: 1.4;
}
.review-slide cite {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

.review-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}
.review-dots button {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: none;
  background: var(--line);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease, transform 0.2s ease;
}
.review-dots button[aria-current="true"] {
  background: var(--brass);
  transform: scale(1.3);
}
.review-dots button:focus-visible {
  outline: 2px solid var(--pine);
  outline-offset: 2px;
}


.header-emc-logo {
  height: 30px;
  width: auto;
  margin-left: 8px;
}
@media (max-width: 860px) { .header-emc-logo { display: none; } }

.footer-emc-logo {
  height: 40px;
  width: auto;
  margin-bottom: 14px;
}

footer.site {
  border-top: 1px solid var(--line);
  padding: 48px 0;
  margin-top: 40px;
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-brand { font-family: var(--font-display); font-size: 1.05rem; }
.footer-legal {
  font-size: 0.82rem;
  color: var(--ink-soft);
  max-width: 640px;
  line-height: 1.6;
}
.footer-links { display: flex; gap: 24px; list-style: none; padding: 0; margin: 0; }
.footer-links a { text-decoration: none; color: var(--ink-soft); font-size: 0.9rem; }
.footer-links a:hover { color: var(--ink); }

/* ---------------- Reveal on load ---------------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  animation: reveal-in 0.7s ease forwards;
}
@keyframes reveal-in {
  to { opacity: 1; transform: translateY(0); }
}
