/* =========================================================================
   Kalahari Trial Centre — Design System
   A clinical research digital presence.
   Palette: deep clinical navy + refined teal, warm neutral paper.
   Type:   Newsreader (serif display) · IBM Plex Sans (UI/body) · IBM Plex Mono (labels)
   ========================================================================= */

:root {
  /* Brand */
  --navy-900: #071b30;
  --navy-800: #0a2340;
  --navy-700: #0f2e50;
  --navy-600: #163e68;
  --navy-500: #1f5484;
  --teal-600: #0d7d7d;
  --teal-500: #109a9a;
  --teal-400: #23b3b3;
  --gold-500: #b98a3f;

  /* Neutrals */
  --paper:     #fbfaf7;   /* warm off-white page */
  --paper-2:   #f4f2ec;   /* alt band */
  --mist:      #eef4f5;   /* pale blue-teal — hero wash, light bands */
  --mist-2:    #e3eded;
  --mist-line: #d3e3e3;   /* hairline that reads on mist */
  --white:     #ffffff;
  --ink:       #14232f;   /* body text on light */
  --ink-soft:  #4a5b68;   /* muted text */
  --ink-faint: #7d8b96;
  --line:      #e5e2d9;   /* warm hairline */
  --line-2:    #d8d4c8;

  /* On dark */
  --on-dark:        #eaf1f6;
  --on-dark-soft:   #a8bccb;
  --on-dark-faint:  #6d879b;
  --line-dark:      rgba(255,255,255,.12);

  /* Type */
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans:  "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono:  "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Scale / rhythm */
  --wrap: 1200px;
  --wrap-narrow: 860px;
  --gutter: clamp(20px, 5vw, 64px);
  --section-y: clamp(64px, 9vw, 140px);

  --radius: 12px;
  --radius-lg: 20px;
  --radius-sm: 8px;
  --radius-btn: 9px;      /* squared-off buttons — clinical, not consumer-pill */

  /* Dune contours — a motif drawn from the Kalahari name, used in place of
     the generic tech-grid overlay. Sits behind hero copy at low opacity. */
  --dune: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%201440%20700%27%20preserveAspectRatio%3D%27xMidYMax%20slice%27%3E%3Cg%20fill%3D%27none%27%20stroke%3D%27%230d7d7d%27%20stroke-opacity%3D%27.17%27%20stroke-width%3D%271.15%27%20stroke-linecap%3D%27round%27%3E%3Cpath%20d%3D%27M-40%2C330%20C200%2C268%20470%2C238%20760%2C262%20C1010%2C283%201250%2C338%201500%2C392%27%2F%3E%3Cpath%20d%3D%27M-40%2C386%20C190%2C318%20480%2C286%20772%2C312%20C1020%2C334%201258%2C392%201500%2C450%27%2F%3E%3Cpath%20d%3D%27M-40%2C442%20C180%2C370%20490%2C334%20784%2C362%20C1030%2C385%201266%2C446%201500%2C508%27%2F%3E%3Cpath%20d%3D%27M-40%2C500%20C170%2C424%20500%2C382%20796%2C412%20C1040%2C436%201274%2C500%201500%2C566%27%2F%3E%3Cpath%20d%3D%27M-40%2C560%20C160%2C478%20510%2C430%20808%2C462%20C1050%2C488%201282%2C554%201500%2C624%27%2F%3E%3Cpath%20d%3D%27M-40%2C622%20C150%2C532%20520%2C478%20820%2C512%20C1060%2C540%201290%2C608%201500%2C682%27%2F%3E%3C%2Fg%3E%3Cg%20fill%3D%27none%27%20stroke%3D%27%23163e68%27%20stroke-opacity%3D%27.10%27%20stroke-width%3D%271%27%20stroke-linecap%3D%27round%27%3E%3Cpath%20d%3D%27M-40%2C214%20C230%2C176%20520%2C160%20820%2C180%20C1070%2C197%201290%2C232%201500%2C268%27%2F%3E%3Cpath%20d%3D%27M-40%2C258%20C220%2C214%20520%2C194%20824%2C216%20C1075%2C234%201295%2C274%201500%2C312%27%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");

  --shadow-sm: 0 1px 2px rgba(10,35,64,.06), 0 2px 8px rgba(10,35,64,.05);
  --shadow-md: 0 6px 20px rgba(10,35,64,.08), 0 2px 6px rgba(10,35,64,.05);
  --shadow-lg: 0 22px 60px rgba(10,35,64,.14), 0 6px 18px rgba(10,35,64,.08);

  --ease: cubic-bezier(.22,.61,.36,1);
  --dur: .7s;
}

/* -------------------------------------------------------------- Reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  font-size: 17px;
  letter-spacing: -0.003em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
::selection { background: var(--teal-500); color: #fff; }

/* -------------------------------------------------------------- Type */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; line-height: 1.08; letter-spacing: -0.012em; color: var(--navy-800); }
h1 { font-size: clamp(2.4rem, 5.4vw, 4.15rem); }
h2 { font-size: clamp(1.95rem, 3.8vw, 3rem); }
h3 { font-size: clamp(1.3rem, 2.1vw, 1.7rem); }
p  { color: var(--ink-soft); }
strong { color: var(--ink); font-weight: 600; }

.eyebrow {
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--teal-600);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: .6em;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 1px;
  background: currentColor;
  opacity: .7;
}
.eyebrow.center::before { display: none; }

.lead { font-size: clamp(1.08rem, 1.5vw, 1.28rem); color: var(--ink-soft); line-height: 1.6; }

/* -------------------------------------------------------------- Layout */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }
.section--tight { padding-block: clamp(48px, 6vw, 90px); }
.band-paper2 { background: var(--paper-2); }
.band-navy { background: var(--navy-800); color: var(--on-dark); }
.band-mist { background: var(--mist); border-bottom: 1px solid var(--mist-line); }
.hero + .band-mist { border-top: none; }
.band-navy h1, .band-navy h2, .band-navy h3 { color: #fff; }
.band-navy p { color: var(--on-dark-soft); }

.section-head { max-width: 720px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { margin-top: 16px; }
.section-head p { margin-top: 18px; }

.grid { display: grid; gap: clamp(18px, 2.2vw, 30px); }
.g-2 { grid-template-columns: repeat(2, 1fr); }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 940px) { .g-3, .g-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .g-2, .g-3, .g-4 { grid-template-columns: 1fr; } }
/* Several sections set grid-template-columns inline for bespoke ratios; inline styles
   outrank media queries, so they need an explicit override to collapse on small screens. */
@media (max-width: 860px) {
  .grid[style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
}

/* -------------------------------------------------------------- Buttons */
.btn {
  --bg: var(--navy-800); --fg: #fff;
  display: inline-flex; align-items: center; gap: .6em;
  background: var(--bg); color: var(--fg);
  padding: 15px 26px; border-radius: var(--radius-btn);
  font-weight: 500; font-size: .96rem; letter-spacing: -0.01em;
  border: 1px solid transparent;
  transition: transform .25s var(--ease), box-shadow .3s var(--ease), background .25s var(--ease);
  box-shadow: 0 1px 2px rgba(10,35,64,.14);
  position: relative;
}
.btn svg { width: 17px; height: 17px; transition: transform .3s var(--ease); }
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn:hover svg { transform: translateX(3px); }
.btn--teal { --bg: var(--teal-600); }
.btn--teal:hover { background: var(--teal-500); }
.btn--ghost { --bg: transparent; --fg: var(--navy-800); border-color: var(--line-2); box-shadow: none; }
.btn--ghost:hover { border-color: var(--navy-600); background: rgba(15,46,80,.03); }
.btn--light { --bg: #fff; --fg: var(--navy-800); }
.btn--outline-light { --bg: transparent; --fg: #fff; border-color: rgba(255,255,255,.28); box-shadow: none; }
.btn--outline-light:hover { border-color: rgba(255,255,255,.6); background: rgba(255,255,255,.06); }

.textlink {
  display: inline-flex; align-items: center; gap: .45em;
  color: var(--teal-600); font-weight: 500;
  border-bottom: 1px solid transparent; padding-bottom: 1px;
  transition: gap .25s var(--ease), border-color .25s var(--ease);
}
.textlink svg { width: 15px; height: 15px; }
.textlink:hover { gap: .75em; border-color: currentColor; }

/* -------------------------------------------------------------- Header */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  transition: background .4s var(--ease), box-shadow .4s var(--ease), border-color .4s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(251,250,247,.82);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-color: var(--line);
  box-shadow: 0 1px 0 rgba(10,35,64,.02);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 84px; transition: height .4s var(--ease); }
.site-header.scrolled .nav { height: 68px; }
.brand { display: flex; align-items: center; }
/* Heroes are light, so the full-colour lockup carries throughout */
.brand__logo { position: relative; display: block; width: 168px; height: 51px; transition: width .4s var(--ease), height .4s var(--ease); }
.brand__logo-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: left center; }
.site-header.scrolled .brand__logo { width: 140px; height: 43px; }
@media (max-width: 520px) {
  .brand__logo { width: 136px; height: 42px; }
  .site-header.scrolled .brand__logo { width: 120px; height: 37px; }
}

.nav__links { display: flex; align-items: center; gap: 4px; }
/* direct children only — keeps the CTA button out of the nav-link styling */
.nav__links > a {
  font-size: .92rem; font-weight: 450; color: var(--ink-soft);
  padding: 9px 13px; border-radius: 8px; letter-spacing: -0.01em;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.nav__links > a:hover { color: var(--navy-800); background: rgba(15,46,80,.04); }
.nav__links > a.active { color: var(--navy-800); font-weight: 500; }
.nav__cta { margin-left: 10px; }
.nav__cta .btn { padding: 11px 20px; font-size: .9rem; color: #fff; }

.nav__toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line-2); border-radius: 10px; background: rgba(255,255,255,.5); flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.nav__toggle span { width: 19px; height: 1.6px; background: var(--navy-800); transition: transform .35s var(--ease), opacity .25s var(--ease); }
.nav__toggle.open span:nth-child(1) { transform: translateY(6.6px) rotate(45deg); }
.nav__toggle.open span:nth-child(2) { opacity: 0; }
.nav__toggle.open span:nth-child(3) { transform: translateY(-6.6px) rotate(-45deg); }

@media (max-width: 960px) {
  .nav__toggle { display: flex; }
  .nav__links {
    /* anchored to the header itself so it tracks the shrink-on-scroll height */
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 18px var(--gutter) 28px;
    box-shadow: var(--shadow-lg);
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: transform .35s var(--ease), opacity .3s var(--ease);
  }
  .nav__links.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav__links > a { padding: 14px 8px; font-size: 1.05rem; border-bottom: 1px solid var(--line); border-radius: 0; color: var(--ink-soft); }
  .nav__links > a:last-of-type { border-bottom: none; }
  .nav__cta { margin: 14px 0 0; }
  .nav__cta .btn { width: 100%; justify-content: center; padding: 15px; }
}

/* -------------------------------------------------------------- Hero */
.hero { position: relative; padding-top: clamp(150px, 16vw, 190px); padding-bottom: clamp(64px, 8vw, 104px); overflow: hidden; }
.hero__bg { position: absolute; inset: 0; z-index: -2;
  background: linear-gradient(180deg, #f3f9f9 0%, var(--mist) 58%, var(--mist) 100%); }
.hero__grid-lines { position: absolute; inset: 0; z-index: -1;
  background-image: var(--dune); background-size: cover; background-position: bottom center; background-repeat: no-repeat;
  -webkit-mask-image: linear-gradient(180deg, transparent 2%, #000 34%, #000 88%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 2%, #000 34%, #000 88%, transparent 100%);
}
/* Asymmetric hero: copy left, a factual site panel right — not a centred pitch block */
.hero__inner { display: grid; grid-template-columns: 1.25fr .75fr; gap: clamp(32px, 5vw, 72px); align-items: end; }
@media (max-width: 900px) { .hero__inner { grid-template-columns: 1fr; align-items: start; } }
.hero .eyebrow { color: var(--teal-600); }
.hero h1 { color: var(--navy-800); margin-top: 22px; max-width: 17ch; font-size: clamp(2.5rem, 5.6vw, 4.4rem); }
.hero h1 em { font-style: italic; color: var(--teal-600); }
.hero__sub { color: var(--ink-soft); font-size: clamp(1.06rem, 1.5vw, 1.22rem); margin-top: 26px; max-width: 54ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }

/* Hero site panel — reads like a site fact sheet */
.sitecard { background: rgba(255,255,255,.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--mist-line); border-radius: var(--radius); padding: 26px 28px; box-shadow: var(--shadow-sm); }
.sitecard dl { display: grid; gap: 0; margin: 0; }
.sitecard div { display: flex; justify-content: space-between; align-items: baseline; gap: 18px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.sitecard div:last-child { border-bottom: none; padding-bottom: 0; }
.sitecard div:first-child { padding-top: 0; }
.sitecard dt { font-family: var(--mono); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); }
.sitecard dd { margin: 0; font-size: .95rem; font-weight: 500; color: var(--navy-800); text-align: right; }

/* -------------------------------------------------------------- Page hero (inner pages) */
.page-hero { position: relative; padding-top: 142px; padding-bottom: clamp(44px, 5.5vw, 74px); overflow: hidden; }
.page-hero__bg { position: absolute; inset: 0; z-index: -2;
  background: linear-gradient(180deg, #f2f8f8 0%, var(--mist) 60%, var(--paper) 100%); }
.page-hero__lines { position: absolute; inset: 0; z-index: -1;
  background-image: var(--dune); background-size: cover; background-position: bottom center; background-repeat: no-repeat;
  -webkit-mask-image: linear-gradient(180deg, transparent 4%, #000 46%, #000 90%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 4%, #000 46%, #000 90%, transparent 100%);
}
.page-hero .eyebrow { color: var(--teal-600); }
.page-hero h1 { color: var(--navy-800); margin-top: 20px; max-width: 17ch; font-size: clamp(2.4rem, 5.2vw, 4.1rem); }
.page-hero h1 em { font-style: italic; color: var(--teal-600); }

.page-hero p { color: var(--ink-soft); margin-top: 20px; max-width: 56ch; font-size: 1.08rem; }
.crumbs { font-family: var(--mono); font-size: .72rem; letter-spacing: .1em; color: var(--ink-faint); text-transform: uppercase; display: flex; gap: .6em; align-items: center; }
.crumbs a:hover { color: var(--teal-600); }
.crumbs span { opacity: .5; }

/* -------------------------------------------------------------- Cards */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s var(--ease);
  position: relative;
  height: 100%;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--mist-line); }
.card__icon {
  width: 48px; height: 48px; border-radius: 10px;
  display: grid; place-items: center; margin-bottom: 22px;
  background: var(--mist);
  color: var(--teal-600);
  border: 1px solid var(--mist-line);
}
.card__icon svg { width: 25px; height: 25px; }
.card h3 { color: var(--navy-800); font-size: 1.28rem; }
.card p { margin-top: 12px; font-size: .98rem; }

/* Feature list card variant with number */
.card__num { font-family: var(--mono); font-size: .8rem; color: var(--teal-600); letter-spacing: .1em; }

/* -------------------------------------------------------------- Metrics band */
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(20px, 3vw, 40px); }
@media (max-width: 780px) { .metrics { grid-template-columns: repeat(2, 1fr); gap: 34px 20px; } }
.metric { position: relative; padding-left: 22px; }
.metric::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 2px; background: var(--teal-500); opacity: .55; }
.metric__num { font-family: var(--serif); font-size: clamp(2.5rem, 4.4vw, 3.5rem); font-weight: 500; line-height: 1; color: var(--navy-800); letter-spacing: -0.02em; }
.metric__num .suffix { color: var(--teal-600); }
.metric__label { margin-top: 12px; color: var(--ink-soft); font-size: .93rem; line-height: 1.45; }
/* …and on the dark bands that remain */
.band-navy .metric__num { color: #fff; }
.band-navy .metric__num .suffix { color: var(--teal-400); }
.band-navy .metric__label { color: var(--on-dark-soft); }

/* -------------------------------------------------------------- Therapeutic area cards */
.ta-card {
  position: relative; overflow: hidden;
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), color .4s var(--ease), border-color .4s var(--ease);
  min-height: 210px; display: flex; flex-direction: column;
  z-index: 0;
}
.ta-card::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(160deg, var(--navy-700), var(--navy-900));
  opacity: 0; transition: opacity .45s var(--ease);
}
.ta-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--navy-700); }
.ta-card:hover::after { opacity: 1; }
.ta-card:hover h3, .ta-card:hover .ta-card__index { color: #fff; }
.ta-card:hover p { color: var(--on-dark-soft); }
.ta-card:hover .ta-card__icon { background: rgba(255,255,255,.08); border-color: var(--line-dark); color: var(--teal-400); }
.ta-card__index { font-family: var(--mono); font-size: .74rem; letter-spacing: .1em; color: var(--ink-faint); transition: color .4s var(--ease); }
.ta-card__icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; margin: 16px 0 auto; background: #eef6f6; border: 1px solid #dcefef; color: var(--teal-600); transition: all .4s var(--ease); }
.ta-card__icon svg { width: 23px; height: 23px; }
.ta-card h3 { font-size: 1.24rem; margin-top: 20px; transition: color .4s var(--ease); }
.ta-card p { margin-top: 10px; font-size: .93rem; transition: color .4s var(--ease); }

/* -------------------------------------------------------------- Split feature */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 5vw, 72px); align-items: center; }
.split--reverse .split__media { order: 2; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split--reverse .split__media { order: 0; } }
.split__media { position: relative; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 5/4; box-shadow: var(--shadow-lg); }

/* Placeholder media (client photos go here) */
.ph {
  position: relative; overflow: hidden;
  background:
    radial-gradient(80% 90% at 15% 10%, rgba(16,154,154,.14), transparent 60%),
    linear-gradient(150deg, var(--mist-2), #eceee8);
  color: var(--ink-faint);
  display: grid; place-items: center;
}
.ph::after {
  content: ""; position: absolute; inset: 0; opacity: .9;
  background-image: var(--dune);
  background-size: cover; background-position: bottom center;
  -webkit-mask-image: linear-gradient(180deg, transparent 8%, #000 55%);
  mask-image: linear-gradient(180deg, transparent 8%, #000 55%);
}
/* Real photo dropped into a .ph slot — covers the placeholder when it loads */
.ph__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; z-index: 2; }
.ph__tag { position: relative; z-index: 1; font-family: var(--mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; display: inline-flex; align-items: center; gap: .5em; padding: 8px 14px; border: 1px dashed var(--line-2); border-radius: 100px; }

/* -------------------------------------------------------------- Feature rows (why choose us) */
.feature-row { display: flex; gap: 20px; padding: 26px 0; border-top: 1px solid var(--line); }
.feature-row:last-child { border-bottom: 1px solid var(--line); }
.feature-row__ic { flex: none; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--navy-800); color: var(--teal-400); }
.feature-row__ic svg { width: 22px; height: 22px; }
.feature-row h3 { font-size: 1.2rem; }
.feature-row p { margin-top: 8px; font-size: .97rem; }

/* --- Animated feature icons --- */
.feature-row__ic {
  position: relative; overflow: visible;
  transition: transform .5s var(--ease), background .5s var(--ease), box-shadow .5s var(--ease);
}
.feature-row__ic::after {
  content: ""; position: absolute; inset: -5px; border-radius: 16px;
  border: 1px solid var(--teal-500); opacity: 0; transform: scale(.82);
  transition: opacity .55s var(--ease), transform .55s var(--ease);
  pointer-events: none;
}
.feature-row__ic svg { transition: transform .5s var(--ease); overflow: visible; }
.feature-row:hover .feature-row__ic {
  background: linear-gradient(150deg, var(--teal-600), var(--navy-700));
  transform: translateY(-3px) scale(1.06);
  box-shadow: 0 12px 26px rgba(13,125,125,.3);
}
.feature-row:hover .feature-row__ic::after { opacity: .5; transform: scale(1); }

/* Per-icon signature motion on hover */
@keyframes ic-bolt   { 0%,100% { transform: none; } 28% { transform: translateY(-2.5px) scale(1.1); } 55% { transform: translateY(1px) scale(.96); } }
@keyframes ic-float  { 0%,100% { transform: none; } 50% { transform: translateY(-2.5px); } }
@keyframes ic-spin   { to { transform: rotate(360deg); } }
@keyframes ic-shuttle{ 0%,100% { transform: translateX(-1.5px); } 50% { transform: translateX(1.5px); } }

.feature-row:hover .feature-row__ic[data-ic="bolt"] svg      { animation: ic-bolt 1.15s var(--ease) infinite; }
.feature-row:hover .feature-row__ic[data-ic="shield"] svg    { animation: ic-float 1.8s ease-in-out infinite; }
.feature-row:hover .feature-row__ic[data-ic="retention"] svg { animation: ic-shuttle 1.5s ease-in-out infinite; }
.feature-row__ic[data-ic="clock"] .hand { transform-origin: 12px 12px; transition: transform .6s var(--ease); }
.feature-row:hover .feature-row__ic[data-ic="clock"] .hand   { animation: ic-spin 2.6s linear infinite; }

@media (prefers-reduced-motion: reduce) {
  .feature-row__ic, .feature-row__ic svg, .feature-row__ic .hand { animation: none !important; transition: none !important; }
  .feature-row:hover .feature-row__ic { transform: none; }
}

/* -------------------------------------------------------------- Infrastructure list */
.spec-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--line); }
@media (max-width: 640px) { .spec-list { grid-template-columns: 1fr; } }
.spec {
  background: var(--white); padding: 24px 26px;
  display: flex; gap: 16px; align-items: flex-start;
  transition: background .3s var(--ease);
}
.spec:hover { background: #fbfdfd; }
.spec__ic { flex: none; color: var(--teal-600); margin-top: 2px; }
.spec__ic svg { width: 22px; height: 22px; }
.spec h4 { font-family: var(--sans); font-weight: 600; font-size: 1rem; color: var(--navy-800); letter-spacing: -0.01em; }
.spec p { margin-top: 5px; font-size: .9rem; line-height: 1.5; }

/* -------------------------------------------------------------- Timeline */
.timeline { position: relative; }
.timeline::before { content: ""; position: absolute; left: 8px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--teal-500), var(--line)); }
.tl-item { position: relative; padding: 0 0 34px 42px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before { content: ""; position: absolute; left: 2px; top: 5px; width: 14px; height: 14px; border-radius: 50%; background: var(--white); border: 3px solid var(--teal-500); box-shadow: 0 0 0 4px rgba(16,154,154,.12); }
.tl-item time { font-family: var(--mono); font-size: .76rem; letter-spacing: .1em; color: var(--teal-600); text-transform: uppercase; }
.tl-item h3 { font-size: 1.2rem; margin-top: 8px; }
.tl-item p { margin-top: 6px; font-size: .96rem; }

/* -------------------------------------------------------------- Studies table / badges */
.badge { display: inline-flex; align-items: center; gap: .45em; font-family: var(--mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; padding: 5px 11px; border-radius: 100px; font-weight: 500; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--active { background: #e5f4ee; color: #1f8a5b; }
.badge--upcoming { background: #eaf1fb; color: #2b62c4; }
.badge--completed { background: #f0efe9; color: #7d7460; }

.study-row {
  display: grid; grid-template-columns: 120px 1.4fr 1fr auto; gap: 24px; align-items: center;
  padding: 22px 26px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.study-row + .study-row { margin-top: 12px; }
.study-row:hover { transform: translateX(4px); box-shadow: var(--shadow-sm); border-color: var(--line-2); }
.study-row__year { font-family: var(--mono); font-size: 1.05rem; color: var(--navy-700); font-weight: 500; }
.study-row__title { font-family: var(--serif); font-size: 1.15rem; color: var(--navy-800); }
.study-row__meta { font-size: .9rem; color: var(--ink-soft); }
@media (max-width: 760px) {
  .study-row { grid-template-columns: 1fr auto; gap: 6px 16px; }
  .study-row__year { order: 1; }
  .study-row .badge { order: 2; justify-self: end; }
  .study-row__title { order: 3; grid-column: 1 / -1; }
  .study-row__meta { order: 4; grid-column: 1 / -1; }
}

/* -------------------------------------------------------------- Forms */
.form { display: grid; gap: 20px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 560px) { .form__row { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: .85rem; font-weight: 500; color: var(--navy-800); letter-spacing: -0.01em; }
.field label .req { color: var(--teal-600); }
.field input, .field select, .field textarea {
  font: inherit; font-size: .96rem; color: var(--ink);
  padding: 14px 16px; border: 1px solid var(--line-2); border-radius: 11px;
  background: var(--white); transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
  width: 100%;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--teal-500); box-shadow: 0 0 0 4px rgba(16,154,154,.12);
}
.field input::placeholder, .field textarea::placeholder { color: var(--ink-faint); }
.form__note { font-size: .82rem; color: var(--ink-faint); }
.form__ok { display: none; align-items: center; gap: 12px; padding: 16px 18px; border-radius: 12px; background: #e5f4ee; color: #1f7a52; font-size: .92rem; border: 1px solid #c6e6d5; }
.form__ok.show { display: flex; }
.form__ok svg { width: 20px; height: 20px; flex: none; }

/* -------------------------------------------------------------- CTA band */
.cta-band { position: relative; overflow: hidden; border-radius: var(--radius-lg); background: linear-gradient(150deg, #0f3057, var(--navy-800) 55%, var(--navy-900)); padding: clamp(40px, 6vw, 78px); text-align: center; }
.cta-band__glow { position: absolute; width: 480px; height: 480px; border-radius: 50%; background: radial-gradient(circle, rgba(35,179,179,.28), transparent 65%); top: -180px; right: -120px; pointer-events: none; }
.cta-band h2 { color: #fff; max-width: 20ch; margin-inline: auto; position: relative; }
.cta-band p { color: var(--on-dark-soft); max-width: 52ch; margin: 20px auto 0; position: relative; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 34px; position: relative; }

/* -------------------------------------------------------------- Contact cards */
.contact-line { display: flex; gap: 16px; align-items: flex-start; padding: 20px 0; border-bottom: 1px solid var(--line); }
.contact-line:last-child { border-bottom: none; }
.contact-line__ic { flex: none; width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; background: #eef6f6; color: var(--teal-600); border: 1px solid #dcefef; }
.contact-line__ic svg { width: 20px; height: 20px; }
.contact-line .lbl { font-family: var(--mono); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); }
.contact-line .val { color: var(--navy-800); font-weight: 500; margin-top: 3px; font-size: 1.02rem; }
.contact-line a.val:hover { color: var(--teal-600); }

.map-frame { border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); }
.map-frame iframe { display: block; width: 100%; height: 100%; min-height: 380px; border: 0; filter: grayscale(.2) contrast(1.02); }

/* -------------------------------------------------------------- Prose (bio, etc.) */
.prose p + p { margin-top: 1.1em; }
.prose h3 { margin-top: 1.6em; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { font-size: .86rem; padding: 8px 15px; border-radius: 100px; background: var(--white); border: 1px solid var(--line-2); color: var(--navy-700); font-weight: 450; }
.chip--solid { background: var(--navy-800); color: var(--on-dark); border-color: transparent; }

.stat-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.stat-card b { display: block; font-family: var(--serif); font-size: 2.4rem; font-weight: 500; color: var(--navy-800); line-height: 1; }
.stat-card span { display: block; margin-top: 10px; font-size: .92rem; color: var(--ink-soft); }

/* -------------------------------------------------------------- Footer */
.site-footer { background: var(--navy-900); color: var(--on-dark-soft); padding-top: clamp(56px, 7vw, 92px); }
.footer-top { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 54px; border-bottom: 1px solid var(--line-dark); }
@media (max-width: 900px) { .footer-top { grid-template-columns: 1fr 1fr; gap: 40px 30px; } }
@media (max-width: 520px) { .footer-top { grid-template-columns: 1fr; } }
.footer-logo { width: 208px; height: auto; max-width: 100%; }
.footer-brand p { margin-top: 18px; font-size: .93rem; color: var(--on-dark-faint); max-width: 34ch; }
.footer-col h4 { font-family: var(--mono); font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: var(--on-dark-faint); font-weight: 500; margin-bottom: 18px; }
.footer-col a, .footer-col p { display: block; font-size: .93rem; color: var(--on-dark-soft); padding: 6px 0; transition: color .2s var(--ease); }
.footer-col a:hover { color: #fff; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: center; padding: 26px 0; font-size: .82rem; color: var(--on-dark-faint); }
.footer-bottom .disclaimer { max-width: 52ch; line-height: 1.5; }

/* Powered-by credit — gold, softly glowing */
.vgm-credit {
  font-family: var(--mono);
  font-size: .72rem; letter-spacing: .13em; text-transform: uppercase;
  color: #dcb571; white-space: nowrap;
  transition: color .3s var(--ease), text-shadow .3s var(--ease);
  animation: vgm-glow 3.4s ease-in-out infinite;
}
@keyframes vgm-glow {
  0%, 100% { text-shadow: 0 0 8px rgba(220,181,113,.35), 0 0 20px rgba(220,181,113,.14); }
  50%      { text-shadow: 0 0 15px rgba(220,181,113,.62), 0 0 36px rgba(220,181,113,.3); }
}
.vgm-credit:hover {
  color: #f4d69c;
  text-shadow: 0 0 18px rgba(244,214,156,.8), 0 0 44px rgba(244,214,156,.45);
  animation-play-state: paused;
}
@media (prefers-reduced-motion: reduce) { .vgm-credit { animation: none; text-shadow: 0 0 12px rgba(220,181,113,.45); } }

/* -------------------------------------------------------------- Reveal animation */
[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); will-change: opacity, transform; }
[data-reveal].in { opacity: 1; transform: none; }
[data-reveal-stagger] > * { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
[data-reveal-stagger].in > * { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal], [data-reveal-stagger] > * { opacity: 1 !important; transform: none !important; transition: none !important; }
}

.mt-s { margin-top: 24px; } .mt-m { margin-top: 40px; } .mt-l { margin-top: 60px; }
.center { text-align: center; }
.maxw { max-width: var(--wrap-narrow); margin-inline: auto; }
