/* ==========================================================================
   Extend Homes — site.css (single stylesheet)
   ========================================================================== */

:root {
  --navy: #0F2A47;
  --navy-700: #1C3C61;
  --navy-800: #0A1D30;
  --coral: #E8743B;
  --coral-600: #C8561F;
  --coral-100: #FBEDE3;
  --cream: #F7F4EE;
  --card: #FFFDF9;
  --ink: #1C2B3A;
  --muted: #596A7B;
  --line: #E5DECF;
  --error: #8C2E0F;
  --font-head: "Montserrat", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(15, 42, 71, 0.08);
  --max-width: 1120px;
  --gutter: 20px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--navy);
  line-height: 1.15;
  margin: 0 0 0.6em;
  font-weight: 800;
}
h2 { letter-spacing: -0.01em; }

p { margin: 0 0 1rem; }

a { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--coral-600); }

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

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 8px; top: -48px;
  background: var(--navy);
  color: #fff;
  padding: 10px 16px;
  border-radius: 6px;
  z-index: 100;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 8px; }
.skip-link:hover { color: #fff; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  text-align: center;
  min-height: 52px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-coral { background: var(--coral); color: #fff; border-color: var(--coral); }
.btn-coral:hover { background: var(--coral-600); border-color: var(--coral-600); color: #fff; }

.btn-outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }

.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.65; cursor: wait; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}

.site-header--minimal { padding: 14px max(var(--gutter), calc((100% - var(--max-width)) / 2 + var(--gutter))); }

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 76px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.brand { display: inline-flex; line-height: 0; padding: 8px 0; }
.brand img { height: 48px; width: auto; display: block; }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  background: transparent;
  border: 2px solid var(--navy);
  border-radius: 10px;
  cursor: pointer;
  padding: 0;
}
.nav-toggle .bar { position: relative; display: block; width: 22px; height: 2px; background: var(--navy); }
.nav-toggle .bar::before, .nav-toggle .bar::after {
  content: "";
  position: absolute;
  left: 0; width: 22px; height: 2px;
  background: var(--navy);
}
.nav-toggle .bar::before { top: -7px; }
.nav-toggle .bar::after { top: 7px; }

.site-nav { display: none; flex-direction: column; gap: 4px; flex: 1 1 100%; padding: 8px 0 16px; }
.site-nav.is-open { display: flex; }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.site-nav ul a {
  display: block;
  padding: 12px 4px;
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--navy);
  text-decoration: none;
  border-radius: 6px;
}
.site-nav ul a:hover { color: var(--coral-600); }
.site-nav .btn { margin-top: 8px; }

@media (min-width: 760px) {
  .header-inner { flex-wrap: wrap; }
  .nav-toggle { display: none; }
  .site-nav { display: flex; flex-direction: row; align-items: center; gap: 20px; flex: 0 1 auto; padding: 0; }
  .site-nav ul { flex-direction: row; gap: 18px; }
  .site-nav ul a { padding: 8px 2px; }
  .site-nav .btn { margin-top: 0; }
}

/* Hero --------------------------------------------------------------- */
.hero { padding: 56px 0 48px; text-align: center; }
.hero .eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--coral-600);
  margin: 0 0 14px;
}
.hero h1 {
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  margin-bottom: 0.4em;
}
.hero .sub { max-width: 660px; margin: 0 auto; color: var(--muted); font-size: 1.05rem; }

/* Path cards */
.paths { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 32px; }
@media (min-width: 640px) { .paths { grid-template-columns: 1fr 1fr; } }

.path-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 22px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.path-card h2 { font-size: 1.35rem; margin: 0; }
.path-card p { color: var(--muted); margin: 0; }
.path-card .btn { margin-top: 8px; }

/* Sections */
.section { padding: 64px 0; }
.section-alt { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 720px; margin: 0 auto 40px; text-align: center; }
.section-head p { color: var(--muted); }
.eyebrow {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--coral-600);
  margin: 0 0 10px;
}

/* How it works */
.how-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 720px) { .how-grid { grid-template-columns: 1fr 1fr; } }

.how-col {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 24px;
}
.how-col h3 { font-size: 1.2rem; margin-bottom: 16px; }

.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li { position: relative; padding-left: 52px; margin-bottom: 22px; counter-increment: step; }
.steps li:last-child { margin-bottom: 0; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: 0;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.steps li strong { color: var(--navy); }

/* Earnings */
.earn { text-align: center; }
.earn .big-figure {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(2.6rem, 7vw, 4.4rem);
  color: var(--navy);
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}
.earn .big-label { font-family: var(--font-head); font-weight: 600; color: var(--muted); margin-bottom: 28px; }
.earn .small-figure { font-family: var(--font-head); font-weight: 700; font-size: 1.4rem; color: var(--coral-600); margin: 0 0 4px; }
.earn .small-label { color: var(--muted); font-size: 0.95rem; }
.earn .disclaimer {
  margin: 28px auto 0;
  max-width: 640px;
  font-size: 0.9rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.decor-mark { width: 40px; height: 40px; margin: 0 auto 18px; display: block; }

/* State badges */
.states { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 28px; }
.state-badge {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--navy);
  border: 2px solid var(--navy);
  border-radius: 999px;
  padding: 12px 26px;
}

/* Join list */
.join { text-align: center; }
.join p { max-width: 640px; margin-left: auto; margin-right: auto; color: var(--muted); }
.join .paths { margin-top: 28px; }

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; }
.faq details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 12px;
  padding: 0;
  overflow: hidden;
}
.faq summary {
  cursor: pointer;
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--navy);
  padding: 18px 20px;
  list-style: none;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 20px; top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  line-height: 1;
  color: var(--coral);
  font-weight: 700;
}
.faq details[open] summary::after { content: "-"; }
.faq summary:hover { color: var(--coral-600); }
.faq .faq-body { padding: 0 20px 20px; color: var(--ink); }
.faq .faq-body p:last-child { margin-bottom: 0; }

/* Forms */
.form-shell { max-width: 680px; margin: 0 auto; }
.form-intro { text-align: center; margin-bottom: 32px; }
.form-intro p { color: var(--muted); }

.est-line {
  display: inline-block;
  background: var(--coral-100);
  color: var(--coral-600);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 999px;
  padding: 8px 18px;
  margin-bottom: 8px;
}

fieldset.field { border: 0; padding: 0; margin: 0 0 22px; min-width: 0; }
.field { margin-bottom: 22px; }
.field label, .field legend { display: block; font-weight: 600; color: var(--navy); margin-bottom: 8px; padding: 0; }
.field legend { margin-bottom: 10px; }
.req { color: var(--coral-600); font-weight: 700; }

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field select {
  width: 100%;
  min-height: 48px;
  font-size: 16px;
  font-family: var(--font-body);
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
}
.field input[type="text"]:focus-visible,
.field input[type="email"]:focus-visible,
.field input[type="tel"]:focus-visible,
.field select:focus-visible { border-color: var(--navy); }

.field textarea {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  font-size: 16px;
  font-family: var(--font-body);
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
}
.field textarea:focus-visible { border-color: var(--navy); }

.radio-group { display: grid; gap: 10px; }
.radio {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 400;
}
.radio input { width: 20px; height: 20px; accent-color: var(--coral); flex: none; }
.radio:hover { border-color: var(--navy); }

.check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.95rem;
  color: var(--ink);
}
.check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--coral); flex: none; }
.check a { color: var(--navy); }

.field .radio, .field .check { display: flex; font-weight: 400; margin-bottom: 0; }
.field .radio { align-items: center; }
.field .check { align-items: flex-start; }

.field-error { margin: 8px 0 0; font-size: 0.9rem; font-weight: 600; color: var(--error); }
.field-error[hidden] { display: none; }

.field input[aria-invalid="true"],
.field select[aria-invalid="true"] { border-color: var(--error); }

.form-status { margin: 18px 0 0; min-height: 24px; font-weight: 600; color: var(--error); text-align: center; }

.thank-you {
  text-align: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 48px 28px;
}
.thank-you .mark { width: 56px; height: 56px; margin: 0 auto 20px; }
.thank-you h2 { margin-bottom: 12px; }
.thank-you p { color: var(--muted); max-width: 480px; margin-left: auto; margin-right: auto; }

/* Honeypot (visually hidden, off-screen) */
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Footer */
.site-footer {
  background: var(--navy);
  color: #dfe7f0;
  margin-top: 48px;
  padding: 48px 0 32px;
}
.footer-top { display: flex; flex-direction: column; gap: 24px; align-items: flex-start; }
@media (min-width: 640px) {
  .footer-top { flex-direction: row; justify-content: space-between; align-items: center; }
}
.footer-brand img { width: 160px; height: auto; display: block; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.footer-nav a { color: #dfe7f0; text-decoration: underline; text-underline-offset: 3px; font-family: var(--font-head); font-weight: 600; }
.footer-nav a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  margin-top: 32px;
  padding-top: 24px;
  font-size: 0.9rem;
  color: #b9c6d6;
}
.footer-bottom p { margin: 0 0 6px; }

/* Simple pages */
.page { padding: 56px 0; }
.page-head { max-width: 720px; margin-bottom: 32px; }
.lede { font-size: 1.1rem; color: var(--muted); }

.prose { max-width: 720px; }
.prose h2 { margin-top: 1.6em; font-size: 1.35rem; }
.prose ul { padding-left: 1.2em; }

.contact-block {
  max-width: 680px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px 28px;
  text-align: center;
}
.contact-block a { font-family: var(--font-head); font-weight: 700; font-size: 1.3rem; }
.contact-block .note { color: var(--muted); margin-top: 16px; }

.notfound { text-align: center; padding: 80px 0 40px; }
.notfound h1 { margin-bottom: 12px; }
.notfound p { color: var(--muted); }
.notfound .actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 24px; }

/* Landing -------------------------------------------------------------- */
.landing {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 56px 24px;
  background: var(--cream);
}

.logo-anim {
  width: min(72vw, 760px);
  height: auto;
  display: block;
}
@media (max-width: 480px) {
  .logo-anim { width: 90vw; }
}

.landing h1 {
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  margin: 28px 0 0.4em;
}
.landing-line {
  max-width: 560px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 1.05rem;
}
.landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-top: 36px;
}
.landing-actions .btn { min-height: 52px; }
.landing-foot {
  margin-top: 32px;
  font-size: 0.9rem;
  color: var(--muted);
}
.landing-foot a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.landing-foot a:hover { color: var(--coral-600); }
@media (max-width: 480px) {
  .landing-actions { flex-direction: column; }
  .landing-actions .btn { width: 100%; }
}

/* Entrance animation --------------------------------------------------- */
.logo-anim .module,
.logo-anim .roof,
.logo-anim .block,
.logo-anim .slab,
.logo-anim .word-extend,
.logo-anim .word-homes,
.logo-anim .word-tag {
  transform-box: fill-box;
}

.logo-anim .slab {
  transform: scaleX(0);
  transform-origin: left center;
  animation: slab-in 0.5s cubic-bezier(.2,.7,.2,1) 0s both;
}
.logo-anim .block {
  transform: scaleY(0);
  transform-origin: bottom center;
  animation: block-in 0.5s cubic-bezier(.2,.7,.2,1) 0.45s both;
}
.logo-anim .roof {
  stroke-dasharray: 0 2 0;
  animation: roof-in 0.6s linear 0.85s both;
}
.logo-anim .module {
  opacity: 0;
  transform: translateX(-96px);
  animation: module-in 0.7s cubic-bezier(.2,.7,.2,1) 1.3s both,
             module-loop 7s cubic-bezier(.2,.7,.2,1) 3.2s infinite;
}
.logo-anim .word-extend {
  opacity: 0;
  transform: translateY(10px);
  animation: word-in 0.45s cubic-bezier(.2,.7,.2,1) 1.75s both;
}
.logo-anim .word-homes {
  opacity: 0;
  transform: translateY(10px);
  animation: word-in 0.45s cubic-bezier(.2,.7,.2,1) 2s both;
}
.logo-anim .word-tag {
  opacity: 0;
  transform: translateY(10px);
  animation: word-in 0.45s cubic-bezier(.2,.7,.2,1) 2.25s both;
}

.landing-text {
  width: 100%;
  opacity: 0;
  animation: text-in 0.5s cubic-bezier(.2,.7,.2,1) 2.5s both;
}

@keyframes slab-in {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
@keyframes block-in {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}
@keyframes roof-in {
  from { stroke-dasharray: 0 2 0; }
  to { stroke-dasharray: 1 0 1; }
}
@keyframes module-in {
  0% { opacity: 0; transform: translateX(-96px); }
  10% { opacity: 1; transform: translateX(-84px); }
  80% { transform: translateX(6px); }
  100% { opacity: 1; transform: translateX(0); }
}
@keyframes word-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes module-loop {
  0%, 13%, 100% { transform: translateX(0); }
  6% { transform: translateX(-96px); }
  11% { transform: translateX(4px); }
}
@keyframes text-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Invest page prose */
.invest-body h3 {
  font-size: 1.05rem;
  margin: 1.6em 0 0.6em;
}
.invest-body ol,
.invest-body ul {
  padding-left: 1.2em;
}
.invest-body ol li,
.invest-body ul.facts li {
  margin-bottom: 0.5rem;
  color: var(--ink);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
  .logo-anim .slab,
  .logo-anim .block,
  .logo-anim .module,
  .logo-anim .roof,
  .logo-anim .word-extend,
  .logo-anim .word-homes,
  .logo-anim .word-tag,
  .landing-text {
    animation: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
  .logo-anim .roof { stroke-dasharray: 1 0 1 !important; }
}
