/* =====================================================================
   Energy Inspection Services LLC
   Design system: "Above the Clouds" (Montfort-inspired)
   Pale, ethereal, cinematic. Layered misty ridges, drifting cloud,
   scroll-driven descent. Vanilla CSS, no build step.
   ===================================================================== */

/* ----------------------------- Fonts ------------------------------ */
/* Self-hosted variable fonts (latin subset), served from /assets with a
   long immutable cache. One file per family covers every weight in use. */
@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url("../fonts/jost-var-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/inter-var-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ----------------------------- Tokens ----------------------------- */
:root {
  /* Brand blues */
  --accent: #2f6cab;
  --accent-deep: #1d4e85;
  --accent-soft: #6f99c6;

  /* Sky + cloud */
  --sky-1: #c4cfd8;
  --sky-2: #dde6ec;
  --sky-3: #eef3f6;
  --cloud: #ffffff;

  /* Paper / surfaces */
  --paper: #eef2f5;
  --paper-2: #e5ecf0;
  --card: #ffffff;

  /* Ink / text */
  --ink: #16304b;
  --text: #233c54;
  --text-dim: #57718a;
  --text-faint: #586f84; /* lightest blue-gray that holds 4.5:1 on --paper */
  --slate: #51708d;

  /* Lines */
  --line: rgba(29, 61, 92, 0.12);
  --line-soft: rgba(29, 61, 92, 0.08);

  /* Type */
  --font-display: "Jost", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;

  /* Geometry */
  --radius: 14px;
  --radius-lg: 22px;
  --container: 1240px;
  --gutter: clamp(20px, 5vw, 64px);

  /* Motion */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  /* Shadow */
  --shadow: 0 22px 60px rgba(29, 61, 92, 0.1);
  --shadow-soft: 0 12px 30px rgba(29, 61, 92, 0.07);
}

/* ----------------------------- Reset ------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
ul { list-style: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ----------------------------- Base ------------------------------- */
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--paper);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Soft atmospheric base */
body::before {
  content: "";
  position: fixed; inset: 0;
  z-index: -3;
  background:
    radial-gradient(120% 90% at 50% -10%, var(--sky-3), transparent 55%),
    linear-gradient(180deg, #eaf0f4 0%, var(--paper) 40%, var(--paper-2) 100%);
}

/* Subtle paper grain */
body::after {
  content: "";
  position: fixed; inset: 0;
  z-index: 200;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.skip-link {
  position: absolute; left: 50%; top: -60px; transform: translateX(-50%);
  background: var(--accent); color: #fff; padding: 10px 18px; border-radius: 999px;
  font-weight: 600; z-index: 300; transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 14px; }

/* Neutralize legacy dark glow blobs */
.backlight { display: none !important; }
.glow-text { text-shadow: none; }

/* --------------------------- Layout ------------------------------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { position: relative; padding-block: clamp(80px, 12vw, 160px); }
.section--tight { padding-block: clamp(56px, 8vw, 100px); }

.rule {
  height: 1px; border: 0;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}

/* --------------------------- Typography --------------------------- */
.eyebrow {
  font-family: var(--font-display);
  font-size: 0.74rem; font-weight: 500;
  letter-spacing: 0.34em; text-transform: uppercase;
  color: var(--accent);
  display: inline-flex; align-items: center; gap: 14px;
}
.eyebrow::before { content: ""; width: 30px; height: 1px; background: var(--accent-soft); }
.eyebrow--center { justify-content: center; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400; line-height: 1.12; color: var(--ink);
}
h1 {
  font-size: clamp(2.3rem, 6vw, 4.6rem); font-weight: 400;
  letter-spacing: 0.05em; text-transform: uppercase;
}
h2 {
  font-size: clamp(1.7rem, 3.8vw, 3rem); font-weight: 400;
  letter-spacing: 0.05em; text-transform: uppercase;
}
h3 { font-size: clamp(1.2rem, 2.2vw, 1.55rem); font-weight: 500; letter-spacing: 0.01em; }
.lede {
  font-size: clamp(1.02rem, 1.5vw, 1.24rem); color: var(--text-dim);
  max-width: 62ch; line-height: 1.75; font-weight: 400;
}
.section-head { max-width: 780px; margin-bottom: clamp(40px, 6vw, 72px); }
.section-head .lede { margin-top: 22px; }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .eyebrow { justify-content: center; }

.text-lime { color: var(--accent); }

/* ----------------------------- Header ----------------------------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 90;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 20px var(--gutter);
  transition: background 0.4s var(--ease), backdrop-filter 0.4s var(--ease),
              border-color 0.4s var(--ease), padding 0.4s var(--ease), box-shadow 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--line-soft);
  padding-block: 13px;
  box-shadow: 0 8px 30px rgba(29, 61, 92, 0.05);
}

.brand { display: inline-flex; align-items: center; gap: 13px; }
.brand img { width: 40px; height: 40px; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-text strong {
  font-family: var(--font-display); font-weight: 500; font-size: 1.4rem;
  letter-spacing: 0.18em; color: var(--ink);
}
.brand-text span {
  font-family: var(--font-display); font-size: 0.54rem; letter-spacing: 0.32em;
  text-transform: uppercase; color: var(--accent); margin-top: 5px; font-weight: 500;
}

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  position: relative; padding: 10px 14px;
  font-family: var(--font-display); font-size: 0.78rem; font-weight: 400;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-dim);
  transition: color 0.25s var(--ease);
}
.nav a::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 1px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.nav a:hover, .nav a.is-active { color: var(--ink); }
.nav a:hover::after, .nav a.is-active::after { transform: scaleX(1); }

.nav-cta {
  margin-left: 12px; padding: 11px 22px !important; border-radius: 999px;
  background: var(--accent); color: #fff !important; font-weight: 500;
  transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease), transform 0.3s var(--ease) !important;
}
.nav-cta::after { display: none; }
.nav-cta:hover { background: var(--accent-deep); box-shadow: 0 10px 26px rgba(47, 108, 171, 0.3); transform: translateY(-1px); }

.nav-toggle {
  display: none; width: 46px; height: 46px; border-radius: 12px;
  border: 1px solid var(--line); align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.7);
}
.nav-toggle span { position: relative; width: 20px; height: 2px; background: var(--ink); transition: background 0.2s; }
.nav-toggle span::before, .nav-toggle span::after {
  content: ""; position: absolute; left: 0; width: 20px; height: 2px; background: var(--ink);
  transition: transform 0.3s var(--ease);
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

/* ----------------------------- Buttons ---------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 30px; border-radius: 999px;
  font-family: var(--font-display); font-weight: 500; font-size: 0.82rem;
  letter-spacing: 0.16em; text-transform: uppercase;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease),
              background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.btn svg { width: 17px; height: 17px; transition: transform 0.3s var(--ease); }
.btn:hover svg { transform: translateX(4px); }

.btn--primary { background: var(--accent); color: #fff; box-shadow: 0 12px 30px rgba(47, 108, 171, 0.22); }
.btn--primary:hover { background: var(--accent-deep); transform: translateY(-2px); box-shadow: 0 16px 40px rgba(47, 108, 171, 0.32); }

.btn--ghost { background: rgba(255, 255, 255, 0.6); color: var(--ink); border: 1px solid var(--line); backdrop-filter: blur(6px); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-soft); }

/* ===================================================================
   CINEMATIC HERO  (.cine): scroll-driven descent through the clouds
   =================================================================== */
.cine { position: relative; height: 340vh; }
.cine__stage { position: sticky; top: 0; height: 100vh; overflow: hidden; }

.cine__sky {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, var(--sky-1) 0%, var(--sky-2) 45%, var(--sky-3) 100%);
}

.cine__peaks {
  position: absolute; inset: -2%;
  background: url("../img/hero-clouds.jpg") center 52% / cover no-repeat;
  filter: saturate(0.95) brightness(1.06) contrast(0.97);
  will-change: transform; transform-origin: 50% 50%;
}
/* ambient backdrop video (desktop); photo background is the poster/fallback */
.cine__video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0; pointer-events: none;
}
/* gentle, monotonic top veil for legibility (clear by mid-screen, no banding) */
.cine__peaks::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(244,247,249,0.4) 0%, rgba(244,247,249,0) 52%);
}
/* save data + dodge mobile autoplay quirks: photo fallback on small screens */
@media (max-width: 900px) { .cine__video { display: none; } }
@media (prefers-reduced-motion: reduce) { .cine__video { display: none; } }
/* phones get the 1100px hero variant (roughly half the bytes) */
@media (max-width: 700px) { .cine__peaks { background-image: url("../img/hero-clouds-m.jpg"); } }

/* The drifting cloud motion now lives in the backdrop video. For the scroll
   "descent" we use a single smooth white wash (a gradient, no texture) so there
   are no layer edges/banding lines as you scroll. */
.cine__cloud { position: absolute; inset: 0; pointer-events: none; will-change: opacity; }
.cine__cloud--back, .cine__cloud--mid { display: none; }
.cine__cloud--front {
  background: linear-gradient(180deg, transparent 0%, transparent 26%, rgba(245, 248, 250, 0.9) 72%, rgba(238, 242, 245, 1) 100%);
  opacity: 0;
}
@keyframes drift { to { background-position-x: -1200px; } }

.cine__brand {
  position: absolute; left: 0; right: 0; top: 38%; transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 22px;
  text-align: center; will-change: transform, opacity; padding-inline: 20px;
}
.cine__brand::before {
  content: ""; position: absolute; left: 50%; top: 48%; transform: translate(-50%, -50%);
  width: 130%; height: 165%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(244, 248, 250, 0.85), rgba(244, 248, 250, 0) 72%);
}
.cine__mark { width: clamp(56px, 8vw, 88px); height: auto; filter: drop-shadow(0 6px 20px rgba(29, 61, 92, 0.18)); }
.cine__word {
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(2.6rem, 9vw, 7rem); letter-spacing: 0.42em;
  color: var(--accent-deep); text-indent: 0.42em; line-height: 1;
}
.cine__sub {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(0.7rem, 1.4vw, 0.95rem); letter-spacing: 0.5em;
  text-transform: uppercase; color: var(--accent);
  text-shadow: 0 1px 14px rgba(244, 247, 249, 0.95);
}

.cine__statements { position: absolute; inset: 0; pointer-events: none; }
.cine__line {
  position: absolute; top: 50%; left: 50%;
  width: min(90vw, 22ch);
  font-family: var(--font-display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(1.4rem, 4vw, 3.2rem); letter-spacing: 0.1em; line-height: 1.2;
  color: var(--accent-deep); text-align: center;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5), 0 4px 34px rgba(238, 242, 245, 0.98);
  opacity: 0; transform: translate(-50%, calc(-50% + 40px)); will-change: opacity, transform;
}

.cine__cue {
  position: absolute; left: 50%; bottom: 34px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  font-family: var(--font-display); font-size: 0.66rem; letter-spacing: 0.34em;
  text-transform: uppercase; color: #6a849c;
  will-change: opacity;
}
.cine__cue .bar { width: 1px; height: 50px; background: linear-gradient(var(--accent-soft), transparent); position: relative; overflow: hidden; }
.cine__cue .bar::after { content: ""; position: absolute; top: -50%; left: 0; width: 1px; height: 50%; background: var(--accent); animation: cueDrop 2s var(--ease) infinite; }
@keyframes cueDrop { 0% { top: -50%; } 60%, 100% { top: 100%; } }

/* fade the bottom of the cine into the page */
.cine__stage::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 24vh;
  background: linear-gradient(180deg, transparent, var(--paper));
  pointer-events: none; z-index: 5;
}

/* ----------------------- Interior page hero ----------------------- */
.page-hero {
  position: relative; overflow: hidden;
  padding-top: clamp(180px, 26vw, 300px); padding-bottom: clamp(80px, 12vw, 150px);
  background: linear-gradient(180deg, var(--sky-1), var(--sky-2) 55%, var(--sky-3));
}
.page-hero__media { position: absolute; inset: 0; z-index: 0; }
.page-hero__media::before {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(238,242,245,0.5) 0%, rgba(238,242,245,0.5) 46%, rgba(238,242,245,0.76) 82%, var(--paper) 100%),
    var(--hero, url("../img/page-clouds.jpg")) center 45% / cover no-repeat;
  filter: saturate(0.9) brightness(1.05) contrast(0.97);
}
.page-hero__media::after {
  content: ""; position: absolute; left: -10%; right: -10%; bottom: -4%; height: 46%;
  background: url("../img/clouds.svg") repeat-x bottom center; background-size: auto 100%;
  animation: drift 75s linear infinite; opacity: 0.9;
}
/* phones get the 1100px hero variant via --hero-m (set inline per page) */
@media (max-width: 700px) {
  .page-hero__media::before {
    background-image:
      linear-gradient(180deg, rgba(238,242,245,0.5) 0%, rgba(238,242,245,0.5) 46%, rgba(238,242,245,0.76) 82%, var(--paper) 100%),
      var(--hero-m, var(--hero, url("../img/page-clouds-m.jpg")));
  }
}
.page-hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 18%;
  background: linear-gradient(180deg, transparent, var(--paper)); z-index: 1;
}
.page-hero__inner { position: relative; z-index: 2; max-width: 840px; }
.page-hero h1 { margin: 24px 0 26px; font-weight: 500; text-shadow: 0 2px 30px rgba(244, 247, 249, 0.75); }
.page-hero .lede {
  color: var(--ink); font-weight: 500;
  text-shadow: 0 1px 16px rgba(244, 247, 249, 0.85), 0 1px 2px rgba(244, 247, 249, 0.6);
}
.crumbs {
  display: flex; gap: 10px; align-items: center;
  font-family: var(--font-display); font-size: 0.74rem; font-weight: 600; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--slate);
}
.crumbs a:hover { color: var(--accent); }
.crumbs span { color: var(--accent); }

/* ------------------- Reveal / word-reveal motion ------------------ */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 1s var(--ease), transform 1s var(--ease); transition-delay: var(--delay, 0ms); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal-left { opacity: 0; transform: translateX(-40px); transition: opacity 1s var(--ease), transform 1s var(--ease); transition-delay: var(--delay, 0ms); }
.reveal-left.is-in { opacity: 1; transform: none; }
.reveal-right { opacity: 0; transform: translateX(40px); transition: opacity 1s var(--ease), transform 1s var(--ease); transition-delay: var(--delay, 0ms); }
.reveal-right.is-in { opacity: 1; transform: none; }
.reveal-scale { opacity: 0; transform: scale(1.04); transition: opacity 1.1s var(--ease), transform 1.2s var(--ease); }
.reveal-scale.is-in { opacity: 1; transform: none; }

.word-reveal .word { display: inline-block; overflow: hidden; vertical-align: top; }
.word-reveal .word > span {
  display: inline-block; transform: translateY(110%); opacity: 0;
  transition: transform 0.9s var(--ease), opacity 0.9s var(--ease);
  transition-delay: calc(var(--i, 0) * 55ms);
}
.word-reveal.is-in .word > span { transform: none; opacity: 1; }

/* ----------------------------- Cards ------------------------------ */
.grid { display: grid; gap: clamp(18px, 2.2vw, 28px); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  position: relative; overflow: hidden;
  background: var(--card); border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: clamp(24px, 2.4vw, 34px);
  box-shadow: var(--shadow-soft);
  transition: transform 0.45s var(--ease), border-color 0.45s var(--ease), box-shadow 0.45s var(--ease);
}
.card::before { content: none; }
.card:hover { transform: translateY(-6px); border-color: var(--line); box-shadow: var(--shadow); }
.card__num { font-family: var(--font-display); font-size: 0.95rem; color: var(--slate); letter-spacing: 0.1em; }
.card h3 { margin: 16px 0 12px; color: var(--ink); }
.card p { color: var(--text-dim); font-size: 0.98rem; }

/* Service card with image */
.svc-card {
  position: relative; overflow: hidden; border-radius: var(--radius);
  border: 1px solid var(--line-soft); min-height: 340px;
  display: flex; align-items: flex-end; box-shadow: var(--shadow-soft);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.svc-card img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  filter: saturate(0.85) brightness(1.02); transition: transform 0.7s var(--ease);
  z-index: -2;
}
.svc-card::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(20, 42, 66, 0) 18%, rgba(16, 34, 54, 0.62) 62%, rgba(13, 28, 46, 0.9) 100%);
}
.svc-card__body { padding: clamp(22px, 2.4vw, 32px); position: relative; z-index: 1; }
.svc-card h3 { color: #fff; margin-bottom: 10px; }
.svc-card p { color: rgba(255, 255, 255, 0.82); font-size: 0.95rem; }
.svc-card .tag { font-family: var(--font-display); font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: #cfe0f0; }
.svc-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.svc-card:hover img { transform: scale(1.06); }
.svc-card__line { position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: var(--accent); transition: width 0.5s var(--ease); z-index: 2; }
.svc-card:hover .svc-card__line { width: 100%; }

/* Tick list */
.tick-list { display: grid; gap: 12px; }
.tick-list li { position: relative; padding-left: 28px; color: var(--text-dim); font-size: 0.98rem; }
.tick-list li::before {
  content: ""; position: absolute; left: 0; top: 9px; width: 7px; height: 7px;
  background: var(--accent); transform: rotate(45deg);
}
.tick-list.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 28px; }

/* Split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: center; }
.split--reverse { direction: rtl; }
.split--reverse > * { direction: ltr; }
.split__media { position: relative; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line-soft); box-shadow: var(--shadow); }
.split__media img { width: 100%; height: 100%; max-height: 560px; object-fit: cover; filter: saturate(0.8) brightness(1.04); }
.split__media .glowframe { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4); }
.split__media iframe { display: block; }

/* Stats */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--line-soft);
  border: 1px solid var(--line-soft); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-soft);
}
.stat { background: var(--card); padding: clamp(28px, 3vw, 44px) clamp(20px, 2.4vw, 32px); text-align: center; }
.stat b { display: block; font-family: var(--font-display); font-weight: 300; font-size: clamp(2.2rem, 4.2vw, 3.4rem); color: var(--ink); line-height: 1; letter-spacing: 0.02em; }
.stat span { display: block; margin-top: 12px; font-family: var(--font-display); font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-faint); }

/* Marquee */
.marquee {
  overflow: hidden; border-block: 1px solid var(--line-soft); padding-block: 24px;
  background: rgba(255, 255, 255, 0.4);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee__track { display: flex; gap: 56px; width: max-content; animation: scrollX 36s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__track span {
  font-family: var(--font-display); font-weight: 300; font-size: clamp(1rem, 1.6vw, 1.4rem);
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-faint);
  white-space: nowrap; display: inline-flex; align-items: center; gap: 56px;
}
.marquee__track span::after { content: ""; width: 5px; height: 5px; background: var(--accent-soft); border-radius: 50%; }
@keyframes scrollX { to { transform: translateX(-50%); } }

/* Certifications */
.cert-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cert { display: flex; align-items: center; gap: 16px; padding: 20px 22px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--card); box-shadow: var(--shadow-soft); transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease); }
.cert:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.cert .badge { flex: none; width: 46px; height: 46px; border-radius: 11px; display: grid; place-items: center; font-family: var(--font-display); font-weight: 500; font-size: 0.8rem; color: var(--accent); background: rgba(47, 108, 171, 0.08); border: 1px solid rgba(47, 108, 171, 0.18); letter-spacing: 0.04em; }
.cert b { display: block; color: var(--ink); font-size: 0.98rem; font-family: var(--font-display); font-weight: 500; }
.cert span { color: var(--text-faint); font-size: 0.82rem; }

/* Team */
.team-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(18px, 2.4vw, 28px); }
.member { display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: start; padding: clamp(22px, 2.4vw, 30px); border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow-soft); transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease); }
.member:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.member__mono { flex: none; width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center; font-family: var(--font-display); font-weight: 500; font-size: 1.3rem; letter-spacing: 0.04em; color: #fff; background: linear-gradient(135deg, var(--accent-soft), var(--accent-deep)); }
.member__role { font-family: var(--font-display); font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); }
.member h3 { font-size: 1.2rem; margin: 6px 0 10px; color: var(--ink); }
.member p { color: var(--text-dim); font-size: 0.92rem; line-height: 1.65; }

/* Projects */
.project { display: grid; grid-template-columns: 120px 1fr auto; gap: clamp(20px, 3vw, 48px); align-items: center; padding: clamp(26px, 3vw, 40px) 0; border-top: 1px solid var(--line-soft); }
.project:last-child { border-bottom: 1px solid var(--line-soft); }
.project__index { font-family: var(--font-display); font-size: 0.95rem; color: var(--slate); letter-spacing: 0.1em; }
.project h3 { font-size: clamp(1.4rem, 2.6vw, 2rem); color: var(--ink); transition: transform 0.4s var(--ease), color 0.4s var(--ease); font-weight: 400; }
.project__meta { display: flex; gap: 10px 24px; flex-wrap: wrap; margin-top: 12px; color: var(--text-faint); font-family: var(--font-display); font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; }
.project__meta .loc { color: var(--accent); }
.project p { color: var(--text-dim); margin-top: 14px; max-width: 60ch; }
.project__client { text-align: right; font-family: var(--font-display); font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-faint); }
.project__client b { display: block; color: var(--ink); font-family: var(--font-display); font-size: 1.05rem; letter-spacing: 0.02em; text-transform: none; margin-top: 4px; font-weight: 500; }
.project:hover h3 { transform: translateX(8px); color: var(--accent); }

/* Accordion */
.accordion { display: grid; gap: 14px; }
.acc { border: 1px solid var(--line-soft); border-radius: 12px; overflow: hidden; background: var(--card); box-shadow: var(--shadow-soft); transition: border-color 0.3s var(--ease); }
.acc[open] { border-color: var(--line); }
.acc summary { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px 24px; cursor: pointer; list-style: none; font-family: var(--font-display); font-weight: 500; font-size: 1.05rem; color: var(--ink); }
.acc summary::-webkit-details-marker { display: none; }
.acc summary .ico { flex: none; width: 24px; height: 24px; position: relative; }
.acc summary .ico::before, .acc summary .ico::after { content: ""; position: absolute; background: var(--accent); border-radius: 2px; }
.acc summary .ico::before { left: 0; top: 11px; width: 24px; height: 2px; }
.acc summary .ico::after { left: 11px; top: 0; width: 2px; height: 24px; transition: transform 0.3s var(--ease); }
.acc[open] summary .ico::after { transform: scaleY(0); }
.acc__body { padding: 0 24px 24px; color: var(--text-dim); font-size: 0.98rem; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 5vw, 72px); align-items: start; }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.field label { font-family: var(--font-display); font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-faint); }
.field input, .field textarea, .field select { width: 100%; padding: 14px 16px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); color: var(--ink); font: inherit; font-size: 0.96rem; transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease); }
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47, 108, 171, 0.12); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-note { font-size: 0.82rem; color: var(--text-faint); margin-top: 6px; }
.form-status { margin-top: 14px; font-size: 0.92rem; color: var(--accent); min-height: 1.2em; }

.dir { display: grid; gap: 0; }
.dir__group { padding: 22px 0; border-top: 1px solid var(--line-soft); }
.dir__group:first-child { border-top: 0; }
.dir__group .dir-h { font-family: var(--font-display); font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.dir__row { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; }
.dir__row b { color: var(--ink); font-weight: 500; font-family: var(--font-display); }
.dir__row a { color: var(--text-dim); font-family: var(--font-display); font-size: 0.92rem; letter-spacing: 0.04em; transition: color 0.2s; }
.dir__row a:hover { color: var(--accent); }

.info-card { display: flex; flex-direction: column; gap: 6px; padding: 26px; border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow-soft); transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease); }
.info-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.info-card .eyebrow { margin-bottom: 6px; }
.info-card b { font-family: var(--font-display); color: var(--ink); font-size: 1.25rem; font-weight: 500; }
.info-card span { color: var(--text-dim); font-size: 0.94rem; }

/* CTA band */
.cta-band {
  position: relative; overflow: hidden; border-radius: var(--radius-lg);
  border: 1px solid var(--line-soft); padding: clamp(48px, 7vw, 96px);
  text-align: center; box-shadow: var(--shadow);
  background: linear-gradient(180deg, var(--sky-2), var(--cloud));
}
.cta-band::after {
  content: ""; position: absolute; left: -10%; right: -10%; bottom: -10%; height: 60%;
  background: url("../img/clouds.svg") repeat-x bottom center; background-size: auto 100%;
  opacity: 0.6; animation: drift 80s linear infinite; pointer-events: none;
}
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { margin-bottom: 20px; }
.cta-band .lede { margin: 0 auto 36px; }
.cta-band .hero__actions { justify-content: center; display: flex; flex-wrap: wrap; gap: 16px; }

/* generic action row reused from old markup */
.hero__actions { display: flex; flex-wrap: wrap; gap: 16px; }

/* Footer */
.site-footer { position: relative; padding-top: clamp(64px, 8vw, 110px); padding-bottom: 40px; border-top: 1px solid var(--line-soft); margin-top: 40px; background: rgba(255, 255, 255, 0.5); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: clamp(28px, 4vw, 56px); }
.footer-brand .brand { margin-bottom: 20px; }
.footer-brand p { color: var(--text-dim); font-size: 0.94rem; max-width: 34ch; }
.footer-col .footer-h { font-family: var(--font-display); font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); margin-bottom: 18px; font-weight: 500; }
.footer-col a { display: block; color: var(--text-dim); font-size: 0.94rem; padding: 6px 0; transition: color 0.25s var(--ease), padding-left 0.25s var(--ease); }
.footer-col a:hover { color: var(--accent); padding-left: 6px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: clamp(44px, 6vw, 72px); padding-top: 28px; border-top: 1px solid var(--line-soft); color: var(--text-faint); font-size: 0.85rem; }
.socials { display: flex; gap: 12px; }
.socials a { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; border: 1px solid var(--line-soft); background: var(--card); color: var(--text-dim); transition: all 0.3s var(--ease); }
.socials a:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow-soft); }
.socials svg { width: 18px; height: 18px; }

/* Pills */
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { font-family: var(--font-display); font-size: 0.76rem; letter-spacing: 0.12em; text-transform: uppercase; padding: 9px 16px; border-radius: 999px; border: 1px solid transparent; color: var(--slate); background: transparent; transition: all 0.3s var(--ease); }
/* only link pills are clickable; span pills (basin tags) get no hover affordance */
a.pill:hover, .pill.is-active { background: var(--accent); color: #fff; }

/* Service in-page index: a legible, elevated band that parks below the header */
.svc-index { position: sticky; top: 70px; z-index: 40; margin-top: clamp(28px, 5vw, 52px); }
.svc-index .pills {
  width: max-content; max-width: 100%; margin-inline: auto;
  justify-content: center; row-gap: 6px; padding: 7px;
  border-radius: 999px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: var(--shadow-soft);
}
/* Anchor targets clear the fixed header + sticky index on jump */
.section[id], .svc-card[id] { scroll-margin-top: 150px; }
@media (max-width: 720px) {
  .svc-index { position: static; }
  .svc-index .pills { width: auto; }
}

/* Oil-drill scroll progress (left rail) */
.drill { position: fixed; left: clamp(16px, 2vw, 34px); top: 0; height: 100vh; width: 46px; z-index: 60; pointer-events: none; }
.drill__derrick { position: absolute; top: 96px; left: 50%; transform: translateX(-50%); width: 30px; height: auto; opacity: 0.65; }
.drill__track { position: absolute; top: 146px; bottom: 84px; left: 50%; transform: translateX(-50%); width: 2px; background: var(--line); border-radius: 2px; }
.drill__fill { position: absolute; top: 0; left: 0; width: 100%; height: calc(var(--p, 0) * 100%); background: linear-gradient(var(--accent-soft), var(--accent-deep)); border-radius: 2px; }
.drill__bit { position: absolute; left: 50%; top: calc(var(--p, 0) * 100%); width: 22px; height: auto; transform: translate(-50%, -2px); filter: drop-shadow(0 3px 6px rgba(29, 61, 92, 0.3)); }
.drill__bit svg { display: block; animation: bitBob 2.6s var(--ease) infinite; }
@keyframes bitBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(2px); } }
.drill__depth { position: absolute; bottom: 56px; left: 50%; transform: translateX(-50%); font-family: var(--font-display); font-size: 0.58rem; font-weight: 500; letter-spacing: 0.12em; color: var(--text-faint); white-space: nowrap; }
@media (max-width: 1279px) { .drill { display: none; } }
@media (prefers-reduced-motion: reduce) { .drill__bit svg { animation: none; } }

/* Mobile nav */
@media (max-width: 940px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed; inset: 0 0 0 auto; width: min(360px, 84vw);
    flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 4px;
    padding: 110px 28px 40px;
    background: rgba(248, 251, 253, 0.97); backdrop-filter: blur(20px);
    border-left: 1px solid var(--line-soft);
    transform: translateX(100%); transition: transform 0.45s var(--ease); z-index: 80;
  }
  .nav.is-open { transform: none; }
  .nav a { padding: 18px 8px; font-size: 0.9rem; border-bottom: 1px solid var(--line-soft); }
  .nav a::after { display: none; }
  .nav-cta { margin: 16px 8px 0; text-align: center; justify-content: center; }
  .nav-backdrop { position: fixed; inset: 0; background: rgba(20, 40, 60, 0.35); z-index: 70; opacity: 0; visibility: hidden; transition: opacity 0.4s var(--ease); }
  .nav-backdrop.is-open { opacity: 1; visibility: visible; }
}

/* Responsive */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .split--reverse { direction: ltr; }
  .team-grid { grid-template-columns: 1fr; }
  .cert-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .tick-list.cols-2 { grid-template-columns: 1fr; }
  .project { grid-template-columns: 1fr; gap: 8px; }
  .project__client { text-align: left; }
  .field-row { grid-template-columns: 1fr; }
  .cine { height: 300vh; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .member { grid-template-columns: 1fr; }
  .cine__word { letter-spacing: 0.3em; text-indent: 0.3em; }
}
