/* ==========================================================
   nrgtekUSA — Home
   ========================================================== */

:root {
  --navy: #0b2343;
  --navy-deep: #08193a;
  --hero-blue: #0e2a5a;   /* saturated deep blue for the hero and contact backgrounds */
  --blue: #135ea5;
  --sky: #97c3ed;
  --sky-light: #bad6f3;
  --text: #0b2343;
  --text-2: #3d4f66;
  --text-3: #4a5d75;
  --bg: #f6f8fa;
  --surface: #ffffff;
  --line: #e1e6ec;
  --line-2: #d5dde6;

  --font-sans: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --font-script: "Allura", cursive;

  --container: 1280px;
  --gutter: 32px;
  --header-h: 92px;
  --radius: 12px;
  --ease: cubic-bezier(.65, 0, .35, 1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; }
h1, h2, h3, p { margin: 0; }
address { font-style: normal; }

a { color: var(--navy); transition: color .25s ease; }
a:hover { color: var(--blue); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.mono { font-family: var(--font-mono); }

.icon {
  width: 16px; height: 16px;
  fill: none; stroke: currentColor; stroke-width: 1.6;
  transition: transform .25s ease;
}
.icon--sm { width: 14px; height: 14px; }

/* ---------- Type helpers ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 20px;
}
.eyebrow--light { color: var(--sky-light); margin-bottom: 28px; }
.eyebrow--sky { color: var(--sky); }

.h2 {
  font-weight: 300;
  font-size: clamp(32px, 3.6vw, 52px);
  line-height: 1.15;
  letter-spacing: -.02em;
}
.h2--sm { font-size: clamp(30px, 3.2vw, 46px); }

.accent { color: var(--blue); }

.lead {
  margin-top: 28px;
  max-width: 680px;
  font-size: 18px;
  line-height: 1.7;
  color: var(--text-2);
}

/* Arrow text links: underline only on hover, animated like the header menu */
.link-arrow {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 2px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .01em;
  text-decoration: none;
  color: var(--navy);
}
.link-arrow:hover .icon { transform: translateX(4px); }
.link-arrow:hover { color: var(--navy); }
.link-arrow::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 6px;
  height: 1.5px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform .45s var(--ease);
}
.link-arrow:hover::after,
.link-arrow:focus-visible::after { transform: scaleX(1); transform-origin: left center; }

/* ---------- Buttons ---------- */
.btn-row { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 48px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 28px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}
.btn:hover .icon { transform: translateX(4px); }

.btn--light { background: #fff; color: var(--navy); }
.btn--light:hover { background: var(--sky-light); color: var(--navy); }

.btn--outline { border: 1px solid rgba(255, 255, 255, .7); color: #fff; }
.btn--outline:hover { background: rgba(255, 255, 255, .1); border-color: #fff; color: #fff; }
/* Hero technology links: lighter, more compact pills */
.btn--tech { min-height: 44px; padding: 0 20px; border-color: rgba(255, 255, 255, .45); font-weight: 400; }

/* ---------- Header ---------- */
.header {
  position: fixed;   /* stays at the top while the page scrolls */
  top: 0; right: 0; left: 0;
  z-index: 20;
  height: var(--header-h);
  transition: background-color .35s ease, border-color .35s ease;
}
.header__inner {
  height: 100%;
  padding-top: 8px;   /* sits a little lower: more space above than below */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.header__brand { display: flex; align-items: center; }

.logo { height: 51px; width: auto; transition: filter .35s ease; }

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

.nav__link {
  position: relative;
  padding: 12px 2px;
  font-size: 15px;
  letter-spacing: .01em;
  text-decoration: none;
  transition: color .35s ease;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 6px;
  height: 1.5px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform .45s var(--ease);
}
/* Hover underline: desktop menu with a mouse only (never in the mobile menu) */
@media (hover: hover) and (min-width: 761px) {
  .nav__link:hover::after { transform: scaleX(1); transform-origin: left center; }
}
.nav__link:focus-visible::after { transform: scaleX(1); transform-origin: left center; }

/* Over the hero: transparent, white */
.header--over { background: transparent; border-bottom: 1px solid transparent; }
.header--over .nav__link,
.header--over .nav__link:hover { color: #fff; }
.header--over .logo { filter: brightness(0) invert(1); }

/* Scrolled: frosted light bar */
.header--solid {
  background: rgba(246, 248, 250, .92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header--solid .nav__link,
.header--solid .nav__link:hover { color: var(--navy); }

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  position: relative;
  width: 44px; height: 44px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  color: inherit;
}
.menu-toggle span {
  position: absolute;
  left: 11px; right: 11px;
  height: 1.5px;
  background: currentColor;
  transition: transform .35s var(--ease), top .35s var(--ease);
}
.menu-toggle span:first-child { top: 18px; }
.menu-toggle span:last-child { top: 25px; }
.header--over .menu-toggle { color: #fff; }
.header--solid .menu-toggle { color: var(--navy); }

/* ---------- Hero ---------- */
.hero {
  /* Pinned: the following sections scroll up and over it */
  position: -webkit-sticky;
  position: sticky;
  top: var(--hero-top, 0px);   /* set by js/main.js when the hero is taller than the screen */
  z-index: 0;
  overflow: hidden;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #fff;
  background: radial-gradient(120% 90% at 70% 30%, #22508f 0%, var(--hero-blue) 45%, var(--navy-deep) 100%);
}
.hero__molecule {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  pointer-events: none;
}
.hero__molecule canvas { display: block; width: 100%; height: 100%; }
/* Overlay on top of the molecule so it reads as background */
.hero__shade {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background:
    linear-gradient(180deg, rgba(8, 25, 58, .315) 0%, rgba(8, 25, 58, 0) 30%, rgba(8, 25, 58, .385) 100%),
    linear-gradient(90deg, rgba(8, 25, 58, .56) 0%, rgba(8, 25, 58, .28) 55%, rgba(8, 25, 58, .315) 100%);
}
.hero__content { position: relative; padding-top: 160px; padding-bottom: 96px; }
.hero__title {
  max-width: 960px;
  font-weight: 300;
  font-size: clamp(41px, calc(6.4vw - 3px), 89px);
  line-height: 1.07;
  letter-spacing: -.025em;
}
.hero__title strong { font-weight: 500; }
.hero__lead {
  margin-top: 32px;
  max-width: 820px;
  font-size: clamp(22px, 2vw, 26px);
  line-height: 1.5;
  color: #dae6f2;
}

/* ---------- Universities ---------- */
/* Everything after the hero slides over it */
/* Everything after the hero slides over it. The translateZ gives each section its own
   compositing layer: without it, iOS Safari can paint the pinned hero (which holds a
   WebGL canvas) on top of the sections scrolling over it. */
main > section:not(.hero),
.footer {
  position: relative;
  z-index: 1;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}
.hero { isolation: isolate; }
.unis { background: var(--bg); }
/* Homepage sections alternate: About white, Technologies grey, Lab white, Services grey */
.about, .approach { background: var(--surface); }
/* Soft shadow on the first section sliding over the pinned hero */
.hero + section { box-shadow: 0 -24px 48px -12px rgba(8, 25, 58, .35); }

.unis { border-bottom: 1px solid var(--line); padding: 64px 0 72px; }
.unis__intro {
  margin: 0 auto 32px;
  max-width: 720px;
  text-align: center;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-2);
}
.unis__list {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 210px));
  justify-content: center;
  gap: 20px;
}
.unis__item {
  min-height: 104px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 20px 16px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
/* --uh: optional per-logo height (About page field); margins keep the card height unchanged */
.unis__img { height: var(--uh, 44px); margin: calc((44px - var(--uh, 44px)) / 2) 0; width: auto; max-width: 100%; object-fit: contain; }

/* ---------- Sections ---------- */
.section { padding: 120px 0; }
.about { padding: 140px 0 120px; }

.section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 64px;
}
.section-head .h2 { line-height: 1.1; }

/* ---------- About ---------- */
/* Centered intro */
.about__intro { max-width: 880px; margin: 0 auto; text-align: center; }
.about__body .lead { margin-left: auto; margin-right: auto; }
.about__body .link-arrow { margin-top: 16px; }

.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-top: 56px;
}
.pillar {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 220px;
  padding: 36px 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
/* ---------- Services ---------- */
.services { padding: 120px 0; background: var(--bg); border-block: 1px solid var(--line); }
.services .pillar { background: var(--surface); }   /* white boxes on the grey Services band */
.services__intro { max-width: 1080px; margin: 0 auto; text-align: center; }
.services__intro .lead { max-width: 980px; margin-left: auto; margin-right: auto; }
.services .pillars { margin-top: 48px; }
.pillar { align-items: flex-start; justify-content: center; text-align: left; padding-right: 72px; }   /* left-aligned; right padding keeps text clear of the corner icon */
.pillar__icon {
  position: absolute;          /* top-right corner of the box */
  top: 20px; right: 20px;
  width: 38px; height: 38px;
  fill: none;
  stroke: #10243e;   /* the logo's navy */
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pillar__icon .dot { fill: #10243e; stroke: none; }
/* Hovering a service box animates its icon */
.pillar__icon .dot { transform-box: fill-box; transform-origin: center; }
.pillar:hover .dot--wander { animation: icon-wander 4s ease-in-out infinite; }
.pillar:hover .dot--cube   { animation: icon-cube 4.8s linear infinite; }
.pillar__icon .write { stroke-dasharray: 1; stroke-dashoffset: 0; }
.pillar:hover .write--1 { animation: icon-write-1 3.2s linear infinite; }
.pillar:hover .write--2 { animation: icon-write-2 3.2s linear infinite; }
.pillar:hover .write--3 { animation: icon-write-3 3.2s linear infinite; }

/* Research: the dot drifts around inside the flask's triangular body (offsets in icon units) */
@keyframes icon-wander {
  0%, 100% { transform: translate(0, 0); }
  17%      { transform: translate(-6px, 5px); }
  34%      { transform: translate(6px, 5px); }
  51%      { transform: translate(2px, -5px); }
  68%      { transform: translate(-3px, -2px); }
  84%      { transform: translate(5px, 2px); }
}
/* Engineering: the dot travels along the cube's edges through every corner, starting and
   ending at the centre (24,24): C → LT → top → RT → RB → bottom → LB → LT → C */
@keyframes icon-cube {
  0%, 100% { transform: translate(0, 0); }
  12.5%    { transform: translate(-15.6px, -9px); }
  25%      { transform: translate(0, -18px); }
  37.5%    { transform: translate(15.6px, -9px); }
  50%      { transform: translate(15.6px, 9px); }
  62.5%    { transform: translate(0, 18px); }
  75%      { transform: translate(-15.6px, 9px); }
  87.5%    { transform: translate(-15.6px, -9px); }
}
/* Consulting: the document's lines are written in one after another, then clear and repeat */
@keyframes icon-write-1 { 0% { stroke-dashoffset: 1; } 25%, 88% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 1; } }
@keyframes icon-write-2 { 0%, 25% { stroke-dashoffset: 1; } 50%, 88% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 1; } }
@keyframes icon-write-3 { 0%, 50% { stroke-dashoffset: 1; } 66%, 88% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 1; } }
.pillar__title { margin: 0 0 10px; font-size: 24px; font-weight: 500; }
.pillar__text { font-size: 16px; line-height: 1.6; color: var(--text-3); }

/* ---------- Technologies ---------- */
.tech { background: var(--bg); }
.tech .card { background: var(--surface); }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr));
  gap: 24px;
}
.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  text-decoration: none;
  color: var(--navy);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.card:hover { color: var(--navy); }
.card__media {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card__media { position: relative; overflow: hidden; }
/* Live 3D scene (js/tech-scenes.js) replaces the static icon */
.card__media canvas { position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; display: block; }
.card__media.has-scene svg { display: none; }
/* On devices with a mouse (js adds .hover-play): cards are light and frozen at rest. On hover
   (js adds .is-playing) the card turns the logo's navy with white text while the animation plays;
   js/tech-scenes.js switches the scene colours to a matching dark palette at the same time. */
.card.hover-play,
.card.hover-play .card__title,
.card.hover-play .card__text { transition: background-color .4s ease, border-color .4s ease, color .4s ease; }
.card.hover-play.is-playing { background: #10243e; border-color: #10243e; }
.card.hover-play.is-playing .card__title { color: #fff; }
.card.hover-play.is-playing .card__text { color: rgba(255, 255, 255, .72); }
.card__body { flex: 1; display: flex; flex-direction: column; padding: 28px; }
/* Wider screens: animation fills the right half of the box, title + text sit on the left
   (the text may overlap the animation a little — intentional) */
@media (min-width: 761px) {
  .card { position: relative; min-height: 260px; }
  .card__media { position: absolute; top: 0; right: 0; bottom: 0; width: 50%; height: auto; }
  .card__body { position: relative; z-index: 1; width: 54%; justify-content: center; padding: 32px; }
}
.card__title { margin: 0 0 10px; font-size: 21px; line-height: 1.3; font-weight: 500; }
.card__text { font-size: 15px; line-height: 1.6; color: var(--text-3); }

/* ---------- Approach ---------- */
.approach { padding: 140px 0; }
.approach__inner { display: flex; flex-wrap: wrap; gap: 64px; align-items: center; }
.approach__media {
  position: relative;
  flex: 1 1 480px;
  min-width: 0;
  height: 480px;
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: #dfe5ec;
}
.approach__media img { position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
/* Lab photo slider: photos stacked, the active one fades in */
.slider__img { opacity: 0; transition: opacity 1s ease; }
.slider__img.is-active { opacity: 1; }
.slider__dots { position: absolute; right: 24px; bottom: 28px; z-index: 1; display: flex; gap: 6px; }
.slider__dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .4); transition: background-color .4s ease; }
.slider__dot.is-active { background: #fff; }
.slider__arrow { position: absolute; top: 50%; z-index: 2; width: 30px; height: 30px; margin-top: -15px; display: grid; place-items: center; padding: 0; border: 1px solid rgba(255, 255, 255, .55); border-radius: 50%; background: rgba(8, 25, 58, .25); color: #fff; cursor: pointer; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); transition: background-color .2s ease, border-color .2s ease; }
.slider__arrow:hover { background: rgba(8, 25, 58, .55); border-color: #fff; }
.slider__arrow svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.slider__arrow--prev { left: 14px; }
.slider__arrow--next { right: 14px; }
.slider__arrow--next svg { transform: scaleX(-1); }
.approach__media::after {
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: linear-gradient(180deg, rgba(8, 25, 58, 0) 55%, rgba(8, 25, 58, .55) 100%);
}
.approach__media figcaption {
  position: absolute;
  left: 28px; bottom: 24px;
  z-index: 1;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #fff;
}
.approach__body { flex: 1 1 420px; min-width: 0; }


/* ---------- Contact CTA ---------- */
.cta { position: relative; overflow: hidden; background: var(--hero-blue); color: #fff; }
.cta__scene {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  pointer-events: none;
}
.cta__scene canvas { display: block; width: 100%; height: 100%; }
/* Overlay over the particle animation so it reads as background */
.cta__overlay {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(14, 42, 90, .55) 0%, rgba(14, 42, 90, .3) 50%, rgba(14, 42, 90, .55) 100%),
    linear-gradient(180deg, rgba(14, 42, 90, .3) 0%, rgba(14, 42, 90, 0) 40%, rgba(14, 42, 90, .3) 100%);
}
.cta__inner {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  justify-content: space-between;
  align-items: flex-end;
  padding-top: 72px;
  padding-bottom: 72px;
}
.cta__text { flex: 1 1 520px; min-width: 0; }
/* Extra text under the banner title (Technologies page) */
.cta__note { margin-top: 18px; max-width: 760px; font-size: 17px; line-height: 1.65; color: #dae6f2; }
.cta__note strong { color: #fff; font-weight: 500; }
.cta__title strong { font-weight: 500; }
/* Centred variant (Technologies page): title, supporting line, then the button */
.cta--center .cta__inner { flex-direction: column; align-items: center; text-align: center; gap: 32px; }
.cta--center .cta__text { flex: none; max-width: 820px; }
.cta--center .cta__title { font-size: clamp(24px, 2.4vw, 32px); line-height: 1.3; }
.cta--center .cta__note { margin: 16px auto 0; max-width: 640px; font-size: 17px; }
.cta__title {
  font-weight: 300;
  font-size: clamp(26px, 2.6vw, 38px);
  line-height: 1.08;
  letter-spacing: -.02em;
}

/* ---------- Footer ---------- */
.footer { background: var(--bg); border-top: 1px solid var(--line); padding: 72px 0 40px; }
.footer__top { display: flex; flex-wrap: wrap; gap: 48px; justify-content: space-between; }
.footer__brand {
  flex: 1 1 280px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
}
.footer__logo { height: 30px; width: auto; }
.footer__about { margin-top: 20px; max-width: 300px; font-size: 14px; line-height: 1.6; color: var(--text-3); }

.credit {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--text-3);
  text-decoration: none;
}
.credit__script { margin-top: 8px; font-family: var(--font-script); font-size: 20px; line-height: 1.1; }
/* The credit artwork (NRGTek Settings) is white, made for dark backgrounds. It's used as a
   mask and filled with the footer text grey (#4a5d75, as before). The artwork itself is drawn at
   ~75-80% opacity, so the fill is a darker shade that lands on the same visible grey. */
.credit__img {
  display: block;
  width: 110px; height: 86px;
  background-color: #172f4d;
  -webkit-mask: var(--credit-mask) center / contain no-repeat;   /* set from NRGTek Settings → credit artwork */
          mask: var(--credit-mask) center / contain no-repeat;
  transition: background-color .25s ease;
}
.credit:hover .credit__img { background-color: var(--navy); }

.footer__cols { display: flex; flex-wrap: wrap; gap: 48px 96px; }
.footer__col { display: flex; flex-direction: column; gap: 12px; min-width: 240px; font-size: 15px; color: var(--text-2); }
.footer__col a { text-decoration: none; align-self: flex-start; }

/* Footer links share the header's animated underline */
.footer__col a,
.footer__legal a { position: relative; }
.footer__col a::after,
.footer__legal a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1.5px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform .45s var(--ease);
}
.footer__col a:hover::after,
.footer__col a:focus-visible::after,
.footer__legal a:hover::after,
.footer__legal a:focus-visible::after { transform: scaleX(1); transform-origin: left center; }
.footer__heading { font-size: 12px; letter-spacing: .12em; color: var(--blue); }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--text-3);
}
.footer__legal { display: flex; flex-wrap: wrap; gap: 28px; }
.footer__legal a { color: var(--text-3); text-decoration: none; }
.footer__legal a:hover { color: var(--text-3); }
.footer__col a:hover { color: var(--navy); }

/* ---------- Booking popup ---------- */
.btn--dark { background: var(--navy); color: #fff; min-height: 56px; padding: 0 32px; font-size: 16px; }
.btn--dark:hover { background: var(--blue); color: #fff; }

body.modal-open { overflow: hidden; }

.modal {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
}
.modal[hidden] { display: none; }
.modal__backdrop {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: rgba(8, 25, 58, .55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity .3s ease;
}
.modal__dialog {
  position: relative;
  width: min(100%, 980px);
  max-height: calc(100vh - 48px);
  max-height: calc(100svh - 48px);
  overflow-y: auto;
  padding: 56px 56px 44px;
  background: var(--bg);
  border-radius: 28px;
  box-shadow: 0 30px 80px -20px rgba(8, 25, 58, .45);
  opacity: 0;
  transform: translateY(16px) scale(.98);
  transition: opacity .3s ease, transform .35s var(--ease);
}
.modal.is-open .modal__backdrop { opacity: 1; }
.modal.is-open .modal__dialog { opacity: 1; transform: none; }

.modal__close {
  position: absolute;
  top: 22px; right: 22px;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
.modal__close:hover { background: var(--line); color: var(--navy); }
.modal__close svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; }

.booking__title {
  font-weight: 400;
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.1;
  letter-spacing: -.02em;
  color: var(--navy);
}
.booking__step { border: 0; margin: 0; padding: 0; margin-top: 30px; min-width: 0; }
.booking__step + .booking__step { margin-top: 36px; }
.booking__legend {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 0;
  margin-bottom: 22px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-3);
}
.booking__legend::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.booking__num {
  flex: none;
  display: grid; place-items: center;
  width: 32px; height: 32px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  font-size: 13px;
  letter-spacing: 0;
  color: var(--navy);
}

.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.chips__sep { width: 1px; height: 32px; background: var(--line-2); margin: 0 4px; }
.chip {
  min-height: 52px;
  padding: 0 26px;
  border: 1.5px solid var(--line-2);
  border-radius: 999px;
  background: transparent;
  font: inherit;
  font-size: 17px;
  color: var(--navy);
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, opacity .2s ease;
}
.chip:hover:not(:disabled) { border-color: var(--blue); }
.chip.is-active { background: var(--blue); border-color: var(--blue); color: #fff; }
.chip:disabled { opacity: .4; cursor: not-allowed; }


.booking__fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.field { display: flex; flex-direction: column; gap: 12px; }
.field__label {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-3);
}
.field__hint { text-transform: none; letter-spacing: 0; font-family: var(--font-sans); color: var(--text-3); opacity: .75; }
.field__input {
  width: 100%;
  min-height: 60px;
  padding: 0 18px;
  border: 1.5px solid var(--line-2);
  border-radius: 14px;
  background: var(--surface);
  font: inherit;
  font-size: 17px;
  color: var(--navy);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field__input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(19, 94, 165, .15); }
.field.has-error .field__input { border-color: #c2412d; }
.field__error { min-height: 1em; font-size: 13px; color: #c2412d; }
.field__error:empty { display: none; }
#err-method { margin-top: 10px; }

.booking__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  margin-top: 44px;
}
.booking__summary { font-size: 17px; color: var(--text-2); }

.booking__done { text-align: center; padding: 24px 0 8px; }
.booking__check {
  width: 72px; height: 72px;
  margin: 0 auto 24px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--blue);
}
.booking__check svg { width: 34px; height: 34px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.booking__done-text { max-width: 480px; margin: 16px auto 32px; font-size: 17px; line-height: 1.6; color: var(--text-2); }

/* Compact sizing for the popup */
.modal .modal__dialog { width: min(100%, 820px); padding: 40px 40px 32px; border-radius: 18px; }
.modal .modal__close { top: 14px; right: 14px; width: 38px; height: 38px; }
.modal .modal__close svg { width: 20px; height: 20px; }
.modal .booking__title { font-size: clamp(24px, 2.6vw, 34px); }
.modal .booking__step { margin-top: 24px; }
.modal .booking__step + .booking__step { margin-top: 26px; }
.modal .booking__legend { margin-bottom: 14px; gap: 12px; font-size: 12px; }
.modal .booking__num { width: 26px; height: 26px; font-size: 12px; }
.modal .chips { gap: 8px; }
.modal .chips__sep { height: 24px; }
.modal .chip { min-height: 40px; padding: 0 18px; border-width: 1px; font-size: 15px; }
.modal .booking__fields { gap: 16px; }
.modal .field { gap: 8px; }
.modal .field__label { font-size: 12px; letter-spacing: .14em; }
.modal .field__input { min-height: 44px; padding: 0 14px; border-width: 1px; border-radius: 8px; font-size: 15px; }
.modal .booking__footer { margin-top: 30px; }
.modal .booking__summary { font-size: 15px; }
.modal .btn--dark { min-height: 46px; padding: 0 24px; font-size: 15px; }
.modal .booking__check { width: 56px; height: 56px; margin-bottom: 18px; }
.modal .booking__check svg { width: 26px; height: 26px; }
.modal .booking__done-text { margin: 12px auto 24px; font-size: 15px; }

@media (max-width: 760px) {
  .modal { padding: 12px; align-items: end; }
  .modal .modal__dialog { padding: 44px 18px 22px; border-radius: 16px; max-height: calc(100svh - 24px); }
  .modal .modal__close { top: 8px; right: 8px; }
  .modal .chip { min-height: 40px; padding: 0 16px; font-size: 15px; }
  .chips__sep { display: none; }
  .modal .booking__fields { grid-template-columns: 1fr; gap: 12px; }
  .booking__footer { flex-direction: column-reverse; align-items: stretch; text-align: center; }
  .booking__footer .btn { justify-content: center; }
}


/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  :root { --gutter: 20px; --header-h: 78px; }

  .menu-toggle { display: block; }

  .nav {
    position: fixed;
    top: var(--header-h); right: 0; left: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 24px;
    background: rgba(246, 248, 250, .98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, transform .3s ease, visibility .3s;
  }
  .nav__link,
  .header--over .nav__link,
  .header--over .nav__link:hover { color: var(--navy); padding: 16px 0; font-size: 17px; border-bottom: 1px solid var(--line); }
  .nav__link:last-child { border-bottom: 0; }
  .nav__link::after,
  .nav__link[aria-current="page"]::after { display: none; }

  .menu-open .nav { opacity: 1; visibility: visible; transform: none; }
  .menu-open .header { background: rgba(246, 248, 250, .98); border-bottom-color: var(--line); }
  .menu-open .header .logo { filter: none; }
  .menu-open .menu-toggle { color: var(--navy); }
  .menu-open .menu-toggle span:first-child { top: 21.5px; transform: rotate(45deg); }
  .menu-open .menu-toggle span:last-child { top: 21.5px; transform: rotate(-45deg); }

  .logo { height: 42px; }

  .unis { padding: 48px 0 56px; }
  .unis__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .unis__item { min-height: 88px; padding: 14px 12px; }
  .unis__img { height: calc(var(--uh, 44px) * .73); margin: calc((32px - var(--uh, 44px) * .73) / 2) 0; }
  .hero__content { padding-top: calc(var(--header-h) + 40px); padding-bottom: 48px; }
  .hero__title { font-size: clamp(31px, calc(10vw - 3px), 41px); line-height: 1.1; }
  .hero__lead { margin-top: 22px; font-size: 19px; }
  .eyebrow--light { margin-bottom: 18px; }
  .hero .btn-row { margin-top: 32px; gap: 10px; }
  .btn--tech { min-height: 40px; padding: 0 16px; font-size: 14px; }
  .hero .btn { min-height: 46px; padding: 0 20px; font-size: 14px; gap: 10px; }

  .section, .about, .approach { padding: 88px 0; }
  .approach__media { height: 320px; flex-basis: 100%; }
  .approach__body { flex-basis: 100%; }
  .cta__inner { padding-top: 56px; padding-bottom: 56px; }
  .cta__scene { opacity: .35; }
  .footer__col { min-width: 0; }

  /* Footer: everything centred on small screens */
  .footer__top { flex-direction: column; align-items: center; text-align: center; }
  .footer__brand { align-items: center; flex-basis: auto; }
  .footer__logo { margin: 0 auto; }
  .footer__about { margin-left: auto; margin-right: auto; }
  .footer__cols { justify-content: center; text-align: center; }
  .footer__col { align-items: center; }
  .footer__col a { align-self: center; }
  .footer__bottom { flex-direction: column; align-items: center; text-align: center; }
  .footer__legal { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ==========================================================
   Inner pages (about, services, technologies, contact, legal)
   ========================================================== */

/* Current page in the menu keeps its underline */
.nav__link[aria-current="page"]::after { transform: scaleX(1); }

/* Compact navy banner at the top of each inner page */
.page-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: radial-gradient(120% 120% at 80% 0%, #22508f 0%, var(--hero-blue) 50%, var(--navy-deep) 100%);
  padding: calc(var(--header-h) + 88px) 0 80px;
}
.page-hero::after {            /* faint grid, echoing the technical feel */
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: linear-gradient(90deg, transparent 20%, #000 100%);
  mask-image: linear-gradient(90deg, transparent 20%, #000 100%);
  pointer-events: none;
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero__title {
  max-width: 900px;
  font-weight: 300;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.06;
  letter-spacing: -.025em;
}
.page-hero__title strong { font-weight: 500; }
.page-hero__lead { margin-top: 24px; max-width: 640px; font-size: 18px; line-height: 1.65; color: #dae6f2; }
.page-hero__lead--wide { max-width: none; }

/* Generic inner-page section + prose */
.page-section { padding: 104px 0; background: var(--bg); }
.page-section--white { background: var(--surface); border-block: 1px solid var(--line); }
.section-intro { max-width: 760px; margin-bottom: 48px; }
.section-intro .lead { margin-top: 18px; }
.prose { max-width: 760px; font-size: 17px; line-height: 1.75; color: var(--text-2); }
.prose p + p { margin-top: 18px; }
.prose strong { color: var(--navy); font-weight: 500; }
.prose--full { max-width: none; }
/* Company logos (About page): same cards as the university logos.
   Each logo's --h is set from its shape so all four carry about the same visual weight. */
/* One row of four under the first paragraph (2 × 2 on phones) */
.clients { margin: 36px 0 40px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.clients .unis__img { height: calc(var(--h, 40px) * 1.15); transform: translateY(var(--y, 0)); }   /* --y: optical nudge for logos whose shape sits off-centre */
@media (max-width: 760px) {
  .clients { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .clients .unis__img { height: calc(var(--h, 40px) * .9); }
}
/* Two-column split: heading left, text right */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: start; }

/* Key facts strip */
.facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-top: 64px;
  border-top: 1px solid var(--line-2);
}
.fact { padding: 28px 24px 0 0; }
.fact__value { font-size: 36px; font-weight: 300; letter-spacing: -.02em; color: var(--navy); }
.fact__label { margin-top: 6px; font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }

/* Team */
/* Four in one row, centred (2 × 2 on phones); names and titles centred under the photos */
.team { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 28px; }   /* full width of the page container */
@media (max-width: 620px) { .team { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.team .person__body { text-align: center; }
.person { min-width: 0; }
/* Photo area: drop an <img> inside to replace the initials placeholder */
.person__photo {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  display: grid; place-items: center;
  background: #e9ebee;
  border-radius: 6px;
  color: #b4bac3;
  font-size: 40px; font-weight: 300; letter-spacing: .06em;
}
.person__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.person__body { padding-top: 20px; }
.person__name { font-size: 19px; font-weight: 500; }
.person__role { margin-top: 4px; font-size: 14px; color: var(--text-3); }
.person__bio { margin-top: 12px; font-size: 15px; line-height: 1.65; color: var(--text-3); }
.team__staff { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line-2); font-size: 16px; line-height: 1.7; color: var(--text-2); }
.team__staff strong { font-weight: 500; color: var(--text); }
.team__staff--more { margin-top: 10px; padding-top: 0; border-top: 0; }   /* second line under the same divider */
@media (max-width: 620px) { .team { gap: 32px 16px; } .person__name { font-size: 17px; } .person__photo { font-size: 30px; } }

/* Services list */
.service-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; border-top: 1px solid var(--line-2); }
.service-item { display: grid; grid-template-columns: 44px 1fr; gap: 16px; padding: 28px 0; border-bottom: 1px solid var(--line-2); }
/* No line under the last row: two items side by side on desktop, the last one when stacked */
.service-item:nth-last-child(-n+2):nth-child(odd),
.service-item:last-child { border-bottom: 0; }
.service-item__num { font-family: var(--font-mono); font-size: 13px; color: var(--blue); padding-top: 4px; }
.service-item__title { font-size: 20px; font-weight: 500; }
.service-item__text { margin-top: 8px; font-size: 15px; line-height: 1.65; color: var(--text-3); }

/* Technologies page */
.tech-index__label { margin-top: 36px; font-size: 16px; font-weight: 500; color: #fff; }
.tech-index { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 36px; }
.tech-index__label + .tech-index { margin-top: 14px; }
.tech-index a {
  display: inline-flex; align-items: center;
  min-height: 40px; padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 999px;
  color: #fff; text-decoration: none; font-size: 14px;
  transition: background-color .25s ease, border-color .25s ease;
}
.tech-index a:hover { background: rgba(255, 255, 255, .1); border-color: #fff; color: #fff; }

.tech-detail { padding: 104px 0; background: var(--bg); border-bottom: 1px solid var(--line); scroll-margin-top: var(--header-h); }
.tech-detail:nth-of-type(even) { background: var(--surface); }
.tech-detail__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 64px; align-items: start; }
.tech-detail:nth-of-type(even) .tech-detail__media { order: 2; }
.tech-detail:nth-of-type(even) .tech-detail__grid { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }   /* animation 1/3, text 2/3 */
.tech-detail__media {
  position: -webkit-sticky;
  position: sticky;
  top: calc(var(--header-h) + 24px);
  height: 340px;
  overflow: hidden;
}
/* Cathodes and micro reactors: centred vertically in the row */
.tech-detail__media:not([data-vertical]) { position: relative; top: 0; align-self: center; }
/* Gas treatment and forward osmosis: a tall animation filling the row's full height */
.tech-detail__media[data-vertical] { position: relative; top: 0; height: auto; min-height: 340px; align-self: stretch; }
.tech-detail__media canvas { position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; display: block; }
.tech-detail__tag { font-family: var(--font-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--blue); }
.tech-detail__title { margin-top: 14px; font-weight: 300; font-size: clamp(28px, 3vw, 40px); line-height: 1.15; letter-spacing: -.02em; }
.tech-detail__lead { margin-top: 18px; font-size: 17px; line-height: 1.7; color: var(--text-2); }
.tech-detail__lead--more, .tech-detail__partner + .tech-detail__lead { margin-top: 12px; }   /* follow-on paragraphs at the intro size */
.tech-detail__after-logo { margin-top: 10px; font-size: 15px; line-height: 1.7; color: var(--text-3); }   /* text under a partner logo: a step smaller and lighter */
.tech-detail h3 { margin-top: 32px; font-size: 18px; font-weight: 500; }
.tech-detail h3 + p, .tech-detail h3 + ul { margin-top: 8px; }
.tech-detail p.small { font-size: 15px; line-height: 1.7; color: var(--text-3); }
.tech-detail__lead + p.small, .tech-detail p.small + p.small { margin-top: 14px; }
.tech-detail p.small.tech-detail__more { margin-top: 24px; }
.ticks { list-style: disc; margin: 16px 0 0; padding-left: 20px; }
.ticks li { padding-left: 4px; font-size: 15px; line-height: 1.65; color: var(--text-2); }
.ticks li + li { margin-top: 8px; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 28px; }
.metric { padding: 16px 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.tech-detail:nth-of-type(even) .metric { background: var(--bg); }
.metric__value { font-size: 22px; font-weight: 500; color: var(--navy); }
.metric__label { margin-top: 4px; font-size: 13px; line-height: 1.45; color: var(--text-3); }
.patents { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line-2); font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em; line-height: 1.8; color: var(--text-3); }
.patents strong { color: var(--navy); font-weight: 500; letter-spacing: .1em; }
.patents a { color: var(--navy); }
/* Partner logo inside a technology section (e.g. Silk Power) */
/* Partner logo inside a technology section (e.g. Silk Power), centred */
.tech-detail__partner { display: block; height: 56px; width: auto; margin: 22px auto 6px; }
.tech-detail__partner + p.small { margin-top: 14px; }
.note { margin-top: 18px; font-size: 13px; line-height: 1.6; color: var(--text-3); }

/* Contact page */
.contact-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: start; }
.contact-cards { display: grid; gap: 16px; }
.contact-card { padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.contact-card__label { font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--blue); }
.contact-card__value { margin-top: 10px; font-size: 18px; line-height: 1.55; color: var(--navy); }
.contact-card__value a { text-decoration: none; border-bottom: 1px solid var(--line-2); }
.contact-card .link-arrow { margin-top: 6px; }
/* Highlighted card ("Prefer a call?") */
.contact-card--highlight { background: #10243e; border-color: #10243e; }
.contact-card--highlight .contact-card__label { color: #7cc4ff; }
.contact-card--highlight .contact-card__value { color: #fff; }
.contact-card--highlight .link-arrow { margin-top: 14px; padding: 10px 18px; border-radius: 999px; background: #fff; color: var(--navy); }
.contact-card--highlight .link-arrow:hover { background: var(--sky-light); }
.contact-card--highlight .link-arrow::after { display: none; }
.contact-form { padding: 40px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.contact-form__title { font-size: 26px; font-weight: 400; letter-spacing: -.01em; }
.contact-form__intro { margin-top: 8px; font-size: 15px; line-height: 1.6; color: var(--text-3); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 28px; }
.form-grid .field--full { grid-column: 1 / -1; }
textarea.field__input { min-height: 150px; padding: 16px 18px; resize: vertical; line-height: 1.6; }
select.field__input { -webkit-appearance: none; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%2310243e' stroke-width='1.6'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 18px center; padding-right: 44px; }
.contact-form__footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 28px; }
.contact-form__hint { font-size: 13px; color: var(--text-3); }
.form-success { display: none; margin-top: 20px; padding: 16px 18px; border-radius: 10px; background: #eaf3ec; color: #1f5132; font-size: 15px; }
.form-success.is-visible { display: block; }

/* Legal pages */
.legal { max-width: 780px; }
.legal__updated { font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.legal h2 { margin-top: 44px; font-size: 22px; font-weight: 500; letter-spacing: -.01em; }
.legal p, .legal li { margin-top: 12px; font-size: 16px; line-height: 1.75; color: var(--text-2); }
.legal ul { margin: 0; padding-left: 20px; }
.legal a { color: var(--blue); }

@media (max-width: 960px) {
  .split, .tech-detail__grid, .tech-detail:nth-of-type(even) .tech-detail__grid, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .tech-detail:nth-of-type(even) .tech-detail__media { order: 0; }
  .tech-detail__media, .tech-detail__media[data-vertical] { position: relative; top: 0; height: 280px; min-height: 0; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service-list { grid-template-columns: 1fr; }
  .service-item:nth-last-child(-n+2):nth-child(odd) { border-bottom: 1px solid var(--line-2); }
  .service-item:last-child { border-bottom: 0; }
}
@media (max-width: 760px) {
  .page-hero { padding: calc(var(--header-h) + 56px) 0 56px; }
  .page-hero__lead { font-size: 16px; }
  .page-section, .tech-detail { padding: 72px 0; }
  .form-grid { grid-template-columns: 1fr; }
  .contact-form { padding: 28px 22px; }
  .tech-detail__media, .tech-detail__media[data-vertical] { height: 230px; }
}


/* ==========================================================
   Patents page: stats, filter chips, timeline, detail card, list
   ========================================================== */

.pt-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.pt-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 16px; border: 1px solid var(--line-2); border-radius: 999px; background: #fff; font: inherit; font-size: 14px; color: var(--navy); cursor: pointer; transition: border-color .2s ease, background-color .2s ease, color .2s ease; }
.pt-chip i { width: 10px; height: 10px; border-radius: 50%; }
.pt-chip span { font-family: var(--font-mono); font-size: 12px; color: var(--text-3); }
.pt-chip:hover { border-color: var(--blue); }
.pt-chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.pt-chip[aria-pressed="true"] span { color: var(--sky-light); }

.pt-board { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.pt-chart-wrap { min-width: 0; padding: 18px 18px 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.pt-chart { overflow-x: auto; }
.pt-svg { display: block; width: 100%; min-width: 680px; height: auto; font-family: var(--font-sans); }
.pt-grid { stroke: var(--line); stroke-width: 1; }
.pt-grid--major { stroke: var(--line-2); }
.pt-year { font-family: var(--font-mono); font-size: 12px; fill: var(--text-3); text-anchor: middle; }
.pt-lane { fill: transparent; }
.pt-lane--alt { fill: rgba(16, 36, 62, .025); }
.pt-lane-label { font-size: 13px; font-weight: 500; fill: var(--navy); }
.pt-bar { cursor: pointer; outline: none; transition: opacity .25s ease; }
/* Selected bar stays, every other bar fades back; while hovering, the hovered bar leads */
.pt-svg.has-active .pt-bar:not(.is-active) { opacity: .25; }
.pt-svg .pt-bar:hover, .pt-svg.has-active .pt-bar:hover { opacity: 1; }
.pt-svg:has(.pt-bar:hover) .pt-bar:not(:hover) { opacity: .25; }
.pt-bar:focus-visible rect { stroke: var(--navy); stroke-width: 2; }
.pt-bar--pending rect { fill: none !important; stroke: #94a3b8; stroke-width: 2; stroke-dasharray: 4 4; pointer-events: all; }   /* hollow, but the inside is still clickable */
.pt-svg .is-dim { opacity: .18; }
.pt-swipe { display: none; margin: 0 0 10px; font-size: 13px; color: var(--text-3); }
@media (max-width: 760px) { .pt-swipe { display: block; } }
.pt-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 12px; font-size: 13px; color: var(--text-3); }
.pt-legend span { display: inline-block; margin-right: -10px; vertical-align: middle; }
.pt-legend__bar { width: 26px; height: 8px; border-radius: 4px; background: var(--navy); }
.pt-legend__dot { width: 13px; height: 8px; margin-top: -4px; border-left: 2.4px solid var(--navy); border-bottom: 2.4px solid var(--navy); transform: rotate(-45deg); }
.pt-legend__pending { width: 26px; height: 8px; border-radius: 4px; border: 2px dashed #94a3b8; }

.pt-card { position: sticky; top: calc(var(--header-h) + 24px); display: flex; flex-direction: column; padding: 24px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); }   /* min-height set by js/patents.js */
.pt-card__no { display: flex; flex-direction: column; gap: 6px; font-family: var(--font-mono); font-size: 15px; letter-spacing: .04em; color: var(--navy); }
.pt-card__no span { align-self: flex-start; padding: 3px 10px; border-radius: 999px; background: var(--c); color: #fff; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.pt-card__title { margin-top: 16px; min-height: var(--title-h, 0); font-size: 18px; font-weight: 500; line-height: 1.4; color: var(--navy); }   /* --title-h: longest title, set by js/patents.js */
.pt-card__dates { display: grid; gap: 10px; margin: 18px 0 0; }
.pt-card__dates div { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); font-size: 14px; }
.pt-card__dates dt { color: var(--text-3); }
.pt-card__dates dd { margin: 0; color: var(--navy); font-weight: 500; }
.pt-card__note { margin-top: 14px; font-size: 14px; color: var(--blue); }
.pt-card__link { align-self: flex-start; margin-top: 16px; font-size: 14px; font-weight: 500; color: var(--navy); }
.pt-card__empty { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 10px; text-align: center; padding: 0 12px; }
.pt-card__empty strong { font-size: 18px; font-weight: 500; color: var(--navy); }
.pt-card__empty p { font-size: 14px; line-height: 1.6; color: var(--text-3); }

.pt-list-title { margin-top: 64px; }
.pt-list { list-style: none; margin: 20px 0 0; padding: 0; border-top: 1px solid var(--line-2); }
.pt-row { display: grid; grid-template-columns: 10px 150px minmax(0, 1fr) 70px; align-items: baseline; gap: 16px; padding: 16px 8px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background-color .2s ease; }
.pt-row:hover, .pt-row.is-active { background: var(--bg); }
.pt-row__dot { width: 10px; height: 10px; border-radius: 50%; align-self: center; }
.pt-row__no { font-family: var(--font-mono); font-size: 14px; color: var(--navy); }
.pt-row__title { font-size: 15px; line-height: 1.55; color: var(--text-2); }
.pt-row__title em { font-style: normal; color: var(--blue); }
.pt-row__year { font-family: var(--font-mono); font-size: 13px; color: var(--text-3); text-align: right; }

@media (max-width: 960px) {
  .pt-board { grid-template-columns: 1fr; }
  .pt-card { position: static; }
}
@media (max-width: 760px) {
  .pt-row { grid-template-columns: 10px minmax(0, 1fr) auto; gap: 6px 12px; }
  .pt-row__title { grid-column: 2 / -1; }
  .pt-row__year { grid-row: 1; grid-column: 3; }
}

/* About page team: heading, intro and staff line centred over the centred grid */
#team .section-intro { text-align: center; margin-left: auto; margin-right: auto; }
#team .section-intro .lead { margin-left: auto; margin-right: auto; }
#team .team__staff { text-align: center; }

/* Technologies page: body text and lists at the same size as each section's intro paragraph */
.tech-detail .ticks li,
.tech-detail p.small { font-size: 17px; line-height: 1.7; color: var(--text-2); }

/* Footer contact: tight line spacing inside the address and the contact-person block,
   with clear space between the heading, the address and the person */
address.footer__col { gap: 4px; }
address.footer__col .footer__heading { margin-bottom: 8px; }
.footer__person { color: var(--navy); font-weight: 500; }
address.footer__col a[href^="tel:"] { margin-bottom: 16px; }   /* gap between the contact person and the address */
.contact-card__name { font-weight: 500; }

/* Phones: Services boxes use the full width for their text; only the title keeps clear of the corner icon */
@media (max-width: 760px) {
  .pillar { padding: 28px 24px; }
  .pillar__title { padding-right: 52px; }
}

/* Phones: slider dots move to the top-right corner so they don't collide with the caption */
@media (max-width: 760px) {
  .slider__dots { top: 18px; right: 18px; bottom: auto; }
}

/* Footer on tablets and phones (when the brand block no longer fits beside the link columns):
   the lotus credit moves to the very end, under the contact address */
@media (max-width: 967px) {
  .footer__brand { display: contents; }
  .footer__cols { order: 1; }
  .credit { order: 2; }
}
@media (min-width: 761px) and (max-width: 967px) {
  .footer__brand > div, .credit { flex-basis: 100%; }   /* each on its own row, left-aligned */
  .credit { align-items: flex-start; }
}

/* ==========================================================
   WordPress theme additions
   ========================================================== */
/* Clients' logos keep their own --h sizing (not the university --uh margins) */
.clients .unis__img { margin: 0; }

/* Technology section body text from the editor: same look as the designed paragraphs and lists */
.tech-detail__body > :first-child { margin-top: 32px; }
.tech-detail__body p { margin: 14px 0 0; font-size: 17px; line-height: 1.7; color: var(--text-2); }
.tech-detail__body h3 + p, .tech-detail__body h3 + ul { margin-top: 8px; }
.tech-detail__body ul { list-style: disc; margin: 16px 0 0; padding-left: 20px; }
.tech-detail__body li { padding-left: 4px; font-size: 17px; line-height: 1.7; color: var(--text-2); }
.tech-detail__body li + li { margin-top: 8px; }
.tech-detail__body a { color: var(--blue); }
.tech-detail__body:empty { display: none; }

/* Forms: spam trap and server errors */
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.form-error { margin: 14px 0 0; font-size: 14px; color: #c2412d; }
.form-error:empty { display: none; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* Text logo fallback (no logo image set) */
.logo--text { display: inline-block; font-size: 24px; font-weight: 600; letter-spacing: -.01em; color: var(--navy); }
.header--over .logo--text { color: #fff; filter: none; }

/* Legal / simple pages from the editor */
.legal img { max-width: 100%; height: auto; }
