/* =============================================================
   Underground Connections — Design System
   Premium corporate, light theme, Fraunces + Inter
   ============================================================= */

:root {
  /* Brand palette */
  --persimmon: #E85C14;
  --persimmon-700: #c34a08;
  --blue: #068CBE;
  --blue-700: #006f99;
  --platinum: #E7E7E7;
  --jet: #2B2B2B;
  --silver: #B1B1B1;

  /* Functional */
  --bg: #FFFFFF;
  --bg-soft: #FAFAFA;
  --bg-muted: #F4F4F4;
  --ink: #1A1A1A;
  --ink-soft: #2B2B2B;
  --ink-muted: #5A5A5A;
  --line: #E7E7E7;
  --line-strong: #D6D6D6;
  --accent: #E85C14;
  --accent-secondary: #068CBE;
  --dark: #1F1F1F;
  --dark-soft: #2B2B2B;

  /* Type */
  --display: 'EB Garamond', 'Cormorant Garamond', Georgia, 'Times New Roman', Times, serif;
  --display-hero: 'Gruppo', 'EB Garamond', 'Cormorant Garamond', Georgia, serif;
  --serif: var(--display); /* legacy alias */
  --sans: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;

  /* Layout */
  --container: 1280px;
  --container-wide: 1440px;
  --container-narrow: 920px;
  --gutter: clamp(20px, 4vw, 48px);
  --section-y: clamp(56px, 6vw, 104px);

  /* Radii / shadows / transitions */
  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04), 0 1px 1px rgba(0,0,0,0.03);
  --shadow: 0 10px 30px -12px rgba(0,0,0,0.18), 0 2px 6px rgba(0,0,0,0.05);
  --shadow-lg: 0 30px 60px -20px rgba(0,0,0,0.22), 0 12px 24px -12px rgba(0,0,0,0.08);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 180ms var(--ease);
  --t-med: 320ms var(--ease);
  --t-slow: 600ms var(--ease);
}

/* =============================================================
   Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Page transition: fade-in on every navigation (kills white flash). */
  animation: pageEnter 540ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
body.page-exit {
  animation: pageExit 260ms cubic-bezier(0.4, 0, 1, 1) forwards;
}
@keyframes pageEnter {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
@keyframes pageExit {
  from { opacity: 1; transform: none; }
  to   { opacity: 0; transform: translateY(-8px); }
}

/* Site-wide film grain — fixed overlay, sits above everything,
   blocks no clicks. Subtle editorial texture. */
html::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 220px 220px;
  opacity: 0.05;
  mix-blend-mode: overlay;
}
@media (prefers-reduced-motion: reduce) {
  body { animation: none; }
  body.page-exit { animation: none; opacity: 1; }
}
img, svg, video { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }
hr { border: 0; height: 1px; background: var(--line); margin: 32px 0; }
::selection { background: var(--accent); color: #fff; }

/* =============================================================
   Typography
   ============================================================= */
h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 500;
  color: var(--ink);
  line-height: 1.12;
  letter-spacing: -0.005em;
  margin: 0 0 0.4em;
}
h1 { font-size: clamp(2.8rem, 6.4vw, 5rem); font-weight: 500; letter-spacing: -0.012em; line-height: 1.06; }
h2 { font-size: clamp(2.05rem, 4vw, 3.2rem); font-weight: 500; letter-spacing: -0.008em; }
h3 { font-size: clamp(1.35rem, 2vw, 1.7rem); font-weight: 600; letter-spacing: -0.003em; }
h4 { font-size: 1.02rem; font-family: var(--sans); font-weight: 600; letter-spacing: -0.005em; }
/* Subtle italic option for accent words */
.hero h1 .accent, .accent-italic { font-style: italic; font-weight: 500; }
p  { margin: 0 0 1em; color: var(--ink-muted); }
p.lead { font-size: clamp(1.1rem, 1.4vw, 1.3rem); color: var(--ink-soft); line-height: 1.55; max-width: 60ch; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--sans);
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: ""; display: inline-block; width: 28px; height: 1.5px;
  background: var(--accent);
}
.eyebrow.center { justify-content: center; }
.eyebrow.light { color: var(--accent); }
.eyebrow.on-dark { color: #FF8A4D; }
.eyebrow.on-dark::before { background: #FF8A4D; }

/* =============================================================
   Layout helpers
   ============================================================= */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.container.wide { max-width: var(--container-wide); }
.container.narrow { max-width: var(--container-narrow); }
section { padding: var(--section-y) 0; position: relative; }
.section-tight { padding: clamp(48px, 6vw, 88px) 0; }
.text-center { text-align: center; }
.muted { color: var(--ink-muted); }
.section-head { max-width: 720px; margin-bottom: clamp(40px, 5vw, 72px); }
.section-head.wide { max-width: none; }
.section-head.wide .lead { max-width: none; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.divider { height: 1px; background: var(--line); width: 100%; }

/* Branded section divider: thin hairlines flanking a small orange diamond.
   Sits between adjacent sections to give empty space a subtle structural beat.
   Usage:
     <div class="section-divider" aria-hidden="true">
       <span class="line"></span><span class="mark"></span><span class="line"></span>
     </div>
   Add the .on-dark modifier when the surrounding background is dark. */
.section-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
  max-width: 280px;
  /* Pull the divider into the adjacent section padding so it actually
     closes the gap visually instead of stacking on top of it. 0.25 leaves
     comfortable breathing room — bigger values cause images at the bottom
     of one section to crowd the next section. */
  margin: calc(-1 * var(--section-y) * 0.25) auto;
  padding: 0 var(--gutter);
  position: relative;
  z-index: 1;
}
.section-divider .line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--line) 40%, var(--line) 60%, transparent 100%);
}
.section-divider .mark {
  width: 7px;
  height: 7px;
  background: var(--accent);
  transform: rotate(45deg);
  flex-shrink: 0;
  box-shadow: 0 0 0 4px rgba(232,92,20,0.08);
}
.section-divider.on-dark .line {
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.22) 40%, rgba(255,255,255,0.22) 60%, transparent 100%);
}
.section-divider.on-dark .mark {
  box-shadow: 0 0 0 4px rgba(232,92,20,0.18);
}

/* =============================================================
   Buttons
   ============================================================= */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px;
  font-family: var(--sans);
  font-weight: 600; font-size: 15px;
  letter-spacing: 0.01em;
  border-radius: 999px;
  transition: transform var(--t-fast), background var(--t-fast), color var(--t-fast), box-shadow var(--t-fast), border-color var(--t-fast);
  white-space: nowrap;
  position: relative;
}
.btn:hover { transform: translateY(-1px); }
.btn .arrow { display: inline-block; transition: transform var(--t-fast); }
.btn:hover .arrow { transform: translateX(4px); }

.btn-primary {
  background: var(--accent); color: #fff;
  box-shadow: 0 4px 16px -4px rgba(232,92,20,0.45);
}
.btn-primary:hover { background: var(--persimmon-700); box-shadow: 0 8px 24px -6px rgba(232,92,20,0.55); }

.btn-dark { background: var(--jet); color: #fff; }
.btn-dark:hover { background: #000; }

.btn-outline {
  background: transparent; color: var(--ink);
  border: 1.5px solid var(--ink);
}
.btn-outline:hover { background: var(--ink); color: #fff; }

.btn-ghost { padding: 12px 0; color: var(--ink); }
.btn-ghost::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 6px;
  height: 1.5px; background: currentColor; transform-origin: left;
  transition: transform var(--t-med);
}
.btn-ghost:hover::after { transform: scaleX(0.85); }

.btn-on-dark { color: #fff; border-color: rgba(255,255,255,0.4); }
.btn-on-dark.btn-outline:hover { background: #fff; color: var(--jet); border-color: #fff; }

/* =============================================================
   Header / Navigation
   ============================================================= */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: background var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
}
.site-header.scrolled {
  background: rgba(255,255,255,0.98);
  border-bottom-color: var(--line);
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 32px;
  padding: 18px 0;
}
.brand {
  display: flex; align-items: center;
  color: var(--ink);
  flex-shrink: 0;
}
.brand img, .brand svg { height: 56px; width: auto; max-width: 280px; object-fit: contain; display: block; }
.site-header.scrolled .brand img,
.site-header.scrolled .brand svg { height: 48px; transition: height var(--t-fast); }
.brand img, .brand svg { transition: height var(--t-fast); }
@media (max-width: 540px) {
  .brand img, .brand svg { height: 44px; }
}

/* Footer logo: keep original colors; just enlarge slightly for footer presence */
.site-footer .brand img { height: 64px; }

.nav-links {
  display: flex; align-items: center; gap: 4px;
  list-style: none; margin: 0; padding: 0;
}
.nav-links a {
  display: inline-block;
  padding: 10px 16px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-soft);
  border-radius: 999px;
  transition: color var(--t-fast), background var(--t-fast);
  position: relative;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--ink); }
.nav-links a.active::after {
  content: ""; position: absolute; left: 50%; bottom: 2px; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 50%; background: var(--accent);
}

.nav-cta { display: flex; align-items: center; gap: 12px; }
.nav-links .mobile-cta { display: none; } /* mobile-only duplicate CTA; revealed by media query below */
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  border-radius: 8px;
}
.nav-toggle span {
  position: relative; display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px;
  transition: transform var(--t-fast), opacity var(--t-fast);
}
.nav-toggle span::before, .nav-toggle span::after {
  content: ""; position: absolute; left: 0; width: 22px; height: 2px; background: var(--ink); border-radius: 2px;
  transition: transform var(--t-fast);
}
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after  { top:  7px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after  { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .nav-cta .btn:not(.nav-toggle) { display: none; }
  .nav-links {
    position: fixed; top: 78px; left: 0; right: 0;
    flex-direction: column; align-items: stretch;
    background: #fff;
    padding: 16px var(--gutter) 32px;
    border-top: 1px solid var(--line);
    box-shadow: 0 24px 40px -20px rgba(0,0,0,0.15);
    gap: 0;
    transform: translateY(-12px);
    opacity: 0; pointer-events: none;
    transition: opacity var(--t-fast), transform var(--t-fast);
    max-height: calc(100vh - 78px);
    overflow-y: auto;
  }
  .nav-links.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .nav-links a { padding: 14px 8px; font-size: 17px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav-links a.active::after { display: none; }
  .nav-links .mobile-cta { display: block; padding-top: 20px; border-bottom: 0; }
}

/* Push content below fixed header */
main { padding-top: 0; }

/* =============================================================
   Hero
   ============================================================= */
.hero {
  position: relative;
  min-height: clamp(560px, 88vh, 880px);
  /* flex-direction: column + justify-content: flex-end reliably anchors the
     hero content block to the bottom of the hero — works on both the full
     and compact variants regardless of how tall the headline grows. */
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #fff;
  overflow: hidden;
  padding-top: 100px;
}
.hero-media {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(120% 80% at 20% 20%, rgba(6,140,190,0.20), transparent 60%),
    radial-gradient(80% 60% at 90% 10%, rgba(232,92,20,0.18), transparent 60%),
    linear-gradient(135deg, #1a1a1a 0%, #2B2B2B 60%, #111 100%);
  background-size: cover; background-position: center;
}
.hero-media img,
.hero-media video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0;
  transition: opacity var(--t-slow);
  /* Parallax: scale gives wiggle room so translate doesn't reveal empty edges.
     --parallax-y is updated by JS on scroll. */
  transform: scale(1.12) translate3d(0, var(--parallax-y, 0px), 0);
  transform-origin: center 30%;
  will-change: transform, opacity;
}
.hero-media img.loaded,
.hero-media video.loaded { opacity: 1; }
/* When video loads, fade out the still image beneath it for a smooth transition */
.hero-media video.loaded ~ img { opacity: 0; }
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.30) 35%, rgba(0,0,0,0.88) 100%),
    linear-gradient(90deg, rgba(0,0,0,0.78) 0%, rgba(0,0,0,0.30) 55%, rgba(0,0,0,0.10) 100%);
}
.hero-content {
  position: relative; z-index: 1;
  width: 100%; padding-bottom: clamp(48px, 7vw, 96px);
  text-shadow: 0 2px 24px rgba(0,0,0,0.45);
}
.hero h1 {
  color: #fff;
  max-width: 24ch;
  margin-bottom: 22px;
  text-shadow: 0 2px 30px rgba(0,0,0,0.55), 0 1px 2px rgba(0,0,0,0.4);
  /* Gruppo: geometric, single-weight 400. Tight line-height + light tracking
     keeps the hero compact while preserving the architectural feel. */
  font-family: var(--display-hero);
  font-weight: 400;
  letter-spacing: 0.006em;
  line-height: 0.98;
  font-size: clamp(2.4rem, 5.4vw, 4.4rem);
}
/* Accent words inside the hero h1 swap to EB Garamond italic for an
   editorial counterpoint to Gruppo's geometric character. */
.hero h1 .accent {
  color: var(--accent);
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  letter-spacing: -0.005em;
  text-shadow: 0 2px 30px rgba(0,0,0,0.55), 0 0 24px rgba(232,92,20,0.35);
}
.hero p.lead {
  color: #fff; max-width: 56ch; margin-bottom: 36px;
  text-shadow: 0 1px 12px rgba(0,0,0,0.6);
  font-weight: 400;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; text-shadow: none; }
.hero .btn { text-shadow: none; }
.hero .eyebrow { color: #FF8A4D; text-shadow: 0 1px 6px rgba(0,0,0,0.6); }
.hero .eyebrow::before { background: #FF8A4D; }

.hero-meta {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1;
  border-top: 1px solid rgba(255,255,255,0.14);
  display: none;
}

.hero.compact { min-height: clamp(420px, 60vh, 560px); }
.hero.compact .hero-content { padding-bottom: clamp(40px, 5vw, 72px); }

.scroll-hint {
  position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%);
  z-index: 2; color: rgba(255,255,255,0.7);
  font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.scroll-hint::after {
  content: ""; width: 1px; height: 38px; background: rgba(255,255,255,0.5);
  animation: scrollLine 2.2s ease-in-out infinite;
  transform-origin: top;
}
@keyframes scrollLine {
  0%   { transform: scaleY(0); opacity: 0; }
  35%  { transform: scaleY(1); opacity: 1; }
  70%  { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(0) translateY(38px); opacity: 0; }
}

/* =============================================================
   Stats / trust strip
   ============================================================= */
.stats {
  background: var(--jet); color: #fff;
  padding: clamp(48px, 6vw, 80px) 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.stat { text-align: center; }
.stat .num {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 4.5vw, 3.6rem);
  font-weight: 600;
  line-height: 1;
  color: #fff;
  display: flex; align-items: baseline; justify-content: center; gap: 4px;
}
.stat .num .suffix { color: var(--accent); font-size: 0.55em; }
.stat .label {
  font-family: var(--sans); font-size: 13px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  margin-top: 10px;
  line-height: 1.45;
}
@media (max-width: 760px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 36px 20px; }
}

/* =============================================================
   Generic split / feature blocks
   ============================================================= */
.split {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 88px);
  align-items: center;
}
.split.reverse { direction: rtl; }
.split.reverse > * { direction: ltr; }
@media (max-width: 880px) { .split { grid-template-columns: 1fr; } .split.reverse { direction: ltr; } }

.media-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(135deg, #2B2B2B, #1A1A1A);
  box-shadow: var(--shadow);
}
.media-frame.wide { aspect-ratio: 5 / 4; }
.media-frame.tall { aspect-ratio: 3 / 4; }
.media-frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease), opacity var(--t-slow); opacity: 0; }
.media-frame img.loaded { opacity: 1; }
.media-frame:hover img { transform: scale(1.04); }
.media-frame .tag {
  position: absolute; left: 20px; bottom: 20px;
  background: rgba(255,255,255,0.92); color: var(--ink);
  padding: 8px 14px; border-radius: 999px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
}
.media-frame::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.25));
  pointer-events: none;
}

/* =============================================================
   Card grids — services, values, projects, team
   ============================================================= */
.grid {
  display: grid;
  gap: 24px;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1020px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 860px)  { .grid-3 { grid-template-columns: 1fr; } .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: transform var(--t-med), border-color var(--t-med), box-shadow var(--t-med);
  position: relative;
  overflow: hidden;
}
.card:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: var(--shadow); }
.card .icon {
  width: 60px; height: 60px;
  border-radius: 14px;
  background: var(--bg-muted);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 22px;
  color: var(--accent);
}
.card:hover .icon { background: rgba(232,92,20,0.10); transition: background var(--t-med); }
.card .icon svg { width: 34px; height: 34px; }
.card h3 { font-size: 1.3rem; margin-bottom: 10px; }
.card p { margin-bottom: 0; font-size: 15px; }

.value-card {
  padding: 36px 28px;
  border-top: 3px solid var(--accent);
  background: var(--bg-soft);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.value-card:nth-child(2) { border-top-color: var(--blue); }
.value-card:nth-child(3) { border-top-color: var(--jet); }
.value-card .num {
  font-family: var(--serif); font-size: 2.2rem; color: var(--ink); font-weight: 600;
  display: block; margin-bottom: 16px;
}
.value-card h3 { font-family: var(--sans); font-size: 1.15rem; font-weight: 600; letter-spacing: -0.005em; margin-bottom: 10px; }
.value-card p { font-size: 15px; margin-bottom: 0; }

.project-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: linear-gradient(135deg, #2B2B2B, #111);
  color: #fff;
  display: flex;
  align-items: flex-end;
  transition: transform var(--t-med);
}
.project-card:hover { transform: translateY(-4px); }
.project-card img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform 1s var(--ease), opacity var(--t-slow);
  opacity: 0;
}
.project-card img.loaded { opacity: 0.85; }
.project-card:hover img { transform: scale(1.06); opacity: 0.95; }
.project-card::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(0,0,0,0.85));
}
.project-card .content { position: relative; z-index: 1; padding: 28px; }
.project-card .tag {
  display: inline-block;
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: #FF8A4D; margin-bottom: 10px; font-weight: 600;
}
.project-card h3 { color: #fff; font-size: 1.4rem; margin-bottom: 6px; }
.project-card p { color: rgba(255,255,255,0.75); margin-bottom: 0; font-size: 14px; }

/* =============================================================
   Services — premium long-form layout
   ============================================================= */
.services-toc {
  position: sticky; top: 96px;
  align-self: start;
  padding-right: 20px;
}
.services-toc .label {
  font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-muted); font-weight: 600; margin-bottom: 18px;
}
.services-toc ol { list-style: none; padding: 0; margin: 0; counter-reset: tocnum; }
.services-toc li { counter-increment: tocnum; }
.services-toc a {
  display: flex; align-items: baseline; gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  font-family: var(--serif); font-size: 1.1rem; font-weight: 500;
  color: var(--ink-muted);
  transition: color var(--t-fast);
}
.services-toc li:last-child a { border-bottom: 1px solid var(--line); }
.services-toc a::before {
  content: counter(tocnum, decimal-leading-zero);
  font-family: var(--sans); font-size: 11px; font-weight: 600; letter-spacing: 0.1em;
  color: var(--silver);
  flex-shrink: 0;
}
.services-toc a:hover, .services-toc a.active { color: var(--ink); }
.services-toc a.active::before { color: var(--accent); }

.service-section {
  scroll-margin-top: 100px;
  padding: clamp(48px, 6vw, 80px) 0;
  border-top: 1px solid var(--line);
}
.service-section:first-of-type { border-top: 0; padding-top: 0; }
.service-section .num {
  font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: 0.2em;
  color: var(--accent); text-transform: uppercase; margin-bottom: 14px;
}
.service-section h2 { margin-bottom: 18px; }
.service-section .details {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 28px;
}
.detail-block h4 { font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-muted); margin-bottom: 10px; font-weight: 600; }
.detail-block ul { margin: 0; padding-left: 18px; }
.detail-block li { margin-bottom: 6px; color: var(--ink-muted); }
@media (max-width: 700px) { .service-section .details { grid-template-columns: 1fr; } }

.services-layout {
  display: grid; grid-template-columns: 260px 1fr; gap: 64px;
}
@media (max-width: 980px) {
  .services-layout { grid-template-columns: 1fr; gap: 32px; }
  .services-toc { position: static; padding-right: 0; }
  .services-toc ol { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 24px; }
  .services-toc a { font-size: 1rem; padding: 12px 0; }
}
@media (max-width: 560px) {
  .services-toc ol { grid-template-columns: 1fr; }
}

/* =============================================================
   Team
   ============================================================= */
/* Legacy grid — kept for compatibility, no longer used on the team page */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px 24px;
}
.team-grid .team-member .photo {
  aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(135deg, #2B2B2B, #1a1a1a); position: relative; margin-bottom: 16px;
}
.team-grid .team-member .photo img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity var(--t-slow), transform 1s var(--ease); }
.team-grid .team-member .photo img.loaded { opacity: 1; }

/* =============================================================
   Editorial Leadership Layout
   Featured founder + numbered horizontal rows for other leaders
   ============================================================= */
.leader-feature {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(36px, 5vw, 72px);
  align-items: center;
  padding-bottom: clamp(56px, 6vw, 88px);
  border-bottom: 1px solid var(--line);
  margin-bottom: clamp(48px, 5vw, 80px);
}
.leader-feature .photo {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(135deg, #2B2B2B, #1a1a1a);
}
.leader-feature .photo img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity var(--t-slow), transform 1.2s var(--ease); }
.leader-feature .photo img.loaded { opacity: 1; }
.leader-feature:hover .photo img { transform: scale(1.03); }
.leader-feature .num {
  font-family: var(--sans); font-size: 12px; font-weight: 600;
  letter-spacing: 0.22em; color: var(--accent); text-transform: uppercase; margin-bottom: 14px;
}
.leader-feature .name {
  font-family: var(--display);
  font-size: clamp(2.4rem, 4.5vw, 3.8rem);
  font-weight: 500; letter-spacing: -0.01em; line-height: 1.06;
  margin: 0 0 8px;
}
.leader-feature .role {
  font-family: var(--sans); font-size: 13px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-muted); margin-bottom: 24px;
}
.leader-feature .bio { font-size: 1.05rem; color: var(--ink-soft); max-width: 56ch; }
.leader-feature .meta {
  display: flex; flex-wrap: wrap; gap: 10px 24px;
  margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--ink-muted); letter-spacing: 0.04em;
}
.leader-feature .meta strong { color: var(--ink); font-weight: 600; letter-spacing: 0; }

/* Reverse variant — flips photo to the right for editorial rhythm */
.leader-feature.reverse {
  grid-template-columns: 7fr 5fr;
}
.leader-feature.reverse .photo { order: 2; }
.leader-feature.reverse .content { order: 1; }

/* On mobile both variants collapse to a single column with the photo first.
   The `.reverse` selector lives in the same media query so the cascade
   doesn't keep its 7fr 5fr columns active at narrow widths. */
@media (max-width: 880px) {
  .leader-feature,
  .leader-feature.reverse {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .leader-feature.reverse .photo { order: 0; }
  .leader-feature.reverse .content { order: 0; }
}

/* Tier heading — sub-section heading inside the leadership block */
.tier-head {
  margin-top: clamp(48px, 6vw, 88px);
  margin-bottom: clamp(24px, 3vw, 40px);
  padding-top: clamp(36px, 4vw, 56px);
  border-top: 1px solid var(--line);
}
.tier-head h3 {
  font-family: var(--display);
  font-size: clamp(1.55rem, 2.6vw, 2.1rem);
  font-weight: 500;
  letter-spacing: -0.005em;
  line-height: 1.18;
  margin: 10px 0 0;
}

/* Initials fallback for missing profile photos.
   Sits behind the <img> via ::before; when the img loads it covers the
   initials; when the img fails to load, the JS removes it and the
   initials show through. */
.photo[data-initials] {
  position: relative;
}
.photo[data-initials]::before {
  content: attr(data-initials);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2B2B2B 0%, #1a1a1a 100%);
  color: rgba(255,255,255,0.42);
  font-family: var(--display-hero);
  letter-spacing: 0.08em;
  z-index: 0;
  pointer-events: none;
}
.leader-feature .photo[data-initials]::before { font-size: 5rem; }
.leader-row .photo[data-initials]::before { font-size: 2.4rem; }
.leader-card .photo[data-initials]::before { font-size: 2.8rem; }
.leader-feature .photo img,
.leader-row .photo img,
.leader-card .photo img {
  position: relative;
  z-index: 1;
  /* Anchor cover-cropping to the top of the image so portrait photos
     don't lose the top of the subject's head when the container is
     shorter than the source image. */
  object-position: center top;
}

/* Compact 3-up admin tier cards */
.leader-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(24px, 3vw, 40px);
}
@media (max-width: 880px) {
  .leader-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .leader-grid { grid-template-columns: 1fr; max-width: 380px; margin: 0 auto; }
}
.leader-card {
  display: grid;
  gap: 14px;
}
.leader-card .photo {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(135deg, #2B2B2B, #1a1a1a);
  position: relative;
}
.leader-card .photo img {
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity var(--t-slow), transform 1s var(--ease);
}
.leader-card .photo img.loaded { opacity: 1; }
.leader-card:hover .photo img { transform: scale(1.03); }
.leader-card .name {
  font-family: var(--display);
  font-size: clamp(1.25rem, 1.8vw, 1.55rem);
  font-weight: 500;
  letter-spacing: -0.005em;
  line-height: 1.18;
  margin: 0;
}
.leader-card .role {
  font-family: var(--sans);
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-muted);
}
.leader-card .bio {
  margin: 4px 0 0;
  color: var(--ink-muted);
  font-size: 14.5px; line-height: 1.55;
}

/* Leadership rows */
.leader-list { display: grid; gap: 0; }
.leader-row {
  display: grid;
  grid-template-columns: 60px 220px 1fr;
  gap: clamp(20px, 3vw, 40px);
  align-items: center;
  padding: clamp(28px, 3vw, 40px) 0;
  border-bottom: 1px solid var(--line);
}
.leader-row:first-child { border-top: 1px solid var(--line); }
.leader-row .row-num {
  font-family: var(--sans);
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.18em; color: var(--silver);
}
.leader-row .photo {
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(135deg, #2B2B2B, #1a1a1a);
  position: relative;
}
.leader-row .photo img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity var(--t-slow), transform 1s var(--ease); }
.leader-row .photo img.loaded { opacity: 1; }
.leader-row:hover .photo img { transform: scale(1.04); }
.leader-row .content { display: grid; gap: 6px; }
.leader-row .name {
  font-family: var(--display);
  font-size: clamp(1.55rem, 2.4vw, 2.05rem);
  font-weight: 500; letter-spacing: -0.005em; line-height: 1.12;
  margin: 0;
}
.leader-row .role {
  font-family: var(--sans); font-size: 12px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-muted);
}
.leader-row .bio {
  margin: 8px 0 0;
  color: var(--ink-muted);
  font-size: 15px; max-width: 70ch;
}

@media (max-width: 720px) {
  .leader-row {
    grid-template-columns: 100px 1fr;
    grid-template-areas:
      "photo  content"
      "photo  content";
    gap: 20px;
  }
  .leader-row .row-num { display: none; }
  .leader-row .photo { grid-area: photo; }
  .leader-row .content { grid-area: content; }
}
@media (max-width: 480px) {
  .leader-row { grid-template-columns: 80px 1fr; gap: 16px; }
}

/* =============================================================
   Contact
   ============================================================= */
.contact-grid {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px;
  align-items: start;
}
@media (max-width: 980px) { .contact-grid { grid-template-columns: 1fr; gap: 48px; } }

.contact-info { display: grid; gap: 24px; }
.contact-info .item {
  display: grid; grid-template-columns: 44px 1fr; gap: 20px; align-items: start;
  padding: 22px 0; border-bottom: 1px solid var(--line);
}
.contact-info .item:last-child { border-bottom: 0; }
.contact-info .icon {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--bg-muted); display: flex; align-items: center; justify-content: center;
  color: var(--accent);
}
.contact-info .icon svg { width: 20px; height: 20px; }
.contact-info h4 { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 6px; }
.contact-info .value { font-family: var(--serif); font-size: 1.2rem; color: var(--ink); font-weight: 500; line-height: 1.3; }
.contact-info a.value:hover { color: var(--accent); }

/* =============================================================
   Forms
   ============================================================= */
.form { display: grid; gap: 20px; }
.form-card {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 44px);
}
.field-group {
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px;
}
@media (max-width: 600px) { .field-group { grid-template-columns: 1fr; } }
.field { display: grid; gap: 8px; }
.field label {
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.04em; color: var(--ink-soft);
}
.field label .req { color: var(--accent); }
.field .hint { font-size: 12px; color: var(--ink-muted); font-weight: 400; letter-spacing: 0; margin-top: -2px; }
.field input[type=text], .field input[type=email], .field input[type=tel], .field input[type=date], .field input[type=number], .field select, .field textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  background: #fff;
  border-radius: var(--radius);
  font-size: 15px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(232,92,20,0.12);
}
.field.checkbox-group {
  border: 1px solid var(--line-strong); background: #fff;
  padding: 16px 18px; border-radius: var(--radius); gap: 12px;
}
.field.checkbox-group .options { display: grid; gap: 10px; }
.option {
  display: flex; align-items: center; gap: 10px;
  font-size: 15px; cursor: pointer;
}
.option input[type=checkbox], .option input[type=radio] {
  width: 18px; height: 18px; accent-color: var(--accent);
}
.form-status {
  display: none;
  margin-top: 10px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: rgba(6,140,190,0.08);
  border: 1px solid rgba(6,140,190,0.2);
  color: var(--blue-700);
  font-size: 14px;
}
.form-status.visible { display: block; }
.form-status.error { color: #b42318; background: #fef3f2; border-color: #fecdca; }
.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.subname { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .subname { grid-template-columns: 1fr; } }
.field-name-pair label.small { font-size: 12px; font-weight: 500; letter-spacing: 0.04em; color: var(--ink-muted); margin-top: 4px; }

/* =============================================================
   Dark CTA banner
   ============================================================= */
.cta-banner {
  position: relative;
  background: var(--jet);
  color: #fff;
  overflow: hidden;
  border-radius: var(--radius-lg);
  padding: clamp(48px, 6vw, 80px);
}
.cta-banner::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(60% 80% at 100% 0%, rgba(232,92,20,0.30), transparent 60%),
    radial-gradient(50% 60% at 0% 100%, rgba(6,140,190,0.22), transparent 60%);
  pointer-events: none;
}
.cta-banner h2 { color: #fff; max-width: 18ch; }
.cta-banner p { color: rgba(255,255,255,0.8); max-width: 60ch; }
.cta-banner .inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 2fr 1fr; gap: 32px; align-items: end;
}
.cta-banner .inner .actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }
@media (max-width: 760px) {
  .cta-banner .inner { grid-template-columns: 1fr; }
  .cta-banner .inner .actions { justify-content: flex-start; }
}

/* =============================================================
   Footer
   ============================================================= */
.site-footer {
  background: #111;
  color: rgba(255,255,255,0.7);
  padding-top: 80px;
  font-size: 14.5px;
}
.site-footer .brand { color: #fff; margin-bottom: 18px; }
.footer-grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px;
  padding-bottom: 60px;
}
@media (max-width: 880px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-about { grid-column: 1 / -1; } }
@media (max-width: 540px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 {
  font-family: var(--sans); font-size: 12px; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-bottom: 18px;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.site-footer a { color: rgba(255,255,255,0.8); transition: color var(--t-fast); }
.site-footer a:hover { color: #fff; }
.footer-about p { color: rgba(255,255,255,0.6); max-width: 36ch; margin-bottom: 0; font-size: 14px; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 24px 0; border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 13px; color: rgba(255,255,255,0.55);
}
.footer-bottom .legal { display: flex; gap: 24px; }

/* =============================================================
   Scroll reveal
   ============================================================= */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 800ms var(--ease), transform 800ms var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
[data-reveal].in {
  opacity: 1; transform: none;
}

/* Mask-clip line reveal — used on hero headlines.
   Wraps each line of content in an overflow:hidden mask;
   the inner line slides up from below into position.
   JS handles the wrapping (split by <br>); CSS handles the animation. */
[data-reveal-lines] {
  display: block;
}
.rl-mask {
  display: block;
  overflow: hidden;
  padding: 0.08em 0.02em 0.12em;
  margin: -0.08em -0.02em -0.12em;
}
.rl-line {
  display: block;
  transform: translateY(112%);
  transition: transform 1.05s cubic-bezier(0.7, 0, 0.2, 1);
  transition-delay: calc(var(--rl-i, 0) * 110ms + var(--rl-base-delay, 0ms));
  will-change: transform;
}
[data-reveal-lines].in .rl-line { transform: none; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .rl-line { transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .scroll-hint { display: none; }
}

/* =============================================================
   Utility
   ============================================================= */
.bg-soft { background: var(--bg-soft); }
.bg-muted { background: var(--bg-muted); }
.bg-dark { background: var(--jet); color: #fff; }
.bg-dark h1, .bg-dark h2, .bg-dark h3, .bg-dark h4 { color: #fff; }
.bg-dark p { color: rgba(255,255,255,0.75); }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.flex-row { display: flex; gap: 14px; flex-wrap: wrap; }

/* Subtle vertical mark you can drop in as a decorative element */
.rule-mark {
  display: inline-block; width: 36px; height: 2px; background: var(--accent); margin-bottom: 18px;
}

/* =============================================================
   Process page — sticky-scroll methodology
   ============================================================= */
.process-grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(40px, 5vw, 80px);
  align-items: start;
}
@media (max-width: 980px) {
  .process-grid { grid-template-columns: 1fr; gap: 24px; }
  .process-sticky { position: static !important; min-height: auto !important; }
}

.process-sticky {
  position: sticky; top: 110px;
  padding: clamp(36px, 4vw, 64px);
  background: var(--jet); color: #fff;
  border-radius: var(--radius-lg);
  min-height: 480px;
  overflow: hidden;
  isolation: isolate;
}
.process-sticky::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 80% at 100% 0%, rgba(232,92,20,0.18), transparent 60%),
    radial-gradient(50% 60% at 0% 100%, rgba(6,140,190,0.16), transparent 60%);
}

.phase-counter {
  font-family: var(--sans); font-size: 12px; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-bottom: 24px;
}
.phase-big-num {
  font-family: var(--display); font-size: clamp(6rem, 14vw, 12rem);
  font-weight: 500; line-height: 0.84; letter-spacing: -0.025em;
  color: var(--accent);
  margin: 0 0 8px;
  font-variant-numeric: tabular-nums;
  display: block;
}
.phase-name {
  font-family: var(--display); font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  font-weight: 500; letter-spacing: -0.005em; color: #fff;
  margin: 0;
}
.phase-summary {
  margin-top: 20px;
  color: rgba(255,255,255,0.7);
  font-size: 0.95rem;
  max-width: 38ch;
  min-height: 5em;
}
.phase-progress {
  position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: rgba(255,255,255,0.08);
}
.phase-progress .bar {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent), #FF8A4D);
  transition: width 480ms var(--ease);
}

.process-step {
  padding: clamp(40px, 5vw, 72px) 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 120px;
}
.process-step:first-child { padding-top: 0; }
.process-step:last-child { border-bottom: 0; }
.process-step .step-eyebrow {
  font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent); font-weight: 600; margin-bottom: 14px;
}
.process-step h3 {
  font-size: clamp(1.6rem, 2.4vw, 2.2rem); margin-bottom: 18px;
}
.process-step .lead {
  font-size: 1.05rem; max-width: 60ch; color: var(--ink-soft);
}
.process-step .step-meta {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 24px; margin-top: 32px;
  padding-top: 24px; border-top: 1px solid var(--line);
}
.process-step .step-meta h5 {
  font-family: var(--sans); font-size: 11px; font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink-muted); margin: 0 0 10px;
}
.process-step .step-meta p { font-size: 14px; color: var(--ink-soft); margin: 0; line-height: 1.55; }

@media (max-width: 720px) {
  .process-step .step-meta { grid-template-columns: 1fr; gap: 18px; }
}

/* =============================================================
   HDD cross-section diagram — technical schematic style
   ============================================================= */
.diagram-section {
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.bore-diagram {
  width: 100%;
  height: auto;
  max-height: 560px;
  display: block;
}
.bore-diagram .label {
  font-family: var(--sans); font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.20em; text-transform: uppercase;
  fill: var(--ink-soft);
}
.bore-diagram .sub {
  font-family: var(--sans); font-size: 10px; font-weight: 500;
  fill: var(--ink-muted);
  letter-spacing: 0.04em;
}
.bore-diagram .leader { stroke: #9A9389; stroke-width: 0.8; }
.bore-diagram .leader-dot { fill: #5A5A5A; }
.bore-diagram .marker-line { stroke: #8A8175; stroke-width: 0.8; stroke-dasharray: 3 4; }
.bore-diagram .tick { stroke: #5A5A5A; stroke-width: 1; }
.bore-diagram .surface-line { stroke: var(--jet); stroke-width: 1.4; }
.bore-diagram .pit { fill: #2B2B2B; }
.bore-diagram .rig-body { fill: #2B2B2B; }
.bore-diagram .rig-mast { stroke: #2B2B2B; stroke-width: 2.6; stroke-linecap: round; }
.bore-diagram .rig-tip { fill: var(--accent); }

.bore-diagram .bore-path {
  fill: none; stroke: var(--accent); stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 1800; stroke-dashoffset: 1800;
  filter: drop-shadow(0 1px 3px rgba(232,92,20,0.30));
}
.bore-diagram .bore-path.draw { animation: drawBore 2.6s var(--ease) forwards; }
@keyframes drawBore { to { stroke-dashoffset: 0; } }

.bore-diagram .pipe-line {
  fill: none; stroke: var(--blue); stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 1800; stroke-dashoffset: 1800;
  opacity: 0;
}
.bore-diagram .pipe-line.draw {
  opacity: 1;
  animation: drawPipe 2.2s var(--ease) forwards;
}
@keyframes drawPipe { to { stroke-dashoffset: 0; } }

/* Moving heads (drill + pipe) that travel along the bore path */
.bore-diagram .head {
  opacity: 0;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.35));
}
.bore-diagram .head.run { opacity: 1; }
.bore-diagram .head.hide { opacity: 0; transition: opacity 600ms var(--ease); }

.bore-diagram .annotation { opacity: 0; animation: fadeIn 600ms var(--ease) 800ms forwards; }
.bore-diagram .annotation.late { animation-delay: 2400ms; }
@keyframes fadeIn { to { opacity: 1; } }

/* =============================================================
   Project map (Leaflet)
   ============================================================= */
.map-section {
  background: var(--jet); color: #fff;
  position: relative;
  overflow: hidden;
}
.map-section::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 80% at 100% 0%, rgba(232,92,20,0.10), transparent 60%),
    radial-gradient(50% 60% at 0% 100%, rgba(6,140,190,0.08), transparent 60%);
  pointer-events: none;
}
.map-section .container { position: relative; z-index: 1; }
.map-section h2 { color: #fff; }
.map-section p { color: rgba(255,255,255,0.75); }
.map-layout {
  display: grid;
  grid-template-columns: 4fr 8fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: stretch;
}
@media (max-width: 980px) { .map-layout { grid-template-columns: 1fr; } }
.map-side .map-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  margin-top: 32px; padding-top: 32px; border-top: 1px solid rgba(255,255,255,0.12);
}
.map-side .map-stats .item .num {
  font-family: var(--display); font-size: 2rem; font-weight: 700;
  color: #fff; line-height: 1;
}
.map-side .map-stats .item .lbl {
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(255,255,255,0.55); margin-top: 6px; font-weight: 600;
}
.map-canvas {
  position: relative;
  height: clamp(420px, 60vh, 560px);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #4a4f55;
  box-shadow:
    0 30px 80px -20px rgba(0,0,0,0.55),
    0 0 0 1px rgba(255,255,255,0.18);
}
.map-canvas .map { position: absolute; inset: 0; }
/* Brighten the dark tiles so land/water/labels actually read */
.map-canvas .leaflet-tile-pane { filter: brightness(1.08) contrast(1.02) saturate(0.95); }
/* Accent ribbon at the top edge of the map for a "panel" feel */
.map-canvas::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 3px; z-index: 500;
  background: linear-gradient(90deg, var(--accent), #FF8A4D 60%, var(--blue));
  pointer-events: none;
}
.map-canvas::after {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.10);
  border-radius: var(--radius-lg);
}
/* Leaflet overrides for dark theme */
.leaflet-container { background: #3a3f45 !important; font-family: var(--sans) !important; }
.leaflet-control-attribution {
  background: rgba(0,0,0,0.5) !important;
  color: rgba(255,255,255,0.5) !important;
  font-size: 10px !important;
}
.leaflet-control-attribution a { color: rgba(255,255,255,0.7) !important; }
.leaflet-control-zoom a {
  background: rgba(30,30,30,0.95) !important;
  color: #fff !important;
  border-color: rgba(255,255,255,0.15) !important;
}
.leaflet-popup-content-wrapper {
  background: #fff !important; color: var(--ink) !important;
  border-radius: 10px !important;
  box-shadow: 0 12px 36px -10px rgba(0,0,0,0.5) !important;
}
.leaflet-popup-tip { background: #fff !important; }
.leaflet-popup-content {
  margin: 14px 18px !important;
  font-family: var(--sans) !important;
  font-size: 13.5px !important;
  line-height: 1.5 !important;
}
.leaflet-popup-content .pop-tag {
  display: inline-block; font-size: 10px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 4px;
}
.leaflet-popup-content .pop-title {
  font-family: var(--display); font-size: 1.05rem; font-weight: 700;
  color: var(--ink); margin: 0 0 2px;
}
.leaflet-popup-content .pop-loc { color: var(--ink-muted); font-size: 12px; }

/* Custom map pin */
.uc-pin {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(232,92,20,0.30), 0 4px 12px rgba(0,0,0,0.4);
  border: 2px solid #fff;
}
.uc-pin::after {
  content: "";
  position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid rgba(232,92,20,0.6);
  animation: pinPulse 2.4s ease-out infinite;
}
@keyframes pinPulse {
  0%   { transform: scale(0.8); opacity: 0.9; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* =============================================================
   Memberships / credentials strip
   ============================================================= */
.memberships {
  padding: clamp(48px, 5vw, 72px) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.memberships .label {
  font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink-muted); font-weight: 600;
  text-align: center; margin-bottom: 28px;
}
.memberships .logos {
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: clamp(28px, 5vw, 64px);
}
.memberships .logos img {
  height: clamp(44px, 6vw, 64px); width: auto; max-width: 180px;
  object-fit: contain;
  opacity: 0.7;
  filter: grayscale(100%);
  transition: opacity var(--t-fast), filter var(--t-fast);
}
.memberships .logos img:hover {
  opacity: 1; filter: grayscale(0%);
}

/* Employee portal form links */
.portal-actions {
  display: grid;
  gap: 12px;
  max-width: 440px;
}
.portal-actions .btn {
  width: 100%;
  justify-content: space-between;
  white-space: normal;
}
.portal-note {
  margin-top: 28px;
  color: var(--ink-muted);
  font-size: 16px;
}
.portal-note a {
  color: var(--accent);
  font-weight: 600;
}
.portal-note a:hover { color: var(--persimmon-700); }
