/* Global palette and layout */
:root {
  --bg: #f4f6f4;
  --surface: #ffffff;
  --navy: #0f2d54;
  --gold: #c9a75f;
  --accent: #8c9c86;
  --text: #172433;
  --muted: #55606b;
  --border: rgba(17, 40, 84, 0.08);
  --max-width: 1180px;
  --font-sans: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
}

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

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

button {
  font: inherit;
}

.container {
  width: min(100%, var(--max-width));
  margin: 0 auto;
  padding: 32px 28px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 246, 244, 0.94);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(17, 40, 84, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 82px;
}

.brand {
  font-family: var(--font-serif);
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--navy);
  text-transform: uppercase;
  font-size: 1.1rem;
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.brand strong {
  font-size: 1.2rem;
}

.brand-mark {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(201, 167, 95, 0.22);
}

.nav {
  flex: 1;
}

.nav ul {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav a {
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.94rem;
  color: var(--navy);
}

.nav a[aria-current="page"] {
  color: var(--gold);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-toggle {
  display: none;
  padding: 12px 16px;
  border: 1px solid rgba(17, 40, 84, 0.16);
  border-radius: 999px;
  background: white;
  color: var(--navy);
  cursor: pointer;
  font-weight: 700;
}

.hero,
.work-hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  color: white;
  overflow: hidden;
}

.hero-slideshow {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.8s ease-in-out;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.hero-slide--mailbox img {
  object-position: center center;
}

.hero-slide--patio img {
  object-position: center center;
}

.hero-slide--firepit img {
  object-position: center 68%;
}

.hero-slide--kitchen img {
  object-position: center 55%;
}

.hero-slide.active {
  opacity: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(5, 18, 36, 0.56) 0%, rgba(5, 18, 36, 0.42) 35%, rgba(5, 18, 36, 0.18) 52%, rgba(5, 18, 36, 0.00) 100%);
  z-index: 1;
}

.hero-copy h1,
.hero-copy .eyebrow,
.hero-ctas .btn {
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

.hero-inner {
  position: relative;
  z-index: 2;
  padding: 96px 28px;
  max-width: 720px;
}

.hero-copy .eyebrow,
.section-header .eyebrow,
.contact-copy .eyebrow,
.feature-copy .eyebrow {
  display: inline-flex;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 0.82rem;
  color: var(--gold);
  margin-bottom: 20px;
}

.hero-copy h1,
.feature-copy h2,
.section-header h2,
.intro h2,
.contact-copy h2 {
  font-family: var(--font-serif);
  font-weight: 700;
  letter-spacing: 0.01em;
  margin: 0;
  line-height: 1.02;
}

.hero-copy h1 {
  font-size: clamp(3rem, 5vw, 4.8rem);
  max-width: 12ch;
  margin-bottom: 16px;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.hero-subtitle {
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  font-weight: 700;
  font-family: var(--font-sans);
  color: rgba(255, 255, 255, 0.95);
  margin: 0 0 32px 0;
  max-width: 50ch;
  line-height: 1.6;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
  letter-spacing: 0.005em;
}

.gallery-hero {
  min-height: 58vh;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  position: relative;
}

.gallery-hero .hero-inner {
  padding: 80px 28px;
  max-width: 740px;
}

.gallery-categories .project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.gallery-category-card {
  display: grid;
  gap: 18px;
  padding: 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(17, 40, 84, 0.08);
  box-shadow: 0 24px 60px rgba(17, 40, 84, 0.08);
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.gallery-category-card:hover,
.gallery-category-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(201, 167, 95, 0.25);
  box-shadow: 0 30px 72px rgba(17, 40, 84, 0.12);
}

.category-thumb,
.category-thumb-placeholder {
  width: 100%;
  min-height: 180px;
  border-radius: 18px;
  object-fit: cover;
  display: block;
  overflow: hidden;
}

.category-thumb-placeholder {
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(15, 45, 84, 0.08), rgba(201, 167, 95, 0.08));
  color: var(--navy);
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.gallery-category-card h3 {
  margin: 0;
  color: var(--navy);
  font-size: 1.08rem;
}

.gallery-category-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.gallery-section {
  padding: 40px 28px;
  margin-top: 28px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
}

.gallery-placeholder-card {
  background: #f6f4ee;
}

.gallery-placeholder-card img {
  height: 360px;
}

.gallery-image-card {
  border-radius: 20px;
  overflow: hidden;
  background: white;
  box-shadow: 0 22px 60px rgba(17, 40, 84, 0.08);
  border: 1px solid rgba(17, 40, 84, 0.05);
}

.gallery-image-card img {
  cursor: pointer;
}

.gallery-image-card figcaption {
  padding: 14px 16px 18px;
  font-weight: 600;
  color: var(--navy);
  background: transparent;
  font-size: 1rem;
}

.gallery-image-card:hover img,
.gallery-image-card:focus-within img {
  transform: scale(1.02) translateY(-2px);
}

.gallery-image-card img,
.category-thumb {
  transition: transform 450ms ease, filter 450ms ease;
}

.gallery-lightbox img {
  width: auto;
  height: auto;
  max-width: 92%;
  max-height: 86%;
}

@media (max-width: 800px) {
  .gallery-categories .project-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .gallery-image-card img,
  .gallery-placeholder-card img {
    height: 240px;
  }
  .gallery-grid {
    gap: 18px;
  }
  .gallery-category-card {
    padding: 18px;
  }
}

.text,
.intro .text,
.section-header .text,
.contact-copy p {
  color: rgba(255, 255, 255, 0.9);
  max-width: 66ch;
  font-size: 1.1rem;
  line-height: 1.75;
}

.section-kicker {
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  font-size: 0.85rem;
  margin-bottom: 16px;
}

.intro,
.services,
.feature-panel,
.process-section,
.work-preview,
.contact-section,
.projects,
.contact-panel {
  background: var(--surface);
  border-radius: 28px;
  box-shadow: 0 24px 80px rgba(17, 40, 84, 0.08);
}

.intro {
  padding: 56px 40px;
  margin-top: -80px;
  position: relative;
  z-index: 2;
}

.intro h2 {
  font-size: clamp(2.1rem, 2.4vw, 3rem);
  color: var(--navy);
  margin-bottom: 18px;
}

.intro .text {
  color: var(--muted);
}

.hero-ctas,
.work-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 999px;
  padding: 16px 30px;
  font-weight: 700;
  font-size: 1rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
}

.btn.btn-primary {
  background: var(--gold);
  color: var(--navy);
  box-shadow: 0 18px 40px rgba(201, 167, 95, 0.25);
}

.btn.btn-secondary {
  background: rgba(255, 255, 255, 0.16);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.feature-panel,
.work-preview,
.process-section,
.projects,
.contact-section {
  padding: 56px 40px;
  margin-top: 40px;
}

.feature-panel {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 1fr);
  gap: 32px;
  align-items: center;
}

.feature-copy h2 {
  color: var(--navy);
  font-size: clamp(2.5rem, 3vw, 3.4rem);
  margin-bottom: 20px;
}

.feature-copy p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.8;
}

.feature-image {
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(17, 40, 84, 0.12);
}

.feature-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.section-header {
  margin-bottom: 28px;
}

.section-header h2 {
  font-size: clamp(2.3rem, 2.5vw, 3rem);
  color: var(--navy);
  margin-bottom: 16px;
}

.section-header .text {
  color: var(--muted);
  line-height: 1.8;
}

.service-grid,
.project-grid,
.work-grid {
  display: grid;
  gap: 24px;
}

.service-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.project-grid,
.work-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Gallery specific styles */
.gallery-categories .project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.gallery-category-card {
  display: block;
  text-decoration: none;
}

.gallery-section {
  padding: 40px 28px;
  margin-top: 28px;
  background: transparent;
}

.gallery-section h3 {
  font-family: var(--font-serif);
  color: var(--navy);
  font-size: 1.6rem;
  margin-bottom: 18px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.gallery-image-card {
  border-radius: 18px;
  overflow: hidden;
  background: white;
  box-shadow: 0 18px 40px rgba(17, 40, 84, 0.06);
  border: 1px solid rgba(17, 40, 84, 0.04);
}

.gallery-image-card img {
  width: 100%;
  height: 360px;
  object-fit: cover;
  display: block;
  cursor: pointer;
}

/* Card caption */
.gallery-image-card figcaption {
  padding: 12px 16px;
  font-weight: 600;
  color: var(--navy);
  background: transparent;
  font-size: 0.98rem;
}

/* Subtle image entrance animation */
.gallery-image-card {
  transform: translateY(8px);
  opacity: 0;
  transition: transform 700ms cubic-bezier(.2,.9,.2,1), opacity 700ms ease, box-shadow 300ms ease;
}
.gallery-image-card.in-view {
  transform: translateY(0);
  opacity: 1;
}

/* Hover / focus interactions */
.gallery-image-card img {
  transition: transform 420ms ease, filter 420ms ease;
}
.gallery-image-card:hover img,
.gallery-image-card:focus-within img {
  transform: scale(1.03) translateY(-4px);
}
.gallery-image-card:focus-within {
  outline: 3px solid rgba(201,167,95,0.18);
}

/* Ensure captions are readable on mobile */
@media (max-width: 640px) {
  .gallery-image-card img { height: 220px; }
  .gallery-image-card figcaption { font-size: 0.95rem; padding: 10px 12px; }
}

/* Lightbox */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(5, 12, 24, 0.8);
  z-index: 200;
}

.gallery-lightbox.open {
  display: flex;
}

.gallery-lightbox img {
  max-width: 92%;
  max-height: 86%;
  border-radius: 8px;
  box-shadow: 0 40px 120px rgba(0,0,0,0.6);
}

.lightbox-controls {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.lightbox-btn {
  pointer-events: auto;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: white;
  padding: 12px 14px;
  border-radius: 999px;
}

.lightbox-btn.prev { left: 28px; }
.lightbox-btn.next { right: 28px; }
.lightbox-btn.close { right: 28px; top: 28px; transform: none; }

.service-card,
.project-card,
.work-card {
  padding: 28px;
  border-radius: 24px;
  background: white;
  box-shadow: 0 18px 40px rgba(17, 40, 84, 0.06);
  border: 1px solid rgba(17, 40, 84, 0.06);
}

.service-card h3,
.project-card h3,
.work-card h3 {
  margin-top: 18px;
  margin-bottom: 12px;
  color: var(--navy);
  font-size: 1.2rem;
}

.service-card p,
.project-card p,
.work-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.work-card img,
.project-card img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  border-radius: 18px;
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-top: 28px;
}

.process-card {
  background: white;
  padding: 30px 28px;
  border-radius: 24px;
  border: 1px solid var(--border);
  box-shadow: 0 18px 45px rgba(17, 40, 84, 0.07);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
  cursor: pointer;
}

.process-card:hover,
.process-card:focus-within,
.process-card.active {
  transform: translateY(-3px);
  border-color: rgba(201, 167, 95, 0.35);
  background: #fcfcfb;
  box-shadow: 0 30px 70px rgba(17, 40, 84, 0.12);
}

.process-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: var(--navy);
  color: white;
  font-weight: 800;
  margin-bottom: 18px;
  font-size: 1rem;
}

.process-card h3 {
  margin-bottom: 12px;
  font-size: 1.15rem;
  color: var(--navy);
}

.process-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.process-preview {
  position: relative;
  margin-top: 32px;
  min-height: 420px;
  border-radius: 28px;
  overflow: hidden;
  background: rgba(17, 40, 84, 0.12);
  box-shadow: 0 38px 90px rgba(17, 40, 84, 0.12);
}

.process-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.process-preview::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8,14,27,0.18), rgba(8,14,27,0.62));
}

.process-preview-copy {
  position: absolute;
  left: 32px;
  bottom: 32px;
  z-index: 1;
  color: white;
  max-width: 56ch;
}

.process-preview-copy h3 {
  margin: 0 0 10px;
  font-size: 2rem;
  letter-spacing: 0.02em;
}

.process-preview-copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.05rem;
  line-height: 1.8;
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(340px, 1fr);
  gap: 32px;
}

.contact-copy h2 {
  color: var(--navy);
  font-size: clamp(2.3rem, 2.8vw, 3.4rem);
  margin-bottom: 20px;
}

.contact-copy p {
  color: var(--muted);
  max-width: 58ch;
  line-height: 1.8;
}

.contact-form {
  display: grid;
  gap: 16px;
}

.contact-form label {
  font-weight: 700;
  color: var(--navy);
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(17, 40, 84, 0.12);
  background: #f7f7f5;
  padding: 16px 18px;
  font-size: 1rem;
  color: var(--text);
}

.contact-form textarea {
  resize: vertical;
}

.contact-form button {
  justify-self: start;
}

.site-footer {
  padding: 32px 28px;
  text-align: center;
  color: var(--muted);
}

.site-footer p {
  margin: 0;
}

@media (max-width: 980px) {
  .header-inner {
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .nav {
    order: 3;
    width: 100%;
  }

  .nav ul {
    display: none;
    flex-direction: column;
    gap: 16px;
    padding: 22px;
    margin: 0;
    background: rgba(255,255,255,0.98);
    border-radius: 22px;
    border: 1px solid rgba(17, 40, 84, 0.08);
    position: absolute;
    right: 28px;
    top: 88px;
    width: calc(100% - 56px);
    box-shadow: 0 24px 70px rgba(17, 40, 84, 0.12);
  }

  .nav.open ul {
    display: flex;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .hero-inner,
  .work-hero .hero-inner {
    padding: 72px 24px;
  }

  .intro,
  .feature-panel,
  .services,
  .process-section,
  .work-preview,
  .contact-section {
    padding: 40px 28px;
  }

  .feature-panel,
  .contact-section,
  .process-inner,
  .process-steps {
    grid-template-columns: 1fr;
  }

  .process-preview {
    min-height: 320px;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 28px 20px;
  }

  .hero-copy h1 {
    font-size: 2.6rem;
  }

  .hero-ctas,
  .work-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .nav.open ul {
    right: 20px;
    left: 20px;
    width: auto;
  }

  .contact-section,
  .feature-panel,
  .process-inner {
    gap: 24px;
  }
}
