/* Havenwood Estates — local preview styles */
:root {
  --ink: #1c1916;
  --ink-soft: #4a453f;
  --paper: #f7f4ef;
  --paper-2: #efe9e0;
  --white: #fffcf8;
  --line: #d9d0c4;
  --teal: #0078b8;
  --teal-dark: #005f91;
  --gray: #5f5f5f;
  --stone: #b7a894;
  --shadow: 0 18px 40px rgba(28, 25, 22, 0.12);
  --serif: "Cormorant Garamond", "Palatino Linotype", Palatino, serif;
  --sans: "Source Sans 3", "Segoe UI", Helvetica, Arial, sans-serif;
  --max: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; height: auto; }
a { color: var(--teal-dark); text-decoration: none; }
a:hover { color: var(--teal); }

.wrap { width: min(var(--max), calc(100% - 48px)); margin: 0 auto; }

/* Header */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 0;
}
.logo img { height: 52px; width: auto; }
.nav { display: flex; gap: 28px; align-items: center; }
.nav a {
  color: var(--ink);
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
}
.nav a[aria-current="page"] { color: var(--teal); }

/* Hero */
.hero {
  position: relative;
  min-height: 72vh;
  display: grid;
  place-items: end start;
  color: white;
  overflow: hidden;
  background: #2a2723;
}
.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(28,25,22,0.15) 20%, rgba(28,25,22,0.72) 100%);
}
.hero-copy {
  position: relative;
  z-index: 1;
  padding: 0 0 64px;
  max-width: 720px;
}
.eyebrow, .kicker {
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #efe7d8;
  font-weight: 600;
}
.hero h1, .page-hero h1, .project-head h1 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 12px 0 16px;
}
.hero h1 { font-size: clamp(2.6rem, 6vw, 5rem); color: white; }
.lede { font-size: 1.12rem; max-width: 40rem; color: #f3eee6; }
.placeholder-note {
  display: inline-block;
  margin-top: 8px;
  padding: 2px 8px;
  border: 1px solid rgba(255,255,255,0.35);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.section { padding: 80px 0; }
.section-head { margin-bottom: 36px; }
.section-head h2 {
  font-family: var(--serif);
  font-size: clamp(2rem, 3vw, 2.8rem);
  font-weight: 500;
  margin: 8px 0 0;
}
.intro {
  max-width: 42rem;
  color: var(--ink-soft);
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.card {
  background: var(--white);
  display: block;
  color: inherit;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 24px 48px rgba(28,25,22,0.16); color: inherit; }
.card-photo { aspect-ratio: 4 / 3; overflow: hidden; background: #ddd6cb; }
.card-photo img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 22px 22px 26px; }
.card-body h3 { font-family: var(--serif); font-size: 1.7rem; margin: 0 0 4px; font-weight: 500; }
.card-meta { color: var(--gray); font-size: 0.95rem; }
.card-stats { margin-top: 10px; font-size: 0.92rem; letter-spacing: 0.02em; color: var(--ink-soft); }

/* Project */
.project-hero { height: 64vh; min-height: 420px; position: relative; overflow: hidden; background: #2a2723; }
.project-hero img { width: 100%; height: 100%; object-fit: cover; }
.project-head { padding: 48px 0 20px; }
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin: 20px 0 0;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat dt {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gray);
}
.stat dd { margin: 0; font-family: var(--serif); font-size: 1.6rem; }
.description { max-width: 44rem; color: var(--ink-soft); margin: 32px 0 48px; }
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 80px;
}
.gallery a:first-child { grid-column: 1 / -1; }
.gallery img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 3 / 2; }
.gallery a:first-child img { aspect-ratio: 16 / 9; }

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(16,14,12,0.92);
  z-index: 40;
  align-items: center;
  justify-content: center;
  padding: 32px;
}
.lightbox.is-open { display: flex; }
.lightbox img { max-width: min(1400px, 94vw); max-height: 90vh; }
.lightbox button {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: 0;
  color: white;
  font-size: 2rem;
  cursor: pointer;
}

/* Contact */
.page-hero { padding: 72px 0 24px; }
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 64px; padding-bottom: 80px; }
.contact-list { list-style: none; padding: 0; }
.contact-list li { margin: 0 0 16px; }
.contact-list span {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gray);
}
form {
  background: var(--white);
  padding: 32px;
  border: 1px solid var(--line);
}
label { display: block; font-size: 0.85rem; margin: 0 0 6px; font-weight: 600; }
input, textarea {
  width: 100%;
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: var(--paper);
  font: inherit;
  color: inherit;
}
textarea { min-height: 140px; resize: vertical; }
button[type="submit"] {
  background: var(--teal);
  color: white;
  border: 0;
  padding: 12px 22px;
  font: inherit;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}
button[type="submit"]:hover { background: var(--teal-dark); }
.form-banner {
  background: #efe3c8;
  border: 1px solid #d9c394;
  color: #4a3b16;
  padding: 12px 14px;
  margin-bottom: 18px;
  font-size: 0.95rem;
}
.form-banner strong { letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.78rem; }
.form-banner.is-ok {
  background: #e4efe6;
  border-color: #b7cbb8;
  color: #1d3b22;
}
.form-banner.is-error {
  background: #f3e4e1;
  border-color: #d8b2aa;
  color: #5c2218;
}
.form-hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
label .optional {
  font-weight: 400;
  color: var(--gray);
  letter-spacing: 0;
  text-transform: none;
}
button[type="submit"]:disabled {
  opacity: 0.65;
  cursor: default;
}

/* Footer */
.site-footer {
  background: #1c1916;
  color: #e7e0d6;
  padding: 40px 0;
  font-size: 0.92rem;
}
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.site-footer a { color: #e7e0d6; }
.site-footer a:hover { color: white; }

@media (max-width: 900px) {
  .card-grid, .contact-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .hero { min-height: 60vh; }
  .logo img { height: 42px; }
}

/* Filters */
.filters {
  margin: 0 0 32px;
  padding: 20px 22px 16px;
  background: var(--white);
  border: 1px solid var(--line);
}
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
  align-items: end;
}
.filters label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray);
  font-weight: 600;
  min-width: 140px;
  flex: 1 1 140px;
}
.filters select {
  appearance: none;
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%231c1916' d='M1 1l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 12px center;
  border: 1px solid var(--line);
  padding: 10px 36px 10px 12px;
  font-family: var(--sans);
  font-size: 0.95rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  font-weight: 400;
  width: 100%;
}
.filter-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.filter-count {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}
.filter-reset {
  background: transparent;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--teal-dark);
  cursor: pointer;
}
.filter-reset:hover { color: var(--teal); }
.filter-empty {
  margin: 8px 0 0;
  color: var(--ink-soft);
}
.card[hidden] { display: none; }

@media (max-width: 1100px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .card-grid { grid-template-columns: 1fr; }
  .filters { padding: 16px; }
  .filters label { min-width: calc(50% - 12px); flex: 1 1 calc(50% - 12px); }
}
@media (max-width: 640px) {
  .filters label { min-width: 100%; flex: 1 1 100%; }
  .wrap { width: min(var(--max), calc(100% - 32px)); }
}

.type-tag {
  display: inline-block;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--teal-dark);
  border: 1px solid var(--line);
  padding: 2px 8px;
  margin: 0 0 8px;
}
.type-tag-page {
  margin: 0 0 10px;
}


/* Skip link and focus */
.skip-link {
  position: absolute;
  left: 16px;
  top: -56px;
  z-index: 100;
  background: var(--white);
  color: var(--ink);
  padding: 8px 14px;
  border: 1px solid var(--line);
  font-size: 0.9rem;
  font-weight: 600;
}
.skip-link:focus, .skip-link:focus-visible {
  top: 12px;
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}
:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}
a:focus:not(:focus-visible),
button:focus:not(:focus-visible),
select:focus:not(:focus-visible),
input:focus:not(:focus-visible),
textarea:focus:not(:focus-visible) {
  outline: none;
}
