/* ── Research Square Engineering Services — shared styles ──
   White + blue clean theme. Sibling to the R² (dark/gold) and
   Return2SA (forest/cream) sites; shares the same clean, spacious feel. */

/* ── TOKENS ─────────────────────────────────────────── */
:root {
  --blue:        #2E6A9E;   /* primary ES blue */
  --blue-deep:   #102a43;   /* headings / deep ink-blue */
  --blue-mid:    #5B9BD5;
  --blue-ice:    #A8C8E8;
  --blue-tint:   #eef4fa;   /* section wash */
  --blue-tint-2: #e3eef8;
  --paper:       #ffffff;
  --paper-2:     #f6f9fc;
  --ink:         #15212e;
  --ink-mid:     #4a5a6a;
  --ink-soft:    #8294a4;
  --line:        rgba(16,42,67,0.12);
  --line-soft:   rgba(16,42,67,0.07);
  --gold:        #C9A84C;   /* shared R² family accent, used sparingly */
  --radius:      4px;
  --maxw:        1180px;
}

/* ── RESET ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-weight: 400;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--blue-ice); color: var(--blue-deep); }

h1, h2, h3, .display {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  color: var(--blue-deep);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

/* ── NAV ────────────────────────────────────────────── */
/* Scoped to #nav (not the bare `nav` tag) so it doesn't also hijack
   in-page <nav> elements like .cap-index on capabilities.html. */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 48px; height: 76px;
  background: rgba(255,255,255,0.86);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, box-shadow .3s ease;
}
#nav.scrolled {
  border-bottom-color: var(--line-soft);
  box-shadow: 0 2px 24px rgba(16,42,67,0.06);
}
.nav-logo { display: flex; align-items: center; }
.nav-logo img { height: 60px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 30px; list-style: none; }
.nav-links a {
  font-size: 14px; font-weight: 500; letter-spacing: 0.01em;
  color: var(--ink-mid); transition: color .2s ease;
}
.nav-links a:hover { color: var(--blue); }
.nav-cta {
  font-size: 13.5px; font-weight: 600; letter-spacing: 0.02em;
  color: #fff !important; background: var(--blue);
  padding: 10px 22px; border-radius: var(--radius);
  transition: background .2s ease, transform .2s ease;
}
.nav-cta:hover { background: var(--blue-deep); transform: translateY(-1px); }
.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 8px;
}
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--blue-deep); border-radius: 2px; transition: .25s; }

/* ── BUTTONS ────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: 'Inter', sans-serif; font-size: 14.5px; font-weight: 600;
  letter-spacing: 0.01em; padding: 14px 28px; border-radius: var(--radius);
  border: 1px solid transparent; cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-deep); }
.btn-outline { border-color: var(--line); color: var(--blue-deep); }
.btn-outline:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-tint); }

/* ── LAYOUT HELPERS ─────────────────────────────────── */
.shell { max-width: var(--maxw); margin: 0 auto; padding: 110px 48px; }
.eyebrow {
  display: inline-flex; align-items: center;
  font-size: 12px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--blue); margin-bottom: 18px;
}
.eyebrow.center { justify-content: center; }
h2 { font-size: clamp(30px, 4.2vw, 46px); }
h2 .soft { color: var(--ink-soft); font-weight: 400; }
.lede { margin-top: 20px; max-width: 600px; font-size: 17px; color: var(--ink-mid); }
.section-head { max-width: 720px; margin-bottom: 56px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ── HERO ───────────────────────────────────────────── */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center;
  padding: 120px 48px 80px;
  background:
    radial-gradient(1100px 560px at 78% 12%, var(--blue-tint), transparent 70%),
    var(--paper);
  overflow: hidden;
}
/* soft blue glow (replaces the old blueprint grid) */
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(560px 460px at 88% 6%, rgba(91,155,213,0.20), transparent 70%),
    radial-gradient(520px 520px at 12% 98%, rgba(91,155,213,0.10), transparent 70%);
}
.hero-inner {
  position: relative; z-index: 2; width: 100%;
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 64px; align-items: center;
}
.hero h1 {
  font-size: clamp(42px, 6vw, 76px); line-height: 1.02; letter-spacing: -0.02em;
}
.hero h1 .accent { color: var(--blue); }
.hero-sub { margin-top: 26px; max-width: 520px; font-size: 18px; color: var(--ink-mid); }
.hero-sub strong { color: var(--ink); font-weight: 600; }
.hero-ctas { margin-top: 36px; display: flex; gap: 14px; flex-wrap: wrap; }
.hero-meta {
  margin-top: 40px; padding-top: 26px; border-top: 1px solid var(--line-soft);
  display: flex; gap: 40px; flex-wrap: wrap;
}
.hero-meta .m-num { font-family: 'Space Grotesk', sans-serif; font-size: 26px; font-weight: 600; color: var(--blue-deep); }
.hero-meta .m-lab { font-size: 12.5px; color: var(--ink-soft); letter-spacing: 0.02em; }

/* hero industries strip */
.hero-sectors { margin-top: 38px; padding-top: 24px; border-top: 1px solid var(--line-soft); }
.hero-sectors .hs-label { display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 14px; }
.hero-sectors .hs-row { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-sectors .hs-chip { font-size: 12.5px; font-weight: 600; color: var(--blue-deep); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 8px 15px; }

/* hero visual */
.hero-visual { position: relative; }
.hero-card {
  position: relative; border-radius: 8px; overflow: hidden;
  box-shadow: 0 30px 70px rgba(16,42,67,0.18); border: 1px solid var(--line-soft);
  aspect-ratio: 4 / 5; background: var(--blue-tint);
}
.hero-card img { width: 100%; height: 100%; object-fit: cover; }
.hero-badge {
  position: absolute; left: -22px; bottom: 36px; z-index: 3;
  background: #fff; border: 1px solid var(--line);
  border-radius: 8px; padding: 16px 20px; box-shadow: 0 16px 40px rgba(16,42,67,0.14);
  display: flex; align-items: center; gap: 13px; max-width: 250px;
}
.hero-badge .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--gold); flex-shrink: 0; box-shadow: 0 0 0 4px rgba(201,168,76,0.16); }
.hero-badge b { font-family: 'Space Grotesk', sans-serif; color: var(--blue-deep); font-size: 14px; display: block; }
.hero-badge span { font-size: 12.5px; color: var(--ink-soft); }
.hero-hex {
  position: absolute; top: -26px; right: -18px; z-index: 3;
  width: 92px; height: auto; filter: drop-shadow(0 12px 24px rgba(16,42,67,0.2));
}

/* ── HERO: ASSEMBLY ANIMATION ───────────────────────── */
.hero-anim { justify-content: center; text-align: center; }
.hero-anim-inner {
  position: relative; z-index: 2; width: 100%;
  max-width: 940px; margin: 0 auto; padding: 0 24px;
  display: flex; flex-direction: column; align-items: center;
}
.scene-wrap {
  position: relative; width: 100%;
  height: clamp(210px, 38vh, 380px);
  margin: 14px 0 6px;
}
#es-scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-anim-tag {
  font-family: 'Space Grotesk', sans-serif; font-weight: 500;
  font-size: clamp(20px, 3vw, 30px); letter-spacing: -0.01em;
  color: var(--blue-deep);
}
.hero-anim-sub {
  margin-top: 18px; max-width: 600px;
  font-size: 16.5px; color: var(--ink-mid);
}
.hero-ctas.center { justify-content: center; }
/* overlay items fade in after the mesh resolves */
.anim-in { opacity: 0; transform: translateY(10px); transition: opacity .6s ease, transform .6s ease; }
.anim-in.show { opacity: 1; transform: none; }
.hero-anim .eyebrow.anim-in { transition-delay: 0s; }
.hero-anim .hero-anim-tag.anim-in { transition-delay: .08s; }
.hero-anim .hero-anim-sub.anim-in { transition-delay: .16s; }
.hero-anim .hero-ctas.anim-in { transition-delay: .24s; }

/* ── CAPABILITY TICKER ──────────────────────────────── */
.capstrip { background: var(--blue-deep); color: #cfe0f0; }
.capstrip .inner {
  max-width: var(--maxw); margin: 0 auto; padding: 22px 48px;
  display: flex; flex-wrap: wrap; gap: 14px 34px; align-items: center; justify-content: center;
  font-size: 13.5px; letter-spacing: 0.04em;
}
.capstrip .inner span { display: inline-flex; align-items: center; gap: 12px; white-space: nowrap; }
.capstrip .inner span::before { content: ""; width: 5px; height: 5px; background: var(--blue-mid); border-radius: 50%; }

/* ── SERVICES GRID ──────────────────────────────────── */
.services { background: var(--paper); }
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.svc-card { background: #fff; padding: 36px 32px; transition: background .25s ease; }
.svc-card.svc-wide { grid-column: 1 / -1; }
.svc-card:hover { background: var(--blue-tint); }
.svc-card .ic { width: 44px; height: 44px; border-radius: 8px; background: var(--blue-tint-2); color: var(--blue); display: flex; align-items: center; justify-content: center; margin-bottom: 20px; }
.svc-card:hover .ic { background: var(--blue); color: #fff; }
.svc-card .ic svg { width: 22px; height: 22px; }
.svc-card h3 { font-size: 18px; margin-bottom: 10px; }
.svc-card p { font-size: 14.5px; color: var(--ink-mid); }

/* ── TEAM ───────────────────────────────────────────── */
.team { background: var(--paper); }
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; margin-top: 8px; }
.team-card { text-align: center; }
.team-photo {
  width: 100%; aspect-ratio: 1 / 1; border-radius: 12px; overflow: hidden;
  background: var(--blue-tint-2); border: 1px solid var(--line-soft);
  display: flex; align-items: center; justify-content: center;
  color: var(--blue); font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 30px;
}
.team-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }
.team-card[data-placeholder] .team-photo { border-style: dashed; border-color: var(--blue-ice); }
.team-card figcaption { margin-top: 15px; }
.team-card h3 { font-size: 17px; }
.team-card p { font-size: 13.5px; color: var(--ink-soft); margin-top: 2px; }
.team-subhead {
  font-family: 'Space Grotesk', sans-serif; font-weight: 600;
  font-size: 13px; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--ink-soft); margin: 52px 0 24px; text-align: left;
  display: flex; align-items: center; gap: 14px;
}
.team-subhead::after { content: ""; flex: 1; height: 1px; background: var(--line-soft); }
.team-subhead:first-of-type { margin-top: 8px; }
.team-note {
  margin-top: 36px; text-align: center; font-size: 13.5px; color: var(--ink-soft);
  background: var(--blue-tint); border: 1px dashed var(--blue-ice);
  border-radius: 8px; padding: 14px 20px; max-width: 640px; margin-left: auto; margin-right: auto;
}

/* ── SPLIT (approach / partnership) ─────────────────── */
.split { background: var(--paper-2); }
.split .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split.reverse .grid { direction: rtl; }
.split.reverse .grid > * { direction: ltr; }
.feature-list { margin-top: 28px; display: grid; gap: 4px; }
.feature-list .item { display: flex; gap: 16px; padding: 18px 0; border-top: 1px solid var(--line-soft); }
.feature-list .item:last-child { border-bottom: 1px solid var(--line-soft); }
.feature-list .num { font-family: 'Space Grotesk', sans-serif; font-size: 14px; font-weight: 600; color: var(--blue); flex-shrink: 0; padding-top: 1px; }
.feature-list .item h4 { font-size: 16px; color: var(--blue-deep); margin-bottom: 4px; font-family: 'Space Grotesk', sans-serif; font-weight: 500; }
.feature-list .item p { font-size: 14px; color: var(--ink-mid); }
.split-visual { position: relative; border-radius: 8px; overflow: hidden; box-shadow: 0 24px 60px rgba(16,42,67,0.14); border: 1px solid var(--line-soft); aspect-ratio: 5 / 4; }
.split-visual img { width: 100%; height: 100%; object-fit: cover; }
.split-visual .visual-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 18px 14px; font-size: .82rem; font-weight: 500; color: #fff; background: linear-gradient(transparent, rgba(16,42,67,0.85)); }

/* partnership card with Brabant logo */
.partner-card { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 32px; }
.partner-card .logo-row { display: flex; align-items: center; gap: 18px; padding-bottom: 20px; border-bottom: 1px solid var(--line-soft); margin-bottom: 20px; }
.partner-card .logo-row img { height: 46px; width: auto; }
.partner-card .ftr { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 600; color: var(--blue); background: var(--blue-tint); padding: 7px 14px; border-radius: 100px; margin-top: 18px; }
.partner-card .ftr .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.partner-card.person { text-align: center; }
.person-photo { width: 124px; height: 124px; border-radius: 50%; overflow: hidden; margin: 0 auto 18px; border: 1px solid var(--line-soft); }
.person-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; }

/* ── GROUP CROSS-LINK BAND ──────────────────────────── */
.group-band { background: var(--blue-deep); color: #dce8f3; }
.group-band .shell { padding-top: 92px; padding-bottom: 92px; }
.group-band .eyebrow { color: var(--blue-ice); }
.group-band h2 { color: #fff; }
.group-band h2 .soft { color: var(--blue-ice); }
.group-band .lede { color: #aebfd0; }
.group-grid { margin-top: 48px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.group-tile {
  display: flex; flex-direction: column; gap: 16px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px; padding: 26px; transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.group-tile:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.25); transform: translateY(-2px); }
.group-tile .logo-pad { height: 38px; display: flex; align-items: center; }
.group-tile .logo-pad img { height: 32px; width: auto; }
.group-tile .logo-pad.wordmark { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 18px; color: #fff; }
.group-tile p { font-size: 14px; color: #aebfd0; flex: 1; }
.group-tile .go { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 600; color: var(--blue-ice); }
.group-tile .go svg { width: 14px; height: 14px; }

/* ── CONTACT / CTA ──────────────────────────────────── */
.contact { background: var(--paper); }
.contact .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; }
.contact-card { background: var(--blue-tint); border: 1px solid var(--line-soft); border-radius: 10px; padding: 40px; }
.contact-card h3 { font-size: 22px; margin-bottom: 22px; }
.cinfo { display: grid; gap: 20px; }
.cinfo .row { display: flex; gap: 15px; align-items: flex-start; }
.cinfo .ic { width: 38px; height: 38px; border-radius: 8px; background: #fff; border: 1px solid var(--line-soft); color: var(--blue); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cinfo .ic svg { width: 18px; height: 18px; }
.cinfo .lab { font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-soft); margin-bottom: 3px; }
.cinfo .val { font-size: 15px; color: var(--ink); }
.cinfo a.val:hover { color: var(--blue); }
.socials { margin-top: 26px; display: flex; gap: 12px; }
.socials a { width: 42px; height: 42px; border-radius: 8px; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--blue-deep); transition: .2s; }
.socials a:hover { background: var(--blue); color: #fff; border-color: var(--blue); }
.socials svg { width: 19px; height: 19px; }

/* ── FOOTER ─────────────────────────────────────────── */
footer { background: var(--blue-deep); color: #9fb3c6; }
.footer-top { max-width: var(--maxw); margin: 0 auto; padding: 64px 48px; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 48px; }
.footer-brand img { height: 76px; width: auto; margin-bottom: 18px; filter: brightness(0) invert(1); opacity: 0.92; }
.footer-brand p { font-size: 14px; color: #8ba0b5; max-width: 300px; }
.footer-col h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.14em; color: #cfe0f0; margin-bottom: 18px; font-family: 'Space Grotesk', sans-serif; font-weight: 500; }
.footer-col a { display: block; font-size: 14px; color: #9fb3c6; padding: 6px 0; transition: color .2s; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); }
.footer-bottom .inner { max-width: var(--maxw); margin: 0 auto; padding: 22px 48px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: #8093a6; }

/* ── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 940px) {
  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .hero-visual { max-width: 440px; }
  .svc-grid { grid-template-columns: repeat(2, 1fr); }
  .split .grid, .split.reverse .grid { grid-template-columns: 1fr; direction: ltr; gap: 40px; }
  .group-grid { grid-template-columns: 1fr; }
  .contact .grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  #nav { padding: 0 24px; }
  .shell { padding: 80px 24px; }
  .hero { padding: 104px 24px 64px; }
  .nav-toggle { display: flex; }
  .nav-links {
    display: none; position: absolute; top: 76px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 4px;
    background: #fff; padding: 18px 24px 26px; border-bottom: 1px solid var(--line);
    box-shadow: 0 20px 40px rgba(16,42,67,0.1);
  }
  #nav.open .nav-links { display: flex; }
  .nav-links a { padding: 10px 0; font-size: 16px; }
  .nav-links .nav-cta { margin-top: 8px; }
  .svc-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 36px; }
  .hero-meta { gap: 26px; }
}
