/* Brand colours */
:root{
  --black:#080707;
  --green:#213126;
  --gold:#987534;
  --bg:#ffffff;
  --text:#111111;
  --card:#ffffff;
  --muted:#6b7280;
  --shadow: 0 8px 24px rgba(0,0,0,.14);
  --radius: 14px;
  --speed: .4s;
}

html[data-theme="dark"]{
  --bg:#0e0f10;
  --text:var(--gold);
  --card:#141618;
  --muted:#a1a1a1;
  --shadow: 0 8px 32px rgba(0,0,0,.55);
}

/* Reset-ish */
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  background:var(--bg);
  color:var(--text);
  line-height:1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Loader */
#loader{
  position:fixed; inset:0; display:grid; place-items:center;
  background:var(--bg); z-index:9999; transition:opacity .3s ease; }
#loader.hidden{opacity:0; pointer-events:none}
.spinner{
  width:40px; height:40px; border:4px solid #ddd; border-top-color:var(--gold);
  border-radius:50%; animation:spin 1s linear infinite; margin:auto;
}
@keyframes spin{to{transform:rotate(360deg)}}

/* Header */
.site-header{
  position:sticky; top:0; z-index:50; background:var(--black); color:var(--gold);
  border-bottom:1px solid rgba(255,255,255,.08);
}
.nav-wrap{display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:.75rem 1rem;}
.brand{display:flex; align-items:center; gap:.6rem; text-decoration:none; color:var(--gold);}
.logo{height:100px; width:auto}
.brand-text{font-weight:700; letter-spacing:.2px}

.nav-toggle{display:none; background:none; border:none; color:var(--gold); font-size:1rem}
.menu{display:flex; list-style:none; gap:.6rem; margin:0; padding:0}
.menu a{
  display:inline-block; padding:.6rem .8rem; color:var(--gold); text-decoration:none; border-radius:10px; transition:background var(--speed) ease;
}
.menu a:hover, .menu a.active{background:rgba(255,255,255,.08)}

#theme-toggle{color:var(--gold); border:1px solid rgba(255,255,255,.18)}

/* Layout helpers */
.container{width:min(1200px, 92%); margin-inline:auto}
.narrow{width:min(860px, 92%); margin-inline:auto}
.center{text-align:center}
.grid{display:grid; gap:2rem}
.grid-2{grid-template-columns:1fr 1fr}
@media (max-width: 900px){ .grid-2{grid-template-columns:1fr} .media-reverse{order:2} }

/* Cards / Boxes */
.card{
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(1rem, 2vw, 2rem);
  margin: 1rem auto;
}

/* Hero / Banner */
.banner{
	position: relative;
  background: linear-gradient( to bottom, rgba(0,0,0,.45), rgba(0,0,0,.35) ), var(--hero) center/cover no-repeat;
  color:#fff; padding: min(18vh, 240px) 1rem; position:relative; overflow:hidden;
}

.banner-inner h1{ 
	position: absolute;
	bottom: 10px;
	left: 20px;
	width:min(900px, 92%);
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	padding-bottom: 2rem;
	height: 100%;
}

.banner h1{font-size: clamp(1.6rem, 3vw, 2.4rem); margin:0}

/* Buttons */
.btn{cursor:pointer; border:none; border-radius:12px; padding:.7rem 1rem; font-weight:700}
.btn-lg{padding:1rem 1.4rem; font-size:1.1rem}
.btn-primary{background:var(--gold); color:#1b1b1b}
.btn-secondary{background:transparent; border:2px solid var(--gold); color:var(--text)}
.btn-ghost{background:transparent; border:1px solid rgba(255,255,255,.2); color:inherit}
.btn-link{background:transparent; color:var(--gold); text-decoration:underline; padding:0}
.icon-btn{background:transparent; border:none; font-size:1.6rem; line-height:1}

/* CTA modal */
#cta-popup{position:fixed; inset:0; display:grid; place-items:center; background:rgba(0,0,0,.5); z-index:60}
#cta-popup[hidden]{display:none}
.cta-modal{max-width:520px; width:92%; position:relative}
.close-cta{position:absolute; top:.4rem; right:.6rem}

/* Portfolio */
.portfolio-grid{display:grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap:1rem}
.project{display:flex; flex-direction:column; gap:.6rem}
.project .project-caption{margin:0}
.ba-hover{position:relative; display:block; border-radius:12px; overflow:hidden}
.ba-hover img{display:block; width:100%; height:auto; transition:opacity .5s ease}
.ba-hover .img-after{position:absolute; inset:0; opacity:0}
.ba-hover:hover .img-after{opacity:1}

/* Lightbox */
#lightbox{position:fixed; inset:0; background:rgba(0,0,0,.85); display:grid; place-items:center; z-index:80}
#lightbox[hidden]{display:none}
.lightbox-figure{max-width:min(92vw,1000px); margin:0; text-align:center}
.lightbox-figure img{width:100%; height:auto; border-radius:12px}
.lightbox-close, .lightbox-prev, .lightbox-next{
  position:fixed; top:50%; transform:translateY(-50%); background:var(--gold); color:#111; border:none; border-radius:999px; width:44px; height:44px;
}
.lightbox-close{top:5%; right:3%; transform:none}
.lightbox-prev{left:3%}
.lightbox-next{right:3%}

/* Force lightbox caption styles */
.lightbox-figure figcaption,
.lightbox-caption {
  margin-top: 0.8rem;
  font-size: 1rem;
  text-align: center;
}

/* Light mode */
html[data-theme="light"] .lightbox-figure figcaption,
html[data-theme="light"] .lightbox-caption {
  color: #ffffff !important; /* force white in light mode */
}

/* Dark mode */
html[data-theme="dark"] .lightbox-figure figcaption,
html[data-theme="dark"] .lightbox-caption {
  color: var(--gold) !important; /* force gold in dark mode */
}


/* Plans */
.plans{display:grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap:1rem}
.plan.inset{padding:1.2rem}
.plan .price{font-size:1.6rem; margin:.5rem 0}
.plan .features{margin:0 0 1rem; padding-left:1.2rem}
.plan .badge{position:absolute; right:1rem; top:1rem; background:var(--gold); color:#111; border-radius:999px; padding:.25rem .6rem; font-size:.8rem; font-weight:800}
.plan.featured{outline:2px solid var(--gold); position:relative}

/* Plan modal */
#plan-modal{position:fixed; inset:0; display:grid; place-items:center; background:rgba(0,0,0,.5); z-index:70}
#plan-modal[hidden]{display:none}
.plan-dialog{max-width:720px; width:92%; position:relative}
.close-plan{position:absolute; top:.4rem; right:.6rem}

/* Contact */
.contact-form{display:grid; gap:1rem}
.contact-form label{display:grid; gap:.5rem}
input, textarea{
  background:transparent; color:var(--text); border:2px solid rgba(0,0,0,.12);
  border-radius:12px; padding:.7rem .8rem; font:inherit;
}
html[data-theme="dark"] input, html[data-theme="dark"] textarea{border-color:rgba(255,255,255,.18)}
input:focus, textarea:focus{outline:none; border-color:var(--gold); box-shadow:0 0 0 3px rgba(152,117,52,.25)}

/* Socials */
.socials{display:flex; gap:.6rem; justify-content:center}
.social{display:inline-grid
	
}
/* Social icons container */
.social-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

/* Light mode (default) */
html[data-theme="light"] .social-icons a {
    font-size: 28px;
    color: #000000; /* Black in light mode */
    transition: color 0.3s ease, transform 0.3s ease;
}

/* Dark mode */
html[data-theme="dark"] .social-icons a {
    color: #987534; /* Gold in dark mode */
}

/* Hover effect */
.social-icons a:hover {
    transform: scale(1.2);
}

/* Target just the homepage carpentry image */
.home-carpentry-img {
    max-width: 100%; /* prevents it from spilling outside its container */
    height: auto; /* keeps proportions */
    display: block;
    margin: 0 auto; /* centers the image */
}

/* Optional: limit to a smaller size */
@media (min-width: 0px) {
    .home-carpentry-img {
        max-width: 350px; /* adjust as you like */
}

/* Target just the homepage carpentry image */
.home-cad-img {
    max-width: 100%; /* prevents it from spilling outside its container */
    height: auto; /* keeps proportions */
    display: block;
    margin: 0 auto; /* centers the image */
}

/* Optional: limit to a smaller size */
@media (min-width: 0px) {
    .home-cad-img {
        max-width: 350px; /* adjust as you like */
}

/* Target just the homepage carpentry image */
.home-landscaping-img {
    max-width: 100%; /* prevents it from spilling outside its container */
    height: auto; /* keeps proportions */
    display: block;
    margin: 0 auto; /* centers the image */
}

/* Optional: limit to a smaller size */
@media (min-width: 0px) {
    .home-landscaping-img {
        max-width: 400px; /* adjust as you like */
}

/* Target just the homepage carpentry image */
.services-carpentry-img {
    max-width: 100%; /* prevents it from spilling outside its container */
    height: auto; /* keeps proportions */
    display: block;
    margin: 0 auto; /* centers the image */
}

/* Optional: limit to a smaller size */
@media (min-width: 0px) {
    .services-carpentry-img {
        max-width: 350px; /* adjust as you like */
}

/* Target just the homepage carpentry image */
.services-cad-img {
    max-width: 100%; /* prevents it from spilling outside its container */
    height: auto; /* keeps proportions */
    display: block;
    margin: 0 auto; /* centers the image */
}

/* Optional: limit to a smaller size */
@media (min-width: 0px) {
    .services-cad-img {
        max-width: 350px; /* adjust as you like */
}

/* Target just the homepage carpentry image */
.services-landscaping-img {
    max-width: 100%; /* prevents it from spilling outside its container */
    height: auto; /* keeps proportions */
    display: block;
    margin: 0 auto; /* centers the image */
}

/* Optional: limit to a smaller size */
@media (min-width: 0px) {
    .services-landscaping-img {
        max-width: 350px; /* adjust as you like */
}
/* Default (desktop) */
.nav .menu {
  display: flex;
  gap: 1.5rem;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
}

/* Mobile styles */
@media (max-width: 768px) {
  .nav .menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100px; /* height of navbar */
    left: 0;
    width: 220px;
    padding: 1rem;
    background-color: var(--background);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 999;
  }

  /* Light mode background */
  [data-theme="light"] .nav .menu {
    background-color: #ffffff;
  }

  /* Dark mode background */
  [data-theme="dark"] .nav .menu {
    background-color: #080707;
  }

  /* Show menu when toggled */
  .nav .menu.show {
    display: flex;
  }

  /* Menu items */
  .nav .menu li {
    border-bottom: 1px solid rgba(0,0,0,0.1);
  }

  [data-theme="dark"] .nav .menu li {
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }

  .nav .menu li:last-child {
    border-bottom: none;
  }

  .nav .menu li a {
    display: block;
    padding: 10px 15px;
    color: var(--text);
    font-size: 1.2rem;
    transition: background-color 0.3s ease;
  }

  [data-theme="light"] .nav .menu li a:hover {
    background-color: #f4f4f4;
  }

  [data-theme="dark"] .nav .menu li a:hover {
    background-color: #213126; /* brand green */
  }

  /* Show hamburger on mobile */
  .nav-toggle {
    display: block;
  }
}

/* Popup Overlay */
.popup {
  display: none; /* Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(8, 7, 7, 0.85); /* semi-transparent black */
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

/* Popup Content */
.popup-content {
  background-color: #080707; /* black background for dark mode */
  color: #987534; /* gold text */
  padding: 30px;
  max-width: 400px;
  text-align: center;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
  position: relative;
}

/* Close Button */
.close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  cursor: pointer;
}

/* CTA Button */
.cta-button {
  display: inline-block;
  margin-top: 15px;
  padding: 12px 25px;
  background-color: #987534; /* gold */
  color: #080707; /* black */
  text-decoration: none;
  font-weight: bold;
  border-radius: 5px;
  transition: background-color 0.3s;
}

.cta-button:hover {
  background-color: #987534; /* lighter gold */
}

/* Light mode adaptation (optional) */
body.light-mode .popup-content {
  background-color: #fff;
  color: #fff;
}

body.light-mode .cta-button {
  background-color: #fff;
  color: #080707;
}

/* Service banner style */
.service-banner {
  margin-bottom: 2rem;
}

.service-img {
  display: block;
  width: 100%;
  height: 180px; /* Adjust height to make it banner-like */
  background-size: cover;
  background-position: center;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
}

.service-img h3 {
  position: absolute;
  bottom: 10px;
  left: 20px;
  color: #fff;
  font-size: 1.8rem;
  background: rgba(0, 0, 0, 0.4);
  padding: 8px 12px;
  border-radius: 4px;
  margin: 0;
}

.service-content {
  padding: 1rem 0;
  text-align: left;
}

.service-content p {
  margin-bottom: 1rem;
}

.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-up.show {
  opacity: 1;
  transform: translateY(0);
}

.slide-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.slide-left.show {
  opacity: 1;
  transform: translateX(0);
}

.slide-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.slide-right.show {
  opacity: 1;
  transform: translateX(0);
}

/* Hide animated elements initially */
.animate__animated {
  opacity: 0;
}

/* When visible, allow animation */
.animate__animated-visible {
  opacity: 1;
}

/* Hide animated elements until they are in view */
.animate__hidden {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate__visible {
  opacity: 1;
  transform: translateY(0);
}