/* ==========================================================================
   Total Analysis — Design System
   ========================================================================== */

:root {
  /* Brand palette — nods to the existing logo (navy + green) but pushed
     toward a more credible, clinical biotech feel */
  --color-ink:        #0B1B24;
  --color-navy:       #0F3D56;
  --color-navy-dark:  #0A2C3F;
  --color-teal:       #1B7A6E;
  --color-green:      #5FAE46;
  --color-bg:         #FAFAF8;
  --color-bg-alt:     #F1F4F2;
  --color-surface:    #FFFFFF;
  --color-border:     #E2E6E3;
  --color-muted:      #56666D;
  --color-muted-2:    #7C8A90;
  --color-mint:       #D6F0E8;
  --color-mint-tint:  #F2FBF8;
  --color-teal-accent:#2A9D8F;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto, "Helvetica Neue", Arial, sans-serif;

  --max-width: 1180px;
  --radius: 10px;
  --radius-sm: 6px;

  --shadow-sm: 0 1px 2px rgba(11, 27, 36, 0.06);
  --shadow-md: 0 8px 24px rgba(11, 27, 36, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-ink);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.7;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
}

/* ------------------------------ Header ------------------------------ */

/* Header starts WHITE at the top of the page and transitions to dark navy
   once scrolled past the threshold (see .scrolled below + js/main.js). */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #ffffff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
  transition: background 0.35s ease, box-shadow 0.35s ease;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
  padding-inline: clamp(28px, 5vw, 72px);
  transition: padding 0.35s ease;
}

.brand {
  display: inline-flex;
  align-items: center;
  transition: opacity 0.2s ease;
}

.brand:hover {
  opacity: 0.85;
}

.brand img {
  height: 58px;
  width: min(48vw, 224px);
  object-fit: contain;
  padding: 4px;
  display: block;
  /* full colour on the white header; inverted to white in the scrolled state */
  transition: filter 0.35s ease;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 40px;
}

.main-nav__links {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav__links a {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-navy-dark);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease, color 0.35s ease;
}

.main-nav__links a:hover {
  color: var(--color-green);
}

.main-nav__links a:hover,
.main-nav__links a[aria-current="page"] {
  border-bottom-color: var(--color-green);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-navy-dark);
  margin: 5px 0;
  border-radius: 2px;
  transition: background-color 0.35s ease;
}

.nav-toggle:hover span {
  background: var(--color-green);
}

/* --- Scrolled (dark) state: header goes navy once past the threshold --- */
.site-header.scrolled {
  background: var(--color-navy-dark);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
}

.site-header.scrolled .site-header__inner {
  padding-top: 10px;
  padding-bottom: 10px;
}

.site-header.scrolled .main-nav__links a {
  color: rgba(255, 255, 255, 0.9);
}

.site-header.scrolled .main-nav__links a:hover {
  color: var(--color-green);
}

.site-header.scrolled .brand img {
  filter: brightness(0) invert(1);
}

.site-header.scrolled .nav-toggle span {
  background: rgba(255, 255, 255, 0.9);
}

/* ------------------------------ Sections ------------------------------ */

section {
  padding: 96px 0;
}

.section--tight {
  padding: 64px 0;
}

.section--alt {
  background: var(--color-bg-alt);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-teal);
  margin-bottom: 20px;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--color-green);
  display: inline-block;
}

h1, h2, h3, h4 {
  font-weight: 700;
  color: var(--color-navy-dark);
  line-height: 1.15;
  margin: 0 0 20px;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2.5rem, 4.4vw, 3.75rem);
}

h2 {
  font-size: clamp(2rem, 3.6vw, 3rem);
}

h3 {
  font-size: 1.3rem;
}

p {
  margin: 0 0 18px;
  color: var(--color-muted);
  max-width: 62ch;
}

.lede {
  font-size: 1.3rem;
  color: var(--color-ink);
  max-width: 58ch;
}

.text-center {
  text-align: center;
}

.text-center p,
.text-center .lede {
  margin-left: auto;
  margin-right: auto;
}

/* ------------------------------ Hero ------------------------------ */

.hero {
  padding: 88px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 64px;
  align-items: center;
}

.hero--home h1 {
  font-size: clamp(3rem, 5vw, 4rem);
  font-weight: 800;
  color: var(--color-navy);
}

.hero--home h1 .accent {
  display: inline-block;
  color: var(--color-green);
}

.hero__copy p:last-of-type {
  margin-bottom: 0;
}

.hero__copy .fact {
  color: var(--color-navy-dark);
  font-weight: 600;
}

.hero__visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Subtle topographic texture lives behind the graphic/photo only — never
   behind .hero__copy's body text — and bleeds past the visual's own box
   into the surrounding whitespace for a less boxed-in feel. */
.hero__visual::before {
  content: "";
  position: absolute;
  inset: -28px;
  z-index: -1;
  background-image: url('../img/pattern-topo.svg');
  background-size: 400px 250px;
  background-repeat: repeat;
}

.hero__visual svg {
  width: 100%;
  height: auto;
  max-width: 460px;
}

.hero__visual img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

/* ------------------------------ Problem-framing band ------------------------------ */

.problem-band {
  background: var(--color-navy);
  padding: 64px 0;
}

.problem-band__text {
  color: #fff;
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
  font-weight: 600;
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
}

/* ------------------------------ Recognitions strip ------------------------------ */

.recognitions {
  background: var(--color-mint-tint);
  padding: 72px 0;
}

.recognitions__inner {
  text-align: center;
}

.recognitions__label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted-2);
  margin-bottom: 16px;
}

.recognitions__intro {
  color: var(--color-muted);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto 40px;
}

.logo-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 48px;
  margin-bottom: 28px;
}

.logo-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 160px;
  height: 72px;
}

.logo-badge img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Modifier for logo marks that include white/light artwork with no
   background of their own (unlike the other partner logos, which ship as
   flattened images already sitting on white). A navy chip gives them the
   contrast they need instead of a white card, which would leave their
   white elements unreadable against it. */
.logo-badge--dark {
  background: var(--color-navy);
  border-radius: var(--radius-sm);
  padding: 10px 20px;
}

.logo-badge:hover img {
  transform: scale(1.05);
}

.recognitions__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-teal);
}

.recognitions__link:hover {
  color: var(--color-teal-accent);
}

/* ------------------------------ Cards / Nav teasers ------------------------------ */

.teaser-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.teaser-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.teaser-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}

.teaser-card__icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--color-bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--color-teal);
  transition: transform 0.2s ease;
}

.teaser-card:hover .teaser-card__icon {
  transform: scale(1.08);
}

/* Home page feature cards get the mint/teal icon treatment */
.teaser-grid .teaser-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--color-mint);
  color: var(--color-teal-accent);
}

.teaser-card h3 {
  margin-bottom: 10px;
  color: var(--color-navy-dark);
}

.teaser-card p {
  margin-bottom: 14px;
  font-size: 0.95rem;
}

.teaser-card__link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-teal);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.teaser-card__link svg {
  width: 14px;
  height: 14px;
  transition: transform 0.15s ease;
}

.teaser-card:hover .teaser-card__link svg {
  transform: translateX(3px);
}

/* Contact page's narrow centered column, so the intro copy and the
   embedded form line up at a readable width instead of stretching the
   full container. */
.contact-layout {
  max-width: 640px;
  margin: 0 auto;
}

/* Contact page's embedded-form wrapper: same surface/border/radius as
   .teaser-card, without the card-grid sizing or hover treatment, plus a
   navy top accent and .teaser-card's own resting shadow for presence. */
.contact-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--color-navy);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
}

.contact-card iframe {
  display: block;
  width: 100%;
  border: 0;
}

.contact-card__external {
  display: none;
}

/* ------------------------------ News ------------------------------ */

.news-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.news-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.news-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.news-card__media {
  display: block;
  aspect-ratio: 16 / 10;
  background: var(--color-bg-alt);
}

.news-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.news-card:hover .news-card__media img {
  transform: scale(1.04);
}

.news-card__body {
  padding: 24px 26px 28px;
}

.news-card__source {
  display: block;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-teal);
  margin-bottom: 10px;
}

.news-card__body :is(h2, h3) {
  margin-bottom: 14px;
  line-height: 1.35;
}

.news-card__body :is(h2, h3) a {
  color: var(--color-navy-dark);
}

.news-card__body :is(h2, h3) a:hover {
  color: var(--color-teal);
}

.news-card__link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-teal);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.news-card__link svg {
  width: 14px;
  height: 14px;
  transition: transform 0.15s ease;
}

.news-card:hover .news-card__link svg {
  transform: translateX(3px);
}

/* ------------------------------ Team ------------------------------ */

.section-head {
  margin-bottom: 48px;
}

.section-head h2 {
  margin-bottom: 10px;
}

.section-head p {
  margin-bottom: 0;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

.team-card {
  perspective: 1200px;
  transition: transform 0.2s ease;
}

.team-card:hover,
.team-card:focus-within {
  transform: translateY(-3px);
}

/* Flip mechanism — CSS 3D transform, no library.
   Trigger is click / tap / Enter / Space only (see js/main.js), which
   toggles .is-flipped. CSS :hover is deliberately NOT a trigger, so a
   card stays put until the user clicks it again. Each card is independent. */
.team-card__flip {
  position: relative;
  width: 100%;
  height: 400px;
  cursor: pointer;
  user-select: none;
  transform-style: preserve-3d;
  transition: transform 0.6s ease;
}

.team-card__flip:focus-visible {
  outline: 2px solid var(--color-teal-accent);
  outline-offset: 4px;
}

.team-card__flip.is-flipped {
  transform: rotateY(180deg);
}

.team-card__face {
  position: absolute;
  inset: 0;
  padding: 28px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transition: box-shadow 0.2s ease;
}

.team-card:hover .team-card__face,
.team-card:focus-within .team-card__face {
  box-shadow: var(--shadow-md);
}

.team-card__face--back {
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  /* "safe center" keeps short bios visually centred but falls back to
     top-alignment when content overflows, so the scroll stays reachable */
  justify-content: safe center;
  overflow-y: auto;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.7;
}

.team-card__face--back::-webkit-scrollbar {
  width: 4px;
}

.team-card__face--back::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.team-card__photo {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 20px;
  background: var(--color-bg-alt);
}

.team-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-card__name {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--color-navy-dark);
  margin-bottom: 2px;
}

.team-card__title {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-teal);
  margin-bottom: 14px;
}

.team-card__hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 0.72rem;
  font-style: italic;
  color: var(--color-muted-2);
}

.team-card__hint svg {
  flex-shrink: 0;
  color: var(--color-teal-accent);
}

.team-card__face--back .team-card__title {
  margin-bottom: 10px;
}

.team-card__bio {
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 0;
  max-width: none;
}

/* LinkedIn pill badge on team-card back faces */
.team-card__linkedin {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 14px;
  padding: 4px 12px;
  border-radius: 20px;
  background: #5FAE46;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.team-card__linkedin:hover {
  background: #4F9A3B;
  color: #fff;
}

.team-card__linkedin svg {
  flex-shrink: 0;
}

/* Placeholder / intern cards — dashed border, faded, silhouette avatar */
.team-card--placeholder .team-card__face {
  border: 2px dashed #cbd5e1;
  opacity: 0.85;
}

.team-card__silhouette {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  margin-bottom: 20px;
  background: var(--color-bg-alt);
  color: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.team-card__note {
  margin: 0;
  color: #94a3b8;
  font-style: italic;
  font-size: 13px;
}

@media (prefers-reduced-motion: reduce) {
  .team-card__flip {
    transition: none;
  }
}

/* ------------------------------ Trust strip ------------------------------ */

.trust-strip {
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: 28px 0;
  background: var(--color-surface);
}

.trust-strip__inner {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.92rem;
  color: var(--color-muted);
}

.trust-strip__badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--color-bg-alt);
  color: var(--color-navy);
}

/* ------------------------------ Placeholder blocks ------------------------------ */

.placeholder {
  border: 1.5px dashed #C7CFC9;
  border-radius: var(--radius);
  background: repeating-linear-gradient(
    135deg,
    #F1F4F2,
    #F1F4F2 10px,
    #EAEEEA 10px,
    #EAEEEA 20px
  );
  color: var(--color-muted-2);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.85rem;
  padding: 24px;
  min-height: 160px;
}

.placeholder__label {
  max-width: 220px;
}

.placeholder--avatar {
  border-radius: 50%;
  min-height: 0;
  aspect-ratio: 1 / 1;
  font-size: 0.7rem;
  padding: 10px;
}

/* ------------------------------ Footer ------------------------------ */

.site-footer {
  background: var(--color-navy-dark);
  color: #C9D3D6;
  padding: 56px 0 28px;
}

.site-footer a {
  color: #C9D3D6;
}

.footer__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 32px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer__brand img {
  width: min(100%, 208px);
  height: 40px;
  object-fit: contain;
  object-position: left center;
  padding: 4px;
  margin-bottom: 12px;
  filter: brightness(0) invert(1);
}

.footer__brand p {
  color: #93A4AA;
  font-size: 0.9rem;
  max-width: 32ch;
  margin: 0;
}

.footer__social {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #93A4AA;
}

.footer__social:hover {
  color: #fff;
}

.footer__nav {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
}

.footer__col h4 {
  color: #fff;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}

.footer__col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.footer__col a {
  font-size: 0.9rem;
  color: #C9D3D6;
}

.footer__col a:hover {
  color: #fff;
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 24px;
  font-size: 0.82rem;
  color: #7E8F95;
}

/* ------------------------------ Buttons ------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.btn--primary {
  background: var(--color-green);
  color: #fff;
  border-radius: 9999px;
  padding: 12px 28px;
  text-decoration: none;
}

.btn--primary:hover {
  background: #4F9A3B;
  transform: translateY(-2px);
}

.btn--ghost {
  border-color: var(--color-border);
  color: var(--color-navy);
  background: transparent;
}

.btn--ghost:hover {
  border-color: var(--color-navy);
  transform: translateY(-2px);
}

/* ------------------------------ Scroll reveal ------------------------------ */
/* Elements marked .reveal fade + rise into place the first time they cross
   into the viewport (see js/main.js). Gated behind prefers-reduced-motion
   so reduced-motion users simply see the final, settled layout. */

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  }

  .reveal.in-view {
    opacity: 1;
    transform: translateY(0);
  }

  /* Stagger direct children of a .stagger container by ~90ms each */
  .stagger > *:nth-child(1) { transition-delay: 0ms; }
  .stagger > *:nth-child(2) { transition-delay: 90ms; }
  .stagger > *:nth-child(3) { transition-delay: 180ms; }
  .stagger > *:nth-child(4) { transition-delay: 270ms; }
  .stagger > *:nth-child(5) { transition-delay: 0ms; }
  .stagger > *:nth-child(6) { transition-delay: 90ms; }
  .stagger > *:nth-child(7) { transition-delay: 180ms; }
}

/* ------------------------------ Responsive ------------------------------ */

/* Team flip-cards need real width to fit the longest bio on the back face
   without overflowing the fixed-height card — so they drop from 4 columns
   to 2 earlier than the other grids (at the container's own max-width,
   rather than 900px), guaranteeing each card is always >=~270px wide
   whenever 4 columns are shown. */
@media (max-width: 1180px) {
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

  .hero__visual svg {
    max-width: 320px;
  }

  .teaser-grid {
    grid-template-columns: 1fr;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .news-grid {
    grid-template-columns: 1fr;
  }

  .footer__top {
    flex-direction: column;
  }
}

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

  .contact-card {
    padding: 12px 0;
  }

  .contact-card__external {
    display: block;
    margin: 0 12px 12px;
    padding: 9px 0;
    color: var(--color-navy);
    font-weight: 600;
    text-decoration: underline;
  }
}

@media (max-width: 1180px) {
  .main-nav__links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-surface);
    flex-direction: column;
    gap: 0;
    max-height: calc(100vh - 78px);
    max-height: calc(100dvh - 78px);
    overflow-y: auto;
    overscroll-behavior-y: contain;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
  }

  .main-nav__links.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  /* dropdown panel is a light surface, so its links go back to dark ink */
  .main-nav__links li {
    flex: none;
  }

  .main-nav__links li + li {
    border-top: 1px solid var(--color-border);
  }

  .main-nav__links a {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 10px 32px;
    color: var(--color-navy);
    border-bottom: 0;
    border-left: 2px solid transparent;
  }

  .main-nav__links a:focus-visible {
    outline-offset: -3px;
  }

  .main-nav__links a:hover {
    color: var(--color-navy-dark);
  }

  /* the dropdown panel is always a light surface, so keep its links dark
     even while the header itself is in the scrolled/navy state */
  .site-header.scrolled .main-nav__links a {
    color: var(--color-navy);
  }

  .site-header.scrolled .main-nav__links a:hover {
    color: var(--color-navy-dark);
  }

  .main-nav__links a[aria-current="page"] {
    border-left-color: var(--color-green);
  }

  .nav-toggle {
    display: block;
  }

  section {
    padding: 64px 0;
  }

  .container {
    padding: 0 20px;
  }

  .site-header__inner {
    padding-top: 10px;
    padding-bottom: 10px;
    padding-inline: clamp(28px, 5vw, 72px);
  }
}


.contact-card form { display: grid; gap: 16px; }
.contact-card label { display: grid; gap: 4px; font-weight: 600; }
.contact-card input, .contact-card textarea {
  width: 100%; min-width: 0; padding: 10px; font: inherit;
  border: 1px solid var(--color-border); border-radius: var(--radius-sm);
}
.contact-card textarea { resize: vertical; }
.contact-card button { justify-self: start; }
.contact-card [role="status"]:empty { display: none; }
@media (max-width: 520px) {
  .contact-card form { padding-inline: 12px; }
}


/* Commercial pages share the site palette, spacing and card styles. */
.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 1100;
  transform: translateY(-180%); padding: 10px 16px;
  border-radius: var(--radius-sm); color: #fff; background: var(--color-navy);
}
.skip-link:focus { transform: none; color: #fff; }
:focus-visible { outline: 3px solid #23705e; outline-offset: 4px; }

@media (min-width: 1181px) {
  .site-header__inner { padding-inline: clamp(24px, 3.2vw, 58px); gap: 18px; }
  .main-nav__links { align-items: center; gap: clamp(10px, 1.25vw, 24px); }
  .main-nav__links a { font-size: .92rem; white-space: nowrap; }
}

.main-nav__links .main-nav__consult a {
  display: block; padding: 9px 14px; border: 0;
  border-radius: var(--radius-sm); background: var(--color-navy); color: #fff;
}
.site-header.scrolled .main-nav__links .main-nav__consult a {
  background: #fff; color: var(--color-navy);
}
.main-nav__links .main-nav__consult a:hover { background: #174d64; color: #fff; }
@media (max-width: 1180px) {
  .main-nav__links .main-nav__consult { padding: 10px 20px; }
  .main-nav__links .main-nav__consult a,
  .site-header.scrolled .main-nav__links .main-nav__consult a {
    display: flex; background: var(--color-navy); color: #fff;
  }
}

.btn--primary { background: #30702a; color: #fff; }
.btn--primary:hover { background: #245620; color: #fff; }
.hero--home h1 .accent { color: #34732d; }
.sales-intro p { max-width: 66ch; }
.sales-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.35rem; }
.sales-actions .btn, .sales-card .btn { min-height: 44px; }
.sales-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.sales-grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sales-card { display: flex; flex-direction: column; align-items: flex-start; }
.sales-card .btn { margin-top: auto; }
.sales-list { padding-left: 1.25rem; }
.sales-list li + li { margin-top: .4rem; }
.sales-list a, .sales-card p a { text-decoration: underline; text-underline-offset: .18em; }
.industry-illustration { width: 56px; height: 56px; margin-bottom: .8rem; }
.industry-illustration rect { fill: #e8f4e4; stroke: #b7d5ae; }
.industry-illustration path { fill: none; stroke: var(--color-navy); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.partnership-steps { padding-left: 1.5rem; }
.partnership-steps li::marker { color: var(--color-navy); font-weight: 750; }
#message { scroll-margin-top: 110px; }
.contact-layout { max-width: 760px; }
.contact-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.contact-card label { min-width: 0; }
.contact-card select, .contact-card input, .contact-card textarea {
  width: 100%; min-width: 0; min-height: 44px; padding: 10px; font: inherit;
  border: 1px solid #8798a1; color: var(--color-ink); background: #fff; border-radius: var(--radius-sm);
}
.contact-bot-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 820px) {
  .sales-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 570px) {
  .sales-grid, .contact-form-grid { grid-template-columns: minmax(0, 1fr); }
  .hero--home h1 { font-size: clamp(2.2rem, 10vw, 3rem); }
}

/* Transparent feathering follows each section or card surface. */
.industry-photo, .reference-poster, .reference-grid img,
.hero__visual img, .news-card__media img {
  --feather: 7%;
  mask-image: linear-gradient(to right, transparent, black var(--feather), black calc(100% - var(--feather)), transparent),
              linear-gradient(to bottom, transparent, black var(--feather), black calc(100% - var(--feather)), transparent);
  mask-composite: intersect;
}
.news-card__media, .team-card__photo { background: transparent }
.news-card:hover .news-card__media img { transform: none }
.team-card__photo img { mask-image: radial-gradient(circle closest-side, black 86%, transparent 100%) }
.industry-photo { width: 100%; height: auto; aspect-ratio: 16/9; object-fit: cover; margin-bottom: 1rem }
.hardware { width: 100%; max-width: 34rem; min-width: 0; margin: 0 auto; text-align: center }
.hardware-stage { position: relative; aspect-ratio: 1; width: 100%; }
.hardware-stage img, .hardware-stage canvas { display: block; width: 100%; height: 100%; object-fit: contain }
.hardware-stage canvas { position: absolute; inset: 0; touch-action: pan-y; cursor: grab }
.hardware-stage canvas:active { cursor: grabbing }
.hardware .reference-poster { --feather: 3% }
.hardware strong { color: var(--color-navy-dark) }
.hardware-help { margin: .25rem auto .65rem; font-size: .94rem }
.hardware-controls { display: flex; justify-content: center; flex-wrap: wrap; gap: .5rem }
.hardware-controls[hidden] { display: none }
.hardware button { background: var(--color-surface); border: 1px solid var(--color-border); color: var(--color-navy-dark); font: inherit; font-weight: 600; min-width: 44px; min-height: 44px; padding: .35rem .85rem; border-radius: var(--radius-sm); cursor: pointer }
.hardware button:hover { border-color: var(--color-teal) }
.hardware summary { padding: .75rem .25rem; color: var(--color-teal); font-weight: 600; cursor: pointer }
.reference-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .75rem }
.reference-grid img { height: auto }
.reference-grid a { color: var(--color-navy); font-size: .9rem }
.hardware :focus-visible { outline: 3px solid var(--color-teal); outline-offset: 2px }
