/* --- Color Variables & Themes --- */
:root {
  --teal: #18969a;
  --teald: #0f666a;
  --orange: #ef8b15;
  --bg: #f7faf9;
  --surface: #fff;
  --text: #142326;
  --muted: #607275;
  --line: #dce7e5;
  --shadow: 0 22px 60px rgba(12, 56, 59, .14);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101719;
    --surface: #182124;
    --text: #edf5f5;
    --muted: #a9b9bb;
    --line: #334347;
    --shadow: 0 24px 60px rgba(0, 0, 0, .35);
  }
}

/* --- Global Resets --- */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, sans-serif;
  line-height: 1.65;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  width: 1.2em;
  height: 1.2em;
}

.wrap {
  width: min(1180px, calc(100% - 40px));
  margin: auto;
}

/* --- Typography --- */
h1, h2, h3 {
  line-height: 1.05;
  letter-spacing: -.04em;
  margin: 0;
}

h1 {
  font-size: clamp(3rem, 7vw, 5.2rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 3.3rem);
}

p {
  color: var(--muted);
}

/* --- Accessibility --- */
.skip {
  position: fixed;
  top: -5rem;
  left: 1rem;
  z-index: 99;
  background: #fff;
  padding: .8rem;
}

.skip:focus {
  top: 1rem;
}

/* --- Header & Navigation --- */
.top {
  height: 78px;
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.navrow {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.brand {
  font-size: 1.65rem;
  letter-spacing: -.07em;
}

.brand span {
  color: var(--teal);
}

.brand b {
  color: var(--orange);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
}

.nav > a,
.group > button {
  position: relative;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: 700;
  padding: .65rem;
  cursor: pointer;
}

/* Marks which top-level nav item matches the current page, set server-side
   in nav.php (aria-current="page" on plain links, .is-active on the
   Services/Industries dropdown buttons since they open a menu rather than
   being a page themselves). The dropdown buttons underline their own <span>
   label rather than the whole button, so it doesn't stretch out to include
   the chevron icon and end up wider/misaligned versus a plain link's. */
.nav > a[aria-current="page"],
.group > button.is-active {
  color: var(--teal);
}

.nav > a[aria-current="page"]::after {
  content: '';
  position: absolute;
  left: .65rem;
  right: .65rem;
  bottom: .1rem;
  height: 2px;
  border-radius: 2px;
  background: var(--teal);
}

.group > button.is-active > span {
  position: relative;
}

.group > button.is-active > span::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -.4rem;
  height: 2px;
  border-radius: 2px;
  background: var(--teal);
}

/* --- Mega Menu --- */
.group {
  position: relative;
}

.mega {
  display: none;
  position: absolute;
  right: -280px;
  top: 3rem;
  width: min(900px, calc(100vw - 40px));
  grid-template-columns: repeat(2, 1fr);
  gap: .6rem;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.mega.open {
  display: grid;
}

.mega a {
  padding: 1rem;
  border-radius: 14px;
  transition: .2s;
}

.mega a:hover {
  background: color-mix(in srgb, var(--teal) 10%, transparent);
  transform: translateY(-2px);
}

.mega strong, 
.mega small {
  display: block;
}

.mega small {
  color: var(--muted);
}

.hamb {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: .7rem;
  color: inherit;
}

/* --- Buttons --- */
.button {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  border-radius: 12px;
  padding: .9rem 1.2rem;
  background: var(--teal);
  color: #fff;
  font-weight: 800;
  transition: .2s;
}

.button:hover {
  transform: translateY(-3px);
  background: var(--teald);
  box-shadow: var(--shadow);
}

.orange {
  background: var(--orange);
  color: #1d1306;
}

.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

/* --- Hero Section --- */
.hero, 
.pagehero {
  padding: clamp(5rem, 9vw, 8rem) 0;
  background: radial-gradient(circle at 15% 20%, color-mix(in srgb, var(--teal) 16%, transparent), transparent 30%);
}

.heroGrid {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 4rem;
  align-items: center;
}

.hero h1 em {
  font-style: normal;
  color: var(--teal);
}

.lead {
  font-size: 1.2rem;
  max-width: 730px;
}

.actions {
  display: flex;
  gap: .8rem;
  flex-wrap: wrap;
  margin-top: 1.8rem;
}

.ticks {
  display: flex;
  gap: 1.4rem;
  flex-wrap: wrap;
  margin-top: 2rem;
  font-weight: 700;
}

.ticks span:before {
  content: "";
  display: inline-block;
  width: .6rem;
  height: .6rem;
  background: var(--teal);
  border-radius: 50%;
  margin-right: .45rem;
}

/* --- Images & Photos --- */
.heroPhoto, 
.photo {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.heroPhoto img, 
.photo img {
  display: block;
  width: 100%;
  min-height: 430px;
  object-fit: cover;
  transition: .6s;
}

.heroPhoto:hover img, 
.photo:hover img {
  transform: scale(1.04);
}

/* --- Overlay Stats --- */
.stats {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .6rem;
}

.stats span {
  background: #071112c9;
  color: #b8c8ca;
  border-radius: 12px;
  padding: .8rem;
  backdrop-filter: blur(8px);
  font-size: .8rem;
}

.stats b {
  display: block;
  color: #fff;
}

/* --- Trust / Logo Section --- */
.trust {
  background: var(--surface);
  border-block: 1px solid var(--line);
}

.trustgrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.trustgrid div {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  padding: 1.4rem;
  border-right: 1px solid var(--line);
}

.trustgrid svg {
  color: var(--teal);
}

/* --- Content Sections --- */
.section, 
.darksection, 
.closing {
  padding: clamp(4.5rem, 8vw, 7rem) 0;
}

.alt {
  background: var(--surface);
}

.heading {
  max-width: 760px;
  margin-bottom: 2.5rem;
}

.eyebrow {
  font-size: .75rem;
  letter-spacing: .15em;
  font-weight: 800;
  color: var(--teal);
  margin: 0 0 1rem;
}

/* --- Bento Grid --- */
.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}

.tile {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.tile.wide {
  grid-column: span 2;
}

.tile img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: .6s;
}

.tile:hover img {
  transform: scale(1.06);
}

.shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent, #071112ed);
}

.tilecopy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.5rem;
  color: #fff;
}

.tilecopy svg {
  color: #65d5d9;
}

.tilecopy h3, 
.tilecopy h2 {
  font-size: 1.5rem;
}

.tilecopy p {
  color: #d4e0e1;
}

.tilecopy b {
  color: #76dfe2;
}

/* --- Dark Section & Split Layouts --- */
.darksection {
  background: #101b1e;
  color: #fff;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.checks, 
.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .8rem;
}

.checks span, 
.cards article {
  padding: 1rem;
  border: 1px solid #ffffff1f;
  background: #ffffff0b;
  border-radius: 14px;
}

.checks span {
  display: flex;
  gap: .6rem;
  align-items: center;
}

.cards article {
  background: var(--surface);
  border-color: var(--line);
  transition: .2s;
}

.cards article:hover {
  transform: translateY(-5px);
  border-color: var(--teal);
  box-shadow: var(--shadow);
}

/* --- Closing Section --- */
.closing {
  background: linear-gradient(135deg, #0c686c, #0b2023);
  color: #fff;
}

.closingrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.closingrow > div {
  max-width: 760px;
}

.closing p {
  color: #d2edee;
}

/* --- Process Section --- */
.process {
  background: #0b2225;
  color: #fff;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.process-grid article {
  border: 1px solid #ffffff20;
  padding: 1.4rem;
  border-radius: 20px;
  transition: .2s;
}

.process-grid article:hover {
  transform: translateY(-6px);
  background: #ffffff0c;
}

.empty {
  text-align: center;
  padding: 5rem;
  border: 1px dashed var(--line);
  border-radius: 24px;
}

/* --- Footer --- */
footer {
  background: #091315;
  color: #fff;
  padding: 4rem 0 1.5rem;
}

.foot {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
}

.foot > div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .55rem;
}

.foot h2 {
  font-size: .8rem;
  color: #78d7da;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.foot p {
  color: #9eb0b2;
}

.phone {
  font-size: 1.3rem;
  font-weight: 800;
}

.copy {
  border-top: 1px solid #293739;
  margin-top: 2rem;
  padding-top: 1rem;
  color: #809395;
}

/* --- Floating Components & Animations --- */
.float {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: .5rem;
  background: var(--orange);
  padding: .8rem 1rem;
  border-radius: 999px;
  font-weight: 800;
  color: #1d1306;
  box-shadow: var(--shadow);
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: .6s;
}

.reveal.show {
  opacity: 1;
  transform: none;
}

/* --- Media Queries (Desktop/Tablet) --- */
@media (max-width: 950px) {
  .nav {
    display: none;
    position: absolute;
    top: 78px;
    left: 0;
    right: 0;
    background: var(--surface);
    padding: 1rem;
    flex-direction: column;
    align-items: stretch;
  }

  .nav.open {
    display: flex;
  }

  .hamb {
    display: block;
    margin-left: auto;
  }

  .navcta {
    display: none;
  }

  .mega {
    position: static;
    width: 100%;
    grid-template-columns: 1fr;
    box-shadow: none;
  }

  .heroGrid, 
  .split {
    grid-template-columns: 1fr;
  }

  .bento {
    grid-template-columns: 1fr 1fr;
  }

  .tile.wide {
    grid-column: span 1;
  }

  .foot {
    grid-template-columns: 1fr 1fr;
  }

  .trustgrid {
    grid-template-columns: 1fr 1fr;
  }
}

/* --- Media Queries (Mobile) --- */
@media (max-width: 600px) {
  .bento, 
  .cards, 
  .checks, 
  .process-grid, 
  .foot, 
  .trustgrid {
    grid-template-columns: 1fr;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .closingrow {
    align-items: flex-start;
    flex-direction: column;
  }

  .float span {
    display: none;
  }
}

/* --- System Accessibility Prefs --- */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* Footer social links */
.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  align-items: center;
  margin-top: 1.1rem;
}

.footer-social a {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid
    color-mix(
      in srgb,
      var(--teal) 30%,
      var(--line)
    );
  border-radius: 11px;
  background:
    color-mix(
      in srgb,
      var(--teal) 7%,
      transparent
    );
  color: var(--teal);
  text-decoration: none;
  transition:
    color .18s ease,
    background .18s ease,
    border-color .18s ease,
    transform .18s ease;
}

.footer-social a:hover,
.footer-social a:focus-visible {
  transform: translateY(-2px);
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
}

.footer-social a:focus-visible {
  outline: 3px solid
    color-mix(
      in srgb,
      var(--teal) 25%,
      transparent
    );
  outline-offset: 3px;
}

.footer-social svg {
  display: block;
  width: 18px;
  height: 18px;
  fill: currentColor;
  stroke: none;
}

@media (max-width: 650px) {
  .footer-social {
    margin-top: .9rem;
  }

  .footer-social a {
    width: 40px;
    height: 40px;
  }
}

/* Moved from legal-pages.css - footer.php uses this bottom bar on every
   page, so it has to be in a file that loads everywhere, not one that
   only loads on privacy/terms. */
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #293739;
  color: #809395;
  font-size: .9rem;
}

.footer-legal {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.footer-legal a {
  color: #b7c7c9;
}

.footer-legal a:hover {
  color: #78d7da;
}

@media (max-width: 600px) {
  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-legal {
    gap: 1rem;
  }
}

/* Moved from services.css - the logo appears in nav.php and footer.php on
   every page, so it has to live in a file that loads everywhere. */
.logo-link, .footer-logo-link {
  display: inline-flex;
  align-items: center;
}

.site-logo {
  display: block;
  width: 168px;
  height: auto;
}

.footer-logo {
  display: block;
  width: 185px;
  height: auto;
}

@media (max-width: 650px) {
  .site-logo {
    width: 145px;
  }
}