/* =========================================================
   GroundworX Technology - style.css
   Palette: Graphite & Teal (brand v3)
   ========================================================= */

:root {
  --gw-dark: #24282F;        /* graphite: nav, dark sections, headlines */
  --gw-dark-soft: #2C313A;   /* slightly lifted graphite for cards on dark */
  --gw-teal: #14907F;        /* single accent */
  --gw-teal-deep: #0F7568;   /* hover / active accent */
  --gw-teal-tint: #E3F1EE;   /* soft teal wash for chips and highlights */
  --gw-bg: #F8FAF9;          /* page background */
  --gw-warm: #E9EDEB;        /* alternate section background */
  --gw-muted: #636A72;       /* secondary text */
  --gw-light: #F8FAF9;       /* text on dark */
}

/* ---------- Base ---------- */

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-weight: 400;
  color: var(--gw-dark);
  background-color: var(--gw-bg);
  line-height: 1.65;
}

h1, h2, h3, h4, h5, .gw-wordmark {
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
}

a { color: var(--gw-teal); }
a:hover { color: var(--gw-teal-deep); }

::selection { background: var(--gw-teal); color: #fff; }

:focus-visible {
  outline: 3px solid var(--gw-teal);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
}

/* ---------- Wordmark ---------- */

.gw-wordmark {
  font-size: 1.35rem;
  color: var(--gw-light);
}
.gw-wordmark .gw-x { color: var(--gw-teal); }
.gw-wordmark .gw-dot { color: inherit; }
.gw-wordmark:hover { color: var(--gw-light); }
.gw-wordmark-footer { font-size: 1.5rem; }

/* ---------- Navbar ---------- */

.gw-navbar {
  background-color: var(--gw-dark);
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
}
.gw-navbar .navbar-nav .gw-nav-link {
  color: rgba(248, 250, 249, 0.85);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.45rem 0.95rem;
  margin-inline: 0.15rem;
  border-radius: 6px;
}
.gw-navbar .navbar-nav .gw-nav-link:hover,
.gw-navbar .navbar-nav .gw-nav-link:focus {
  color: #fff;
  background-color: rgba(248, 250, 249, 0.08);
}
.gw-navbar .navbar-nav .gw-nav-link.active {
  color: #fff;
  background-color: var(--gw-teal-deep);
}
.navbar-toggler { border-color: rgba(248, 250, 249, 0.4); }
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(248,250,249,0.9)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ---------- Buttons ---------- */

.gw-btn-accent {
  background-color: var(--gw-teal);
  border: 2px solid var(--gw-teal);
  color: #fff;
  font-weight: 600;
  padding: 0.6rem 1.35rem;
  border-radius: 6px;
}
.gw-btn-accent:hover,
.gw-btn-accent:focus {
  background-color: var(--gw-teal-deep);
  border-color: var(--gw-teal-deep);
  color: #fff;
}
.gw-btn-outline-light {
  background: transparent;
  border: 2px solid rgba(248, 250, 249, 0.5);
  color: var(--gw-light);
  font-weight: 600;
  padding: 0.6rem 1.35rem;
  border-radius: 6px;
}
.gw-btn-outline-light:hover,
.gw-btn-outline-light:focus {
  border-color: #fff;
  color: #fff;
}
.gw-btn-outline-dark {
  background: transparent;
  border: 2px solid var(--gw-dark);
  color: var(--gw-dark);
  font-weight: 600;
  padding: 0.6rem 1.35rem;
  border-radius: 6px;
}
.gw-btn-outline-dark:hover,
.gw-btn-outline-dark:focus {
  background: var(--gw-dark);
  color: #fff;
}

/* ---------- Dark sections & hero ---------- */

.gw-bg-dark {
  background-color: var(--gw-dark);
  color: var(--gw-light);
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.gw-bg-dark h1, .gw-bg-dark h2, .gw-bg-dark h3 { color: var(--gw-light); }

.gw-hero {
  background-color: var(--gw-dark);
  color: var(--gw-light);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 6rem 0 7rem;
}

/* ---------- Hero background: glows + video ----------
   Markup comes from includes/hero-bg.php, included inside .gw-hero.
   Interior pages get ambient teal glows; the home page adds a
   muted looping video under a graphite overlay and teal tint. */

.gw-hero .container { position: relative; z-index: 2; }

.gw-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

/* Ambient teal glows, weighted to the right side */
.gw-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
}
.gw-glow-1 {
  width: 420px;
  height: 420px;
  right: -90px;
  top: -140px;
  background: radial-gradient(circle, rgba(20, 144, 127, 0.45), transparent 65%);
  animation: gw-drift-1 18s ease-in-out infinite alternate;
}
.gw-glow-2 {
  width: 340px;
  height: 340px;
  right: 22%;
  bottom: -160px;
  background: radial-gradient(circle, rgba(20, 144, 127, 0.3), transparent 65%);
  animation: gw-drift-2 24s ease-in-out infinite alternate;
}
@keyframes gw-drift-1 { to { transform: translate(-60px, 40px) scale(1.12); } }
@keyframes gw-drift-2 { to { transform: translate(70px, -30px) scale(0.92); } }

/* Hero background video (home page): real footage under a graphite
   gradient and a light teal tint so it sits inside the brand. */
.gw-hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  transform: translate(-50%, -50%);
  object-fit: cover;
  object-position: center center;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.gw-hero-video.gw-ready { opacity: 1; }

.gw-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(26, 29, 35, 0.88) 0%,
    rgba(26, 29, 35, 0.66) 45%,
    rgba(26, 29, 35, 0.9) 100%
  );
}
.gw-hero-tint {
  position: absolute;
  inset: 0;
  background: rgba(20, 144, 127, 0.1);
  mix-blend-mode: color;
}

/* Reduced motion: still poster frame, calm glows */
@media (prefers-reduced-motion: reduce) {
  .gw-hero-video { opacity: 1; transition: none; }
  .gw-glow { animation: none; }
}

/* ---------- Photos & duotone treatment ---------- */

.gw-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gw-photo-frame {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
}

/* Graphite + teal duotone overlay. Apply .gw-duotone to a .gw-photo-frame. */
.gw-duotone::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(36, 40, 47, 0.82), rgba(20, 144, 127, 0.55));
  mix-blend-mode: multiply;
  pointer-events: none;
}
.gw-duotone::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(20, 144, 127, 0.14);
  z-index: 1;
  pointer-events: none;
}
.gw-duotone .gw-photo { filter: grayscale(0.35) contrast(1.05); }

/* Full-width photo band with copy on top */
.gw-photo-band {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #fff;
}
.gw-photo-band .gw-band-media {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.gw-photo-band .gw-band-media .gw-photo { height: 100%; }
.gw-photo-band .gw-band-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(36, 40, 47, 0.88), rgba(20, 144, 127, 0.6));
  mix-blend-mode: multiply;
}
.gw-photo-band .gw-band-media::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(36, 40, 47, 0.35);
  z-index: 1;
}
.gw-photo-band .container { position: relative; z-index: 2; }

/* ---------- Sections & cards ---------- */

.gw-section { padding: 5.5rem 0; }
.gw-section-warm { background-color: var(--gw-warm); }

.gw-eyebrow {
  display: inline-block;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gw-teal);
  margin-bottom: 0.5rem;
}

.gw-lead {
  color: var(--gw-muted);
  font-size: 1.08rem;
  line-height: 1.75;
  max-width: 640px;
}
.gw-hero .gw-lead { color: rgba(248, 250, 249, 0.85); }

.gw-card {
  background: #fff;
  border: 1px solid rgba(36, 40, 47, 0.09);
  border-radius: 12px;
  padding: 2.25rem 1.85rem;
  height: 100%;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}
/* Hazard-stripe edge, revealed on hover: the brand texture in motion */
.gw-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: repeating-linear-gradient(
    45deg,
    var(--gw-teal) 0 10px,
    transparent 10px 20px
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}
.gw-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 18px 38px rgba(36, 40, 47, 0.13);
}
.gw-card:hover::before { opacity: 1; }
.gw-card .gw-tick {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: var(--gw-teal);
  margin-bottom: 1rem;
}
.gw-card h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }
.gw-card p { font-size: 0.95rem; color: var(--gw-muted); margin-bottom: 0; }
.gw-card a.stretched-link { text-decoration: none; }

.gw-pillar-icon { width: 64px; height: 64px; margin-bottom: 0.75rem; }

/* ---------- Services page ---------- */

.gw-svc-section { padding: 5rem 0; scroll-margin-top: 100px; }
.gw-svc-art { max-width: 190px; width: 100%; height: auto; }
.gw-svc-item h3 { font-size: 1.05rem; margin-bottom: 0.25rem; }
.gw-svc-item p { color: var(--gw-muted); font-size: 0.95rem; }

.gw-also {
  background: #fff;
  border: 1px solid rgba(36, 40, 47, 0.09);
  border-left: 3px solid var(--gw-teal);
  border-radius: 8px;
  padding: 1.5rem 1.5rem;
  height: 100%;
}
.gw-also h3 { font-size: 1rem; margin-bottom: 0.25rem; }
.gw-also p { font-size: 0.9rem; color: var(--gw-muted); margin-bottom: 0; }

/* ---------- Process steps ---------- */

.gw-step {
  position: relative;
  padding-left: 3.5rem;
  padding-bottom: 2.5rem;
}
.gw-step::before {
  content: "";
  position: absolute;
  left: 17px;
  top: 38px;
  bottom: 0;
  width: 2px;
  background: rgba(20, 144, 127, 0.35);
}
.gw-step:last-child { padding-bottom: 0; }
.gw-step:last-child::before { display: none; }
.gw-step-num {
  position: absolute;
  left: 0;
  top: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gw-teal-tint);
  color: var(--gw-teal-deep);
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gw-step h3 { font-size: 1.05rem; margin-bottom: 0.2rem; }
.gw-step p { color: var(--gw-muted); font-size: 0.95rem; margin-bottom: 0; }

/* ---------- Contact ---------- */

.gw-form-label { font-weight: 600; font-size: 0.9rem; }
.gw-form .form-control,
.gw-form .form-select {
  border-color: rgba(36, 40, 47, 0.18);
  border-radius: 6px;
  padding: 0.65rem 0.85rem;
}
.gw-form .form-control:focus,
.gw-form .form-select:focus {
  border-color: var(--gw-teal);
  box-shadow: 0 0 0 0.2rem rgba(20, 144, 127, 0.18);
}
.gw-hp { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

.gw-alert-success {
  background: var(--gw-teal-tint);
  border: 1px solid var(--gw-teal);
  color: #0B5A50;
  border-radius: 8px;
  padding: 1rem 1.25rem;
}
.gw-alert-error {
  background: #FCEFEA;
  border: 1px solid #C25B32;
  color: #8A3A1B;
  border-radius: 8px;
  padding: 1rem 1.25rem;
}

.gw-contact-media { min-height: 320px; }
.gw-contact-media .gw-photo-frame { height: 100%; border-radius: 12px; }

/* ---------- Footer ---------- */

.gw-footer { color: rgba(248, 250, 249, 0.85); }
.gw-footer-heading {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(248, 250, 249, 0.6);
  margin-bottom: 0.75rem;
}
.gw-footer-links li { margin-bottom: 0.4rem; }
.gw-footer-links a {
  color: rgba(248, 250, 249, 0.85);
  text-decoration: none;
}
.gw-footer-links a:hover { color: #fff; text-decoration: underline; }
.gw-footer-tag { color: rgba(248, 250, 249, 0.7); font-size: 0.95rem; }
.gw-footer-bottom {
  border-top: 1px solid rgba(248, 250, 249, 0.15);
  font-size: 0.85rem;
  color: rgba(248, 250, 249, 0.6);
}

/* ---------- Responsive tweaks ---------- */

@media (max-width: 991.98px) {
  .gw-hero { padding: 3.5rem 0 5rem; }
  .gw-hero-media { margin-top: 2rem; }
}

/* ---------- Kinetic layer: scroll reveals & stats ----------
   Reveals only activate when JS is present (html.gw-js), so the
   site remains fully visible without JavaScript. */

.gw-js .gw-reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.gw-js .gw-reveal.gw-in {
  opacity: 1;
  transform: none;
}
.gw-js .gw-reveal-d1 { transition-delay: 0.1s; }
.gw-js .gw-reveal-d2 { transition-delay: 0.2s; }
.gw-js .gw-reveal-d3 { transition-delay: 0.3s; }

/* Stats band */
.gw-stats { padding: 4rem 0; }
.gw-stat-num {
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 700;
  font-size: clamp(2.1rem, 4vw, 3rem);
  letter-spacing: -0.02em;
  color: var(--gw-teal);
  line-height: 1.1;
}
.gw-stat-label {
  font-size: 0.88rem;
  color: var(--gw-muted);
  margin-top: 0.35rem;
}

/* Cards on dark sections (Why GroundworX) */
.gw-bg-dark .gw-card {
  background: var(--gw-dark-soft);
  border-color: rgba(248, 250, 249, 0.08);
}
.gw-bg-dark .gw-card:hover {
  border-color: rgba(20, 144, 127, 0.55);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.35);
}
.gw-bg-dark .gw-card h3 { color: var(--gw-light); }
.gw-bg-dark .gw-card p { color: rgba(248, 250, 249, 0.68); }
.gw-bg-dark .gw-eyebrow { color: #3ECBB4; }

@media (prefers-reduced-motion: reduce) {
  .gw-js .gw-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
