/* ==========================================================================
   AGATHISHA GROUP — landing page
   One-viewport desktop composition · responsive tablet/mobile flow
   ========================================================================== */

/* ---------- self-hosted fonts (variable, Latin subset) ------------------- */
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../fonts/plus-jakarta-sans-latin-var.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- design tokens ------------------------------------------------ */
:root {
  --font-display: "Plus Jakarta Sans", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --navy: #0c2150;
  --navy-2: #163262;
  --ink: #1f2b45;
  --slate: #3d4b66;
  --line: #dde5f0;
  --bg: #eef3fb;

  --blue: #2168d9;
  --blue-2: #2f7ff5;
  --green: #179064;
  --purple: #6d3ad6;

  --header-h: clamp(58px, 9vh, 96px);
  --cards-h: clamp(290px, 46.5vh, 516px);
  --strip-h: clamp(66px, 9.8vh, 106px);
  --lower-gap: clamp(10px, 2.1vh, 24px);
  --lower-pad: clamp(8px, 2.5vh, 28px);
  --container: min(81.2vw, 1560px);
  --gap: clamp(12px, 1.3vw, 22px);
  --radius: clamp(16px, 2.2vh, 24px);
  --badge: clamp(46px, 7.6vh, 80px);

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --t: 420ms;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img,
svg,
video,
picture { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, p { margin: 0; }
button { font: inherit; cursor: pointer; }

.icon { width: 1em; height: 1em; flex: none; }

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--navy);
  color: #fff;
  font-weight: 600;
  transition: top 200ms;
}
.skip-link:focus { top: 12px; }

:focus-visible {
  outline: 3px solid rgba(47, 127, 245, 0.55);
  outline-offset: 3px;
  border-radius: 6px;
}

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

/* ---------- page shell --------------------------------------------------- */
.page {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  overflow: hidden;
}

/* ---------- header ------------------------------------------------------- */
.site-header {
  position: relative;
  z-index: 20;
  flex: none;
  height: var(--header-h);
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97) 0%, rgba(255, 255, 255, 0.93) 60%, rgba(255, 255, 255, 0.88) 100%);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
}
.site-header__edge {
  position: absolute;
  left: 0;
  top: calc(100% - 1px);
  width: 100%;
  height: clamp(28px, 7vh, 80px);
  pointer-events: none;
}
.site-header__inner {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 2vw;
  max-width: 1920px;
  margin: 0 auto;
  padding: 0 clamp(16px, 2.6vw, 42px);
}

.brand {
  display: flex;
  align-items: center;
  gap: clamp(8px, 0.8vw, 14px);
  flex: none;
}
.brand__mark {
  height: clamp(44px, 7.8vh, 82px);
  width: auto;
}
.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1;
  font-family: var(--font-display);
  color: var(--navy);
}
.brand__name {
  font-size: clamp(19px, 2.95vh, 32px);
  font-weight: 800;
  letter-spacing: 0.005em;
  /* the variable font tops out at 800, so thicken the strokes optically */
  -webkit-text-stroke: 0.9px currentColor;
  paint-order: stroke fill;
}
.brand__sub {
  margin-top: 0.34em;
  padding-left: 0.1em;
  font-size: clamp(10px, 1.5vh, 15px);
  font-weight: 700;
  letter-spacing: 0.46em;
  color: var(--navy-2);
}

.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.4vw, 46px);
}
.site-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.2vw, 42px);
}
.site-nav__link {
  position: relative;
  display: inline-block;
  padding: 0.4em 0;
  font-size: clamp(13px, 1.62vh, 16.5px);
  font-weight: 500;
  color: var(--navy);
  white-space: nowrap;
  transition: color var(--t) var(--ease);
}
.site-nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--blue-2), var(--purple));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t) var(--ease);
}
.site-nav__link:hover,
.site-nav__link:focus-visible { color: var(--blue); }
.site-nav__link:hover::after,
.site-nav__link:focus-visible::after { transform: scaleX(1); }

/* social links (header, top right) */
.social {
  display: flex;
  align-items: center;
  gap: clamp(5px, 0.5vw, 10px);
}
.social__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  height: clamp(34px, 4.5vh, 46px);
  padding: 0 clamp(10px, 0.85vw, 16px);
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--navy);
  font-size: clamp(11px, 1.4vh, 14px);
  font-weight: 600;
  white-space: nowrap;
  transition: color var(--t) var(--ease), background var(--t) var(--ease),
    border-color var(--t) var(--ease), transform var(--t) var(--ease),
    box-shadow var(--t) var(--ease);
}
.social__link .icon {
  width: clamp(15px, 2vh, 19px);
  height: clamp(15px, 2vh, 19px);
  transition: color var(--t) var(--ease);
}
.social__link--facebook .icon { color: #1877f2; }
.social__link--instagram .icon { color: #d6337c; }
.social__link:hover,
.social__link:focus-visible { transform: translateY(-2px); }
.social__link:hover .icon,
.social__link:focus-visible .icon { color: inherit; }
.social__link--facebook:hover,
.social__link--facebook:focus-visible {
  color: #fff;
  background: linear-gradient(180deg, #2b86f5 0%, #1266d8 100%);
  border-color: #1266d8;
  box-shadow: 0 10px 22px -8px rgba(24, 119, 242, 0.85);
}
.social__link--instagram:hover,
.social__link--instagram:focus-visible {
  color: #fff;
  background: linear-gradient(45deg, #f9a03c 0%, #e5407a 48%, #a02fc4 100%);
  border-color: transparent;
  box-shadow: 0 10px 22px -8px rgba(196, 58, 138, 0.85);
}

.nav-toggle { display: none; }

/* ---------- stage (hero + lower) ---------------------------------------- */
.stage {
  position: relative;
  flex: 1 1 auto;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 0;
}

/* ---------- hero --------------------------------------------------------- */
.hero {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-height: 0;
  padding: 0 clamp(16px, 4vw, 60px) 2.6vh;
}

/* animated biomedical background (behind header too) */
.bio {
  position: absolute;
  left: 0;
  top: calc(-1 * var(--header-h));
  width: 100%;
  height: 37.5vw; /* source art is 2048 x 768 */
  pointer-events: none;
  overflow: visible;
}
.bio__art,
.bio__cells,
.bio__haze,
.bio__veil,
.bio__spot,
.bio__canvas {
  position: absolute;
  inset: 0;
}
/* orb layer shares the art box but paints above the white surface */
.bio__orbs {
  position: absolute;
  left: 0;
  top: calc(-1 * var(--header-h));
  width: 100%;
  height: 37.5vw;
  z-index: 1;
  pointer-events: none;
}
.bio__art picture,
.bio__cells picture {
  position: absolute;
  inset: 0;
}
.bio__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}

/* floating copy of the left stem-cell cluster (masked, transform-only) */
.bio__cells {
  -webkit-mask-image: radial-gradient(ellipse 27% 60% at 8% 44%, #000 40%, rgba(0, 0, 0, 0.5) 68%, transparent 100%);
  mask-image: radial-gradient(ellipse 27% 60% at 8% 44%, #000 40%, rgba(0, 0, 0, 0.5) 68%, transparent 100%);
  transform-origin: 5% 42%;
  transform: scale(1.3);
  animation: cellsDrift 18s ease-in-out infinite alternate;
  will-change: transform;
}
.bio__cells::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 4% 51%, rgba(170, 215, 255, 0.5), rgba(170, 215, 255, 0) 16%),
    radial-gradient(circle at 12.5% 29%, rgba(200, 230, 255, 0.45), rgba(200, 230, 255, 0) 11%),
    radial-gradient(circle at 14% 62%, rgba(180, 200, 255, 0.35), rgba(180, 200, 255, 0) 12%);
  mix-blend-mode: screen;
  animation: glowPulse 6.5s ease-in-out infinite alternate;
}

/* soft light haze that lifts the far-right sky behind the animated helix */
.bio__haze {
  background:
    radial-gradient(ellipse 11.5% 72% at 94.2% 34%, rgba(232, 243, 255, 0.98) 0%, rgba(232, 243, 255, 0.96) 48%, rgba(232, 243, 255, 0.62) 74%, rgba(232, 243, 255, 0) 100%),
    radial-gradient(ellipse 22% 62% at 75% 52%, rgba(240, 246, 255, 0.2) 0%, rgba(240, 246, 255, 0.1) 50%, rgba(240, 246, 255, 0) 100%),
    radial-gradient(ellipse 28% 26% at 14% 54%, rgba(150, 195, 250, 0.24) 0%, rgba(150, 195, 250, 0) 70%);
}

/* brightness veil: keeps the top clean & bright like the reference (weaker over the cell cluster) */
.bio__veil {
  background: linear-gradient(180deg,
    rgba(255, 255, 255, 1) 0%,
    rgba(255, 255, 255, 0.92) 7%,
    rgba(255, 255, 255, 0.4) 15%,
    rgba(255, 255, 255, 0.14) 28%,
    rgba(255, 255, 255, 0.03) 44%,
    rgba(255, 255, 255, 0) 58%);
  -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.55) 16%, #000 30%, #000 100%);
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.55) 16%, #000 30%, #000 100%);
}

/* clean readable centre for the headline + white band above the cards */
.bio__spot {
  background:
    radial-gradient(ellipse 25% 38% at 50% 34%, rgba(255, 255, 255, 0.82) 0%, rgba(255, 255, 255, 0.55) 42%, rgba(255, 255, 255, 0.16) 76%, rgba(255, 255, 255, 0) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0) 46%, rgba(255, 255, 255, 0.7) 55%, rgba(255, 255, 255, 0.9) 64%, rgba(255, 255, 255, 0.72) 72%, rgba(255, 255, 255, 0) 82%);
  -webkit-mask-image: linear-gradient(90deg, transparent 5%, #000 26%, #000 74%, transparent 95%);
  mask-image: linear-gradient(90deg, transparent 5%, #000 26%, #000 74%, transparent 95%);
}

/* translucent 3D stem-cell orbs (CSS transform/opacity only) */
.orb {
  position: absolute;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 30%, rgba(255, 255, 255, 0.95) 0%, rgba(220, 240, 255, 0.85) 16%, rgba(150, 196, 252, 0.45) 44%, rgba(95, 145, 240, 0.18) 70%, rgba(95, 145, 240, 0) 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45), inset 0 0 18px rgba(255, 255, 255, 0.55), 0 0 44px rgba(120, 170, 255, 0.28);
  opacity: 0.82;
  animation: orbFloat var(--dur, 14s) ease-in-out infinite alternate, orbPulse 6s ease-in-out infinite;
  will-change: transform;
}
.orb::after {
  content: "";
  position: absolute;
  inset: 31%;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 36%, rgba(200, 172, 255, 0.92), rgba(120, 90, 232, 0.55) 46%, rgba(90, 60, 200, 0) 76%);
}
.orb::before {
  content: "";
  position: absolute;
  left: 22%;
  top: 14%;
  width: 26%;
  height: 16%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.75);
  filter: blur(2px);
  transform: rotate(-24deg);
}
.orb--1 { left: -2.6%; top: 37%; width: 11vw; height: 11vw; --dur: 17s; animation-delay: -3s, 0s; opacity: 0.72; }
.orb--2 { left: 8.5%; top: 6%; width: 3.2vw; height: 3.2vw; --dur: 13s; animation-delay: -7s, -2s; }
.orb--3 { left: 24%; top: 31%; width: 2.5vw; height: 2.5vw; --dur: 15s; animation-delay: -5s, -1s; }
.orb--4 { left: 13.5%; top: 44%; width: 3.8vw; height: 3.8vw; --dur: 19s; animation-delay: -9s, -4s; opacity: 0.72; }

.bio__canvas { width: 100%; height: 100%; }

/* hero copy */
.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: min(62vw, 980px);
  margin-top: 0.4vh;
}
.hero__eyebrow {
  font-size: clamp(10px, 1.34vh, 14.5px);
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--blue-2);
}
.hero__title {
  margin-top: clamp(6px, 1.4vh, 16px);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(26px, min(5.75vh, 3.95vw), 70px);
  line-height: 1.08;
  letter-spacing: -0.022em;
  color: var(--navy);
}
.hero__line { display: block; white-space: nowrap; }
.accent {
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.accent--blue { background-image: linear-gradient(92deg, #2f7ff5 0%, #1a53c6 100%); --glow: rgba(47, 127, 245, 0.55); }
.accent--green { background-image: linear-gradient(92deg, #1fa571 0%, #12855a 100%); --glow: rgba(31, 165, 113, 0.5); }
.accent--purple { background-image: linear-gradient(92deg, #8a5cf0 0%, #5f2fc9 100%); --glow: rgba(138, 92, 240, 0.55); }
/* slow halo pulse in each word's own colour - the colours themselves never change.
   Longhands only, so the per-word delays below are not reset by a shorthand. */
.accent {
  animation-name: accentGlow;
  animation-duration: 4.6s;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  will-change: filter;
}
.accent--blue { animation-delay: 0s; }
.accent--green { animation-delay: 1.5s; }
.accent--purple { animation-delay: 3s; }
@keyframes accentGlow {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(255, 255, 255, 0)); }
  50% { filter: drop-shadow(0 0 16px var(--glow)); }
}

.hero__ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: clamp(8px, 1.8vh, 18px);
}
.hero__ornament i {
  display: block;
  width: clamp(24px, 3.4vh, 40px);
  height: 2px;
  border-radius: 2px;
  background: var(--blue);
  opacity: 0.7;
}
.hero__ornament b {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue-2);
  box-shadow: 0 0 0 4px rgba(47, 127, 245, 0.14);
}
.hero__sub {
  margin: clamp(8px, 1.8vh, 18px) auto 0;
  max-width: 27em;
  font-size: clamp(13px, 1.8vh, 19.5px);
  line-height: 1.42;
  color: var(--slate);
}

/* full-width flowing transition */
.wave {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 1;
  top: calc(41vh - var(--header-h));
  height: 40vh;
  pointer-events: none;
  overflow: hidden;
}
.wave__svg {
  width: 100%;
  height: 100%;
  transform-origin: 50% 100%;
  animation: waveBreath 12s ease-in-out infinite alternate;
  will-change: transform;
}
.wave__deep { opacity: 0.45; }
.wave__cyan { opacity: 0.9; }
.wave__shine {
  position: absolute;
  top: 0;
  left: -25%;
  width: 34%;
  height: 58%;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.75) 0%, rgba(255, 255, 255, 0) 68%);
  mix-blend-mode: screen;
  animation: shineSweep 17s linear infinite;
  will-change: transform;
}
/* thin light rays skimming the crest, as in the reference */
.wave__rays {
  position: absolute;
  left: 25%;
  right: 31%;
  top: 23%;
  height: 11%;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(120, 180, 255, 0) 0%, rgba(140, 195, 255, 0.7) 35%, rgba(255, 255, 255, 1) 52%, rgba(140, 195, 255, 0.7) 70%, rgba(120, 180, 255, 0) 100%) 0 30% / 100% 2px no-repeat,
    linear-gradient(90deg, rgba(120, 180, 255, 0) 0%, rgba(150, 200, 255, 0.55) 40%, rgba(255, 255, 255, 0.85) 58%, rgba(150, 200, 255, 0.55) 78%, rgba(120, 180, 255, 0) 100%) 0 62% / 100% 1.5px no-repeat,
    linear-gradient(90deg, rgba(120, 180, 255, 0) 10%, rgba(160, 205, 255, 0.4) 45%, rgba(255, 255, 255, 0.7) 60%, rgba(120, 180, 255, 0) 90%) 0 90% / 100% 1px no-repeat;
  transform: rotate(-2.2deg);
  opacity: 0.95;
  animation: raysShimmer 9s ease-in-out infinite alternate;
}

/* ---------- lower: basin + cards + strip -------------------------------- */
.lower {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-rows: var(--cards-h) var(--strip-h);
  row-gap: var(--lower-gap);
  padding-bottom: var(--lower-pad);
}
.basin {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 42.5vh;
  z-index: 0;
  pointer-events: none;
}
.basin__svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 -8px 18px rgba(70, 130, 230, 0.32));
}

/* ---------- portal cards ------------------------------------------------- */
.portals {
  position: relative;
  z-index: 1;
  width: var(--container);
  margin: 0 auto;
  min-height: 0;
}
.portals__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
  height: 100%;
}

.card {
  position: relative;
  height: 100%;
  min-height: 0;
  --accent: #2168d9;
  --accent-2: #0b4fc0;
  --accent-l: #6ea3ff;
  --accent-soft: rgba(33, 104, 217, 0.18);
  transition: transform var(--t) var(--ease);
}
.card--green { --accent: #179064; --accent-2: #0f7a54; --accent-l: #5fcaa0; --accent-soft: rgba(23, 144, 100, 0.18); }
.card--purple { --accent: #6d3ad6; --accent-2: #5228c4; --accent-l: #b08cff; --accent-soft: rgba(109, 58, 214, 0.18); }
.card:hover { transform: translateY(-6px); }

.card__badge {
  position: absolute;
  left: 50%;
  top: 0;
  z-index: 3;
  width: var(--badge);
  height: var(--badge);
  transform: translate(-50%, -46%);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: radial-gradient(circle at 35% 28%, var(--accent-l) 0%, var(--accent) 42%, var(--accent-2) 100%);
  box-shadow: 0 0 0 4px #fff, 0 0 0 5px var(--accent-soft), 0 14px 28px -10px rgba(12, 33, 80, 0.5);
  transition: box-shadow var(--t) var(--ease);
}
.card:hover .card__badge { box-shadow: 0 0 0 4px #fff, 0 0 0 5px var(--accent-soft), 0 0 30px -2px var(--accent-soft), 0 18px 30px -10px rgba(12, 33, 80, 0.5); }
.card__badge .icon { width: 44%; height: 44%; stroke-width: 2; }

.card__inner {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 20px 44px -20px rgba(12, 33, 80, 0.38), 0 2px 8px rgba(12, 33, 80, 0.06), inset 0 1px 0 #fff;
  isolation: isolate;
  transition: box-shadow var(--t) var(--ease);
}
.card:hover .card__inner {
  box-shadow: 0 30px 56px -20px rgba(12, 33, 80, 0.42), 0 0 0 1px var(--accent-soft), 0 0 44px -6px var(--accent-soft), inset 0 1px 0 #fff;
}

.card__media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  border-radius: inherit;
}
.card__media picture,
.card__img,
.card__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--pos, 50% 50%);
}
.card__img {
  opacity: 0.95;
  transform: scale(1.02);
  transition: transform 650ms var(--ease), opacity var(--t) var(--ease);
}
.card__video {
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 700ms ease, transform 650ms var(--ease);
}
.card.has-video .card__video { opacity: 0.85; }
.card--blue .card__img { filter: saturate(1.9) contrast(1.18) brightness(0.98); }
.card:hover .card__img,
.card:hover .card__video { transform: scale(1.06); }
.card:hover .card__img { opacity: 0.96; }
.card.has-video:hover .card__video { opacity: 1; }

.card__overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(150% 92% at 0% 0%, #fff 34%, rgba(255, 255, 255, 0.96) 48%, rgba(255, 255, 255, 0.7) 63%, rgba(255, 255, 255, 0.2) 84%, rgba(255, 255, 255, 0) 100%),
    radial-gradient(70% 70% at 100% 100%, var(--accent-soft) 0%, rgba(255, 255, 255, 0) 70%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 22%, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 0.45) 100%);
  transition: opacity var(--t) var(--ease);
}
.card:hover .card__overlay { opacity: 0.92; }

.card__body {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: calc(var(--badge) * 0.56 + 0.9vh) var(--card-px) var(--card-py);
  --card-px: clamp(16px, 2.6vw, 50px);
  --card-py: clamp(12px, 2.4vh, 26px);
  --logo-h: clamp(56px, 9.6vh, 104px);
}
.card__logo-wrap {
  display: grid;
  place-items: center;
  flex: none;
  width: 100%;
  height: var(--logo-h);
}
.card__logo {
  max-width: 96%;
  max-height: var(--logo-h);
  width: auto;
  height: auto;
  object-fit: contain;
  mix-blend-mode: multiply;
}
/* the institute mark is the tallest/narrowest of the three, so it is scaled up
   visually (transform only, no layout shift) to read at the same weight */
.card--green .card__logo { transform: scale(1.2); }
.card__rule {
  display: block;
  width: clamp(34px, 4.8vh, 52px);
  height: 2px;
  margin: clamp(7px, 1.5vh, 16px) auto 0;
  border-radius: 2px;
  background: var(--accent);
}
.card__desc {
  margin-top: clamp(7px, 1.5vh, 16px);
  min-height: calc(3 * 1.45em);
  font-size: clamp(12px, 1.48vh, 15.5px);
  line-height: 1.45;
  color: var(--ink);
}
.card__list {
  margin-top: clamp(7px, 1.5vh, 16px);
  display: grid;
  gap: clamp(4px, 0.85vh, 10px);
}
.card__list li {
  display: flex;
  align-items: center;
  gap: 0.55em;
  font-size: clamp(11.5px, 1.4vh, 14.5px);
  line-height: 1.35;
  color: var(--ink);
}
.card__list .icon { width: 1.15em; height: 1.15em; color: var(--accent); }
.card__foot {
  margin-top: auto;
  padding-top: clamp(8px, 1.5vh, 16px);
  border-top: 1px solid var(--line);
}
.card__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.62em;
  width: 100%;
  height: clamp(38px, 5.3vh, 56px);
  border-radius: 999px;
  background: linear-gradient(100deg, #04204f 0%, #0b2a6b 48%, var(--accent-2) 125%);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(12.5px, 1.62vh, 17px);
  letter-spacing: -0.01em;
  box-shadow: 0 10px 22px -10px rgba(6, 22, 60, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  transition: filter var(--t) var(--ease), box-shadow var(--t) var(--ease), transform var(--t) var(--ease);
}
/* whole card is clickable */
.card__cta::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
}
.card__cta:focus-visible { outline: none; }
.card__cta:focus-visible::after { outline: 3px solid rgba(47, 127, 245, 0.6); outline-offset: 2px; }
.card__cta-arrow {
  width: 1.6em;
  height: 1.6em;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  display: grid;
  place-items: center;
  transition: background var(--t) var(--ease), transform var(--t) var(--ease);
}
.card__cta-arrow .icon { width: 62%; height: 62%; stroke-width: 2.3; }
.card:hover .card__cta,
.card__cta:hover,
.card__cta:focus-visible {
  filter: brightness(1.1);
  box-shadow: 0 15px 28px -10px rgba(6, 22, 60, 0.82), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}
.card:hover .card__cta-arrow,
.card__cta:hover .card__cta-arrow,
.card__cta:focus-visible .card__cta-arrow {
  background: rgba(255, 255, 255, 0.3);
  transform: translateX(3px);
}


/* ---------- contact strip ------------------------------------------------ */
.strip {
  position: relative;
  z-index: 1;
  width: var(--container);
  margin: 0 auto;
  min-height: 0;
}
.strip__list {
  height: 100%;
  display: grid;
  grid-template-columns: 1.6fr 1.42fr 0.95fr 0.95fr;
  border-radius: clamp(14px, 2vh, 20px);
  background: linear-gradient(180deg, rgba(10, 30, 92, 0.55), rgba(5, 18, 62, 0.62));
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 24px 44px -22px rgba(0, 10, 50, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  overflow: hidden;
}
.strip__item {
  min-width: 0;
  --tone-l: #3d7ff0;
  --tone: #1e4fc0;
  --tone-d: #0c2f7a;
  --tone-glow: rgba(61, 127, 240, 0.5);
  --tone-ink: #e8f1ff;
}
.strip__item + .strip__item { border-left: 1px solid rgba(255, 255, 255, 0.12); }
.strip__item--green { --tone-l: #2fa77a; --tone: #1a7d5b; --tone-d: #0d4a37; --tone-glow: rgba(47, 167, 122, 0.5); --tone-ink: #e6fff4; }
.strip__item--indigo { --tone-l: #7d6ee8; --tone: #5349a9; --tone-d: #2b2775; --tone-glow: rgba(125, 110, 232, 0.5); --tone-ink: #efeaff; }
.strip__item--gold { --tone-l: #e5b95f; --tone: #a8742e; --tone-d: #5a3a2c; --tone-glow: rgba(229, 185, 95, 0.45); --tone-ink: #fff0c8; }
.strip__link {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.2vw, 20px);
  height: 100%;
  padding: 0 clamp(12px, 1.5vw, 28px);
  color: #fff;
  transition: background var(--t) var(--ease);
}
a.strip__link:hover,
a.strip__link:focus-visible { background: rgba(255, 255, 255, 0.06); outline: none; }
.strip__icon {
  flex: none;
  width: clamp(38px, 6.3vh, 66px);
  height: clamp(38px, 6.3vh, 66px);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--tone-ink);
  background: radial-gradient(circle at 35% 30%, var(--tone-l) 0%, var(--tone) 52%, var(--tone-d) 100%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16), 0 8px 20px -8px rgba(0, 0, 0, 0.55), 0 0 26px -4px var(--tone-glow);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.strip__icon .icon { width: 46%; height: 46%; }
a.strip__link:hover .strip__icon,
a.strip__link:focus-visible .strip__icon {
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.28), 0 12px 24px -8px rgba(0, 0, 0, 0.6), 0 0 32px -2px var(--tone-glow);
}
.strip__text {
  display: flex;
  flex-direction: column;
  gap: 0.28em;
  min-width: 0;
}
.strip__title {
  font-size: clamp(9.5px, 1.2vh, 12.5px);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.66);
  line-height: 1.1;
}
.strip__value {
  font-family: var(--font-display);
  font-size: clamp(11.5px, 1.5vh, 15.5px);
  font-weight: 600;
  line-height: 1.32;
  color: #fff;
  overflow-wrap: break-word;
}
a.strip__link:hover .strip__value,
a.strip__link:focus-visible .strip__value { text-decoration: none; }

/* ---------- footer (visible on scrolling layouts only) ------------------- */
.site-footer {
  display: none;
  background: #03215b;
  color: rgba(255, 255, 255, 0.62);
  text-align: center;
  padding: 14px 20px 18px;
  font-size: 12px;
}

/* ---------- entrance animation ----------------------------------------- */
.rise {
  animation: rise 0.9s var(--ease) backwards;
  animation-delay: var(--d, 0s);
}

/* ---------- keyframes ---------------------------------------------------- */
@keyframes rise {
  from { opacity: 0; transform: translate3d(0, 16px, 0); }
}
@keyframes cellsDrift {
  from { transform: translate3d(0, 0, 0) scale(1.3); }
  to { transform: translate3d(5px, -8px, 0) scale(1.34); }
}
@keyframes glowPulse {
  from { opacity: 0.45; }
  to { opacity: 1; }
}
@keyframes orbFloat {
  from { transform: translate3d(0, 0, 0) rotate(0deg); }
  to { transform: translate3d(1.2vw, -1.6vw, 0) rotate(8deg); }
}
@keyframes orbPulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.12); }
}
@keyframes waveBreath {
  from { transform: scaleY(1); }
  to { transform: scaleY(1.035); }
}
@keyframes shineSweep {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(420%, 0, 0); }
}
@keyframes raysShimmer {
  from { opacity: 0.55; }
  to { opacity: 0.95; }
}


/* ==========================================================================
   Desktop: lock the composition to exactly one viewport
   ========================================================================== */
@media (min-width: 1024px) and (min-height: 600px) {
  html,
  body { height: 100%; overflow: hidden; }
  .page { height: 100vh; height: 100dvh; }
  .stage { height: calc(100vh - var(--header-h)); height: calc(100dvh - var(--header-h)); }
}

/* narrower desktops */
@media (min-width: 1024px) and (max-width: 1279px) {
  :root { --container: 88vw; --gap: 14px; }
  .card__body { --card-px: clamp(14px, 2vw, 28px); }
  .hero__content { max-width: 66vw; }
  .bio__spot { background: radial-gradient(ellipse 32% 62% at 50% 44%, rgba(255, 255, 255, 0.94) 0%, rgba(255, 255, 255, 0.72) 45%, rgba(255, 255, 255, 0.25) 78%, rgba(255, 255, 255, 0) 100%); }
  .strip__list { grid-template-columns: 1.8fr 1.5fr 0.9fr 0.9fr; }
  .strip__link { gap: 10px; padding: 0 12px; }
  .strip__icon { width: 42px; height: 42px; }
  .strip__title { font-size: 9.5px; letter-spacing: 0.08em; }
  .strip__value { font-size: 11.5px; }
  .social__label { display: none; }
  .social__link { width: clamp(34px, 4.5vh, 44px); padding: 0; justify-content: center; }
}

/* mid desktops: keep the contact strip on one or two tidy lines */
@media (min-width: 1280px) and (max-width: 1439px) {
  .strip__link { gap: 12px; padding: 0 14px; }
}

/* short desktop windows: tighten the card interiors so every card still closes cleanly */
@media (min-width: 1024px) and (max-height: 780px) {
  :root { --badge: 54px; --cards-h: max(43.5vh, 330px); }
  .card__body { padding-top: calc(var(--badge) * 0.5 + 8px); --card-py: 10px; }
  .card__body { --logo-h: clamp(50px, 8.5vh, 86px); }
  .card__rule { margin-top: 8px; }
  .card__desc { margin-top: 8px; line-height: 1.35; }
  .card__list { margin-top: 8px; gap: 2px; }
  .card__foot { padding-top: 7px; }
}

/* short desktop windows: keep the layout, allow scrolling */
@media (min-width: 1024px) and (max-height: 599px) {
  :root { --header-h: 60px; --cards-h: 330px; --strip-h: 76px; }
  .hero { min-height: 250px; }
  .wave { top: 120px; height: 300px; }
  .basin { height: 300px; }
}

/* ==========================================================================
   Tablet & mobile: scrolling composition
   ========================================================================== */
@media (max-width: 1023px) {
  :root {
    --header-h: 64px;
    --badge: 60px;
    --radius: 22px;
    --container: min(92vw, 560px);
  }
  .page { overflow: visible; }

  .site-header {
    position: sticky;
    top: 0;
  }
  .site-header__edge { display: none; }
  .site-header__inner { padding: 0 18px; gap: 12px; }
  .brand__mark { height: 46px; }
  .brand__name { font-size: 20px; }
  .brand__sub { font-size: 10.5px; }

  .nav-toggle {
    display: grid;
    place-items: center;
    margin-left: auto;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--navy);
  }
  .nav-toggle .icon { width: 26px; height: 26px; }
  .nav-toggle__close { display: none; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__open { display: none; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__close { display: block; }

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    margin: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 8px 20px 20px;
    background: rgba(255, 255, 255, 0.97);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px -24px rgba(12, 33, 80, 0.35);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 260ms var(--ease), transform 260ms var(--ease), visibility 0s linear 260ms;
  }
  .site-header.is-open .site-nav {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    transition: opacity 260ms var(--ease), transform 260ms var(--ease), visibility 0s;
  }
  .site-nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav__link {
    display: block;
    padding: 12px 4px;
    font-size: 16px;
    border-bottom: 1px solid var(--line);
  }
  .site-nav__link::after { display: none; }
  .social { flex-wrap: wrap; gap: 8px; margin-top: 10px; }
  .social__link { height: 42px; font-size: 14px; padding: 0 14px; }

  .stage { display: block; }

  .hero {
    min-height: min(calc(100svh - var(--header-h)), 720px);
    padding: 40px 22px 150px;
    overflow: hidden;
  }
  .bio,
  .bio__orbs {
    top: calc(-1 * var(--header-h));
    height: calc(100% + var(--header-h));
  }
  .bio__img { object-position: 74% 45%; }
  .bio__cells { display: none; }
  .bio__haze { background: radial-gradient(ellipse 46% 60% at 96% 30%, rgba(230, 242, 255, 0.9) 0%, rgba(230, 242, 255, 0.5) 60%, rgba(230, 242, 255, 0) 100%); }
  .bio__veil {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.72) 25%, rgba(255, 255, 255, 0.5) 55%, rgba(255, 255, 255, 0.35) 100%);
  }
  .bio__spot { background: radial-gradient(ellipse 60% 40% at 50% 38%, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0) 100%); }
  .orb--1 { left: -4%; top: 12%; width: 22vw; height: 22vw; opacity: 0.82; }
  .orb--2 { left: 16%; top: 4%; width: 10vw; height: 10vw; }
  .orb--3 { left: 8%; top: 40%; width: 8vw; height: 8vw; }
  .orb--4 { display: none; }

  .hero__content { width: 100%; max-width: 100%; min-width: 0; margin-top: 0; }
  .hero__eyebrow { font-size: 11px; }
  .hero__title { font-size: clamp(30px, 8.6vw, 52px); }
  .hero__line { white-space: normal; }
  .hero__sub { font-size: clamp(14px, 4vw, 17px); max-width: 28em; }

  .wave {
    top: auto;
    bottom: -1px;
    height: 190px;
  }
  .wave__svg { animation: none; }

  .lower {
    display: block;
    padding-bottom: 28px;
  }
  .basin {
    top: 28%;
    bottom: 0;
    height: auto;
  }
  .basin__svg { height: 100%; }

  .portals { margin-top: -112px; }
  .portals__list {
    grid-template-columns: 1fr;
    gap: 46px;
    padding-top: 34px;
    height: auto;
  }
  .card { height: auto; }
  .card__inner { min-height: 0; background: rgba(255, 255, 255, 0.94); }
  .card__body { padding: 40px 24px 22px; }
  .card__body { --logo-h: 74px; }
  .card__desc { font-size: 14.5px; min-height: 0; }
  .card__list { gap: 6px; }
  .card__list li { font-size: 14px; }
  .card__foot { margin-top: 18px; padding-top: 14px; }
  .card__cta { height: 50px; font-size: 16px; }

  .strip { margin-top: 30px; }
  .strip__list { grid-template-columns: 1fr; height: auto; }
  .strip__link { padding: 14px 18px; gap: 14px; }
  .strip__item + .strip__item { border-left: 0; border-top: 1px solid rgba(255, 255, 255, 0.12); }
  .strip__icon { width: 46px; height: 46px; }
  .strip__title { font-size: 11px; }
  .strip__value { font-size: 15px; }

  .site-footer { display: block; }
}

/* tablet: three cards side by side, 2x2 strip */
@media (min-width: 900px) and (max-width: 1023px) {
  :root { --container: 94vw; }
  .hero { min-height: min(72vh, 680px); padding-bottom: 150px; }
  .portals { margin-top: -100px; }
  .portals__list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding-top: 30px; }
  .card__body { padding: 38px 18px 18px; }
  .card__body { --logo-h: 62px; }
  .card__desc { font-size: 13px; }
  .card__list li { font-size: 12.5px; }
  .card__cta { font-size: 15px; }
  .strip__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .strip__item:nth-child(2) { border-top: 0; border-left: 1px solid rgba(255, 255, 255, 0.12); }
  .strip__item:nth-child(4) { border-left: 1px solid rgba(255, 255, 255, 0.12); }
}

/* mid-size: 2x2 strip */
@media (min-width: 600px) and (max-width: 899px) {
  :root { --container: min(92vw, 620px); }
  .strip__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .strip__item:nth-child(2) { border-top: 0; border-left: 1px solid rgba(255, 255, 255, 0.12); }
  .strip__item:nth-child(4) { border-left: 1px solid rgba(255, 255, 255, 0.12); }
}

/* ---------- reduced motion ---------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
  }
  .bio__cells,
  .orb,
  .wave__svg,
  .wave__shine { animation: none !important; }
}

/* ---------- print ---------------------------------------------------------- */
@media print {
  .bio, .wave, .basin, .nav-toggle { display: none !important; }
  html, body, .page { height: auto; overflow: visible; }
}
