/* ==========================================================================
   Valorix BioSolutions LLC — Design System
   Palette sampled from the existing brand mark.
   ========================================================================== */

:root {
  /* Brand — sampled from logo + existing site */
  --ink-900: #04091F;
  --ink-800: #061031;
  --navy-900: #071444;
  --navy-800: #09116E; /* existing site headline indigo */
  --navy-700: #09214B; /* logo wordmark core */
  --navy-600: #123C7A;
  --blue-500: #1B6FB0;
  --cyan-400: #3FA9D4;
  --cyan-300: #7FD3EE;
  --ice-100: #DEF6FE; /* logo plate */
  --ice-050: #F2FBFF;
  --teal-700: #2A6069;
  --teal-500: #3E8C9B;

  --paper: #FFFFFF;
  --paper-tint: #F5FAFD;
  --line: #D9E7F0;
  --line-dark: rgba(127, 211, 238, 0.18);

  --text: #0E1B33;
  --text-muted: #4A5C77;
  --text-invert: #EAF6FD;
  --text-invert-muted: #A9C6DC;

  /* Type */
  --font-display: "Sora", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;

  --step--1: clamp(0.82rem, 0.79rem + 0.14vw, 0.9rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.09rem);
  --step-1: clamp(1.17rem, 1.1rem + 0.35vw, 1.4rem);
  --step-2: clamp(1.4rem, 1.27rem + 0.63vw, 1.85rem);
  --step-3: clamp(1.7rem, 1.46rem + 1.14vw, 2.5rem);
  --step-4: clamp(2.05rem, 1.63rem + 2.05vw, 3.4rem);
  --step-5: clamp(2.3rem, 1.75rem + 2.6vw, 4rem);

  /* Space */
  --gutter: clamp(1.15rem, 0.8rem + 1.8vw, 2.5rem);
  --section-y: clamp(4rem, 2.8rem + 6vw, 8.5rem);
  --max: 1240px;
  --max-narrow: 780px;

  --radius: 20px;
  --radius-sm: 12px;
  --radius-pill: 999px;

  --shadow-tile: 0 1px 2px rgba(9, 33, 75, 0.04), 0 12px 28px -12px rgba(9, 33, 75, 0.18);
  --shadow-tile-hover: 0 2px 4px rgba(9, 33, 75, 0.06), 0 30px 60px -20px rgba(9, 33, 75, 0.32);
  --shadow-dark: 0 20px 50px -24px rgba(0, 0, 0, 0.75);

  --ease: cubic-bezier(0.22, 0.68, 0.32, 1);
  --dur: 0.45s;

  --nav-h: 72px;
}

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

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
}

body {
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip; /* kill horizontal scroll without breaking sticky */
}

img, svg, canvas, video { display: block; max-width: 100%; }
img { height: auto; }

button, input, textarea, select { font: inherit; color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p { text-wrap: pretty; }

a { color: var(--navy-600); text-decoration-thickness: 1px; text-underline-offset: 3px; }

:focus-visible {
  outline: 3px solid var(--cyan-400);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 200;
  background: var(--navy-800);
  color: #fff;
  padding: 12px 20px;
  border-radius: 0 0 10px 10px;
  font-weight: 600;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 0; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* --------------------------------------------------------------------------
   Layout primitives
   -------------------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.wrap--narrow { max-width: var(--max-narrow); }

.section {
  position: relative;
  padding-block: var(--section-y);
  isolation: isolate;
}

.section--dark {
  background:
    radial-gradient(120% 90% at 12% 0%, #0D2A63 0%, transparent 60%),
    radial-gradient(100% 80% at 92% 100%, #0B3A55 0%, transparent 62%),
    linear-gradient(180deg, var(--ink-800) 0%, var(--navy-900) 55%, var(--ink-800) 100%);
  color: var(--text-invert);
}
.section--dark h2, .section--dark h3 { color: #fff; }
.section--dark p { color: var(--text-invert-muted); }
.section--dark a { color: var(--cyan-300); }

.section--tint { background: linear-gradient(180deg, var(--ice-050) 0%, var(--paper) 100%); }

/* Header block ------------------------------------------------------------ */
.sec-head { max-width: 62ch; margin-bottom: clamp(2rem, 1.2rem + 2.6vw, 3.6rem); }
.sec-head--center { max-width: 72ch; margin-inline: auto; text-align: center; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-display);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-700);
  margin-bottom: 1rem;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 2px;
  background: linear-gradient(90deg, var(--cyan-400), var(--teal-500));
  border-radius: 2px;
}
.section--dark .eyebrow { color: var(--cyan-300); }

.sec-head h2 { font-size: var(--step-4); margin-bottom: 1rem; color: var(--navy-800); }
.sec-head p { font-size: var(--step-1); color: var(--text-muted); }

/* On dark sections the generic .sec-head colours would otherwise win on
   source order and render navy-on-navy. */
.section--dark .sec-head h2 { color: #fff; }
.section--dark .sec-head p { color: var(--text-invert-muted); }

.lede { font-size: var(--step-1); color: var(--text-muted); }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  --btn-bg: var(--navy-800);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: 52px;
  padding: 0.85em 1.7em;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--step-0);
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
  box-shadow: 0 10px 24px -12px rgba(9, 17, 110, 0.85);
}
.btn::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 20%, rgba(255, 255, 255, 0.28) 50%, transparent 80%);
  transform: translateX(-120%);
  transition: transform 0.7s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 18px 36px -14px rgba(9, 17, 110, 0.9); }
.btn:hover::after { transform: translateX(120%); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: linear-gradient(135deg, var(--navy-800) 0%, var(--blue-500) 100%);
}
.btn--ghost {
  background: transparent;
  color: var(--navy-800);
  border-color: rgba(9, 33, 75, 0.24);
  box-shadow: none;
}
.btn--ghost:hover { background: var(--ice-100); border-color: var(--cyan-400); }

.section--dark .btn--ghost,
.hero .btn--ghost {
  color: #fff;
  border-color: rgba(127, 211, 238, 0.45);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(6px);
}
.section--dark .btn--ghost:hover,
.hero .btn--ghost:hover { background: rgba(127, 211, 238, 0.16); border-color: var(--cyan-300); }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.85rem; }

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease), backdrop-filter 0.35s var(--ease);
}
.nav__inner {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav.is-stuck {
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  box-shadow: 0 1px 0 var(--line), 0 12px 30px -22px rgba(9, 33, 75, 0.5);
}

.brand { display: flex; align-items: center; margin-right: auto; text-decoration: none; }
.brand img { height: 46px; width: auto; border-radius: 8px; }
@media (max-width: 480px) { .brand img { height: 38px; } }

.nav__menu { display: flex; align-items: center; gap: 0.25rem; }
.nav__links { display: flex; align-items: center; gap: 0.15rem; list-style: none; padding: 0; margin: 0; }

.nav__link {
  position: relative;
  display: block;
  padding: 0.6rem 0.85rem;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.nav:not(.is-stuck) .nav__link { color: rgba(255, 255, 255, 0.86); }
.nav:not(.is-stuck) .brand img { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22); }

.nav__link::after {
  content: "";
  position: absolute;
  left: 0.85rem; right: 0.85rem; bottom: 0.35rem;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--cyan-400), var(--teal-500));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.nav__link:hover::after,
.nav__link[aria-current="true"]::after { transform: scaleX(1); }
.nav__link[aria-current="true"] { color: var(--navy-800); font-weight: 600; }
.nav:not(.is-stuck) .nav__link[aria-current="true"] { color: #fff; }

.nav__cta { margin-left: 0.5rem; min-height: 44px; padding: 0.7em 1.35em; font-size: 0.95rem; }

.nav__toggle {
  display: none;
  width: 46px; height: 46px;
  align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid rgba(9, 33, 75, 0.18);
  border-radius: 12px;
  cursor: pointer;
}
.nav:not(.is-stuck) .nav__toggle { border-color: rgba(255, 255, 255, 0.3); }
.nav__toggle span,
.nav__toggle span::before,
.nav__toggle span::after {
  display: block;
  width: 20px; height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
}
.nav:not(.is-stuck) .nav__toggle span,
.nav:not(.is-stuck) .nav__toggle span::before,
.nav:not(.is-stuck) .nav__toggle span::after { background: #fff; }
.nav__toggle span { position: relative; }
.nav__toggle span::before { content: ""; position: absolute; top: -6px; }
.nav__toggle span::after { content: ""; position: absolute; top: 6px; }

body.nav-open .nav__toggle span { background: transparent !important; }
body.nav-open .nav__toggle span::before { transform: translateY(6px) rotate(45deg); }
body.nav-open .nav__toggle span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 980px) {
  .nav__toggle { display: inline-flex; }
  .nav__menu {
    position: fixed;
    inset: var(--nav-h) 0 0 0;
    background: linear-gradient(180deg, #071444 0%, #04091F 100%);
    padding: clamp(1.2rem, 4vw, 2rem) var(--gutter) 3rem;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    overflow-y: auto;
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s;
  }
  body.nav-open .nav__menu { opacity: 1; visibility: visible; transform: none; pointer-events: auto; }
  body.nav-open { overflow: hidden; }

  /* CRITICAL: backdrop-filter on .nav would make .nav the containing block for
     the fixed-position drawer, collapsing it to the 72px bar. Drop it while the
     drawer is open and paint the bar solid instead. */
  body.nav-open .nav,
  body.nav-open .nav.is-stuck {
    background: #071444;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
  }
  body.nav-open .brand img { box-shadow: none; }
  body.nav-open .nav__toggle { border-color: rgba(255, 255, 255, 0.32); }
  body.nav-open .nav__toggle span::before,
  body.nav-open .nav__toggle span::after { background: #fff; }

  .nav__links { flex-direction: column; align-items: stretch; gap: 0.2rem; width: 100%; }
  .nav__link,
  .nav:not(.is-stuck) .nav__link {
    color: #EAF6FD;
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 500;
    padding: 1rem 0.75rem;
    border-radius: 14px;
    border-bottom: 1px solid rgba(127, 211, 238, 0.14);
  }
  .nav__link::after { display: none; }
  .nav__link[aria-current="true"],
  .nav:not(.is-stuck) .nav__link[aria-current="true"] {
    color: var(--cyan-300);
    background: rgba(127, 211, 238, 0.1);
  }
  .nav__cta { margin: 1.5rem 0 0; width: 100%; min-height: 56px; font-size: 1.05rem; }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: min(100svh, 900px);
  display: flex;
  align-items: center;
  padding-block: calc(var(--nav-h) + clamp(3rem, 6vw, 5rem)) clamp(3rem, 6vw, 6rem);
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(90% 70% at 80% 15%, rgba(27, 111, 176, 0.42) 0%, transparent 60%),
    radial-gradient(70% 60% at 10% 90%, rgba(42, 96, 105, 0.5) 0%, transparent 65%),
    linear-gradient(165deg, #061031 0%, #071444 45%, #04091F 100%);
  color: var(--text-invert);
}

.hero__canvas {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  opacity: 0.95;
}

/* Photographic backdrop sitting beneath the generated helix. */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -3;
  overflow: hidden;
}
.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.46;
  filter: saturate(115%) contrast(105%);
  transform: scale(1.06);
}
.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(90% 70% at 78% 20%, rgba(7, 20, 68, 0.35) 0%, rgba(4, 9, 31, 0.82) 70%),
    linear-gradient(180deg, rgba(4, 9, 31, 0.62) 0%, rgba(6, 16, 49, 0.55) 45%, rgba(4, 9, 31, 0.88) 100%);
}

/* soft vignette so text always wins */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(100deg, rgba(4, 9, 31, 0.88) 0%, rgba(4, 9, 31, 0.55) 42%, rgba(4, 9, 31, 0.1) 72%);
  pointer-events: none;
}
@media (max-width: 860px) {
  .hero::after {
    background: linear-gradient(180deg, rgba(4, 9, 31, 0.7) 0%, rgba(4, 9, 31, 0.5) 45%, rgba(4, 9, 31, 0.9) 100%);
  }
}

.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
@media (max-width: 980px) { .hero__grid { grid-template-columns: 1fr; } }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.5em 1.1em 0.5em 0.7em;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(127, 211, 238, 0.35);
  background: rgba(127, 211, 238, 0.1);
  backdrop-filter: blur(10px);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--cyan-300);
  text-transform: uppercase;
}
.badge__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--cyan-300);
  box-shadow: 0 0 0 0 rgba(127, 211, 238, 0.7);
  animation: pulse 2.6s var(--ease) infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(127, 211, 238, 0.6); }
  70% { box-shadow: 0 0 0 12px rgba(127, 211, 238, 0); }
  100% { box-shadow: 0 0 0 0 rgba(127, 211, 238, 0); }
}

.hero h1 {
  font-size: var(--step-5);
  margin: 1.4rem 0 1.2rem;
  color: #fff;
}
.hero h1 .grad {
  /* end stop kept bright enough to clear 3:1 against the navy backdrop */
  background: linear-gradient(100deg, var(--cyan-300) 0%, #B6EBFB 45%, #6FC6DC 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__sub {
  font-size: var(--step-1);
  color: #C3DCEC;
  max-width: 52ch;
  margin-bottom: 2rem;
}
.hero .btn-row { margin-bottom: 2.6rem; }

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.6rem;
  font-size: var(--step--1);
  color: var(--text-invert-muted);
}
.hero__meta span { display: inline-flex; align-items: center; gap: 0.45em; }
.hero__meta svg { width: 15px; height: 15px; flex: none; color: var(--cyan-300); }

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 1.6rem;
  transform: translateX(-50%);
  display: grid;
  place-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(169, 198, 220, 0.7);
  text-decoration: none;
}
.scroll-cue__line {
  width: 1px; height: 42px;
  background: linear-gradient(180deg, transparent, var(--cyan-300));
  animation: cue 2.2s var(--ease) infinite;
}
@keyframes cue {
  0%, 100% { transform: scaleY(0.4); transform-origin: top; opacity: 0.4; }
  50% { transform: scaleY(1); transform-origin: top; opacity: 1; }
}
@media (max-width: 980px) { .scroll-cue { display: none; } }

/* --------------------------------------------------------------------------
   Floating tiles — the core motif
   -------------------------------------------------------------------------- */
.tiles {
  display: grid;
  gap: clamp(1rem, 0.6rem + 1.2vw, 1.6rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr));
}
.tiles--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.tiles--tight { grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }

.tile {
  position: relative;
  padding: clamp(1.4rem, 1.1rem + 1vw, 2rem);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-tile);
  /* No `overflow: hidden` here on purpose — it would force transform-style
     back to flat and kill the per-element depth inside a tilted tile. */
  isolation: isolate;
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease), border-color 0.5s var(--ease);
}

/* top gradient hairline */
.tile::before {
  content: "";
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 2px;
  border-radius: 0 0 2px 2px;
  background: linear-gradient(90deg, var(--cyan-400), var(--teal-500), transparent);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}
/* cursor-tracking glow */
.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: -1;
  background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%), rgba(63, 169, 212, 0.14), transparent 65%);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
}
.tile:hover::before, .tile:focus-within::before,
.tile:hover::after, .tile:focus-within::after { opacity: 1; }

.tile:hover, .tile:focus-within {
  box-shadow: var(--shadow-tile-hover);
  border-color: rgba(63, 169, 212, 0.5);
}

.tile h3 {
  font-size: var(--step-2);
  color: var(--navy-800);
  margin-bottom: 0.6rem;
  transform: translateZ(24px);
}
.tile p { color: var(--text-muted); transform: translateZ(14px); }
.tile > * { position: relative; }

/* Glass variant for dark backgrounds */
.tile--glass {
  background: rgba(255, 255, 255, 0.055);
  border-color: var(--line-dark);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: var(--shadow-dark);
  color: var(--text-invert);
}
.tile--glass h3 { color: #fff; }
.tile--glass p { color: var(--text-invert-muted); }
.tile--glass:hover, .tile--glass:focus-within {
  background: rgba(127, 211, 238, 0.1);
  border-color: rgba(127, 211, 238, 0.45);
}

/* Idle float — staggered so the grid breathes rather than pulses in unison */
.float { animation: float 7s ease-in-out infinite; }
.float:nth-child(2n) { animation-duration: 8.4s; animation-delay: -1.6s; }
.float:nth-child(3n) { animation-duration: 9.2s; animation-delay: -3.1s; }
.float:nth-child(4n) { animation-duration: 7.8s; animation-delay: -4.4s; }
@keyframes float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -9px; }
}
/* pause the idle float while a card is being tilted, so they don't fight */
.tile.is-tilting { animation-play-state: paused; }

/* Tile icon — 3D rotating scientific glyph */
.tile__icon {
  width: 56px; height: 56px;
  margin-bottom: 1.1rem;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(140deg, var(--ice-100), #FFFFFF);
  border: 1px solid var(--line);
  color: var(--navy-800);
  transform: translateZ(34px);
  perspective: 400px;
}
.tile--glass .tile__icon {
  background: linear-gradient(140deg, rgba(127, 211, 238, 0.16), rgba(255, 255, 255, 0.03));
  border-color: rgba(127, 211, 238, 0.3);
  color: var(--cyan-300);
}
.tile__icon svg { width: 28px; height: 28px; }
.tile__icon .spin3d {
  transform-style: preserve-3d;
  animation: spin3d 9s linear infinite;
}
@keyframes spin3d {
  from { transform: rotateY(0deg); }
  to { transform: rotateY(360deg); }
}
.tile:hover .tile__icon .spin3d { animation-duration: 2.6s; }

.tile__num {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--teal-500);
  margin-bottom: 0.7rem;
  transform: translateZ(20px);
}

/* `.tile p` / `.tile--glass p` are broad rules that would otherwise swallow
   the colour of every named <p> inside a tile. Re-assert them here. */
.tile .tile__num { color: var(--teal-500); transform: translateZ(20px); }
.tile--glass .tile__num { color: var(--cyan-300); }
.tile .stat__label { color: var(--text-invert-muted); transform: translateZ(12px); }
.tile .person__name,
.tile .founder__name { color: var(--navy-800); }
.tile .person__role,
.tile .founder__role { color: var(--teal-700); }
.tile--glass .person__name,
.tile--glass .founder__name { color: #fff; }
.tile--glass .person__role,
.tile--glass .founder__role { color: var(--cyan-300); }
.tile .form__status { color: #fff; }

/* Stat tiles ------------------------------------------------------------- */
.stat {
  text-align: left;
  padding: clamp(1.1rem, 0.9rem + 0.8vw, 1.5rem);
}
.stat__value {
  font-family: var(--font-display);
  font-size: var(--step-3);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  background: linear-gradient(120deg, var(--cyan-300), #FFFFFF);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.4rem;
  transform: translateZ(26px);
}
.stat__label {
  font-size: var(--step--1);
  line-height: 1.45;
  color: var(--text-invert-muted);
  transform: translateZ(12px);
}

/* --------------------------------------------------------------------------
   3D decorative scientific objects (CSS-driven, no libraries)
   -------------------------------------------------------------------------- */
.helix-stage {
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
  max-width: 460px;
  margin-inline: auto;
  perspective: 900px;
}
.helix-stage canvas { width: 100%; height: 100%; }

/* Rotating wireframe molecule used as a section ornament */
.molecule {
  position: absolute;
  width: 180px;
  height: 180px;
  perspective: 700px;
  pointer-events: none;
  opacity: 0.5;
  z-index: 0;
}
.molecule__inner {
  position: relative;
  width: 100%; height: 100%;
  transform-style: preserve-3d;
  animation: tumble 26s linear infinite;
}
@keyframes tumble {
  0% { transform: rotateX(12deg) rotateY(0deg) rotateZ(0deg); }
  100% { transform: rotateX(12deg) rotateY(360deg) rotateZ(360deg); }
}
.molecule__ring {
  position: absolute;
  inset: 0;
  border: 1.5px solid rgba(63, 169, 212, 0.55);
  border-radius: 50%;
}
.molecule__ring:nth-child(1) { transform: rotateY(0deg); }
.molecule__ring:nth-child(2) { transform: rotateY(60deg); }
.molecule__ring:nth-child(3) { transform: rotateY(120deg); }
.molecule__ring:nth-child(4) { transform: rotateX(70deg); border-color: rgba(42, 96, 105, 0.5); }
.molecule__node {
  position: absolute;
  top: 50%; left: 50%;
  width: 12px; height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #BFEEFF, var(--cyan-400));
  box-shadow: 0 0 14px rgba(63, 169, 212, 0.9);
}

.molecule--a { top: -40px; right: -50px; }
.molecule--b { bottom: -30px; left: -60px; width: 130px; height: 130px; opacity: 0.35; }
@media (max-width: 860px) { .molecule { display: none; } }

/* Ambient particle canvas for dark sections */
.lattice-canvas {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%; height: 100%;
  opacity: 0.55;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Photography
   -------------------------------------------------------------------------- */

/* Framed image block */
.figure {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-tile);
  border: 1px solid var(--line);
  background: var(--paper-tint);
}
.figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 1.2s var(--ease);
}
.figure--4x3 { aspect-ratio: 4 / 3; }
.figure--16x9 { aspect-ratio: 16 / 9; }
.figure:hover img { transform: scale(1.04); }

/* A subtle brand wash so stock photography reads as part of the palette
   rather than dropped in from elsewhere. */
.figure::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(9, 17, 110, 0.06) 0%, rgba(42, 96, 105, 0.14) 100%);
  pointer-events: none;
}
.section--dark .figure { border-color: var(--line-dark); box-shadow: var(--shadow-dark); }

/* Photo header inside a floating tile */
.tile__media {
  position: relative;
  margin: calc(-1 * clamp(1.4rem, 1.1rem + 1vw, 2rem)) calc(-1 * clamp(1.4rem, 1.1rem + 1vw, 2rem)) 1.4rem;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--ice-050);
}
.tile__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--ease), filter 0.6s var(--ease);
}
.tile__media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(6, 16, 49, 0.55) 100%);
}
.tile:hover .tile__media img { transform: scale(1.06); }

/* Icon badge floating over a tile photo */
.tile__media + .tile__icon {
  margin-top: -3.2rem;
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 24px -12px rgba(9, 33, 75, 0.6);
}

/* Full-bleed photographic section background */
.section--photo { position: relative; isolation: isolate; }
.section__bg {
  position: absolute;
  inset: 0;
  z-index: -3;
  overflow: hidden;
}
.section__bg img {
  width: 100%; height: 100%;
  object-fit: cover;
}
/* The scrim is what keeps text legible over any photo. */
/* Two-layer scrim: a soft radial that lets the photo breathe on the right,
   and a linear floor that guarantees contrast under the copy on the left. */
.section__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(100deg, rgba(4, 9, 31, 0.94) 0%, rgba(6, 16, 49, 0.86) 38%, rgba(7, 20, 68, 0.62) 100%),
    linear-gradient(180deg, rgba(4, 9, 31, 0.8) 0%, rgba(7, 20, 68, 0.7) 45%, rgba(4, 9, 31, 0.9) 100%);
}
@media (max-width: 900px) {
  /* Single-column layout puts text over the whole width — go heavier. */
  .section__bg::after {
    background: linear-gradient(180deg, rgba(4, 9, 31, 0.93) 0%, rgba(7, 20, 68, 0.9) 50%, rgba(4, 9, 31, 0.95) 100%);
  }
}

/* Portrait avatars ------------------------------------------------------- */
.avatar {
  flex: none;
  border-radius: 50%;
  overflow: hidden;
  background: var(--ice-100);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9), 0 10px 26px -12px rgba(9, 33, 75, 0.7);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--sm { width: 72px; height: 72px; }
.avatar--lg {
  width: 132px; height: 132px;
  margin: 0 auto 1.2rem;
  transform: translateZ(30px);
  box-shadow: 0 0 0 3px var(--ice-100), 0 16px 34px -14px rgba(9, 33, 75, 0.75);
}

/* Logo plate — the mark ships on white, so give it padding and round it
   instead of trying to key out a background the wordmark needs. */
.brand img,
.footer img {
  border-radius: 8px;
  background: #fff;
}
.nav:not(.is-stuck) .brand img {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25), 0 6px 18px -8px rgba(0, 0, 0, 0.6);
}
.footer img { border-radius: 12px; }

/* --------------------------------------------------------------------------
   Scroll reveal
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }
.reveal[data-delay="4"] { transition-delay: 0.32s; }
.reveal[data-delay="5"] { transition-delay: 0.4s; }

/* --------------------------------------------------------------------------
   About
   -------------------------------------------------------------------------- */
.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: start;
}
@media (max-width: 900px) { .about__grid { grid-template-columns: 1fr; } }

.about__body p + p { margin-top: 1.1rem; }

.mission-card {
  position: relative;
  padding: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem);
  border-radius: var(--radius);
  background: linear-gradient(150deg, var(--navy-800) 0%, #123C7A 55%, var(--teal-700) 100%);
  color: #fff;
  overflow: hidden;
  box-shadow: 0 24px 60px -28px rgba(9, 17, 110, 0.8);
}
.mission-card::before {
  content: "";
  position: absolute;
  inset: auto -30% -60% auto;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(127, 211, 238, 0.35), transparent 65%);
}
.mission-card h3 { font-size: var(--step-2); margin-bottom: 0.8rem; position: relative; }
.mission-card p { color: #D3EAF7; position: relative; font-size: var(--step-1); }

.values { list-style: none; padding: 0; margin-top: 1.6rem; display: grid; gap: 0.6rem; }
.values li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-weight: 500;
  transition: transform 0.3s var(--ease), background 0.3s var(--ease);
}
.values li:hover { transform: translateX(6px); background: rgba(127, 211, 238, 0.18); }
.values svg { width: 18px; height: 18px; flex: none; color: var(--cyan-300); }

.founder {
  display: flex;
  gap: 1.2rem;
  align-items: flex-start;
  margin-top: 1.8rem;
  padding: 1.4rem;
  border-radius: var(--radius);
  background: var(--paper-tint);
  border: 1px solid var(--line);
}
.founder__avatar {
  flex: none;
  width: 64px; height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  color: #fff;
  background: linear-gradient(140deg, var(--navy-800), var(--teal-500));
  letter-spacing: -0.02em;
}
.founder__name { font-family: var(--font-display); font-weight: 600; font-size: var(--step-1); color: var(--navy-800); }
.founder__role { font-size: var(--step--1); color: var(--teal-700); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 0.5rem; }
.founder p { font-size: 0.96rem; }

/* --------------------------------------------------------------------------
   NAICS codes
   -------------------------------------------------------------------------- */
.naics {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  list-style: none;
  padding: 0;
}
.naics li {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line-dark);
  backdrop-filter: blur(10px);
  transition: transform 0.35s var(--ease), background 0.35s var(--ease), border-color 0.35s var(--ease);
}
.naics li:hover {
  transform: translateY(-4px);
  background: rgba(127, 211, 238, 0.12);
  border-color: rgba(127, 211, 238, 0.5);
}
.naics__code {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--cyan-300);
  letter-spacing: 0.02em;
  flex: none;
}
.naics__label { font-size: 0.88rem; line-height: 1.4; color: var(--text-invert-muted); }

/* Checklist -------------------------------------------------------------- */
.checklist { list-style: none; padding: 0; display: grid; gap: 0.9rem; }
.checklist li { display: flex; gap: 0.85rem; align-items: flex-start; line-height: 1.55; }
.checklist svg {
  flex: none;
  width: 22px; height: 22px;
  margin-top: 2px;
  color: var(--teal-500);
}
.section--dark .checklist svg { color: var(--cyan-300); }

/* --------------------------------------------------------------------------
   Team
   -------------------------------------------------------------------------- */
.team-note {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  max-width: 62ch;
  margin: 0 auto clamp(2rem, 4vw, 3rem);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  background: #FFF8E6;
  border: 1px solid #F0DFB0;
  color: #6B5316;
  font-size: 0.92rem;
}
.team-note svg { flex: none; width: 20px; height: 20px; margin-top: 2px; }

.person { text-align: center; }
.person__photo {
  position: relative;
  width: 118px; height: 118px;
  margin: 0 auto 1.1rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    repeating-linear-gradient(45deg, var(--ice-050) 0 10px, var(--ice-100) 10px 20px);
  border: 2px dashed rgba(63, 169, 212, 0.5);
  color: var(--navy-600);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6rem;
  transform: translateZ(30px);
}
.person__photo span { opacity: 0.55; }
.person__name { font-family: var(--font-display); font-weight: 600; font-size: var(--step-1); color: var(--navy-800); }
.person__role { font-size: var(--step--1); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--teal-700); margin-bottom: 0.7rem; }
.person p { font-size: 0.94rem; }
.pill-placeholder {
  display: inline-block;
  margin-top: 0.9rem;
  padding: 0.3em 0.9em;
  border-radius: var(--radius-pill);
  background: #FFF3D6;
  border: 1px solid #EBD79E;
  color: #7A5E17;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Wellness
   -------------------------------------------------------------------------- */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  padding: 0.45em 1.1em;
  border-radius: var(--radius-pill);
  background: rgba(63, 169, 212, 0.12);
  border: 1px solid rgba(63, 169, 212, 0.4);
  color: var(--teal-700);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.section--dark .status-pill { color: var(--cyan-300); background: rgba(127, 211, 238, 0.12); }

/* Wellness two-column ----------------------------------------------------- */
.wellness__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
}
@media (max-width: 900px) { .wellness__grid { grid-template-columns: 1fr; } }

.wellness__list { display: grid; gap: 0.9rem; margin-top: 2rem; }
.wellness__list .tile { padding: 1.1rem 1.3rem; }
.wellness__list h3 { font-size: var(--step-1); margin-bottom: 0.3rem; }
.wellness__list p { font-size: 0.94rem; }

/* Capabilities photo CTA -------------------------------------------------- */
.tile--cta {
  border-color: transparent;
  color: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 300px;
}
.tile--cta > img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: -2;
}
.tile--cta::before {
  content: "";
  position: absolute;
  inset: 0;
  left: 0; right: 0;
  height: auto;
  z-index: -1;
  opacity: 1;
  border-radius: inherit;
  background: linear-gradient(160deg, rgba(9, 17, 110, 0.82) 0%, rgba(42, 96, 105, 0.88) 100%);
}
.tile--cta h3 { color: #fff; }
.tile--cta p { color: #D3EAF7; }
.tile--cta:hover > img { transform: scale(1.05); }
.tile--cta > img { transition: transform 1.2s var(--ease); }

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */
.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
}
@media (max-width: 900px) { .contact__grid { grid-template-columns: 1fr; } }

.contact-list { list-style: none; padding: 0; display: grid; gap: 1rem; margin-top: 1.8rem; }
.contact-list li { display: flex; gap: 1rem; align-items: flex-start; }
.contact-list svg { flex: none; width: 22px; height: 22px; color: var(--cyan-300); margin-top: 3px; }
.contact-list a { color: #fff; font-weight: 500; text-decoration: none; border-bottom: 1px solid rgba(127, 211, 238, 0.5); }
.contact-list a:hover { color: var(--cyan-300); }
.contact-list__label { display: block; font-size: 0.76rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-invert-muted); margin-bottom: 0.15rem; }

.form { display: grid; gap: 1.1rem; }
.form__row { display: grid; gap: 1.1rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 620px) { .form__row { grid-template-columns: 1fr; } }

.field { display: grid; gap: 0.4rem; }
.field label { font-size: var(--step--1); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--cyan-300); }
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 52px;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(127, 211, 238, 0.28);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.field textarea { min-height: 130px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: rgba(169, 198, 220, 0.55); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--cyan-300);
  background: rgba(127, 211, 238, 0.1);
  box-shadow: 0 0 0 4px rgba(63, 169, 212, 0.18);
}
.field select option { background: var(--navy-900); color: #fff; }

.form__note { font-size: 0.84rem; color: var(--text-invert-muted); }
.form__status {
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius-sm);
  background: rgba(63, 169, 212, 0.16);
  border: 1px solid rgba(127, 211, 238, 0.5);
  color: #fff;
  font-size: 0.94rem;
}
.form__status[hidden] { display: none; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer {
  background: var(--ink-900);
  color: var(--text-invert-muted);
  padding-block: clamp(3rem, 5vw, 4.5rem) 2rem;
  border-top: 1px solid rgba(127, 211, 238, 0.12);
}
.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(127, 211, 238, 0.12);
}
@media (max-width: 900px) { .footer__grid { grid-template-columns: 1fr 1fr; gap: 2rem; } }
@media (max-width: 560px) { .footer__grid { grid-template-columns: 1fr; } }

/* Long email addresses must never push the layout wider than the viewport. */
.footer li, .footer a, .contact-list a { overflow-wrap: anywhere; word-break: break-word; }

.footer img { height: 40px; width: auto; border-radius: 6px; margin-bottom: 1.1rem; }
.footer h4 {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 1rem;
}
.footer ul { list-style: none; padding: 0; display: grid; gap: 0.6rem; }
.footer a { color: var(--text-invert-muted); text-decoration: none; transition: color 0.2s var(--ease); }
.footer a:hover { color: var(--cyan-300); }
.footer__bottom {
  padding-top: 1.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  justify-content: space-between;
  font-size: 0.84rem;
}

/* Back to top ------------------------------------------------------------- */
.to-top {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: 90;
  width: 48px; height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(9, 33, 75, 0.14);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  color: var(--navy-800);
  box-shadow: 0 12px 28px -14px rgba(9, 33, 75, 0.6);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: #fff; transform: translateY(-3px); }
.to-top svg { width: 20px; height: 20px; }

/* --------------------------------------------------------------------------
   Reduced motion & print
   -------------------------------------------------------------------------- */
@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;
  }
  .reveal { opacity: 1; transform: none; }
  .float { animation: none; }
  .hero__canvas, .lattice-canvas { display: none; }
}

@media print {
  .nav, .to-top, .hero__canvas, .lattice-canvas, .molecule, .scroll-cue { display: none !important; }
  body { color: #000; background: #fff; }
  .section--dark, .hero { background: #fff !important; color: #000 !important; }
  .section--dark h2, .section--dark h3, .hero h1 { color: #000 !important; }
  .section--dark p, .hero__sub { color: #333 !important; }
  .tile { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
}
