/* =====================================================================
   I4SERV — design tokens
   Palette matches the official i4Serv brand colors: near-black ink,
   a rust-red accent, dark slate, warm gray and a cream ground.
   A green status LED for delivered work is kept as a functional signal
   color — it isn't part of the brand file, but "delivered" reads as
   green regardless of brand palette.
   Change these values to re-skin the whole site.
   ===================================================================== */

:root {
  --ink:      #001114;   /* panel dark — headings, header, footer */
  --slate:    #354546;   /* raised panel */
  --steel:    #707A76;   /* secondary text, hairlines — a darkened tint of
                             the brand warm-gray (AAB1AD), which is too
                             light on its own to pass text contrast */
  --steel-tint: #AAB1AD; /* the brand warm-gray itself, for non-text uses */
  --paper:    #FFFCF2;   /* brand cream ground */
  --card:     #FFFFFF;
  --line:     #E4E4DC;
  --signal:   #B2422E;   /* brand rust-red — buttons, focus, accents on light backgrounds */
  --signal-tint: #D9A197; /* lighter tint of the rust-red — the solid brand
                              red fails contrast as text directly on --ink
                              or --slate, so this is used there instead */
  --live:     #2FB380;   /* status LED — delivered (functional, not brand) */

  --display: 'Space Grotesk', system-ui, sans-serif;
  --body:    'Inter', system-ui, sans-serif;
  --mono:    'IBM Plex Mono', ui-monospace, monospace;

  --wrap: 1180px;
  --radius: 3px;         /* near-square: machined, not soft */
  --shadow: 0 1px 2px rgba(0, 17, 20, .06), 0 8px 24px rgba(0, 17, 20, .06);
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

body.is-locked { overflow: hidden; }

/* Keep in-page anchor targets clear of the pinned header */
html { scroll-padding-top: 6.5rem; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }

h1, h2, h3 { font-family: var(--display); line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); font-weight: 700; letter-spacing: -.02em; }
h2 { font-size: 1.4rem; font-weight: 600; }
h3 { font-size: 1.05rem; font-weight: 600; letter-spacing: .01em; }
p  { margin: 0 0 1rem; }
a  { color: inherit; }

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

/* ------------------------------------------------------------- page head */

.page-head {
  background: var(--ink);
  color: #fff;
  padding: 4.5rem 0 3.5rem;
  /* Faint grid: drafting paper, kept almost subliminal. */
  background-image:
    radial-gradient(ellipse 700px 400px at 90% 0%, rgba(178,66,46,.14), transparent 60%),
    linear-gradient(rgba(255,255,255,.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.028) 1px, transparent 1px);
  background-size: auto, 46px 46px, 46px 46px;
}

.eyebrow {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--signal-tint);
  margin-bottom: .9rem;
}

.page-head h1 { max-width: 20ch; }
.lede { max-width: 60ch; color: #C7CCC5; font-size: 1.06rem; }

/* -------------------------------------------------------------- controls */

.library { padding: 2.5rem 0 5rem; }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.filter {
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .04em;
  padding: .5rem .9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--steel);
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}

.filter:hover { color: var(--ink); border-color: var(--steel); }

.filter.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.results-line {
  font-family: var(--mono);
  font-size: .76rem;
  color: var(--steel);
  padding: 1rem 0 1.5rem;
  min-height: 2.4rem;
}

/* ----------------------------------------------------------------- cards */

.grid { display: grid; gap: 1.25rem; }

/* Rows rather than columns: technical titles need the width, and the
   tag strip reads like an instrument label at this size. */
.card {
  display: grid;
  grid-template-columns: 300px 1fr;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(0,17,20,.08), 0 16px 36px rgba(0,17,20,.10);
}

.card-media { display: block; background: var(--slate); overflow: hidden; }
.card-media img { width: 100%; height: 100%; min-height: 210px; object-fit: cover; display: block; }

.card-media-empty {
  display: grid;
  place-items: center;
  height: 100%;
  min-height: 210px;
  font-family: var(--display);
  font-size: 2rem;
  color: rgba(255,255,255,.18);
}

.card-body { padding: 1.5rem 1.75rem; display: flex; flex-direction: column; }

.chip {
  display: inline-block;
  align-self: flex-start;
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--steel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .2rem .55rem;
  margin-bottom: .85rem;
}

.card-title { font-size: 1.22rem; margin-bottom: .5rem; }
.card-title a { text-decoration: none; }
.card-title a:hover { color: var(--slate); text-decoration: underline; text-underline-offset: 3px; }

.card-tagline { color: var(--steel); font-size: .93rem; margin-bottom: 1.15rem; }

/* Signature element: the HMI-style tag readout. */
.tagstrip {
  display: flex;
  flex-wrap: wrap;
  gap: 0 2rem;
  margin: auto 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.tagstrip div { display: flex; flex-direction: column; }

.tagstrip dt {
  font-family: var(--mono);
  font-size: .64rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--steel);
}

.tagstrip dd {
  font-family: var(--mono);
  font-size: .82rem;
  margin: 0;
  display: flex;
  align-items: center;
  gap: .4rem;
}

.led {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 0 3px rgba(47,179,128,.18);
}

.tagstrip-wide { margin: 1rem 0 2rem; border-top: 0; border-bottom: 1px solid var(--line); padding-bottom: 1rem; }

/* Loading placeholders keep the layout from jumping. */
.skeleton { min-height: 212px; border-style: dashed; box-shadow: none; background: #ECEAE1; }
@media (prefers-reduced-motion: no-preference) {
  .skeleton { animation: pulse 1.4s ease-in-out infinite; }
  @keyframes pulse { 50% { opacity: .55; } }
}

.empty { padding: 3rem 0; color: var(--steel); text-align: center; }

.linklike {
  background: none; border: 0; padding: 0;
  color: var(--ink); font: inherit;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}

/* ----------------------------------------------------------------- pager */

.pager { display: flex; justify-content: center; gap: .4rem; margin-top: 2.5rem; }

.page-btn {
  font-family: var(--mono);
  font-size: .82rem;
  min-width: 2.6rem;
  padding: .55rem .75rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--steel);
  cursor: pointer;
  transition: border-color .15s, color .15s;
}

.page-btn:hover:not(:disabled) { border-color: var(--steel); color: var(--ink); }
.page-btn:disabled { opacity: .38; cursor: not-allowed; }

.page-btn.is-current {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.page-arrow { letter-spacing: .04em; }

/* ------------------------------------------------------- detail sheet */

.sheet { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 1.5rem; }
.sheet[hidden] { display: none; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0,17,20,.62); }

.sheet-panel {
  position: relative;
  background: var(--card);
  border-radius: var(--radius);
  width: min(100%, 780px);
  max-height: 88vh;
  overflow-y: auto;
  padding: 2.5rem;
  box-shadow: 0 24px 64px rgba(0,17,20,.3);
}

.sheet-close {
  position: absolute; top: .75rem; right: 1rem;
  background: none; border: 0;
  font-size: 1.9rem; line-height: 1;
  color: var(--steel); cursor: pointer;
}

.sheet-loading { padding: 3rem 0; text-align: center; color: var(--steel); font-family: var(--mono); font-size: .85rem; }
.sheet-panel h2 { font-size: 1.7rem; }
.sheet-panel h3 { margin-top: 1.75rem; color: var(--slate); }

.deliveries { padding-left: 0; list-style: none; }
.deliveries li { position: relative; padding-left: 1.4rem; margin-bottom: .45rem; }
.deliveries li::before {
  content: ''; position: absolute; left: 0; top: .62em;
  width: 6px; height: 6px; background: var(--signal); border-radius: 1px;
}

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .6rem; margin-top: 1.75rem; }
.gallery img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius); display: block; }

.sheet-cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }

.btn {
  display: inline-block;
  font-family: var(--mono);
  font-size: .82rem;
  letter-spacing: .04em;
  padding: .8rem 1.4rem;
  background: var(--ink);
  color: #fff;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, border-color .15s ease;
}

button.btn { cursor: pointer; appearance: none; }
.btn:hover { background: var(--slate); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,17,20,.15); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--paper); border-color: var(--steel); }

/* ----------------------------------------------------------- responsive */

@media (max-width: 860px) {
  .card { grid-template-columns: 1fr; }
  .card-media img, .card-media-empty { min-height: 190px; }
  .card-body { padding: 1.25rem; }
  .page-head { padding: 3rem 0 2.5rem; }
  .sheet { padding: 0; }
  .sheet-panel { max-height: 100vh; height: 100%; padding: 3.25rem 1.35rem 2rem; border-radius: 0; }
  .tagstrip { gap: .75rem 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
}

/* =====================================================================
   Site header
   ===================================================================== */

/* Sticky has to live on the #site-header WRAPPER, not on .site-header itself.
   The header markup is fetched and injected into that wrapper div, and a
   sticky element can never escape its containing block - the wrapper is only
   as tall as the header, so sticky on the inner element had no room to move
   and the header just scrolled away. */
#site-header {
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header {
  /* Semi-transparent + blur, so hero content softly shows through */
  background: rgba(255,255,255,.88);
  -webkit-backdrop-filter: blur(14px) saturate(1.6);
  backdrop-filter: blur(14px) saturate(1.6);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(0,17,20,.04);
  transition: background-color .28s ease, border-color .28s ease, box-shadow .28s ease;
}

/* Scrolled: more opaque, tighter, and lifted off the page */
#site-header.is-stuck .site-header {
  background: rgba(255,255,255,.95);
  border-bottom-color: rgba(0,17,20,.1);
  box-shadow: 0 1px 0 rgba(0,17,20,.05), 0 10px 30px rgba(0,17,20,.1);
}

/* Fallback for browsers without backdrop-filter: stay fully opaque, since a
   translucent header over scrolling content would be unreadable. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header,
  #site-header.is-stuck .site-header { background: #fff; }
}

.site-header-row {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  padding: .6rem 0;
  transition: padding .28s ease;
}
#site-header.is-stuck .site-header-row { padding: .3rem 0; }

.brand-mark {
  display: inline-flex;
  align-items: center;
  margin-right: auto;
  line-height: 0;
}
.brand-mark img { display: block; height: 78px; width: auto; transition: height .28s ease; }
/* Shrink once scrolled so the sticky bar keeps less of the viewport */
#site-header.is-stuck .brand-mark img { height: 50px; }
.brand-name { font-family: var(--display); font-weight: 700; letter-spacing: .04em; font-size: 1.15rem; }
.brand-sub { font-family: var(--mono); font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; color: var(--signal); }

.main-nav { display: flex; align-items: center; gap: 1.6rem; }
.main-nav > a, .nav-drop-trigger {
  color: var(--steel);
  text-decoration: none;
  font-size: .92rem;
  background: none;
  border: 0;
  font: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .3rem 0;
}
.main-nav > a:hover, .nav-drop-trigger:hover { color: var(--ink); }
.main-nav > a.is-current { color: var(--ink); box-shadow: inset 0 -2px 0 var(--signal); }
.nav-drop-trigger svg { transition: transform .15s; }
.nav-drop.is-open .nav-drop-trigger svg { transform: rotate(180deg); }

.nav-drop { position: relative; }
.nav-drop-panel {
  position: absolute;
  top: calc(100% + .9rem);
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  color: var(--ink);
  border-radius: var(--radius);
  box-shadow: 0 20px 48px rgba(0,17,20,.22);
  padding: .5rem;
  min-width: 230px;
  display: none;
  flex-direction: column;
}
.nav-drop.is-open .nav-drop-panel { display: flex; }
.nav-drop-panel a {
  padding: .6rem .75rem;
  border-radius: 2px;
  text-decoration: none;
  color: var(--ink);
  font-size: .9rem;
}
.nav-drop-panel a:hover { background: var(--paper); }

.header-cta { display: flex; align-items: center; gap: 1.25rem; }

.btn-signal { background: var(--signal); border-color: var(--signal); color: #fff; font-weight: 600; }
.btn-signal:hover { background: #96351f; border-color: #96351f; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; width: 18px; margin: 0 auto; background: var(--ink); }

.main-nav-mobile {
  display: none;
  flex-direction: column;
  padding: .5rem 1.25rem 1.25rem;
  border-top: 1px solid var(--line);
  /* Nine links can outrun a short phone screen now the header is pinned */
  max-height: calc(100vh - 5rem);
  overflow-y: auto;
  background: #fff;
}
.main-nav-mobile a { color: var(--steel); text-decoration: none; padding: .65rem 0; border-bottom: 1px solid var(--line); }
.main-nav-mobile a:hover { color: var(--ink); }
.main-nav-mobile:not([hidden]) { display: flex; }

@media (max-width: 940px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
}
@media (min-width: 941px) {
  .main-nav-mobile { display: none !important; }
}

/* =====================================================================
   Site footer
   ===================================================================== */

.site-footer { background: var(--ink); color: #C7CCC5; margin-top: 4rem; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding: 3.5rem 0 2.5rem;
}
.footer-brand p { max-width: 34ch; font-size: .92rem; }
.footer-col h3 {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--signal-tint);
  margin-bottom: 1rem;
}
.footer-col { display: flex; flex-direction: column; }
.footer-col a { color: #C7CCC5; text-decoration: none; font-size: .9rem; padding: .3rem 0; }
.footer-col a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 1.25rem 0;
  font-size: .8rem;
  color: #8B948E;
}

@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* =====================================================================
   Hero (homepage)
   ===================================================================== */

.hero {
  position: relative;
  background: var(--ink);
  color: #fff;
  padding: 6.5rem 0 7rem;
  overflow: hidden;
  background-image:
    linear-gradient(rgba(255,255,255,.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.028) 1px, transparent 1px);
  background-size: 46px 46px;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(ellipse 900px 550px at 85% 0%, rgba(178,66,46,.22), transparent 60%);
  animation: heroGlowBreathe 6s ease-in-out infinite;
}
/* Shrinkable so the text column keeps its width on mid-size screens; the
   viewBox means the whole scene just scales down cleanly. */
.hero-graphic {
  flex: 0 1 300px;
  min-width: 210px;
  aspect-ratio: 1 / 1;
  transform: translateY(var(--parallax, 0px));
  opacity: .95;
  pointer-events: none;
  transition: transform .05s linear;
}

/* Control cabinet + HMI screen panels. Strokes are deliberately heavy:
   the 460-unit viewBox renders at ~300px, so anything under ~2 units
   thins out to sub-pixel and disappears. */
.hg-panel { fill: rgba(255,255,255,.04); stroke: rgba(255,255,255,.34); stroke-width: 2; }
.hg-panel-label { fill: rgba(255,255,255,.5); font-family: var(--mono); font-size: 11px; letter-spacing: .08em; }
.hg-panel-div { stroke: rgba(255,255,255,.2); stroke-width: 1.4; }
.hg-terminal { stroke: rgba(255,255,255,.32); stroke-width: 2; }

/* PLC I/O cards; the CPU card gets the brand red top band */
.hg-module { fill: rgba(255,255,255,.05); stroke: rgba(255,255,255,.24); stroke-width: 1.4; }
.hg-module-band { fill: rgba(255,255,255,.26); }
.hg-module-band.is-cpu { fill: var(--signal); }

.hg-led { fill: rgba(255,255,255,.2); animation: heroLedBlink 3.2s ease-in-out infinite; }
.hg-led.is-signal { fill: var(--live); }

.hg-screen-bar { fill: rgba(255,255,255,.16); }
.hg-tank-outline { fill: none; stroke: rgba(255,255,255,.38); stroke-width: 2; }
.hg-tank-fill { fill: var(--live); animation: heroTankLevel 5s ease-in-out infinite; }

.hg-pipe { fill: none; stroke: rgba(255,255,255,.38); stroke-width: 2.6; stroke-linecap: round; }
.hg-valve { fill: rgba(255,255,255,.22); stroke: rgba(255,255,255,.42); stroke-width: 1.4; }
.hg-grid { stroke: rgba(255,255,255,.1); stroke-width: 1; }
.hg-trend-area { fill: rgba(47,179,128,.14); }
.hg-trend { fill: none; stroke: var(--live); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }

/* Meshed gears, solid and two-tone like the I4SERV mark. Tooth counts are
   12:8, so the small gear spins 1.5x faster for the mesh to read right. */
.hg-gear { transform-box: view-box; }
.hg-gear path { fill-rule: evenodd; }
.hg-gear-big { transform-origin: 150px 300px; animation: heroGearSpin 18s linear infinite; }
.hg-gear-big path { fill: rgba(255,255,255,.16); stroke: rgba(255,255,255,.3); stroke-width: 1.2; }
.hg-gear-small { transform-origin: 237px 330px; animation: heroGearSpinReverse 12s linear infinite; }
.hg-gear-small path { fill: rgba(178,66,46,.85); stroke: rgba(217,161,151,.35); stroke-width: 1.2; }
/* Static — a shaft doesn't turn with its gear */
.hg-gear-shaft { fill: var(--ink); stroke: rgba(255,255,255,.38); stroke-width: 1.8; }

/* Conveyor */
.hg-belt { fill: rgba(255,255,255,.04); stroke: rgba(255,255,255,.32); stroke-width: 2; }
.hg-belt-mark { stroke: rgba(255,255,255,.16); stroke-width: 1.4; }
.hg-conveyor-box { fill: var(--signal); animation: heroConveyorMove 3.2s linear infinite; }

/* Connecting signal traces */
.hero .hg-line-live {
  fill: none;
  stroke: var(--signal);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 9 12;
  animation: heroDashFlow 3.5s linear infinite;
}
.hero .hg-node-live { fill: var(--signal); animation: heroNodePulse 2.4s ease-in-out infinite; }
.hero .hg-node-live.is-delay1 { animation-delay: .5s; }
.hero .hg-node-live.is-delay2 { animation-delay: 1s; }

/* Hero layout: PLC/SCADA scene (left) - text (flexible middle) - project
   photo slideshow (right). The row runs wider than the site's normal --wrap
   so all three columns get real room; the hero is a full-bleed dark band,
   so a wider inner measure here reads as intentional. */
.hero-row {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  /* Overrides .wrap's own width, which is set as `width` not `max-width` */
  width: min(100% - 2.5rem, 1460px);
}

.hero-inner { position: relative; z-index: 1; flex: 1 1 690px; min-width: 0; max-width: 690px; }
.hero .eyebrow { animation: heroFadeUp .6s ease both; }
.hero h1 { animation: heroFadeUp .7s ease .08s both; }
.hero .lede { max-width: 60ch; animation: heroFadeUp .7s ease .16s both; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.75rem; animation: heroFadeUp .7s ease .24s both; }
/* .page-head as well as .hero: both sit on --ink, and the base .btn-ghost is
   near-black text, which rendered as an invisible empty outline on the
   service page headers. */
.hero .btn-ghost,
.page-head .btn-ghost { border-color: rgba(255,255,255,.3); color: #fff; }
.hero .btn-ghost:hover,
.page-head .btn-ghost:hover { background: rgba(255,255,255,.08); border-color: #fff; }

/* Project photo slideshow: cross-fades, vignette-masked and dimmed so
   photos read as part of the hero rather than a pasted-in gallery. */
.hero-slideshow {
  flex: none;
  width: 375px;
  height: 420px;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(160deg, var(--slate), var(--ink));
}
.hero-slideshow img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.8s ease;
  filter: saturate(1.05) brightness(.82) contrast(1.05);
  -webkit-mask-image: radial-gradient(ellipse 62% 62% at 50% 50%, #000 40%, transparent 92%);
  mask-image: radial-gradient(ellipse 62% 62% at 50% 50%, #000 40%, transparent 92%);
}
.hero-slideshow img.is-active { opacity: .7; }

@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes heroGlowBreathe {
  0%, 100% { opacity: .75; }
  50%      { opacity: 1; }
}
@keyframes heroDashFlow {
  to { stroke-dashoffset: -66; }
}
@keyframes heroNodePulse {
  0%, 100% { opacity: .55; r: 5; }
  50%      { opacity: 1; r: 7; }
}
@keyframes heroLedBlink {
  0%, 70%, 100% { opacity: .25; }
  85%           { opacity: 1; }
}
/* Fills upward from a fixed floor at y=114 (the tank's inner base) */
@keyframes heroTankLevel {
  0%, 100% { y: 98px; height: 16px; }
  50%      { y: 68px; height: 46px; }
}
@keyframes heroGearSpin {
  to { transform: rotate(360deg); }
}
/* Starts at 22.5deg (half a tooth pitch) so this gear's teeth sit in the
   big gear's gaps. Used only by .hg-gear-small. */
@keyframes heroGearSpinReverse {
  from { transform: rotate(22.5deg); }
  to   { transform: rotate(-337.5deg); }
}
@keyframes heroConveyorMove {
  0%   { transform: translateX(0); opacity: 0; }
  10%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { transform: translateX(330px); opacity: 0; }
}

@media (max-width: 1150px) {
  .hero-graphic,
  .hero-slideshow { display: none; }
}

/* =====================================================================
   Stats band
   ===================================================================== */

.stats-band { background: var(--slate); color: #fff; padding: 2.75rem 0; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; text-align: center; }
.stat-figure {
  font-family: var(--mono);
  font-size: clamp(2.1rem, 5vw, 3rem);
  font-weight: 500;
  color: var(--signal-tint);
  display: block;
  line-height: 1;
  margin-bottom: .5rem;
}
.stat-label { font-size: .88rem; color: #C7CCC5; }

@media (max-width: 640px) {
  .stats-grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* =====================================================================
   Generic content sections
   ===================================================================== */

.section { padding: 5.5rem 0; }
.section-tight { padding: 3rem 0; }
.section-alt { background: #fff; }
.section-head { max-width: 62ch; margin-bottom: 2.5rem; }
.section-head .eyebrow { color: var(--signal); }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.split-reverse .split-media { order: 2; }
.split-media img { width: 100%; border-radius: var(--radius); display: block; box-shadow: var(--shadow); }
.split-media-placeholder {
  aspect-ratio: 4/3;
  background: var(--slate);
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  color: rgba(255,255,255,.25);
  font-family: var(--display);
  font-size: 2rem;
}

@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; gap: 2rem; }
  .split-reverse .split-media { order: 0; }
}

/* Checklist used across service and about pages. */
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { position: relative; padding-left: 1.6rem; margin-bottom: .65rem; }
.checklist li::before {
  content: '';
  position: absolute; left: 0; top: .5em;
  width: 8px; height: 8px;
  background: var(--live);
  border-radius: 1px;
}

/* -------------------------------------------------------- service cards */

/* minmax(0, 1fr) not 1fr: plain `1fr` means minmax(auto, 1fr), so one long
   unbreakable string (a team member's email, say) can widen its track and
   throw the columns out of alignment. */
.services-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.service-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 2px 4px rgba(0,17,20,.08), 0 20px 40px rgba(0,17,20,.12);
  border-color: var(--signal);
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: var(--radius);
  background: rgba(178,66,46,.08);
  color: var(--signal);
  margin-bottom: 1.15rem;
  transition: background-color .18s ease;
}
.card-icon svg { width: 24px; height: 24px; }
.service-card:hover .card-icon { background: var(--signal); color: #fff; }

.service-card .tag {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 1rem;
}
.service-card h3 { font-size: 1.15rem; }
.service-card p { color: var(--steel); font-size: .92rem; margin-bottom: 1.25rem; }
.service-card .card-link { margin-top: auto; font-family: var(--mono); font-size: .82rem; color: var(--ink); }

.testimonial-card { margin: 0; position: relative; }
.testimonial-card::before {
  content: '\201C';
  position: absolute;
  top: 1rem;
  right: 1.4rem;
  font-family: var(--display);
  font-size: 3.2rem;
  line-height: 1;
  color: var(--line);
}
.testimonial-card p { font-style: italic; position: relative; z-index: 1; }
.testimonial-card .card-link { color: var(--steel); font-style: normal; }

@media (max-width: 940px) {
  .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .services-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ------------------------------------------------------------- team cards */

.team-card { align-items: center; text-align: center; }

.team-avatar {
  display: block;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 1rem;
  background: var(--slate);
}
.team-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.team-avatar-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: #fff;
  font-family: var(--display);
  font-size: 1.15rem;
}

.team-card.skeleton { min-height: 180px; }

/* Optional per-member email/phone, rendered only when filled in */
.team-contacts {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  margin-top: .9rem;
  width: 100%;
}
.team-contact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  font-size: .875rem;
  /* --slate (10.0:1 on white), not --steel: at 14px --steel only reaches
     4.44:1, just under the 4.5:1 WCAG AA minimum for normal-size text. */
  color: var(--slate);
  text-decoration: none;
  /* Long addresses shouldn't stretch the card */
  min-width: 0;
}
.team-contact span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.team-contact svg {
  flex: none;
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.team-contact:hover { color: var(--signal); text-decoration: underline; }
.team-contact:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }

/* ------------------------------------------------------------- contact */

.contact-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 3rem; align-items: start; }
.contact-info { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 2.5rem; }
.contact-info h3 { color: #fff; font-size: 1.1rem; }
.contact-info dl { margin: 1.5rem 0 0; }
.contact-info dt { font-family: var(--mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--signal-tint); margin-bottom: .3rem; }
.contact-info dd { margin: 0 0 1.4rem; }
.contact-info a { color: #fff; text-decoration: none; }
.contact-info a:hover { text-decoration: underline; }

.contact-form { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 2.5rem; box-shadow: var(--shadow); }
.contact-form label { display: block; font-weight: 600; font-size: .88rem; margin: 1.1rem 0 .35rem; }
.contact-form label:first-of-type { margin-top: 0; }
.contact-form input, .contact-form textarea {
  width: 100%;
  padding: .7rem .85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
  background: #fff;
  color: var(--ink);
}
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--slate); outline: 2px solid var(--signal); outline-offset: 1px; }
.contact-form textarea { resize: vertical; }
.contact-form button { margin-top: 1.5rem; }
.form-note { font-size: .82rem; color: var(--steel); margin-top: .75rem; }

@media (max-width: 860px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------- misc pages */

.breadcrumbs { font-family: var(--mono); font-size: .76rem; color: #C7CCC5; margin-bottom: 1rem; }
.breadcrumbs a { color: #C7CCC5; text-decoration: none; }
.breadcrumbs a:hover { color: #fff; }

.cta-band { background: var(--ink); color: #fff; padding: 4rem 0; text-align: center; }
.cta-band h2 { color: #fff; max-width: 30ch; margin-inline: auto; }
.cta-band .btn-signal { margin-top: 1.25rem; }

.social-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,.1);
}
.social-row-label {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #C7CCC5;
  margin-right: .4rem;
}
.social-row a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50%;
  color: #C7CCC5;
  transition: color .15s ease, border-color .15s ease, background-color .15s ease, transform .15s ease;
}
.social-row a svg { width: 18px; height: 18px; }
.social-row a:hover { color: #fff; border-color: var(--signal); background: var(--signal); transform: translateY(-2px); }
