/* ===================== RESET ===================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ===================== BASE ===================== */
body {
  font-family: 'Inter', sans-serif;
  color: #111;
  line-height: 1.6;
  /* FIX: Prevent mobile nav slide-in from causing horizontal scrollbar */
  overflow-x: hidden;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
}

/* ===================== HEADER ===================== */
.header {
  position: fixed;
  width: 100%;
  top: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
}

.logo {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 600;
  /* FIX: Ensure logo never wraps or gets clipped */
  white-space: nowrap;
  flex-shrink: 0;
}

/* ===================== DESKTOP NAV ===================== */
.nav {
  display: flex;
  gap: 30px;
}

.nav a {
  text-decoration: none;
  color: #111;
  font-weight: 500;
  font-size: 14px;
  position: relative;
  transition: color 0.3s ease;
}

.nav a:hover {
  color: #b8864b;
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1px;
  background: #b8864b;
  transition: width 0.3s ease;
}

.nav a:hover::after {
  width: 100%;
}

/* ===================== HAMBURGER ===================== */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  /* FIX: Larger tap target for mobile */
  padding: 6px;
  border-radius: 4px;
}

.hamburger span {
  width: 25px;
  height: 2px;
  background: #111;
  display: block;
  transition: all 0.3s ease;
}

/* Animated X when open */
.hamburger.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ===================== NAV OVERLAY (mobile backdrop) ===================== */
/* FIX: Tap outside nav to close it */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.nav-overlay.active {
  display: block;
  opacity: 1;
}

/* ===================== SCROLL REVEAL ===================== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===================== CARD ICONS ===================== */
.card-icon {
  color: #b8864b;
  margin-bottom: 16px;
  display: flex;
  justify-content: center;
}

/* ===================== HERO ===================== */
.hero {
  height: 100vh;
  /* FIX: min-height so hero is never too short on landscape mobile */
  min-height: 500px;
  background: url("https://images.unsplash.com/photo-1505843513577-22bb7d21e455?auto=format&fit=crop&w=1600&q=80") center/cover no-repeat;
  display: flex;
  align-items: center;
  position: relative;
  text-align: center;
  color: #fff;
  /* FIX: Padding-top so content is never hidden behind the fixed header */
  padding-top: 80px;
}

.overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.hero-content {
  position: relative;
  z-index: 2;
  /* FIX: Padding so text doesn't touch screen edges on small devices */
  padding: 0 16px;
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  /* FIX: Fluid font size — no abrupt jump between desktop and mobile */
  font-size: clamp(28px, 5vw, 56px);
  line-height: 1.15;
  margin-bottom: 16px;
}

.hero p {
  margin-bottom: 30px;
  /* FIX: Fluid size for subtitle */
  font-size: clamp(15px, 2.5vw, 18px);
  opacity: 0.9;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  /* FIX: Wrap buttons on very small screens */
  flex-wrap: wrap;
}

/* ===================== BUTTONS ===================== */
.btn {
  padding: 12px 24px;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 500;
  display: inline-block;
  font-size: 14px;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
  /* FIX: Prevent button text from wrapping */
  white-space: nowrap;
}

.other {
  background: #b8864b;
  color: #fff;
}
.other:hover {
  transform: scale(1.03);
  background: #a0733d;
}

.primary {
  background: #b8864b;
  color: #fff;
  border: 2px solid #b8864b;
  box-shadow: 0 0 10px rgba(184, 134, 75, 0.3);
}
.primary:hover {
  background: rgba(184, 134, 75, 0.15);
  box-shadow: 0 0 20px rgba(184, 134, 75, 0.7),
              inset 0 0 10px rgba(184, 134, 75, 0.3);
  color: #fff;
}

.secondary {
  background: transparent;
  border: 2px solid #fff;
  color: #fff;
}
.secondary:hover {
  background: rgba(184, 134, 75, 0.35);
  box-shadow: 0 0 20px rgba(184, 134, 75, 0.7),
              inset 0 0 10px rgba(184, 134, 75, 0.3);
  color: #fff;
  border-color: #b8864b;
}

/* ===================== SECTIONS ===================== */
.section {
  padding: 100px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 60px;
  font-family: 'Playfair Display', serif;
  /* FIX: Fluid section title */
  font-size: clamp(22px, 3.5vw, 32px);
}

/* ===================== ABOUT ===================== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about img {
  width: 100%;
  border-radius: 8px;
  display: block;
}

/* FIX: Replaced <br> spacing with proper CSS margins */
.about-text h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(22px, 3vw, 30px);
  margin-bottom: 20px;
}

.about-text p {
  margin-bottom: 16px;
  color: #444;
}

.about-text .btn {
  margin-top: 8px;
}

/* ===================== SERVICES ===================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.card {
  padding: 30px;
  border: 1px solid #eee;
  border-radius: 6px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.08);
}

.card h4 {
  margin-bottom: 10px;
  font-family: 'Playfair Display', serif;
}

/* ===================== PROJECTS ===================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.project {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
}

.project img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.project:hover img {
  transform: scale(1.05);
}

.project-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 16px;
}

.project-info h4 {
  margin-bottom: 4px;
}

.project-info span {
  font-size: 13px;
  opacity: 0.8;
}

/* ===================== PROCESS ===================== */
.process {
  background: #faf9f7;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  text-align: center;
}

.process-step {
  padding: 20px;
}

.process-step span {
  display: block;
  font-size: 2rem;
  color: #b8864b;
  font-weight: bold;
  margin-bottom: 12px;
}

.process-step h5 {
  font-family: 'Playfair Display', serif;
  font-size: 17px;
  margin-bottom: 8px;
}

.process-step p {
  color: #666;
  font-size: 14px;
}

/* ===================== CONTACT ===================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.contact-info h3 {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  margin-bottom: 20px;
}

.contact-info p {
  color: #555;
  margin-bottom: 14px;
  line-height: 1.7;
}

/* FIX: Styled form as a proper flex column */
.contact form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* FIX: Added border-radius and consistent styling to inputs */
.contact input,
.contact textarea {
  padding: 12px 14px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #111;
  background: #fff;
  width: 100%;
  /* FIX: Smooth focus ring */
  transition: border-color 0.2s ease;
  resize: vertical;
}

.contact input:focus,
.contact textarea:focus {
  outline: none;
  border-color: #b8864b;
}

.contact input::placeholder,
.contact textarea::placeholder {
  color: #aaa;
}

/* ===================== FOOTER ===================== */
footer {
  background: #111;
  color: #fff;
  padding: 30px 0;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  /* FIX: Vertical alignment before stacking */
  align-items: center;
}

.footer-brand {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
}

.footer-copy {
  font-size: 13px;
  color: #aaa;
}

/* ===================== BREAKPOINT: TABLET 900px ===================== */
@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  /* FIX: 4 → 2 columns on tablet for services */
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  /* FIX: 3 → 2 columns on tablet for projects */
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* FIX: 4 → 2 columns on tablet for process */
  .process-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* ===================== BREAKPOINT: MOBILE 768px ===================== */
@media (max-width: 768px) {
  /* FIX: Nav slides in from right with a fixed pixel value (not -100%)
     so it works correctly regardless of screen/nav width */
  .nav {
    position: fixed;
    right: -280px;
    top: 0;
    flex-direction: column;
    background: #fff;
    width: 260px;
    /* FIX: Full height drawer, padding so links don't start flush at the top */
    height: 100vh;
    padding: 90px 30px 30px;
    transition: right 0.3s ease;
    z-index: 999;
    gap: 8px;
    box-shadow: -4px 0 20px rgba(0,0,0,0.1);
  }

  .nav.active {
    right: 0;
  }

  /* FIX: Nav links larger and easier to tap on mobile */
  .nav a {
    font-size: 16px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
  }

  .hamburger {
    display: flex;
  }

  .section {
    padding: 70px 0;
  }

  .section-title {
    margin-bottom: 40px;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  /* FIX: Projects go to single column on mobile */
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .project img {
    height: 240px;
  }

  /* FIX: Process stays at 2 columns on mobile (doesn't need to be 1) */
  .process-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-content {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}

/* ===================== BREAKPOINT: SMALL MOBILE 480px ===================== */
/* FIX: Brand new breakpoint — original had nothing below 768px */
@media (max-width: 480px) {
  .container {
    width: 92%;
  }

  .hero {
    padding-top: 70px;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .hero-buttons .btn {
    width: 100%;
    max-width: 260px;
    text-align: center;
  }

  /* FIX: Services and process go to 1 column on very small phones */
  .services-grid {
    grid-template-columns: 1fr;
  }

  .process-grid {
    grid-template-columns: 1fr;
  }

  .about-grid {
    gap: 24px;
  }

  .section {
    padding: 56px 0;
  }
}