/* ============================================================
   Mauldin Village — Columbia, SC
   Shared stylesheet
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  --brick-900: #5e2317;
  --brick-700: #8a3a24;
  --brick-500: #a34a2e;
  --brick-300: #c97b5c;
  --ink-900: #22303c;
  --ink-700: #3a4a58;
  --ink-soft: #5c6a76;
  --linen-100: #f7f2ea;
  --linen-200: #ede4d6;
  --paper: #fcf9f4;
  --leaf: #6f8f6a;
  --white: #ffffff;
  --shadow-sm: 0 2px 8px rgba(94, 35, 23, 0.08);
  --shadow-md: 0 10px 30px rgba(94, 35, 23, 0.14);
  --radius: 12px;
  --radius-lg: 22px;
  --maxw: 1160px;
  --font-head: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink-900);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--brick-700); text-decoration: none; }
a:hover { color: var(--brick-500); }
h1, h2, h3 { font-family: var(--font-head); color: var(--ink-900); line-height: 1.12; margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1rem; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 72px 0; }
.section--tint { background: var(--linen-100); }
.section--dark { background: var(--ink-900); }
.section--dark h2, .section--dark h3, .section--dark p { color: var(--paper); }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .78rem;
  font-weight: 700;
  color: var(--brick-500);
  margin: 0 0 .6rem;
}
.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 62ch; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 8px;
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform .15s ease, background .2s ease, color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--brick-700); color: var(--white); }
.btn--primary:hover { background: var(--brick-900); color: var(--white); }
.btn--ink { background: var(--ink-900); color: var(--white); }
.btn--ink:hover { background: var(--ink-700); color: var(--white); }
.btn--ghost { background: transparent; border-color: var(--brick-700); color: var(--brick-700); }
.btn--ghost:hover { background: var(--brick-700); color: var(--white); }
.btn--light { background: var(--white); color: var(--ink-900); }
.btn--light:hover { background: var(--linen-100); color: var(--ink-900); }

/* ---------- Announcement bar ---------- */
.announce {
  background: var(--ink-900);
  color: var(--paper);
  text-align: center;
  font-size: .9rem;
  padding: 9px 18px;
}
.announce a { color: var(--brick-300); font-weight: 600; }
.announce a:hover { color: var(--white); }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(252, 249, 244, 0.93);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--linen-200);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  max-width: var(--maxw);
  margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand__mark { width: 42px; height: 42px; flex: none; }
.brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.brand__name { font-family: var(--font-head); font-weight: 600; color: var(--ink-900); font-size: 1.2rem; }
.brand__sub { font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); }

.nav__links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__links a {
  color: var(--ink-900);
  font-weight: 500;
  font-size: .95rem;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}
.nav__links a:hover, .nav__links a.active { color: var(--brick-700); border-bottom-color: var(--brick-500); }

.nav__cta { display: flex; align-items: center; gap: 10px; }
.nav__cta .btn { padding: 10px 20px; }

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
}
.nav__toggle span { width: 24px; height: 2px; background: var(--ink-900); transition: transform .2s ease, opacity .2s ease; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(201, 123, 92, .35), transparent 60%),
    linear-gradient(160deg, var(--ink-900) 0%, #2e4050 55%, var(--brick-900) 130%);
}
.hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(34,48,60,.93) 0%, rgba(34,48,60,.78) 45%, rgba(94,35,23,.42) 100%);
}
.hero__art { position: absolute; inset: auto 0 0 0; width: 100%; height: auto; opacity: .9; pointer-events: none; }
.hero__inner { position: relative; width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 90px 24px; }
.hero__content { max-width: 620px; }
.hero__content .eyebrow { color: var(--brick-300); }
.hero__content h1 { color: var(--white); }
.hero__content p { color: rgba(252, 249, 244, .88); font-size: 1.12rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }

/* ---------- Grids / cards ---------- */
.grid { display: grid; gap: 24px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--white);
  border: 1px solid var(--linen-200);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-sm);
}
.card h3 { margin-top: 2px; }
.card p { color: var(--ink-soft); margin-bottom: 0; }
.card__icon {
  width: 46px; height: 46px;
  border-radius: 10px;
  background: var(--linen-100);
  color: var(--brick-700);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.card__icon svg { width: 26px; height: 26px; }

/* ---------- Split layout ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.split > img, .split > svg, .split > .ph { border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }

/* ---------- Stats ---------- */
.stats { display: flex; gap: 36px; flex-wrap: wrap; }
.stat__num { font-family: var(--font-head); font-size: 2rem; color: var(--brick-700); font-weight: 600; }
.stat__label { font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-soft); }

/* ---------- Photo placeholders (until real photos arrive) ---------- */
.ph {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background:
    linear-gradient(150deg, var(--linen-200) 0%, var(--linen-100) 60%),
    var(--linen-100);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ph--wide { aspect-ratio: 16 / 9; }
.ph__inner { text-align: center; color: var(--ink-soft); padding: 18px; }
.ph__inner svg { width: 42px; height: 42px; margin: 0 auto 10px; color: var(--brick-300); }
.ph__label { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 600; }

/* ---------- Floor plan cards ---------- */
.plan-card { display: flex; flex-direction: column; }
.plan-card .plan__art { border-radius: 10px; overflow: hidden; margin-bottom: 18px; background: var(--linen-100); }
.plan__meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 6px 0 12px; color: var(--ink-700); font-size: .95rem; }
.plan__meta strong { color: var(--ink-900); }
.plan__price { font-family: var(--font-head); font-size: 1.5rem; color: var(--brick-700); margin-bottom: 14px; }
.plan__actions { margin-top: auto; display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.spec {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
table.spec th, table.spec td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--linen-200); }
table.spec th { background: var(--ink-900); color: var(--paper); font-weight: 600; font-size: .9rem; letter-spacing: .04em; }
table.spec tr:last-child td { border-bottom: 0; }

/* ---------- AppFolio embed ---------- */
.appfolio-embed {
  background: var(--white);
  border: 1px solid var(--linen-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 10px;
  min-height: 400px;
}
.appfolio-embed iframe { border: 0; width: 100%; }

/* ---------- FAQ ---------- */
details.card summary { cursor: pointer; font-weight: 600; color: var(--ink-900); }
details.card[open] summary { color: var(--brick-700); }
details.card p { margin-top: 12px; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(140deg, var(--brick-700), var(--brick-900));
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 56px 48px;
  text-align: center;
  box-shadow: var(--shadow-md);
}
.cta-band h2 { color: var(--white); }
.cta-band p { color: rgba(255, 255, 255, .85); max-width: 56ch; margin: 0 auto 24px; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: .9rem; }
.field input, .field select, .field textarea {
  font: inherit;
  padding: 12px 14px;
  border: 1.5px solid var(--linen-200);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink-900);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--brick-500);
  box-shadow: 0 0 0 3px rgba(163, 74, 46, .15);
}
.field .error { display: none; color: #b3261e; font-size: .82rem; }
.field.invalid input, .field.invalid textarea { border-color: #b3261e; }
.field.invalid .error { display: block; }
.form-success {
  display: none;
  background: #eef5ee;
  border: 1px solid var(--leaf);
  color: #2e4a2b;
  padding: 16px 20px;
  border-radius: var(--radius);
  margin-top: 18px;
}
.form-success.show { display: block; }

/* ---------- Gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.gallery-item { cursor: pointer; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .15s ease; }
.gallery-item:hover { transform: translateY(-3px); }
.gallery-item figcaption { padding: 10px 14px; background: var(--white); font-size: .88rem; color: var(--ink-soft); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: none;
  align-items: center; justify-content: center;
  background: rgba(34, 48, 60, .88);
  padding: 32px;
}
.lightbox.open { display: flex; }
.lightbox__box { max-width: 900px; width: 100%; }
.lightbox__content img, .lightbox__content svg { width: 100%; border-radius: var(--radius); }
.lightbox__caption { color: var(--paper); text-align: center; margin-top: 12px; }
.lightbox__close {
  position: absolute; top: 20px; right: 26px;
  background: none; border: 0; color: var(--paper);
  font-size: 2rem; cursor: pointer; line-height: 1;
}

/* ---------- Map embed ---------- */
.map-embed { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); }
.map-embed iframe { display: block; width: 100%; height: 420px; border: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink-900); color: var(--paper); padding: 56px 0 28px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 40px; }
.site-footer h4 { margin: 0 0 14px; font-size: .85rem; text-transform: uppercase; letter-spacing: .14em; color: var(--brick-300); }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-links a { color: rgba(252, 249, 244, .85); }
.footer-links a:hover { color: var(--white); }
.footer-contact { display: grid; gap: 10px; }
.footer-contact a, .footer-contact span { color: rgba(252, 249, 244, .85); }
.footer-contact a:hover { color: var(--white); }
.footer-bottom {
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid rgba(252, 249, 244, .18);
  font-size: .85rem;
  color: rgba(252, 249, 244, .65);
  text-align: center;
}

/* ---------- Page hero (interior pages) ---------- */
.page-hero {
  background:
    radial-gradient(900px 380px at 85% -20%, rgba(201, 123, 92, .3), transparent 60%),
    linear-gradient(160deg, var(--ink-900), #2e4050);
  padding: 72px 0 60px;
}
.page-hero h1 { color: var(--white); }
.page-hero p { color: rgba(252, 249, 244, .85); max-width: 62ch; }
.page-hero .eyebrow { color: var(--brick-300); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; gap: 30px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .nav__links, .nav__cta { display: none; }
  .nav__toggle { display: flex; }
  .nav.open .nav__links {
    display: flex;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--linen-200);
    padding: 10px 24px 16px;
  }
  .nav.open .nav__links a { display: block; padding: 12px 0; border-bottom: 0; }
  .nav.open .nav__links .nav__apply { margin-top: 6px; }
  .grid--4, .grid--3, .gallery-grid, .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 52px 0; }
  .cta-band { padding: 40px 26px; }
}
