/* ========================================================================
   Avant Home Builders — site styles
   Palette pulled from the AVANT shield logo:
     navy   #1f2a3d   (primary)
     navy-2 #2c3a52   (links/hover)
     gold   #b89252   (accent / underlines / buttons)
     cream  #faf7f1   (page background)
     paper  #ffffff   (cards)
     ink    #2b2b2b   (body text)
     muted  #7a7a7a   (secondary text)
   ====================================================================== */

:root {
  --navy:   #1f2a3d;
  --navy-2: #2c3a52;
  --gold:   #b89252;
  --gold-2: #9a7841;
  --cream:  #faf7f1;
  --paper:  #ffffff;
  --ink:    #2b2b2b;
  --muted:  #7a7a7a;
  --line:   #e7e1d6;

  --serif: "Cormorant Garamond", "Playfair Display", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --maxw: 1200px;
  --gutter: clamp(20px, 4vw, 48px);
}

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

html { scroll-behavior: smooth; }
body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: var(--navy-2); text-decoration: none; transition: color .15s; }
a:hover { color: var(--gold); }

/* ── Typography ──────────────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--navy);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.005em;
}
h1 { font-size: clamp(2.4rem, 5.5vw, 4.2rem); }
h2 { font-size: clamp(1.8rem, 3.8vw, 2.8rem); }
h3 { font-size: 1.4rem; }
p  { margin-bottom: 1em; }

.eyebrow {
  display: inline-block;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}
.rule {
  width: 56px; height: 2px; background: var(--gold);
  margin: 18px 0 28px;
}
.center { text-align: center; }
.center .rule { margin-left: auto; margin-right: auto; }

/* ── Layout containers ───────────────────────────────────────────────── */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
section { padding: clamp(60px, 9vw, 110px) 0; }
section.tight { padding: clamp(40px, 6vw, 70px) 0; }
section.alt { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ── Header ─────────────────────────────────────────────────────────── */
.site-header {
  background: var(--cream);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(140%) blur(8px);
  background: rgba(250, 247, 241, 0.92);
}
.site-header .inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: 14px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand img { height: 48px; width: auto; }
.brand-text {
  font-family: var(--serif); font-size: 1.05rem; color: var(--navy);
  letter-spacing: 0.04em;
  display: none; /* logo speaks for itself */
}

.nav { display: flex; align-items: center; gap: 28px; }
.nav a {
  font-size: 13px; font-weight: 500; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--navy);
  padding: 6px 0; position: relative;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px; background: var(--gold);
  transform: scaleX(0); transform-origin: center; transition: transform .2s;
}
.nav a:hover::after, .nav a.active::after { transform: scaleX(1); }
.nav a.active { color: var(--gold-2); }

.header-contact {
  font-family: var(--serif); font-size: 1.1rem; color: var(--navy);
  white-space: nowrap;
}
.header-contact a { color: var(--navy); }
.header-contact a:hover { color: var(--gold); }

.menu-toggle {
  display: none; background: none; border: 0; padding: 8px; cursor: pointer;
  color: var(--navy);
}
.menu-toggle svg { width: 28px; height: 28px; }

/* ── Buttons ─────────────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  padding: 14px 30px;
  border: 1px solid var(--navy);
  background: var(--navy); color: #fff;
  transition: background .15s, color .15s, border-color .15s, transform .12s;
  cursor: pointer;
}
.btn:hover { background: var(--gold); border-color: var(--gold); color: #fff; transform: translateY(-1px); }
.btn.outline { background: transparent; color: var(--navy); }
.btn.outline:hover { background: var(--navy); color: #fff; }
.btn.on-dark { border-color: #fff; color: #fff; background: transparent; }
.btn.on-dark:hover { background: var(--gold); border-color: var(--gold); }

/* ── Hero ───────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: clamp(520px, 78vh, 760px);
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  color: #fff;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  z-index: 0;
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(31,42,61,0.30) 0%, rgba(31,42,61,0.55) 100%);
}
.hero-inner {
  position: relative; z-index: 1;
  padding: 0 var(--gutter);
  max-width: 880px;
}
.hero .eyebrow { color: #e8d9ba; }
.hero h1 { color: #fff; }
.hero .lede {
  font-family: var(--serif); font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: rgba(255,255,255,0.92);
  margin: 18px auto 32px; max-width: 640px; line-height: 1.55;
}
.hero .rule { background: var(--gold); margin-left: auto; margin-right: auto; }

.page-hero {
  background: var(--navy);
  color: #fff;
  padding: clamp(80px, 12vw, 140px) 0 clamp(60px, 9vw, 90px);
  text-align: center;
}
.page-hero h1 { color: #fff; }
.page-hero .eyebrow { color: #e8d9ba; }
.page-hero .rule { background: var(--gold); margin: 18px auto 24px; }
.page-hero p { color: rgba(255,255,255,0.85); max-width: 640px; margin: 0 auto; }

/* ── Feature grid (home) ────────────────────────────────────────────── */
.features {
  display: grid; gap: clamp(24px, 4vw, 48px);
  grid-template-columns: repeat(3, 1fr);
}
.feature h3 { margin-bottom: 8px; }
.feature .icon {
  width: 44px; height: 44px; color: var(--gold);
  margin-bottom: 18px;
}
.feature p { color: var(--muted); }

/* ── Split section (image + text) ───────────────────────────────────── */
.split {
  display: grid; gap: clamp(32px, 5vw, 64px);
  grid-template-columns: 1fr 1fr;
  align-items: center;
}
.split img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/3; }
.split.reverse > :first-child { order: 2; }

/* ── Gallery grid ───────────────────────────────────────────────────── */
.gallery-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.gallery-grid figure {
  position: relative; overflow: hidden; cursor: zoom-in;
  aspect-ratio: 4/3; background: #ddd;
}
.gallery-grid img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s ease;
}
.gallery-grid figure:hover img { transform: scale(1.05); }
.gallery-grid figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 12px 14px;
  font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
  color: #fff;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.55));
  opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s;
}
.gallery-grid figure:hover figcaption { opacity: 1; transform: translateY(0); }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(15, 20, 30, 0.92);
  display: none; align-items: center; justify-content: center;
  padding: 40px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox-caption {
  position: absolute; left: 0; right: 0; bottom: 24px;
  text-align: center; color: rgba(255,255,255,0.8);
  font-family: var(--serif); font-size: 1.1rem;
}
.lightbox-btn {
  position: absolute; background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff; cursor: pointer;
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; transition: background .15s;
}
.lightbox-btn:hover { background: rgba(255,255,255,0.18); }
.lightbox-close { top: 24px; right: 24px; }
.lightbox-prev  { left: 24px; top: 50%; transform: translateY(-50%); }
.lightbox-next  { right: 24px; top: 50%; transform: translateY(-50%); }

/* ── Floor plan cards ───────────────────────────────────────────────── */
.plans-grid {
  display: grid; gap: 28px;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}
.plan-card {
  background: var(--paper); border: 1px solid var(--line);
  display: flex; flex-direction: column;
  transition: transform .15s, box-shadow .15s;
}
.plan-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px -20px rgba(31, 42, 61, 0.35);
}
.plan-card .preview {
  aspect-ratio: 4/3; background: #f3eee2;
  overflow: hidden; display: flex; align-items: center; justify-content: center;
}
.plan-card .preview img { width: 100%; height: 100%; object-fit: contain; padding: 14px; background: #fff; }
.plan-card .body {
  padding: 22px 24px 26px;
  display: flex; flex-direction: column; gap: 14px;
  flex: 1;
}
.plan-card h3 { font-size: 1.3rem; margin: 0; }
.plan-card .meta { font-size: 13px; color: var(--muted); letter-spacing: 0.04em; }
.plan-card .actions { margin-top: auto; display: flex; gap: 10px; flex-wrap: wrap; }
.plan-card .actions a {
  font-size: 12px; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; padding: 10px 16px;
  border: 1px solid var(--navy); color: var(--navy);
}
.plan-card .actions a.primary { background: var(--navy); color: #fff; }
.plan-card .actions a:hover { background: var(--gold); border-color: var(--gold); color: #fff; }

/* ── Contact ────────────────────────────────────────────────────────── */
.contact-grid {
  display: grid; gap: clamp(40px, 6vw, 72px);
  grid-template-columns: 1fr 1fr;
  align-items: start;
}
.contact-info { padding-top: 8px; }
.contact-info h3 { margin-bottom: 6px; }
.contact-info .info-block { margin-bottom: 28px; }
.contact-info .info-block .label {
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 6px;
}
.contact-info .info-block .value {
  font-family: var(--serif); font-size: 1.4rem; color: var(--navy);
}
.contact-info .info-block .value a { color: var(--navy); }
.contact-info .info-block .value a:hover { color: var(--gold); }

.contact-form { display: grid; gap: 16px; background: var(--paper); padding: 36px; border: 1px solid var(--line); }
.contact-form label {
  display: block; font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--navy); margin-bottom: 6px; font-weight: 600;
}
.contact-form input, .contact-form textarea, .contact-form select {
  width: 100%; padding: 12px 14px;
  font-family: var(--sans); font-size: 15px; color: var(--ink);
  background: var(--cream); border: 1px solid var(--line);
  border-radius: 2px; transition: border-color .15s, background .15s;
}
.contact-form input:focus, .contact-form textarea:focus, .contact-form select:focus {
  outline: none; border-color: var(--gold); background: #fff;
}
.contact-form textarea { resize: vertical; min-height: 140px; }
.contact-form .row-2 { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
.contact-form button { margin-top: 8px; justify-self: start; }
.form-msg {
  padding: 14px 18px; border-radius: 2px; font-size: 14px;
  display: none;
}
.form-msg.success { display: block; background: #ecf5e9; color: #2d5b1f; border: 1px solid #b7d9aa; }
.form-msg.error   { display: block; background: #fbe9e9; color: #7a2424; border: 1px solid #e8b3b3; }

/* ── Footer ─────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.78);
  padding: 60px 0 28px;
  margin-top: 40px;
}
.site-footer a { color: rgba(255,255,255,0.82); }
.site-footer a:hover { color: var(--gold); }
.footer-cols {
  display: grid; gap: clamp(28px, 4vw, 56px);
  grid-template-columns: 1.5fr 1fr 1fr;
  margin-bottom: 40px;
}
.site-footer img { height: 56px; margin-bottom: 18px; filter: brightness(1.05); }
.site-footer h4 {
  font-family: var(--sans); font-size: 11px; font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 16px;
}
.site-footer .col p { color: rgba(255,255,255,0.7); margin-bottom: 8px; font-size: 14px; }
.site-footer .col ul { list-style: none; }
.site-footer .col ul li { margin-bottom: 8px; font-size: 14px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 24px;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 12px; color: rgba(255,255,255,0.55);
  letter-spacing: 0.04em;
}

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .features { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .split.reverse > :first-child { order: 0; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-form .row-2 { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr; }
  .header-contact { display: none; }
  .nav { gap: 18px; }
}
@media (max-width: 640px) {
  .nav { display: none; position: fixed; top: 76px; left: 0; right: 0;
         flex-direction: column; gap: 0;
         background: var(--cream); border-bottom: 1px solid var(--line);
         padding: 8px 0; }
  .nav.open { display: flex; }
  .nav a { padding: 14px var(--gutter); width: 100%; }
  .menu-toggle { display: inline-flex; }
  .brand img { height: 40px; }
  .contact-form { padding: 24px; }
}

/* ── FAQ accordion ──────────────────────────────────────────────────── */
.faq-list { display: flex; flex-direction: column; gap: 0; }
.faq-item {
  border-bottom: 1px solid var(--line);
  padding: 0;
}
.faq-item:first-child { border-top: 1px solid var(--line); }
.faq-item > summary {
  list-style: none;
  cursor: pointer;
  padding: 22px 36px 22px 0;
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--navy);
  position: relative;
  transition: color .15s;
}
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary::after {
  content: "+";
  position: absolute; right: 4px; top: 50%;
  transform: translateY(-50%);
  font-family: var(--sans); font-size: 1.5rem; font-weight: 300;
  color: var(--gold); transition: transform .2s;
  line-height: 1;
}
.faq-item[open] > summary::after { content: "\2212"; }
.faq-item > summary:hover { color: var(--gold-2); }
.faq-item > p {
  padding: 0 36px 22px 0;
  color: var(--ink); margin: 0;
  max-width: 64ch;
}

/* ── Misc helpers ───────────────────────────────────────────────────── */
.lede { font-family: var(--serif); font-size: 1.25rem; color: var(--muted); }
.muted { color: var(--muted); }
.mt-32 { margin-top: 32px; }

/* ── Cross-site link pill (header → Avant Residential Services) ─────── */
.nav-cross-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 9px 14px;
  background: var(--gold);
  color: #fff;
  border: 1px solid var(--gold);
  border-radius: 3px;
  white-space: nowrap;
  transition: background .15s, border-color .15s, transform .12s, box-shadow .15s;
}
.nav-cross-link:hover {
  background: var(--gold-2);
  border-color: var(--gold-2);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px -8px rgba(184, 146, 82, 0.55);
}
.nav-cross-link .arrow {
  font-size: 14px;
  line-height: 1;
  transition: transform .15s;
}
.nav-cross-link:hover .arrow { transform: translateX(2px); }

@media (max-width: 860px) {
  .nav-cross-link { font-size: 11px; padding: 8px 12px; letter-spacing: 0.05em; }
}
@media (max-width: 640px) {
  .nav-cross-link { font-size: 10.5px; padding: 7px 10px; letter-spacing: 0.04em; }
  .nav-cross-link .arrow { font-size: 12px; }
}
