/* Foulke Construction — Luxury Custom Home Builder */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Jost:wght@300;400;500;600&display=swap');

:root {
  --charcoal: #121212;
  --charcoal-light: #1c1c1c;
  --cream: #f3ecdf;
  --cream-dim: #cfc8b8;
  --gold: #c9a45c;
  --gold-light: #e0c382;
  --border: rgba(201, 164, 92, 0.25);
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'Jost', 'Helvetica Neue', Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--charcoal);
  color: var(--cream);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
}

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

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.2;
}

.eyebrow {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 0.75rem;
  color: var(--gold);
  font-weight: 500;
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- Nav ---------- */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 48px;
  background: transparent;
  transition: background 0.4s ease, padding 0.4s ease, box-shadow 0.4s ease;
}

.site-nav.scrolled {
  background: rgba(18, 18, 18, 0.92);
  backdrop-filter: blur(10px);
  padding: 16px 48px;
  box-shadow: 0 1px 0 var(--border);
}

.site-nav .logo img {
  height: 168px;
  width: auto;
  transition: height 0.4s ease;
}

.site-nav.scrolled .logo img {
  height: 128px;
}

.nav-links {
  display: flex;
  gap: 44px;
  list-style: none;
  align-items: center;
}

.nav-links a {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 400;
  position: relative;
  padding-bottom: 6px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  z-index: 1100;
}

.nav-toggle:focus { outline: none; }
.nav-toggle:focus-visible { outline: 2px solid var(--gold); outline-offset: 6px; }

.nav-toggle span {
  width: 26px;
  height: 1.5px;
  background: var(--cream);
}

/* ---------- Portfolio Mega-Menu ---------- */
.has-mega { position: relative; }

.mega-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 860px;
  background: rgba(14, 14, 14, 0.97);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 18px 32px 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 44px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, visibility 0.22s ease;
  z-index: 2000;
}

.mega-menu.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.mega-col-head {
  font-family: var(--serif);
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  font-weight: 600;
  padding-bottom: 8px;
  margin-bottom: 0;
}

.mega-col-sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.78rem;
  color: var(--cream-dim);
  padding-bottom: 14px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.mega-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(201,164,92,0.08);
}

.mega-item:last-child { border-bottom: none; }

.mega-thumb {
  width: 68px;
  height: 50px;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
  transition: opacity 0.2s;
}

.mega-item:hover .mega-thumb { opacity: 0.8; }

.mega-text { flex: 1; min-width: 0; }

.mega-name {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--cream);
  display: block;
  margin-bottom: 2px;
  transition: color 0.2s;
}

/* Same gold-on-hover accent the top-level nav links use (a sliding
   gold underline) — here expressed as the item's name turning gold
   and its arrow brightening, so every dropdown (Portfolio, About)
   reads with one consistent hover language. */
.mega-item:hover .mega-name { color: var(--gold); }

.mega-loc {
  font-size: 0.72rem;
  color: var(--cream-dim);
  display: block;
  margin-bottom: 2px;
}

.mega-tag {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.72rem;
  color: var(--gold);
  display: block;
}

.mega-arrow {
  color: var(--gold);
  font-size: 0.9rem;
  flex-shrink: 0;
  opacity: 0.6;
  transition: opacity 0.2s, transform 0.2s;
}

.mega-item:hover .mega-arrow { opacity: 1; transform: translateX(3px); }

.mega-caret {
  display: inline-block;
  margin-left: 4px;
  font-size: 0.55rem;
  vertical-align: middle;
  opacity: 0.7;
}

.about-menu {
  width: 380px;
  grid-template-columns: 1fr;
  padding: 18px 32px 28px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(180deg, rgba(12,12,12,0.55) 0%, rgba(12,12,12,0.35) 40%, rgba(12,12,12,0.85) 100%), url('../images/portfolio/hillcrest-manor/02 - Exterior Front Angle.jpg') center 30%/cover no-repeat;
}

.hero-inner {
  max-width: 820px;
  padding: 0 24px;
}

.hero .eyebrow { margin-bottom: 22px; color: var(--gold); }

.brand-mark {
  font-family: var(--serif);
  font-size: 1.5rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cream);
  margin-bottom: 20px;
}
.brand-mark::after {
  content: '';
  display: block;
  width: 60px;
  height: 1px;
  background: var(--gold);
  margin: 16px auto 0;
}

.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  color: var(--cream);
  margin-bottom: 26px;
}

.hero p {
  font-size: 1.1rem;
  color: var(--cream-dim);
  max-width: 580px;
  margin: 0 auto 40px;
}

.scroll-cue {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--gold), transparent);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 16px 38px;
  border: 1px solid var(--gold);
  color: var(--cream);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  transition: background 0.35s ease, color 0.35s ease;
  background: transparent;
  cursor: pointer;
  font-family: var(--sans);
}

.btn:hover {
  background: var(--gold);
  color: var(--charcoal);
}

.btn-solid {
  background: var(--gold);
  color: var(--charcoal);
  border-color: var(--gold);
}

.btn-solid:hover {
  background: var(--gold-light);
}

.btn-outline {
  background: transparent;
  color: var(--gold);
  border-color: var(--gold);
}

.btn-outline:hover {
  background: var(--gold);
  color: var(--charcoal);
}

/* ---------- Sections ---------- */
section {
  padding: 120px 0;
  position: relative;
}

.section-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 64px;
}

.section-head h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin: 18px 0 22px;
  color: var(--cream);
}

.section-head p {
  color: var(--cream-dim);
  font-size: 1.02rem;
}

.section-head .eyebrow { color: var(--gold); }

.divider {
  width: 60px;
  height: 1px;
  background: var(--gold);
  margin: 0 auto;
}

/* ---------- Service split ---------- */
.services-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: var(--gold);
}

.service-card {
  background: var(--charcoal);
  padding: 90px 60px;
  position: relative;
  overflow: hidden;
  min-height: 480px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-size: cover;
  background-position: center;
  transition: opacity 0.5s ease, transform 0.6s ease;
  z-index: 0;
}

.service-card.custom::before { background-image: url('../images/portfolio/avondale-residences/02 - 108 Exterior Front Elevation.jpg'); }
.service-card.spec::before { background-image: url('../images/crystal-lake-7.jpg'); }

.service-card:hover::before {
  opacity: 0.32;
  transform: scale(1.05);
}

.service-card > * { position: relative; z-index: 1; }

.service-card .eyebrow { margin-bottom: 16px; color: var(--gold); }
.service-card h3 { font-size: 2rem; margin-bottom: 18px; color: var(--cream); }
.service-card p { color: var(--cream-dim); margin-bottom: 30px; max-width: 420px; }
.service-card .btn { margin-top: auto; align-self: flex-start; }

/* ---------- Portfolio grid ---------- */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* Desktop-only column-count overrides for specific portfolio grids (a
   4-item showcase, a 4/6-item project list). Scoped to min-width so the
   980px/760px responsive rules below still take over on tablet/phone —
   these used to be inline styles, which beat every breakpoint and left
   these grids stuck at 2-4 cramped columns on every screen size. */
@media (min-width: 981px) {
  .portfolio-grid.cols-2-desktop { grid-template-columns: repeat(2, 1fr); }
  .portfolio-grid.cols-4-desktop { grid-template-columns: repeat(4, 1fr); }
}

.portfolio-item {
  position: relative;
  aspect-ratio: 4/5;
  overflow: hidden;
  display: block;
  background: var(--charcoal-light);
}

.portfolio-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(.2,.8,.2,1), filter 0.5s ease;
  filter: saturate(0.9);
}

.portfolio-item:hover img {
  transform: scale(1.08);
  filter: saturate(1.05);
}

.portfolio-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(18,18,18,0) 40%, rgba(12,12,12,0.92) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px;
}

.portfolio-overlay .eyebrow { margin-bottom: 6px; }
.portfolio-overlay h3 { color: var(--cream); font-size: 1.4rem; }

/* ---------- Current projects teaser ---------- */
.projects-teaser {
  background: var(--charcoal-light);
}

.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 60px;
}

.project-card {
  display: block;
  position: relative;
  overflow: hidden;
}

.project-card img {
  width: 100%;
  height: 360px;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.project-card:hover img { transform: scale(1.05); }

.project-card-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 26px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.85));
}

.project-card-label .status {
  display: inline-block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--charcoal);
  background: var(--gold);
  padding: 5px 12px;
  margin-bottom: 10px;
}

.project-card-label h3 { color: var(--cream); font-size: 1.3rem; }

.project-card-body { padding: 22px 4px 0; }
.project-card-body .eyebrow { margin-bottom: 8px; }
.project-card-body p:not(.eyebrow) { color: var(--cream-dim); font-size: 0.95rem; margin-bottom: 18px; }

/* ---------- CTA band ---------- */
.cta-band {
  text-align: center;
  background: linear-gradient(180deg, rgba(12,12,12,0.7), rgba(12,12,12,0.85)), url('../images/portfolio/heritage-point/06 - Family Room Fireplace.jpg') center/cover;
  padding: 140px 24px;
}

.cta-band .eyebrow { margin-bottom: 18px; }
.cta-band h2 { font-size: clamp(2rem, 4vw, 3rem); max-width: 700px; margin: 0 auto 36px; color: var(--cream); }

/* ---------- Footer ---------- */
footer {
  background: #0c0c0c;
  padding: 90px 0 30px;
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 60px;
}

.footer-grid .logo img {
  height: 190px;
  margin-bottom: 22px;
}

.footer-grid p { color: var(--cream-dim); font-size: 0.92rem; max-width: 320px; }

.footer-grid h4 {
  font-family: var(--sans);
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  color: var(--gold);
  margin-bottom: 20px;
  font-weight: 500;
}

.footer-grid ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.footer-grid a { color: var(--cream-dim); font-size: 0.92rem; transition: color 0.25s; }
.footer-grid a:hover { color: var(--gold); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 30px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--cream-dim);
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ---------- Origin story editorial ---------- */
.origin-story {
  margin: 100px 0;
  padding: 80px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  position: relative;
}

.origin-story-inner {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
  position: relative;
}

.origin-mark {
  font-family: var(--serif);
  font-size: 9rem;
  line-height: 0.6;
  color: var(--gold);
  opacity: 0.35;
  display: block;
  margin-bottom: 36px;
  user-select: none;
}

.origin-title {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--cream);
  margin-bottom: 32px;
  font-style: italic;
}

.origin-story-inner p {
  font-size: 1.15rem;
  line-height: 1.85;
  color: var(--cream-dim);
  max-width: 680px;
  margin: 0 auto 20px;
}

.origin-attribution {
  font-family: var(--serif);
  font-style: italic;
  color: var(--gold) !important;
  font-size: 1rem !important;
  margin-top: 32px !important;
  letter-spacing: 0.03em;
}

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Portfolio project hero image ---------- */
/* Taller, less aggressive crop than a fixed-height banner -- the aspect
   ratio scales with the viewport instead of forcing every photo into one
   wide/short rectangle, so more of each photograph's composition survives. */
.project-hero-img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
}
@media (min-width: 1400px) {
  .project-hero-img { max-height: 840px; }
}
@media (max-width: 900px) {
  .project-hero-img { aspect-ratio: 4 / 3; }
}
@media (max-width: 560px) {
  .project-hero-img { aspect-ratio: 4 / 5; }
}

/* ---------- Page header (sub pages) ---------- */
.page-header {
  position: relative;
  padding: 220px 0 100px;
  text-align: center;
  background: linear-gradient(180deg, rgba(12,12,12,0.6), rgba(12,12,12,0.92)), var(--bg-img, none) center/cover;
}

.page-header .eyebrow { font-size: 0.95rem; color: var(--gold); }

.page-header h1 {
  font-size: clamp(2.1rem, 4vw, 3rem);
  margin: 16px 0;
  color: var(--cream);
}

.page-header p { color: var(--cream-dim); max-width: 560px; margin: 0 auto; }

.page-header .detail-lead {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  color: var(--cream);
  max-width: 620px;
}

/* ---------- Forms ---------- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 700px;
}

.form-grid .full { grid-column: 1 / -1; }

input, textarea, select {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 0.95rem;
  padding: 14px 2px;
  transition: border-color 0.3s;
}

input::placeholder, textarea::placeholder { color: var(--cream-dim); opacity: 0.6; }

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--gold);
}

select option { background: var(--charcoal); color: var(--cream); }

label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
  margin-bottom: 8px;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  grid-column: 1 / -1;
  font-size: 0.85rem;
  color: var(--cream-dim);
}

.checkbox-row input { width: auto; margin-top: 3px; }

.form-success {
  display: none;
  border: 1px solid var(--gold);
  padding: 18px 22px;
  margin-top: 24px;
  color: var(--gold-light);
  font-size: 0.92rem;
}

.form-success.show { display: block; }

.form-error {
  display: none;
  border: 1px solid #a6584a;
  padding: 14px 18px;
  margin-top: 20px;
  color: #e0a89a;
  font-size: 0.88rem;
}
.form-error.show { display: block; }

.field-hidden { display: none !important; }

.field-note {
  font-size: 0.8rem;
  color: var(--gold-light);
  margin-top: -12px;
  margin-bottom: 4px;
  grid-column: 1 / -1;
}

/* ---------- About page ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
  align-items: center;
}

.about-grid img { border: 1px solid var(--border); }

.about-grid h2 { font-size: 2.4rem; margin: 16px 0 24px; }
.about-grid p { color: var(--cream-dim); margin-bottom: 18px; }
.about-grid .eyebrow { color: var(--gold); }


/* ---------- Detail page gallery ---------- */
.detail-meta {
  display: flex;
  gap: 50px;
  justify-content: center;
  margin: 30px 0 10px;
  flex-wrap: wrap;
}

.detail-meta div { text-align: center; }
.detail-meta .label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--gold); margin-bottom: 6px; }
.detail-meta .value { font-family: var(--serif); font-size: 1.3rem; color: var(--cream); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.gallery-grid img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  cursor: pointer;
  transition: opacity 0.3s;
}

.gallery-grid img:hover { opacity: 0.85; }

.gallery-grid .wide { grid-column: 1 / -1; height: 560px; }

.detail-copy {
  max-width: 700px;
  margin: 0 auto 70px;
  text-align: left;
}

.detail-copy .eyebrow { text-align: center; color: var(--gold); font-size: 0.95rem; }
.detail-copy p { color: var(--cream-dim); font-size: 1.05rem; line-height: 1.75; margin-bottom: 18px; }
.detail-copy p:last-child { margin-bottom: 0; }
.detail-copy h2 {
  font-size: clamp(1.8rem, 3.2vw, 2.4rem);
  color: var(--cream);
  margin: 8px 0 24px;
}

/* ---------- Detail split (image + copy panel) ---------- */
.gallery-grid-lg {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-flow: dense;
  gap: 0;
}
.gallery-grid-lg img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  cursor: pointer;
  transition: opacity 0.3s;
}
.gallery-grid-lg img:hover { opacity: 0.85; }
.gallery-grid-lg .wide { grid-column: 1 / -1; height: 560px; }
.gallery-grid-lg .pair-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.gallery-grid-lg .pair-row img { height: 300px; }

.detail-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: stretch;
  min-height: 580px;
}
.detail-split.reverse { direction: rtl; }
.detail-split.reverse > * { direction: ltr; }
/* This split's source photo is a tall portrait crop (staircase), whose
   intrinsic aspect ratio would otherwise stretch the whole row to
   ~955px and leave the copy column's shorter content floating in a
   sea of blank space above/below it. Capping the row height crops the
   photo down to a normal split-image height instead. */
.detail-split.split-capped { height: 780px; }
.detail-split-img {
  width: 100%;
  height: 100%;
  min-height: 480px;
  object-fit: cover;
  display: block;
  cursor: pointer;
  transition: opacity 0.3s;
}
.detail-split-img:hover { opacity: 0.9; }
.detail-split-copy {
  padding: 64px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--charcoal);
}
.detail-split.dark-bg .detail-split-copy { background: var(--charcoal-light); }
.detail-split-copy p {
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--cream-dim);
  margin-bottom: 18px;
}
.detail-split-copy p:last-child { margin-bottom: 0; }
.detail-split-copy .eyebrow { color: var(--gold); margin-bottom: 0; }
.detail-split-copy h2 {
  font-size: 2rem;
  margin: 12px 0 28px;
  line-height: 1.2;
}
@media (max-width: 900px) {
  .gallery-grid-lg { grid-template-columns: 1fr; }
  .gallery-grid-lg img, .gallery-grid-lg .wide { height: 280px; grid-column: auto; }
  .gallery-grid-lg .pair-row { grid-template-columns: 1fr; gap: 16px; }
  .gallery-grid-lg .pair-row img { height: 280px; }
  .detail-split, .detail-split.reverse {
    grid-template-columns: 1fr;
    direction: ltr;
    min-height: auto;
  }
  .detail-split.split-capped { height: auto; }
  .detail-split-img { min-height: 300px; }
  .detail-split-copy { padding: 40px 24px; }
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(8,8,8,0.96);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 90vh; border: 1px solid var(--border); }
.lightbox-close {
  position: absolute;
  top: 30px;
  right: 40px;
  color: var(--cream);
  font-size: 2rem;
  cursor: pointer;
  font-family: var(--serif);
  z-index: 2002;
}

.lightbox-prev, .lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--cream);
  font-size: 3rem;
  line-height: 1;
  font-family: var(--serif);
  cursor: pointer;
  padding: 10px 18px;
  opacity: 0.75;
  transition: opacity 0.2s, color 0.2s;
  z-index: 2001;
}
.lightbox-prev:hover, .lightbox-next:hover { opacity: 1; color: var(--gold); }
.lightbox-prev { left: 6px; }
.lightbox-next { right: 6px; }

.lightbox-counter {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--cream-dim);
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
}

@media (max-width: 760px) {
  .lightbox-prev, .lightbox-next { font-size: 2.1rem; padding: 8px 10px; }
  .lightbox-close { top: 18px; right: 20px; }
}

.other-homes {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

/* ---------- Email capture ---------- */
.capture-band {
  background: var(--charcoal-light);
  border: 1px solid var(--border);
  padding: 60px;
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.capture-band form {
  display: flex;
  gap: 14px;
  max-width: 460px;
  margin: 30px auto 0;
}

.capture-band input { border-bottom: 1px solid var(--border); flex: 1; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .services-split, .projects-grid, .about-grid, .form-grid { grid-template-columns: 1fr; }
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; gap: 40px; text-align: center; }
  .footer-grid p { margin: 0 auto; }
  .footer-grid ul { align-items: center; }
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-grid img, .gallery-grid .wide { height: 320px; }
  .other-homes { grid-template-columns: repeat(2, 1fr); }
}

/* Nav switches to the slide-out mobile pattern at 980px (not 760px): between
   760-980px the full horizontal nav has enough items ("How We Think", the
   Portfolio/About carets) that it wraps onto multiple lines — that range
   covers iPad portrait and similar tablet widths, so they need the same
   compact nav as phones rather than a cramped/wrapping desktop nav. */
@media (max-width: 980px) {
  .site-nav { padding: 20px 24px; }
  .site-nav .logo img { height: 96px; }
  .site-nav.scrolled .logo img { height: 78px; }
  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 72%;
    background: var(--charcoal);
    flex-direction: column;
    justify-content: center;
    transform: translateX(100%);
    transition: transform 0.4s ease;
    overflow-y: auto;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-toggle { display: flex; }
  /* The collapsed .mega-menu is still position:static + width:100% inside
     .has-mega, so it stretches the Portfolio/About <li> to the full nav
     width even at height:0 — leaving their trigger link flush-left while
     every other item's <li> shrink-wraps and centers normally. Center the
     trigger link's own text so it lines up with the rest regardless. */
  .has-mega > a { display: block; width: 100%; text-align: center; }
  /* Mobile mega-menu: inline expand */
  .mega-menu {
    position: static;
    width: 100%;
    transform: none;
    opacity: 1;
    visibility: hidden;
    pointer-events: none;
    height: 0;
    overflow: hidden;
    background: transparent;
    border: none;
    backdrop-filter: none;
    padding: 0;
    grid-template-columns: 1fr;
    transition: none;
    z-index: auto;
  }
  .has-mega.mega-expanded .mega-menu {
    visibility: visible;
    pointer-events: auto;
    height: auto;
    padding: 4px 0 12px 16px;
  }
  .mega-thumb, .mega-loc, .mega-tag { display: none; }
  .mega-col-head { font-family: var(--serif); font-size: 0.95rem; letter-spacing: 0.06em; padding: 10px 0 4px; color: var(--gold); opacity: 1; }
  .mega-item { padding: 8px 0; border-bottom: none; }
  .mega-name { font-size: 0.95rem; color: var(--cream-dim); }
  /* Keep the gold arrow that desktop shows on each row — it's the one
     other gold touch already designed for this menu, just switched off
     on mobile along with the thumbnail/location/tagline. Restoring it
     (small, already-muted at 0.6 opacity) adds a little more gold
     without adding new text or a new device. */
  .mega-arrow { opacity: 0.6; }
  /* Padding + negative margin enlarges the tap target without shifting
     the visible glyph or the centered layout of the label next to it. */
  .mega-caret { display: inline-block; transition: transform 0.2s; padding: 14px; margin: -14px -14px -14px 4px; color: var(--gold); }
  .has-mega.mega-expanded .mega-caret { transform: rotate(180deg); }
}

@media (max-width: 760px) {
  .portfolio-grid { grid-template-columns: 1fr; }
  section { padding: 80px 0; }
  .capture-band { padding: 40px 24px; }
  .capture-band form { flex-direction: column; }
  .other-homes { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  /* The hero eyebrow's long location line (tracked out 0.25em like every
     other eyebrow) wraps to 3-4 lines in a narrow phone column, reading
     bigger than the "Foulke Construction" h1 underneath it. Tighten
     tracking and size so it wraps less and stays visually subordinate. */
  .hero .eyebrow { font-size: 0.68rem; letter-spacing: 0.14em; }
}

/* Landscape tablets (e.g. iPad 1024x768) keep the full-width desktop nav
   (width is well over the 980px nav breakpoint), but the nav's full-size
   168px logo eats enough of a short viewport that the hero's vertically
   -centered content — sized for taller screens — overlaps it. Shrink the
   nav and stop centering the hero so it clears the nav instead. */
@media (max-height: 820px) and (min-width: 981px) {
  .site-nav { padding: 16px 48px; }
  .site-nav .logo img { height: 110px; }
  .hero { height: auto; min-height: 100vh; padding: 160px 0 80px; justify-content: flex-start; }
}
