/* ===== Huddleston Custom Homes — Design System ===== */

:root {
  --navy: #132840;
  --navy-deep: #0b1a2a;
  --maroon: #500000;
  --maroon-light: #6d1616;
  --cream: #f7f4ef;
  --stone: #e9e4da;
  --ink: #21201d;
  --gray: #6b6f73;
  --white: #ffffff;

  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --max-width: 1180px;
  --radius: 6px;
  --shadow: 0 12px 32px -8px rgba(11, 26, 42, 0.25);
  --transition: 220ms ease;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--navy);
  line-height: 1.15;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.1rem, 4.5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

a { color: var(--maroon); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.sr-only {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--navy);
  color: var(--white);
  padding: 10px 16px;
  z-index: 1000;
}
.skip-link:focus {
  left: 0;
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  padding: 14px 28px;
  border-radius: var(--radius);
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  text-decoration: none;
}
.btn-primary {
  background: var(--maroon);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--maroon-light);
  text-decoration: none;
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.6);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  text-decoration: none;
}
.btn-lg { padding: 16px 34px; font-size: 1.05rem; }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: saturate(160%) blur(6px);
  box-shadow: 0 1px 0 rgba(19, 40, 64, 0.08);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  padding-bottom: 10px;
}
.brand img { height: 56px; width: auto; }

.site-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 28px;
  margin: 0;
  padding: 0;
}
.site-nav a {
  color: var(--navy);
  font-weight: 500;
  font-size: 0.95rem;
}
.site-nav a:hover { text-decoration: none; color: var(--maroon); }
.nav-cta {
  background: var(--navy);
  color: var(--white) !important;
  padding: 10px 18px;
  border-radius: var(--radius);
}
.nav-cta:hover { background: var(--maroon); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--navy);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: var(--white);
}
.hero-slides {
  position: absolute;
  inset: 0;
}
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.4s ease;
}
.hero-slide.is-active { opacity: 1; }
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11,26,42,0.55) 0%, rgba(11,26,42,0.72) 60%, rgba(11,26,42,0.85) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  padding-top: 120px;
  padding-bottom: 80px;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--maroon-light);
  margin-bottom: 0.75em;
}
.hero .eyebrow { color: #d8b3a8; }
.eyebrow.center { text-align: center; }
.hero h1 { color: var(--white); max-width: 820px; }
.hero-sub {
  max-width: 560px;
  font-size: 1.1rem;
  color: rgba(255,255,255,0.9);
}
.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 1.5em;
}

/* ===== Sections ===== */
.section {
  padding: 88px 0;
}
.section-alt { background: var(--cream); }
h2.center, .eyebrow.center, .section-lede.center { text-align: center; }
.section-lede {
  color: var(--gray);
  max-width: 640px;
  margin: 0 auto 2.5em;
  font-size: 1.05rem;
}

/* ===== About ===== */
.about-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 56px;
  align-items: start;
}
.about-photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.about-copy p { color: var(--ink); }

/* ===== Services ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 48px;
}
.service-card {
  background: var(--white);
  border: 1px solid rgba(19,40,64,0.08);
  border-radius: var(--radius);
  padding: 28px 22px;
  text-align: center;
}
.service-card h3 { font-size: 1.1rem; }
.service-card p { color: var(--gray); font-size: 0.95rem; margin: 0; }

/* ===== Gallery ===== */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 24px;
}
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  cursor: pointer;
  background: var(--stone);
  aspect-ratio: 4 / 3;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms ease;
}
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11,26,42,0) 60%, rgba(11,26,42,0.35) 100%);
  opacity: 0;
  transition: opacity var(--transition);
}
.gallery-item:hover::after { opacity: 1; }

/* ===== Process ===== */
.process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 48px;
}
.process-step {
  background: var(--white);
  padding: 32px 26px;
  border-radius: var(--radius);
  border-top: 3px solid var(--maroon);
}
.process-num {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--stone);
  font-weight: 700;
  display: block;
  margin-bottom: 0.25em;
}
.process-step p { color: var(--gray); margin: 0; }

/* ===== Service Area ===== */
.area-list {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  padding: 0;
  margin: 0;
}
.area-list li {
  background: var(--cream);
  border: 1px solid rgba(19,40,64,0.1);
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 500;
  color: var(--navy);
  font-size: 0.95rem;
}

/* ===== Contact ===== */
.section-contact {
  background: var(--navy);
  color: var(--white);
}
.section-contact h2 { color: var(--white); }
.section-contact .section-lede { color: rgba(255,255,255,0.75); }
.contact-actions {
  display: flex;
  justify-content: center;
  margin-top: 1.5em;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--navy-deep);
  color: rgba(255,255,255,0.7);
  padding: 40px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-inner img { height: 48px; filter: brightness(0) invert(1) opacity(0.85); }
.footer-inner p { margin: 0; font-size: 0.9rem; }

/* ===== Lightbox ===== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(11, 26, 42, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.lightbox[hidden] { display: none; }
.lightbox-img {
  max-width: min(90vw, 1100px);
  max-height: 85vh;
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute;
  background: none;
  border: none;
  color: var(--white);
  font-size: 2.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 8px 16px;
}
.lightbox-close { top: 16px; right: 16px; font-size: 2rem; }
.lightbox-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 8px; top: 50%; transform: translateY(-50%); }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { max-width: 240px; margin: 0 auto; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .process-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .site-nav ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 24px 20px;
    box-shadow: 0 12px 24px rgba(19,40,64,0.12);
  }
  .site-nav ul.is-open { display: flex; }
  .site-nav li { border-top: 1px solid rgba(19,40,64,0.08); }
  .site-nav li:first-child { border-top: none; }
  .site-nav a { display: block; padding: 14px 4px; }
  .nav-cta { display: inline-block; margin: 10px 0; }
  .services-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .hero-content { padding-top: 100px; }
}

@media (max-width: 480px) {
  .gallery { grid-template-columns: 1fr 1fr; }
  .btn-lg { padding: 14px 22px; font-size: 0.95rem; }
}
