/* ==========================================================================
   home.css — hero + homepage-only sections. See plans/landing.MD §9.
   ========================================================================== */

/* ==========================================================================
   KIT mark — dark-background variant (landing page only)
   kit_mark_dark.svg is a cropped, recolored derivative of the shared
   kit_de.svg (wordmark only, no institution subtitle line; black fills
   swapped for white) so it reads with no white chip on a dark surface.
   Navbar: shown only while the header is transparent over the dark hero;
   swaps back to the standard white-chip mark once .is-solid (light bg) is
   reached, since white-on-white would vanish. Footer here is always dark,
   so it always gets the bare mark, no toggle needed.
   ========================================================================== */
.kit-logo-bare {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}
.site-nav:not(.is-solid) .brand__kit .kit-logo-chip--solid { display: none; }
.site-nav.is-solid .brand__kit .kit-logo-chip--dark { display: none; }

/* ==========================================================================
   Hero (§9.2)
   ========================================================================== */
.hero {
  position: relative;
  min-height: min(88vh, 860px);
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: center;
  isolation: isolate;
  /* pulled up under the sticky transparent header so the hero starts at
     document y:0 and the header floats over it, per plan §7.1 */
  margin-top: calc(-1 * var(--nav-h));
}
@supports (height: 100svh) {
  .hero { min-height: min(88svh, 860px); }
}

/* Flat dark KIT-green field with a soft glow behind the graphic column,
   replacing the earlier photo-background approach (no hero photo exists). */
.hero__media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: -1;
  background:
    radial-gradient(55% 65% at 78% 32%, rgba(0,150,130,.35) 0%, transparent 68%),
    linear-gradient(160deg, var(--ink-900) 0%, var(--green-900) 55%, var(--ink-900) 100%);
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: var(--space-12);
  padding-top: var(--space-20);
}

.hero__eyebrow {
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--green-300);
  margin: 0 0 var(--space-5);
}

/* Mobile nav hides the brand name (§ navbar §7.3), so the mobile hero
   eyebrow stands in as the brand identifier — desktop has no eyebrow of
   its own, since the navbar already carries the group name there. */
.hero__eyebrow--mobile { display: none; }
@media (max-width: 900px) {
  .hero__eyebrow--mobile { display: block; }
}

.hero__title {
  font-size: var(--fs-display);
  font-family: var(--font-display);
  font-weight: 600;
  color: #fff;
  line-height: 1.04;
  letter-spacing: -0.022em;
  text-wrap: balance;
  margin-block: 0 var(--space-6);
}

.hero__tagline {
  font-size: 20px;
  font-weight: 400;
  color: rgba(255,255,255,.88);
  line-height: 1.62;
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-top: var(--space-8);
}

/* Dark-background override of base.css's light-surface .btn--outline —
   scoped to .hero only, so research.php/team.php keep the light variant. */
.hero .btn--outline {
  border-color: rgba(0,150,130,.6);
  color: #fff;
}
@media (hover: hover) {
  .hero .btn--outline:hover {
    background: rgba(0,150,130,.14);
    border-color: var(--kit-green);
  }
}

.hero__graphic {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
}
.hero__graphic::before {
  content: "";
  position: absolute;
  inset: 8%;
  background: radial-gradient(circle, rgba(0,150,130,.45) 0%, transparent 70%);
  filter: blur(32px);
  z-index: -1;
}
.hero__graphic img {
  width: min(100%, 460px);
  height: auto;
}

.hero__strip {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(255,255,255,.14);
}
.hero__strip p {
  margin-block: 0;
  max-width: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-4);
  padding-block: var(--space-5);
  font-size: var(--fs-small);
  color: rgba(255,255,255,.72);
  letter-spacing: .01em;
}

@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; gap: var(--space-8); }
  .hero__graphic { min-height: 200px; }
  .hero__graphic img { width: min(70%, 320px); }
  .hero__content { text-align: center; }
  .hero__actions { justify-content: center; }
}

/* ==========================================================================
   Section 2 — Research statement (§9.3)
   ========================================================================== */
.statement__grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(var(--space-12), 6vw, var(--space-20));
  align-items: start;
}

.statement__body { max-width: 62ch; }
.statement__body .lead {
  font-size: var(--fs-lead);
  line-height: 1.62;
  max-width: 54ch;
  color: var(--text-primary);
  margin-bottom: var(--space-4);
}
.statement__body p { margin-bottom: var(--space-4); }
.statement__body .link-arrow { margin-top: var(--space-2); }

.statement__figure {
  position: relative;
}
.statement__figure::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  border: 1.5px solid rgba(0,150,130,.55);
  transform: translate(20px, 20px);
  z-index: -1;
  transition: transform var(--dur-base) var(--ease-out);
}
@media (hover: hover) {
  .statement__figure:hover::before { transform: translate(14px, 14px); }
}

.frame {
  position: relative;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: linear-gradient(135deg, #E6F4F2 0%, #CCEAE6 55%, #A3D9D2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-base) var(--ease-out);
}
@media (hover: hover) {
  .statement__figure:hover .frame img { transform: scale(1.015); }
}
.frame__fallback {
  width: 40px;
  height: 40px;
  color: var(--green-400);
}

.statement__figure figcaption {
  margin-top: var(--space-3);
  font-size: var(--fs-meta);
  color: var(--text-muted);
  text-align: center;
}

@media (min-width: 900px) {
  .statement__figure { margin-top: calc(-1 * var(--space-12)); }
}
@media (max-width: 899px) {
  .statement__grid { grid-template-columns: 1fr; }
  /* width: 100% stops the grid item shrinking to its fallback SVG (§9) */
  .statement__figure { order: 2; margin-top: var(--space-10); width: 100%; max-width: 420px; margin-inline: auto; }
  .statement__body { order: 1; max-width: none; }
}

/* ==========================================================================
   Section 3 — Research areas card grid (§9.4)
   `.cards-header` / `.cards` / `.card` moved to css/cards.css (plans/team.MD
   §2.3) so team.html can share the component without loading this whole
   sheet. Load cards.css before this file wherever `.card` is used.
   ========================================================================== */

/* ==========================================================================
   Section 5 — Closing CTA band (§9.6)
   ========================================================================== */
.cta { padding-block-start: var(--space-36); }

.cta__panel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #005146 0%, #00362F 100%);
  background-image:
    radial-gradient(70% 120% at 12% 0%, rgba(0,150,130,.16) 0%, transparent 62%),
    linear-gradient(135deg, #005146 0%, #00362F 100%);
  padding: clamp(var(--space-16), 7vw, var(--space-20));
  text-align: center;
}
.cta__panel .eyebrow { justify-content: center; margin-bottom: var(--space-4); }
.cta__panel h2 {
  color: #fff;
  text-wrap: balance;
  max-width: 20ch;
  margin-inline: auto;
}
.cta__sub {
  color: rgba(255,255,255,.80);
  max-width: 52ch;
  margin-inline: auto;
  margin-top: var(--space-2);
  margin-bottom: var(--space-8);
}
.cta__actions {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}
.cta__wave {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 60%;
  min-width: 480px;
  opacity: .08;
  pointer-events: none;
}

@media (max-width: 639px) {
  .cta__actions .btn { width: 100%; max-width: 320px; justify-content: center; }
  .cta__actions { flex-direction: column; align-items: center; }
  /* Hero pills full-width in a 320px stack, centred under the now-centred
     mobile hero text (§12) */
  .hero__actions { flex-direction: column; align-items: center; }
  .hero__actions .btn { width: 100%; max-width: 320px; justify-content: center; }
}
