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

:root {
  --color-primary: #8b4513;
  --color-primary-dark: #6b3410;
  --color-secondary: #d4a574;
  --color-bg: #1a1a1a;
  --color-bg-light: #2a2a2a;
  --color-text: #f5f5f5;
  --color-text-muted: #a0a0a0;
  --font-main: system-ui, -apple-system, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: url('assets/images/wood-plank.webp') center / cover;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.header.scrolled {
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.7);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  background: rgba(26, 26, 26, 0.85);
  border-radius: 50px;
  padding: 0.3rem 1rem;
}

.logo img {
  height: 44px;
  width: auto;
  display: block;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-menu a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 1.15rem;
  font-weight: 600;
  text-shadow: -1px -1px 1px rgba(0, 0, 0, 0.8), 1px 1px 1px rgba(255, 255, 255, 0.1);
  transition: color 0.3s, text-shadow 0.3s;
}

.nav-menu a:hover {
  color: #fff;
  text-shadow: -1px -1px 2px rgba(0, 0, 0, 0.9), 1px 1px 2px rgba(255, 255, 255, 0.2);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: -1px -1px 1px rgba(0, 0, 0, 0.8);
  transition: transform 0.3s, opacity 0.3s;
}

.btn {
  display: inline-block;
  padding: 0.875rem 2rem;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-text);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(139, 69, 19, 0.4);
}

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 1.5rem;
  background: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)),
              url('assets/images/deckporch.webp');
  background-size: cover;
  background-position: center;
}

.hero-content h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 1rem;
  color: var(--color-text);
}

.hero-content p {
  font-size: 1.25rem;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
}

section {
  padding: 5rem 0;
}

section h2 {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 3rem;
  color: var(--color-secondary);
  display: none;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.service-card {
  background: var(--color-bg-light);
  padding: 2rem;
  border-radius: 8px;
  border: 1px solid rgba(212, 165, 116, 0.1);
  transition: transform 0.3s, border-color 0.3s;
}

.service-card:hover {
  transform: translateY(-5px);
  border-color: rgba(212, 165, 116, 0.3);
}

.service-card h3 {
  color: var(--color-secondary);
  margin-bottom: 0.75rem;
}

.service-card p {
  color: var(--color-text-muted);
}

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

.portfolio-item {
  aspect-ratio: 4/3;
  background: var(--color-bg-light) center / cover no-repeat;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
}

.portfolio-item:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.lightbox.active {
  display: flex;
}

.lightbox-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  animation: fadeIn 0.25s ease;
}

.lightbox-img-wrap {
  position: relative;
  z-index: 1;
  max-width: 90vw;
  max-height: 85vh;
  animation: zoomIn 0.25s ease;
}

.lightbox-img {
  display: block;
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  z-index: 2;
  background: rgba(26, 26, 26, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 2rem;
  line-height: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.lightbox-close:hover {
  background: rgba(139, 69, 19, 0.8);
}

.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  background: rgba(26, 26, 26, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 2.5rem;
  line-height: 0;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.lightbox-arrow:hover {
  background: rgba(139, 69, 19, 0.8);
}

.lightbox-prev { left: 1.5rem; }
.lightbox-next { right: 1.5rem; }

.lightbox-counter {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
  letter-spacing: 0.1em;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes zoomIn {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}

.about {
  background: var(--color-bg-light);
}

.about-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.about-content p {
  font-size: 1.125rem;
  color: var(--color-text-muted);
}

.contact-phone {
  text-align: center;
  font-size: 1.25rem;
  margin-bottom: 2rem;
  color: var(--color-text-muted);
}

.contact-phone a {
  color: var(--color-secondary);
  text-decoration: none;
}

.contact-phone a:hover {
  text-decoration: underline;
}

.contact-email {
  text-align: center;
  margin-top: 1.5rem;
  color: var(--color-text-muted);
}

.contact-email a {
  color: var(--color-secondary);
  text-decoration: none;
}

.contact-email a:hover {
  text-decoration: underline;
}

.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  background: var(--color-bg-light);
  border: 1px solid rgba(212, 165, 116, 0.2);
  border-radius: 4px;
  color: var(--color-text);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-secondary);
}

.form-group textarea {
  resize: vertical;
}

.form-message {
  text-align: center;
  margin-top: 1rem;
}

.form-message.success {
  color: #4ade80;
}

.form-message.error {
  color: #f87171;
}

.footer {
  padding: 2rem 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: -1px -1px 1px rgba(0, 0, 0, 0.8), 1px 1px 1px rgba(255, 255, 255, 0.1);
  background: url('assets/images/wood-plank.webp') center -500px / cover;
  box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.5);
}

.wood-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 0;
  background: url('assets/images/wood-plank.webp') center / cover;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4), 0 -2px 10px rgba(0, 0, 0, 0.4);
  scroll-margin-top: 76px;
}

.wood-divider h2 {
  font-size: 2rem;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: -1px -1px 1px rgba(0, 0, 0, 0.8), 1px 1px 1px rgba(255, 255, 255, 0.1);
  margin: 0;
}

.wood-pos-1 { background-position: center -100px; }
.wood-pos-2 { background-position: center -300px; }
.wood-pos-3 { background-position: center -400px; }
.wood-pos-4 { background-position: center -540px; }

@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--color-bg);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s, opacity 0.3s;
  }

  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }
}
