/* main.css — PainCube leaflet. Mobile-first. */

/* ============ BASE ============ */
body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  color: var(--light-text);
  background: var(--white);
  font-synthesis: none;
}

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

.section {
  position: relative;
  padding-block: var(--space-section-y);
}
.section--light { background: var(--white); color: var(--light-text); }
.section--light.section--alt { background: var(--gray-050); }
.section--dark { background: var(--dark-surface); color: var(--dark-text); }

/* anchor offset so the sticky nav never covers a section heading */
[id] { scroll-margin-top: calc(var(--nav-h) + 12px); }

/* ============ WORD WRAP / LINE BREAKING ============
   KO: break on word (어절) boundaries, never mid-word.
   EN: no automatic hyphenation; balance headline/lead line lengths. */
:lang(ko) { letter-spacing: 0; word-break: keep-all; line-break: strict; }
:lang(ko) body { font-size: .95rem; line-height: 1.75; }
:lang(ko) .heavy { font-weight: 700; }

body { hyphens: manual; -webkit-hyphens: manual; overflow-wrap: break-word; }

/* Headlines and leads: balanced ragged edge, no lone trailing word */
.hero__headline, .hero__sub,
.section__headline, .section__sub,
.block__headline, .block__sub,
.manifesto__kicker, .manifesto__main, .manifesto__desc,
.eyebrow__brand, .eyebrow__rest, .datasrc__label,
.demo__headline, .marquee__heading,
.cta-band__headline, .cta-band__sub,
.flow-card__title, .flow-card__body,
.featurelist__title, .featurelist__sub,
.team-card__name, .team-card__role, .team-card__affil,
.checklist__item, .footnote {
  text-wrap: balance;
  hyphens: manual;
  -webkit-hyphens: manual;
}
/* Longer running text reads better with `pretty` (orphan control only) */
.block__sub, .manifesto__desc, .checklist__item, .flow-card__body { text-wrap: pretty; }

/* Labels that must never break mid-word: keep on one line, wrap as a unit */
.chip, .btn, .badge, .block__num, .block__eyebrow-text,
.cofounder-badge, .lang-toggle, .demo__btn, .flow-card__num {
  white-space: nowrap;
}
.chips, .block__eyebrow { flex-wrap: wrap; }

/* Typographic primitives */
.eyebrow {
  font-size: var(--fs-label);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--cyan-300);
  font-weight: 600;
}
:lang(ko) .eyebrow { letter-spacing: 0; text-transform: none; }

/* Brand word does the separating work that an em-dash used to do */
.eyebrow--split {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .5rem;
  text-transform: none;
  letter-spacing: 0;
}
.eyebrow__brand {
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--cyan-300);
}
.eyebrow__rest {
  font-size: clamp(.8rem, 1.1vw, .95rem);
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--dark-text-mute);
}
:lang(ko) .eyebrow__rest { letter-spacing: .02em; text-transform: none; }

.label {
  font-size: var(--fs-label);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--blue-700);
  font-weight: 700;
}
.label--muted { color: var(--light-text-mute); }
:lang(ko) .label { letter-spacing: 0; text-transform: none; }

.caption { font-size: var(--fs-caption); color: var(--light-text-mute); }

.section__head { max-width: var(--content-narrow); margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section__head--center { margin-inline: auto; text-align: center; }
.section__headline {
  font-size: var(--fs-h1);
  font-weight: 800;
  line-height: 1.18;
  margin-top: .6rem;
  letter-spacing: -0.015em;
}
.section__sub {
  margin-top: 1.1rem;
  color: var(--light-text-soft);
  font-size: var(--fs-lead);
  line-height: 1.6;
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .85rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  line-height: 1;
  transition: transform var(--dur-fast) var(--ease-out),
              background-color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out);
  white-space: nowrap;
}
.btn--cta { background: var(--teal-500); color: var(--navy-900); }
.btn--cta:hover { background: var(--teal-400); transform: translateY(-2px); }
.btn--lg { padding: 1.05rem 1.9rem; font-size: 1.05rem; }
.btn--ghost {
  background: transparent;
  color: var(--dark-text);
  border: 1px solid var(--dark-border);
}
.btn--ghost:hover { background: var(--dark-surface-raise); transform: translateY(-2px); }

/* ============ NAV — always solid navy ============ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy-800);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .08);
  transition: box-shadow var(--dur-base) var(--ease-out);
}
.nav.is-scrolled { box-shadow: 0 6px 24px rgba(11, 14, 42, .35); }
.nav__inner {
  max-width: var(--content-max);
  margin-inline: auto;
  min-height: var(--nav-h);
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.nav__brand { display: inline-flex; align-items: center; gap: .75rem; }
.nav__logo {
  height: 30px;
  width: auto;
  /* logo art is navy — force white so it reads on the navy nav */
  filter: brightness(0) invert(1);
}
.nav__brand-sub {
  display: none;
  padding-left: .75rem;
  border-left: 1px solid rgba(255, 255, 255, .22);
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .06em;
  color: var(--dark-text-soft);
  white-space: nowrap;
}
.nav__menu { display: flex; align-items: center; gap: 2rem; }
.nav__links { display: flex; align-items: center; gap: 1.6rem; }
.nav__links a {
  font-size: .95rem;
  font-weight: 500;
  color: var(--dark-text-soft);
  transition: color var(--dur-fast) var(--ease-out);
}
.nav__links a:hover { color: var(--dark-text); }
.nav__actions { display: flex; align-items: center; gap: .75rem; }

.lang-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;          /* WCAG tap target */
  padding: .45rem .7rem;
  border-radius: 999px;
  border: 1px solid var(--dark-border);
  color: var(--cyan-300);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .04em;
  transition: background-color var(--dur-fast) var(--ease-out);
}
.lang-toggle:hover { background: var(--dark-surface-raise); }

/* Two toggles exist: one pinned in the mobile header bar, one inside the
   desktop nav. Exactly one is visible at any width — they share state. */
.nav__bar-actions { display: flex; align-items: center; gap: .5rem; }
.lang-toggle--bar { display: none; }
.nav__cta { padding: .58rem 1.15rem; font-size: .9rem; }

.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: .5rem;
  z-index: 2;
}
.nav__burger span {
  width: 22px; height: 2px; background: var(--dark-text);
  transition: transform var(--dur-base) var(--ease-out), opacity var(--dur-fast);
}

.nav__contact {
  display: none;                 /* menu-only; the desktop nav has no room */
  font-size: .95rem;
  color: var(--dark-text-mute);
}
.nav__contact a {
  color: var(--cyan-300);
  text-decoration: underline;
  text-underline-offset: 3px;
  margin-left: .5rem;
  word-break: break-all;
}

/* ============ HERO ============ */
.hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--hero-wash), var(--dark-surface);
  padding-block: var(--space-hero-y) 0;
  overflow: hidden;
}
.hero__grid {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2.25rem, 5vw, 4rem);
  align-items: center;
}
.hero__copy { max-width: 36rem; }
.hero__headline {
  font-size: var(--fs-display);
  line-height: 1.04;
  margin-top: 1.1rem;
  font-weight: 300;
  letter-spacing: -0.025em;
}
.hero__headline .heavy { font-weight: 800; }
.hero__sub {
  margin-top: 1.4rem;
  font-size: clamp(1.1rem, 1.9vw, 1.4rem);
  line-height: 1.5;
  color: var(--dark-text-soft);
  max-width: 32rem;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2.25rem; }
.hero__media {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow-card-dark);
  border: 1px solid var(--dark-border);
}
.hero__img { width: 100%; height: auto; display: block; }

.hero__badges {
  width: 100%;
  max-width: var(--content-max);
  margin: clamp(2.5rem, 6vw, 4rem) auto 0;
  padding-inline: var(--gutter);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
}
.badge {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .8rem 1rem;
  border-radius: 12px;
  background: var(--dark-surface-raise);
  border: 1px solid var(--dark-border);
  font-size: .875rem;
  line-height: 1.35;
  color: var(--dark-text-soft);
}
.badge__icon { color: var(--teal-400); flex-shrink: 0; }

/* ============ ROLLING PARTNER-LOGO BAND (hero bottom) ============ */
/* Light band so the original-colour logos stay legible over the dark hero. */
.marquee {
  margin-top: clamp(2.5rem, 6vw, 4rem);
  padding-block: clamp(1.25rem, 3vw, 2rem);
  background: var(--white);
  overflow: hidden;
}
.marquee__heading {
  text-align: center;
  margin-bottom: clamp(.9rem, 2vw, 1.4rem);
  padding-inline: var(--gutter);
  font-size: clamp(.85rem, 1.4vw, 1rem);
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--blue-700);
}
.marquee__viewport {
  overflow: hidden;
  /* fade the band edges so logos slide in/out instead of popping */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track {
  display: flex;
  align-items: center;
  width: max-content;
  gap: clamp(2.5rem, 7vw, 5.5rem);
  padding-inline: clamp(1.25rem, 3.5vw, 2.75rem);
  animation: marquee-scroll 38s linear infinite;
}
.marquee__item { flex: 0 0 auto; display: flex; align-items: center; }
/* The track holds two identical sets, so -50% lands exactly on the seam. */
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.marquee:hover .marquee__track { animation-play-state: paused; }

/* institution logos: original colour, never greyscaled */
.inst-logo { height: clamp(68px, 10vw, 92px); width: auto; }
.inst-logo--eng { height: clamp(80px, 11.2vw, 108px); }

/* Reduced motion: stop the loop and show one static, centred set */
@media (prefers-reduced-motion: reduce) {
  .marquee__viewport { -webkit-mask-image: none; mask-image: none; }
  .marquee__track {
    animation: none;
    width: 100%;
    flex-wrap: wrap;
    justify-content: center;
  }
  .marquee__item[aria-hidden="true"] { display: none; }
}

/* Desktop: the band is wide enough to show all three marks at once, so the
   scroll reads as noise. Pin them, centred and evenly spaced, no duplicates. */
@media (min-width: 768px) {
  .marquee__viewport { -webkit-mask-image: none; mask-image: none; }
  .marquee__track {
    animation: none;
    width: 100%;
    justify-content: center;
    gap: clamp(3rem, 8vw, 7rem);
  }
  .marquee__item[aria-hidden="true"] { display: none; }
  .marquee:hover .marquee__track { animation-play-state: running; }
}

/* ============ MANIFESTO (hero → 01) ============ */
.manifesto__inner {
  max-width: 62rem;
  margin-inline: auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: .85rem;
}
.manifesto__kicker {
  font-size: clamp(.95rem, 1.6vw, 1.15rem);
  font-weight: 500;
  color: var(--light-text-mute);
}
.manifesto__main {
  font-size: clamp(1.6rem, 3.6vw, 2.6rem);
  font-weight: 800;
  line-height: 1.28;
  letter-spacing: -0.015em;
  color: var(--navy-700);
}
.manifesto__desc {
  margin-top: .4rem;
  max-width: 52rem;
  margin-inline: auto;
  font-size: var(--fs-lead);
  line-height: 1.7;
  color: var(--light-text-soft);
}

/* ============ CORE BLOCKS 01–07 ============ */
/* No outer card — content sits directly on the section background.
   (The three solution cards in 02 are real cards and keep their own chrome.) */
.block {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.75rem, 3.5vw, 3rem);
  align-items: center;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.block--stack { display: block; }

.block__eyebrow {
  display: flex;
  align-items: center;
  gap: .7rem;
  flex-wrap: wrap;
}
.block__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.4rem;
  padding: .3rem .6rem;
  border-radius: 8px;
  background: var(--blue-700);
  color: #fff;
  font-size: .875rem;
  font-weight: 800;
  letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
}
.block__eyebrow-text {
  font-size: clamp(.9rem, 1.3vw, 1.05rem);
  font-weight: 700;
  color: var(--blue-700);
  letter-spacing: .01em;
}
/* Technique name on line 1, plain-language description on line 2 — always
   two lines, independent of viewport width. */
.block__eyebrow-name,
.block__eyebrow-desc { display: block; }
.block__eyebrow-desc {
  font-size: .875em;
  font-weight: 600;
  color: var(--blue-600);
}

.block__headline {
  margin-top: 1.1rem;
  font-size: var(--fs-h2);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--navy-900, var(--light-text));
}
.block__sub {
  margin-top: 1.1rem;
  font-size: var(--fs-lead);
  line-height: 1.65;
  color: var(--light-text-soft);
  max-width: 46ch;
}
.block__body--wide { max-width: none; }
.block__body--wide .block__headline { margin-bottom: clamp(2rem, 4vw, 3rem); }

.block__media {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  background: var(--gray-050);
}
.block__media img { width: 100%; height: auto; display: block; }
/* charts read better without a card frame around them */
.block__media--plain { box-shadow: none; background: transparent; border-radius: 0; }

/* Checklist bullets */
.checklist { margin-top: 1.75rem; display: grid; gap: .95rem; }
.checklist__item {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: start;
  gap: .8rem;
  font-size: clamp(1rem, 1.35vw, 1.1rem);
  line-height: 1.55;
  color: var(--light-text);
}
.checklist__icon { color: var(--blue-400); flex-shrink: 0; margin-top: .15rem; }
.footnote {
  margin-top: .35rem;
  font-size: var(--fs-caption);
  color: var(--light-text-mute);
  line-height: 1.5;
}

/* Feature list (01–07) — text only, no leading icon */
.featurelist { margin-top: 1.9rem; display: grid; gap: 1.4rem; }
.featurelist__item { display: block; }
.featurelist__title { font-size: clamp(1.05rem, 1.5vw, 1.2rem); font-weight: 700; line-height: 1.4; }
.featurelist__sub { margin-top: .3rem; color: var(--light-text-soft); line-height: 1.5; }

/* Data-source boxes (03) */
.datasrc { margin-top: 1.75rem; }
.datasrc__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(.75rem, 2vw, 1.1rem);
}
.datasrc__box {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 96px;
  padding: 1.6rem 1rem 1rem;
  border-radius: 14px;
  background: var(--white);
  border: 1px solid var(--light-border);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.datasrc__logo { max-width: 100%; height: auto; max-height: 46px; width: auto; }
.datasrc__badge {
  position: absolute;
  top: 0; right: 0;
  padding: .3rem .6rem;
  border-radius: 0 14px 0 10px;
  background: var(--teal-600);
  color: #fff;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .02em;
  line-height: 1.2;
  white-space: nowrap;
}
.datasrc__label {
  margin-top: .6rem;
  text-align: center;
  font-size: var(--fs-caption);
  font-weight: 600;
  color: var(--light-text-mute);
}

/* Chip groups (03) */
.chipset { margin-top: 1.6rem; }
.chipset__label {
  font-size: .95rem;
  font-weight: 800;
  color: var(--blue-700);
  margin-bottom: .65rem;
}
.chips { display: flex; flex-wrap: wrap; gap: .55rem; }
.chip {
  padding: .55rem 1rem;
  border-radius: 10px;
  background: var(--gray-050);
  color: var(--navy-600);
  font-size: .9rem;
  font-weight: 600;
  border: 1px solid var(--gray-200);
}

/* Flow cards (02) */
.flow {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.25rem, 3vw, 2rem);
  align-items: stretch;
}
.flow-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 0 clamp(1.5rem, 3vw, 2rem);
  border-radius: 22px;
  background: var(--white);
  border: 1px solid var(--light-border);
  box-shadow: var(--shadow-card);
  position: relative;
  min-width: 0;
}
/* Full-bleed hero image: spans the card, top corners follow the card radius.
   (No overflow:hidden on the card — that would clip the chevron connectors.) */
.flow-card__media {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 21px 21px 0 0;
  overflow: hidden;
  background: var(--gray-100);
}
.flow-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* The AI card is a UI graphic, not a photo — never crop it. Its own artwork
   is dark, so the letterbox is matched to it and reads as one surface. */
.flow-card__media--contain { background: #070b16; }
.flow-card__media--contain img { object-fit: contain; }

.flow-card__num,
.flow-card__title,
.flow-card__body { padding-inline: clamp(1.25rem, 3vw, 2rem); }
.flow-card__num {
  margin-top: 1.25rem;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--blue-500);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.flow-card__title { margin-top: .35rem; font-size: var(--fs-h3); font-weight: 800; }
.flow-card__body {
  margin-top: .8rem;
  color: var(--light-text-soft);
  line-height: 1.6;
  font-size: 1rem;
  max-width: 30ch;
}

/* ============ TEAM ============ */
.team__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  /* every row the same height, so cards that wrap onto a second row still
     line their divider + logo footer up with the first row */
  grid-auto-rows: 1fr;
  gap: clamp(1.5rem, 3vw, 2.25rem);
}
.team-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0;
  padding: 1.25rem 1rem 1.5rem;
  border-radius: 22px;
  background: var(--white);
  border: 1px solid var(--light-border);
  box-shadow: var(--shadow-card);
  height: 100%;          /* every card fills its grid row */
}
/* Name + role share one fixed-height block so a one-line and a two-line
   name still put the divider below them at the same y. */
.team-card__id {
  margin-top: 1rem;
  min-height: 4.5rem;
  flex: 1 1 auto;          /* absorbs the slack so .team-card__orgs sits flush
                              at the bottom of every equal-height card */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: .15rem;
  width: 100%;
  padding-bottom: .9rem;
}
.team-card__figure {
  position: relative;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: var(--gray-100);
}
.team-card__photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  height: auto;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.cofounder-badge {
  position: absolute;
  top: .6rem; left: .6rem;
  padding: .32rem .7rem;
  border-radius: 999px;
  background: var(--teal-600);
  color: #fff;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .03em;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(15, 18, 53, .28);
}
.team-card__name {
  font-size: clamp(1.05rem, 1.35vw, 1.2rem);
  font-weight: 800;
  line-height: 1.3;
  margin-top: 0;
  text-wrap: balance;
  hyphens: none;
}
.team-card__role { font-size: .9rem; color: var(--light-text-soft); line-height: 1.45; }
/* optional second line — smaller, lighter than the role above it */
.team-card__affil {
  margin-top: .2rem;
  font-size: .8rem;
  line-height: 1.45;
  color: var(--light-text-mute);
}
/* Every card reserves the same footer height — enough for the tallest case
   (a two-logo vertical stack). Single-logo cards centre inside that box, so
   all five dividers land on the same y. */
.team-card__orgs {
  margin-top: auto;
  padding-top: .9rem;
  border-top: 1px solid var(--light-border);
  width: 100%;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;   /* vertically centres a lone logo */
  gap: .6rem;
  min-height: 4.75rem;       /* 20px + 26px logos + gap + padding-top */
}
.team-card__orgs .org-logo { flex: 0 0 auto; }

/* affiliation logos: original colour, small */
.org-logo { height: 20px; width: auto; }
.org-logo--anam { height: 26px; }

/* ============ LIVE DEMO ============ */
.demo__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
}
.demo__eyebrow { justify-content: center; }
.demo__headline {
  font-size: var(--fs-h1);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin-bottom: .6rem;
}
.demo__thumb {
  position: relative;
  display: block;
  width: min(100%, 900px);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-block);
  border: 1px solid var(--light-border);
  cursor: pointer;
  transition: transform var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out);
}
.demo__img { width: 100%; height: auto; display: block; }
.demo__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 18, 53, .34);
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease-out);
}
.demo__overlay-pill {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .8rem 1.4rem;
  border-radius: 999px;
  background: var(--teal-500);
  color: var(--navy-900);
  font-weight: 700;
  font-size: 1rem;
  white-space: nowrap;
  box-shadow: var(--shadow-float);
}
.demo__thumb:hover,
.demo__thumb:focus-visible {
  transform: translateY(-6px) scale(1.012);
  box-shadow: 0 26px 70px rgba(15, 18, 53, .20);
}
.demo__thumb:hover .demo__overlay,
.demo__thumb:focus-visible .demo__overlay { opacity: 1; }
/* Touch devices never hover — keep the affordance visible there */
@media (hover: none) {
  .demo__overlay { opacity: 1; background: rgba(15, 18, 53, .22); }
}
.demo__btn { margin-top: 1.25rem; text-decoration: none; }

@media (prefers-reduced-motion: reduce) {
  .demo__thumb:hover, .demo__thumb:focus-visible { transform: none; }
}

/* ============ CTA BAND ============ */
.cta-band {
  padding-block: clamp(3rem, 6vw, 5rem);
  background: var(--hero-wash), var(--dark-surface);
  text-align: center;
  overflow: hidden;
  position: relative;
}
.cta-band__cube {
  position: absolute;
  right: clamp(-40px, -2vw, 0px); top: 50%;
  transform: translateY(-50%);
  width: clamp(160px, 22vw, 300px);
  height: auto;
  opacity: .06;
  filter: brightness(0) invert(1);
  pointer-events: none;
}
.cta-band__inner { position: relative; z-index: 1; max-width: var(--content-narrow); }
.cta-band__headline { font-size: var(--fs-h1); font-weight: 800; line-height: 1.2; }
.cta-band__sub { margin-top: 1.1rem; color: var(--dark-text-soft); font-size: var(--fs-lead); }
.cta-band .btn--cta { margin-top: 2.25rem; }

/* ============ FOOTER ============ */
.footer {
  background: var(--navy-900);
  color: var(--dark-text-soft);
  padding-block: clamp(2.5rem, 6vw, 4rem);
  border-top: 3px solid transparent;
  border-image: var(--stellar-grad) 1;
}
.footer__inner { display: grid; gap: 2rem; }
.footer__brand { display: flex; flex-direction: column; gap: .6rem; align-items: flex-start; }
.footer__logo {
  height: 26px; width: auto;
  /* StellarCube wordmark art is navy — whiten for the dark footer */
  filter: brightness(0) invert(1);
}
.footer__company { font-weight: 600; color: var(--dark-text); }

.footer__info {
  display: grid;
  grid-template-columns: 1fr;
  gap: .55rem 2.5rem;
  font-size: .9rem;
  line-height: 1.6;
}
.footer__row { display: flex; flex-wrap: wrap; gap: .5rem .9rem; }
.footer__row dt {
  min-width: 8rem;
  color: var(--dark-text-soft);
  font-size: 1.05rem;          /* ~2pt above the .9rem values beside them */
  font-weight: 700;
  line-height: 1.45;
  flex-shrink: 0;
}
.footer__row dd { color: var(--dark-text-soft); }
.footer__row a { color: var(--cyan-300); text-decoration: underline; text-underline-offset: 2px; }
.footer__copyright {
  font-size: var(--fs-caption);
  color: var(--dark-text-mute);
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, .12);
}

/* ============ FLOATING CTA ============ */
.floating-cta {
  position: fixed;
  right: clamp(16px, 4vw, 32px);
  bottom: clamp(16px, 4vw, 32px);
  z-index: 200;
  padding: .9rem 1.5rem;
  border-radius: 999px;
  background: var(--teal-500);
  color: var(--navy-900);
  font-weight: 700;
  font-size: .95rem;
  box-shadow: var(--shadow-float);
  transition: transform var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out);
}
.floating-cta:hover { background: var(--teal-400); transform: translateY(-2px); }

/* ============ UTIL: skip link + focus + reveal ============ */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 300;
  padding: .75rem 1rem;
  background: var(--navy-900);
  color: var(--dark-text);
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; border-radius: 4px; }
.section--light :focus-visible { outline-color: var(--blue-700); }

[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
  will-change: opacity, transform;
}
[data-reveal].is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .btn:hover, .floating-cta:hover, .hero__media { transform: none; }
}

/* ============ RESPONSIVE ============ */
@media (min-width: 820px) {
  .flow { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  /* chevron connectors between the three flow cards */
  .flow-card + .flow-card::before {
    content: "";
    position: absolute;
    left: calc(-1 * clamp(1.25rem, 3vw, 2rem) / 2 - 5px);
    top: 28%;
    width: 10px; height: 10px;
    border-top: 2px solid var(--gray-300);
    border-right: 2px solid var(--gray-300);
    transform: translateY(-50%) rotate(45deg);
  }
}

@media (min-width: 768px) {
  .team__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }  /* 3 × 2 = 6 */
  .footer__inner {
    grid-template-columns: minmax(200px, .8fr) 1.6fr;
    align-items: start;
    gap: 2rem 3.5rem;
  }
  .footer__copyright { grid-column: 1 / -1; }
}

@media (min-width: 901px) {
  .nav__brand-sub { display: inline-block; }
}

@media (min-width: 960px) {
  /* 01 / 04 / 06 — copy left, image right (image gets the wider column) */
  .block { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
  /* 03 / 05 / 07 — alternate: image left, copy right.
     To make every block copy-left instead, delete this rule. */
  .block--reverse { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
  .block--reverse .block__body { order: 2; }
  .block--reverse .block__media { order: 1; }
  .block--stack { display: block; }
}

@media (min-width: 1024px) {
  .hero__grid { grid-template-columns: 1fr 1.05fr; }
  .hero__badges { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .footer__info { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__row--wide { grid-column: 1 / -1; }
}

/* Mobile nav */
@media (max-width: 900px) {
  .nav__burger { display: flex; }
  /* language toggle lives in the header bar, left of the burger */
  .lang-toggle--bar { display: inline-flex; }
  .lang-toggle--menu { display: none; }
  .nav__contact { display: block; }
  .nav__menu {
    position: fixed;
    inset: var(--nav-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 1.25rem;
    padding: 1.5rem var(--gutter) 2rem;
    background: var(--navy-800);
    border-top: 1px solid var(--dark-border);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out), visibility var(--dur-base);
  }
  .nav.is-open .nav__menu { opacity: 1; visibility: visible; transform: none; }
  .nav.is-open .nav__burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav.is-open .nav__burger span:nth-child(2) { opacity: 0; }
  .nav.is-open .nav__burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav__links { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .nav__links a { font-size: 1.1rem; }
  .nav__actions { justify-content: stretch; }
  .nav__actions .nav__cta { width: 100%; }
}

/* Mobile team cards: paired logos sit side by side, and the lone Johns
   Hopkins mark is scaled up so it reads at phone size. The shared
   min-height on .team-card__orgs keeps all five dividers aligned. */
@media (max-width: 767px) {
  .team-card__orgs { flex-direction: row; flex-wrap: nowrap; gap: .7rem; }
  .team-card__orgs .org-logo { flex: 0 1 auto; min-width: 0; }
  .org-logo--jhu { height: 32px; }
}

@media (max-width: 420px) {
  .hero__badges { grid-template-columns: 1fr; }
  .team__grid { grid-template-columns: 1fr; }
  .btn { width: 100%; }
  .hero__cta .btn { width: 100%; }
  .footer__row dt { min-width: 100%; }
}
