/* ============================================================
   EMERALD DESIGN CUSTOM HOMES — Homepage Stylesheet (Light)
   ============================================================ */

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

:root {
  --white:         #ffffff;
  --cream:         #f7f5f0;
  --cream-border:  #e8e4dc;
  --sage-tint:     #eaf6f0;
  --sage-border:   #c5dfd0;
  --charcoal:      #1c1c1a;
  --charcoal-mid:  #3a3a38;
  --text-muted:    #6b6b68;
  --text-light:    #9a9a96;
  --emerald:       #2d7a4f;
  --emerald-light: #3a9d65;
  --emerald-pale:  #eaf6f0;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Jost', 'Helvetica Neue', Arial, sans-serif;

  --nav-h: 88px;
  --max-w: 1280px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--charcoal);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
img { display: block; max-width: 100%; height: auto; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 48px;
}

.text-center { text-align: center; }
.text-center .section__lead { margin-left: auto; margin-right: auto; }

/* ── Typography ── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
}

h1 { font-size: clamp(2.8rem, 5.5vw, 5.2rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(2rem, 3.5vw, 3rem); letter-spacing: -0.005em; }
h3 { font-size: 1.65rem; }
h4 { font-size: 1.25rem; }

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--emerald);
  display: block;
  margin-bottom: 0.9rem;
}

.eyebrow--light { color: rgba(255,255,255,0.65); }

/* ── Buttons ── */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 14px 34px;
  border: 1px solid transparent;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
  cursor: pointer;
}

.btn--dark {
  background: var(--charcoal);
  color: var(--white);
  border-color: var(--charcoal);
}
.btn--dark:hover { background: var(--charcoal-mid); border-color: var(--charcoal-mid); }

.btn--outline {
  background: transparent;
  color: var(--emerald);
  border-color: var(--emerald);
}
.btn--outline:hover { background: var(--emerald); color: var(--white); }

.btn--white {
  background: var(--white);
  color: var(--charcoal);
  border-color: var(--white);
}
.btn--white:hover { background: var(--cream); }

/* ── Fade-in ── */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.fade-in.visible { opacity: 1; transform: none; }

/* ── Section base ── */
.section { padding: 96px 0; }
.section--white { background: var(--white); border-top: 1px solid var(--cream-border); border-bottom: 1px solid var(--cream-border); }
.section--cream { background: var(--cream); }

.section__header { margin-bottom: 60px; }
.section__header h2 { color: var(--charcoal); margin-bottom: 0.75rem; }
.section__lead {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 580px;
  line-height: 1.85;
}

/* ============================================================
   NAVIGATION — black background, matches footer
   ============================================================ */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 1000;
  background: #000000;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  transition: box-shadow 0.3s;
}

#nav.scrolled {
  box-shadow: 0 2px 24px rgba(0,0,0,0.4);
}

.nav__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 48px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo — black bg blends seamlessly, given generous height */
.nav__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.nav__logo img {
  height: 68px;
  width: auto;
  display: block;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav__links > li > a {
  font-size: 0.71rem;
  font-weight: 500;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  transition: color 0.2s;
  position: relative;
}

.nav__links > li > a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 100%;
  height: 1px;
  background: var(--emerald-light);
  transition: right 0.3s;
}

.nav__links > li > a:hover { color: var(--white); }
.nav__links > li > a:hover::after,
.nav__links > li > a.active::after { right: 0; }
.nav__links > li > a.active { color: var(--emerald-light); }

/* Dropdown */
.nav__dropdown { position: relative; }

.nav__drop-btn {
  font-size: 0.71rem;
  font-weight: 500;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  transition: color 0.2s;
}
.nav__drop-btn:hover { color: var(--white); }
.nav__drop-btn svg { transition: transform 0.2s; }
.nav__dropdown:hover .nav__drop-btn svg { transform: rotate(180deg); }

.nav__drop-menu {
  display: none;
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%);
  background: #000000;
  border: 1px solid rgba(255,255,255,0.1);
  min-width: 210px;
  padding: 8px 0;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.nav__dropdown:hover .nav__drop-menu { display: block; }

.nav__drop-menu a {
  display: block;
  padding: 10px 22px;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  transition: color 0.2s, padding-left 0.2s;
}
.nav__drop-menu a:hover { color: var(--white); padding-left: 28px; }

/* CTA button in nav */
.nav__cta {
  font-size: 0.68rem !important;
  background: var(--emerald) !important;
  color: var(--white) !important;
  padding: 10px 22px !important;
  border: 1px solid var(--emerald) !important;
  letter-spacing: 0.18em !important;
  transition: background 0.25s, border-color 0.25s !important;
}
.nav__cta::after { display: none !important; }
.nav__cta:hover { background: var(--emerald-light) !important; border-color: var(--emerald-light) !important; color: var(--white) !important; }

/* Mobile hamburger */
.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav__hamburger span { display: block; width: 24px; height: 1.5px; background: rgba(255,255,255,0.8); transition: transform 0.3s, opacity 0.3s; }
.nav__hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav__hamburger.open span:nth-child(2) { opacity: 0; }
.nav__hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.nav__mobile {
  display: none;
  position: fixed;
  top: var(--nav-h); left: 0; right: 0;
  background: #000000;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: 24px 48px 36px;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  z-index: 999;
}
.nav__mobile.open { display: flex; }
.nav__mobile a {
  display: block;
  padding: 13px 0;
  font-size: 0.75rem;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.nav__mobile a:hover { color: var(--emerald-light); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  margin-top: var(--nav-h);
  background: var(--white);
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(100vh - var(--nav-h));
  border-bottom: 1px solid var(--cream-border);
}

.hero__text {
  padding: 80px 64px 80px 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero__text h1 {
  color: var(--charcoal);
  margin-bottom: 1.5rem;
}

.hero__text h1 em {
  font-style: italic;
  color: var(--emerald);
}

.hero__text p {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 440px;
  line-height: 1.85;
  margin-bottom: 2.5rem;
}

.hero__btns {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero__image {
  position: relative;
  overflow: hidden;
  background: var(--cream);
}

.hero__image-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #c8ddd0 0%, #a2c3b0 50%, #7aaa92 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: rgba(44,80,60,0.55);
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  line-height: 1.6;
  text-transform: uppercase;
}

/* Real photo — drop an <img> inside .hero__image and remove placeholder */
.hero__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ============================================================
   STATS BAR
   ============================================================ */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--emerald);
}

.stat {
  padding: 36px 28px;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,0.18);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.stat:last-child { border-right: none; }

.stat__n {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 400;
  color: var(--white);
  line-height: 1;
  letter-spacing: 0.01em;
}

.stat__l {
  font-family: var(--font-body);
  font-size: 0.64rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
}

/* ============================================================
   SERVICES
   ============================================================ */
.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.service-card {
  background: var(--white);
  border: 1px solid var(--cream-border);
  padding: 40px 36px 36px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}

.service-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 2px;
  background: var(--emerald);
  transition: width 0.4s ease;
}

.service-card:hover {
  border-color: var(--sage-border);
  box-shadow: 0 8px 40px rgba(45,122,79,0.07);
  transform: translateY(-3px);
}
.service-card:hover::after { width: 100%; }

.service-card__num {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 300;
  color: rgba(45,122,79,0.12);
  line-height: 1;
  margin-bottom: 1.25rem;
}

.service-card h3 {
  color: var(--charcoal);
  font-size: 1.6rem;
  margin-bottom: 0.85rem;
}

.service-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.card-link {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--emerald);
  font-family: var(--font-body);
  font-weight: 500;
  transition: letter-spacing 0.3s;
}
.card-link:hover { letter-spacing: 0.28em; }

/* ============================================================
   PORTFOLIO PREVIEW
   ============================================================ */
.portfolio__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 36px;
}
.portfolio__header h2 { color: var(--charcoal); }

.portfolio__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  grid-template-rows: 340px 220px;
  gap: 6px;
}

.port-item {
  position: relative;
  overflow: hidden;
  background: var(--cream);
}

.port-item--1 { grid-row: span 2; background: linear-gradient(135deg, #b8d4c4 0%, #8db8a0 100%); }
.port-item--2 { background: linear-gradient(135deg, #c8d4cc 0%, #a8bab0 100%); }
.port-item--3 { background: linear-gradient(135deg, #d4cfc8 0%, #b8b2a8 100%); }
.port-item--4 { background: linear-gradient(135deg, #c0ccc4 0%, #98aaa0 100%); }

/* When you add real photos: place <img> tags inside each .port-item */
.port-item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s ease;
}
.port-item:hover img { transform: scale(1.04); }

.port-item__label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 20px 24px;
  background: linear-gradient(to top, rgba(28,28,26,0.72) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.35s;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.port-item:hover .port-item__label { opacity: 1; }

.port-item__label strong {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--white);
}

.port-item__label span {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
}

/* ============================================================
   ABOUT PANEL — one dark section for contrast
   ============================================================ */
.about-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 540px;
}

.about-section__img {
  background: var(--charcoal);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Watermark logo — put a real photo here instead */
.about-section__logo-watermark {
  max-width: 65%;
  opacity: 0.07;
  /* Once you add a real photo: set display:none on this img */
}

.about-section__img img.real-photo {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.6;
}

.about-section__text {
  background: #232320;
  padding: 80px 72px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.about-section__text h2 {
  color: var(--white);
  margin-bottom: 1.25rem;
}

.about-section__divider {
  width: 36px;
  height: 1px;
  background: var(--emerald-light);
  margin-bottom: 1.75rem;
}

.about-section__text p {
  font-size: 0.92rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.9;
  margin-bottom: 1rem;
}

.about-section__text p:last-of-type { margin-bottom: 2rem; }

/* ============================================================
   PROCESS
   ============================================================ */
.process__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.process-step {
  background: var(--white);
  border: 1px solid var(--cream-border);
  padding: 36px 28px;
  position: relative;
}

.process-step__num {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 300;
  color: rgba(45,122,79,0.15);
  line-height: 1;
  margin-bottom: 1rem;
}

.process-step h4 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--charcoal);
  margin-bottom: 0.65rem;
}

.process-step p {
  font-size: 0.87rem;
  color: var(--text-muted);
  line-height: 1.8;
}

/* ============================================================
   CTA BAND
   ============================================================ */
.cta-band {
  background: var(--emerald-pale);
  border-top: 1px solid var(--sage-border);
  border-bottom: 1px solid var(--sage-border);
  padding: 96px 0;
  text-align: center;
}

.cta-band h2 {
  color: var(--charcoal);
  max-width: 640px;
  margin: 0 auto 1.25rem;
}

.cta-band p {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto 2.5rem;
  line-height: 1.8;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: #000000;
  padding: 72px 0 36px;
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 56px;
  margin-bottom: 56px;
}

.footer__brand .footer__logo {
  height: 52px;
  width: auto;
  margin-bottom: 1.25rem;
}

.footer__tagline {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  margin-bottom: 1.5rem;
}

.footer__social {
  display: flex;
  gap: 10px;
}

.footer__social a {
  width: 34px; height: 34px;
  border: 1px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.4);
  font-size: 0.75rem;
  font-family: var(--font-body);
  transition: border-color 0.25s, color 0.25s;
}
.footer__social a:hover { border-color: var(--emerald-light); color: var(--emerald-light); }

.footer__col-title {
  font-size: 0.62rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--emerald-light);
  margin-bottom: 1.1rem;
}

footer ul { display: flex; flex-direction: column; gap: 8px; }

footer ul a, footer p {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.4);
  line-height: 1.6;
  transition: color 0.2s;
}
footer ul a:hover { color: rgba(255,255,255,0.85); }
footer p { margin-bottom: 6px; }
footer p a:hover { color: var(--emerald-light); }

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.07);
  padding-top: 28px;
  font-size: 0.73rem;
  color: rgba(255,255,255,0.25);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1080px) {
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero__text { padding: 64px 48px; }
  .hero__image { min-height: 400px; }
  .portfolio__grid { grid-template-columns: 1fr 1fr; grid-template-rows: 220px 220px; }
  .port-item--1 { grid-row: span 1; }
  .about-section { grid-template-columns: 1fr; }
  .about-section__img { min-height: 320px; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .process__grid { grid-template-columns: repeat(2, 1fr); }
  .services__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  :root { --nav-h: 72px; }
  .container { padding: 0 24px; }
  .section { padding: 64px 0; }
  .nav__inner { padding: 0 24px; }
  .nav__logo img { height: 48px; }
  .nav__links { display: none; }
  .nav__hamburger { display: flex; }
  .nav__mobile { padding: 20px 24px 32px; }
  .hero__text { padding: 48px 24px; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .stat { border-bottom: 1px solid rgba(255,255,255,0.12); }
  .services__grid { grid-template-columns: 1fr; }
  .portfolio__grid { grid-template-columns: 1fr; grid-template-rows: 260px 200px 200px 200px; }
  .about-section__text { padding: 48px 24px; }
  .process__grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; gap: 28px; }
  .portfolio__header { flex-direction: column; align-items: flex-start; gap: 16px; }
  .hero__btns { flex-direction: column; }
  .hero__btns .btn { text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
}
