/* =========================================================
   GS Groundworks — INDUSTRIAL THEME
   nav, header, .hero-content, .section, .icon-feature, .card,
   .gallery, .gallery-card, #backToTop, #themeToggle, .lightbox
   ========================================================= */

/* --------- Theme tokens --------- */
:root{
  /* Palette */
  --primary: #1f2937;          /* steel */
  --accent: #ffb000;           /* hazard */
  --accent-2: #2dd4bf;         /* teal */
  --bg-light: #f3f4f6;         /* concrete */
  --text: #111827;
  --white: #ffffff;

  /* Components */
  --bg: var(--bg-light);
  --text-color: var(--text);
  --card-bg: var(--white);

  --border: rgba(17,24,39,0.12);
  --shadow: 0 14px 40px rgba(0,0,0,0.12);
  --shadow-2: 0 10px 26px rgba(0,0,0,0.10);

  --radius: 16px;
}

/* Dark mode (your script toggles body.dark-mode) */
body.dark-mode{
  --bg: #0b0f14;
  --text-color: #e6eaf0;
  --card-bg: #111827;
  --border: rgba(255,255,255,0.12);
  --shadow: 0 18px 60px rgba(0,0,0,0.55);
  --shadow-2: 0 12px 36px rgba(0,0,0,0.40);

  --primary: #0b0f14;
}

/* --------- Base / reset --------- */
*{ box-sizing: border-box; margin: 0; padding: 0; }
html{ scroll-behavior: smooth; }
body{
  background: var(--bg);
  color: var(--text-color);
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.75;
  transition: background .35s ease, color .35s ease;
}
img{ max-width: 100%; display: block; }
a{ color: inherit; text-decoration: none; }

h1,h2,h3,h4{
  font-family: "Space Grotesk","Inter",system-ui,sans-serif;
  line-height: 1.15;
  margin-bottom: .45em;
}
h1{ font-size: clamp(2.2rem, 4.5vw, 3.4rem); letter-spacing: .2px; }
h2{ font-size: clamp(1.7rem, 3vw, 2.3rem); }
h3{ font-size: 1.18rem; }
p{
  margin: 0 auto 1.15em;
  max-width: 72ch;
  color: color-mix(in srgb, var(--text-color) 78%, transparent);
}

/* --------- Nav --------- */
nav{
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 999;
  display: flex;
  justify-content: center;
  gap: 18px;
  padding: 14px 12px;

  background:
    linear-gradient(to right,
      color-mix(in srgb, var(--primary) 92%, transparent),
      color-mix(in srgb, var(--primary) 82%, transparent)
    );
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-link,
nav a{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  letter-spacing: .35px;
  color: #fff;
  padding: 10px 12px;
  border-radius: 12px;
  transition: background .25s ease, transform .15s ease, opacity .25s ease;
}

body.dark-mode nav a{ color: #e6eaf0; }

nav a:hover{
  background: rgba(255,255,255,0.10);
  transform: translateY(-1px);
}

/* --------- Header / hero --------- */
header{
  height: 100vh;
  position: relative;
  background: url('./images/site_airial.jpg') center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  overflow: hidden;
}

/* Industrial overlay + subtle grid */
header::before{
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom right, rgba(0,0,0,0.72), rgba(0,0,0,0.38)),
    repeating-linear-gradient(
      90deg,
      rgba(255,255,255,0.06) 0px,
      rgba(255,255,255,0.06) 1px,
      transparent 1px,
      transparent 18px
    );
  z-index: 1;
}
body.dark-mode header::before{
  background:
    linear-gradient(to bottom right, rgba(0,0,0,0.80), rgba(0,0,0,0.45)),
    repeating-linear-gradient(
      90deg,
      rgba(255,255,255,0.05) 0px,
      rgba(255,255,255,0.05) 1px,
      transparent 1px,
      transparent 18px
    );
}

.hero-content{
  position: relative;
  z-index: 2;
  animation: fadeIn 1.0s ease-out;
  padding: 0 18px;
}

.hero-content img{
  width: min(520px, 84vw);
  margin: 0 auto 18px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: 0 18px 60px rgba(0,0,0,0.35);
}

header h1{
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.55);
}
header p{
  font-size: 1.15rem;
  color: rgba(255,255,255,0.88);
  text-shadow: 0 2px 10px rgba(0,0,0,0.55);
}

/* --------- Components (from your components.css, baked in) --------- */
.btn-primary{
  background: var(--accent);
  color: #111827;
  border-radius: 999px;
  padding: 0.85rem 1.55rem;
  font-weight: 900;
  font-size: 1rem;
  display: inline-block;
  box-shadow: 0 14px 40px rgba(255,176,0,0.18);
  border: 1px solid rgba(255,176,0,0.25);
  transition: filter .25s ease, transform .15s ease;
}
.btn-primary:hover{
  filter: brightness(0.95);
  transform: translateY(-1px);
}

.section{
  padding: 6.2rem 1rem;
  max-width: 1020px;
  margin: auto;
  text-align: center;
  color: var(--text-color);
}

/* Section headings */
section h2{
  color: color-mix(in srgb, var(--text-color) 96%, transparent);
  position: relative;
}
section h2::after{
  content: "";
  display: block;
  width: 72px;
  height: 4px;
  margin: 12px auto 0;
  background: var(--accent);
  border-radius: 999px;
}

/* --------- Services grid --------- */
.icon-feature{
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  margin-top: 34px;
}
.card,
.icon-feature > div{
  background: var(--card-bg);
  color: var(--text-color);
  padding: 1.6rem 1.35rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-2);
  text-align: center;
  border: 1px solid var(--border);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
  max-width: 280px;
}
.card:hover,
.icon-feature > div:hover{
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: color-mix(in srgb, var(--accent) 28%, var(--border));
}
.card i,
.icon-feature i{
  color: var(--accent);
  margin-bottom: 12px;
}

/* About pills */
.about-badges{
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.pill{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--card-bg) 92%, transparent);
  box-shadow: var(--shadow-2);
  font-weight: 800;
  color: color-mix(in srgb, var(--text-color) 88%, transparent);
}
.pill i{ color: var(--accent-2); }

/* --------- Gallery --------- */
.gallery{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 30px;
}
.gallery-card{
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow-2);
  border: 1px solid var(--border);
  background: var(--card-bg);
  transition: transform .22s ease, box-shadow .22s ease;
}
.gallery-card:hover{
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.gallery-card img{
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform .25s ease;
}
.gallery-card:hover img{
  transform: scale(1.04);
}

/* --------- Footer --------- */
footer{
  text-align: center;
  padding: 26px 16px;
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--card-bg) 88%, transparent);
  color: color-mix(in srgb, var(--text-color) 82%, transparent);
}

/* --------- Back to top --------- */
#backToTop{
  position: fixed;
  bottom: 26px;
  right: 26px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--accent);
  color: #111827;
  border: 1px solid rgba(255,176,0,0.25);
  box-shadow: 0 18px 50px rgba(255,176,0,0.16);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity .2s ease, transform .2s ease;
}
/* If your script toggles a class like .show, keep this; if not, it will still work when you add it. */
#backToTop.show{
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* --------- Theme toggle (from your components.css, baked in) --------- */
.floating-toggle{
  position: fixed;
  bottom: 26px;
  left: 26px;
  z-index: 1000;
  background: transparent;
  border: none;
}
.flip-toggle{
  width: 44px;
  height: 44px;
  perspective: 800px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
}
.flip-inner{
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform .6s ease;
  transform-style: preserve-3d;
}
.flip-face{
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card-bg);
  color: var(--text-color);
  border: 1px solid var(--border);
  box-shadow: 0 8px 22px rgba(0,0,0,0.15);
  backface-visibility: hidden;
}
.front{ transform: rotateY(0deg); }
.back{ transform: rotateY(180deg); }
body.dark-mode .flip-inner{ transform: rotateY(180deg); }

/* --------- Lightbox --------- */
.lightbox{
  display: none; /* your script likely toggles display */
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 26px;
}
.lightbox .close{
  position: absolute;
  top: 18px;
  right: 22px;
  font-size: 44px;
  color: #fff;
  cursor: pointer;
  user-select: none;
}
.lightbox-img{
  width: min(1100px, 95vw);
  max-height: 82vh;
  object-fit: contain;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: 0 20px 70px rgba(0,0,0,0.55);
}

/* --------- Animations + responsive --------- */
@keyframes fadeIn{
  from{ opacity: 0; transform: translateY(10px); }
  to{ opacity: 1; transform: translateY(0); }
}

@media (max-width: 980px){
  nav{ gap: 10px; padding: 12px 10px; flex-wrap: wrap; }
  .gallery{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px){
  header{ height: 92vh; }
  .gallery{ grid-template-columns: 1fr; }
  #backToTop{ right: 16px; bottom: 16px; }
  .floating-toggle{ left: 16px; bottom: 16px; }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *{ transition: none !important; animation: none !important; }
}
/* =========================
   Services Carousel Overlay
   ========================= */

body.svc-modal-open{
  overflow: hidden;
}

.svc-carousel{
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2500;
}

.svc-carousel.is-open{
  display: block;
}

.svc-carousel__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.75);
}

.svc-carousel__panel{
  position: relative;
  width: min(920px, 92vw);
  margin: 8vh auto 0;
  background: var(--card-bg);
  color: var(--text-color);
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 22px 18px 18px;
}

.svc-carousel__close{
  position: absolute;
  top: 10px;
  right: 12px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--card-bg) 92%, transparent);
  color: var(--text-color);
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.svc-carousel__header{
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 14px;
  align-items: start;
  padding: 6px 6px 14px;
}

.svc-carousel__icon{
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--card-bg) 86%, transparent);
}

.svc-carousel__icon i{
  font-size: 30px;
  color: var(--accent);
}

.svc-carousel__title{
  margin: 2px 0 8px;
  font-size: 1.35rem;
}

.svc-carousel__desc{
  margin: 0;
  max-width: 75ch;
  color: color-mix(in srgb, var(--text-color) 82%, transparent);
}

.svc-carousel__controls{
  display: grid;
  grid-template-columns: 54px 1fr 54px;
  gap: 12px;
  align-items: center;
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.svc-carousel__btn{
  height: 46px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--card-bg) 92%, transparent);
  color: var(--text-color);
  cursor: pointer;
  display: grid;
  place-items: center;
}

.svc-carousel__btn i{
  color: var(--accent);
}

.svc-carousel__dots{
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.svc-dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--text-color) 18%, transparent);
  cursor: pointer;
}

.svc-dot.is-active{
  background: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
}

/* Make service cards feel clickable */
#services .icon-feature .card{
  cursor: pointer;
}
#services .icon-feature .card:focus{
  outline: 2px solid color-mix(in srgb, var(--accent) 70%, transparent);
  outline-offset: 3px;
}
.svc-carousel__media{
  margin-top: 10px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.svc-carousel__img{
  width: 100%;
  height: min(42vh, 360px);
  object-fit: cover;
  display: block;
}
.svc-carousel__media{
  position: relative;
  margin-top: 10px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.svc-carousel__img{
  width: 100%;
  height: min(42vh, 360px);
  object-fit: cover;
  display: block;
}

.svc-media__btn{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.35);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 2;
  backdrop-filter: blur(6px);
}

.svc-media__btn--prev{ left: 10px; }
.svc-media__btn--next{ right: 10px; }

.svc-media__dots{
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.18);
  backdrop-filter: blur(6px);
  z-index: 2;
}

.svc-img-dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.25);
  cursor: pointer;
}

.svc-img-dot.is-active{
  background: #fff;
}
/* Contact */
.contact-form{
  max-width: 760px;
  margin: 18px auto 0;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.contact-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.contact-form label{
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.contact-form span{
  font-weight: 600;
  font-size: 0.95rem;
}

.contact-form input,
.contact-form textarea{
  width: 100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--card-bg) 92%, transparent);
  color: var(--text-color);
  outline: none;
}

.contact-form input:focus,
.contact-form textarea:focus{
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
}

.contact-form textarea{
  resize: vertical;
  min-height: 140px;
}

.contact-note{
  margin: 10px 0 0;
  color: color-mix(in srgb, var(--text-color) 75%, transparent);
  font-size: 0.95rem;
}

@media (max-width: 720px){
  .contact-grid{ grid-template-columns: 1fr; }
}
/* --------- Contact card + form (matches GS cards) --------- */
.contact-card{
  max-width: 860px;
  margin: 26px auto 0;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--card-bg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-2);
  text-align: left; /* break out of section's center align */
}

.contact-card__top{
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  justify-content: space-between;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.contact-card__line{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: color-mix(in srgb, var(--text-color) 92%, transparent);
}

.contact-card__line i{
  color: var(--accent);
}

.contact-card__line a{
  text-decoration: none;
  border-bottom: 1px dashed color-mix(in srgb, var(--text-color) 28%, transparent);
}
.contact-card__line a:hover{
  border-bottom-color: color-mix(in srgb, var(--accent) 55%, transparent);
}

/* Form */
.contact-form{ margin-top: 6px; }

.contact-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field{
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.field span{
  font-weight: 800;
  letter-spacing: .2px;
  font-size: .95rem;
  color: color-mix(in srgb, var(--text-color) 92%, transparent);
}

.contact-form input,
.contact-form textarea{
  width: 100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--card-bg) 92%, transparent);
  color: var(--text-color);
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.contact-form input:focus,
.contact-form textarea:focus{
  border-color: color-mix(in srgb, var(--accent) 30%, var(--border));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent);
}

.contact-form textarea{
  resize: vertical;
  min-height: 150px;
}

.contact-form .btn-primary{
  margin-top: 6px;
}

.contact-note{
  margin: 10px 0 0;
  color: color-mix(in srgb, var(--text-color) 78%, transparent);
  font-size: 0.95rem;
}

@media (max-width: 720px){
  .contact-card{ text-align: left; }
  .contact-grid{ grid-template-columns: 1fr; }
  .contact-card__top{ flex-direction: column; }
}
.contact-status{
  max-width: 860px;
  margin: 10px auto 0;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--accent) 12%, var(--card-bg));
  color: var(--text-color);
}
.hp-field{ display:none !important; }