/* ==========================================================================
   Harvod University — design system
   Palette sampled from the Harvod reference: white canvas, lavender surface,
   electric royal blue as the single brand colour.
   ========================================================================== */

:root {
  /* Colour */
  --blue: #1d17e6;          /* primary: buttons, footer, icons */
  --blue-hover: #140fbd;    /* primary interactive state */
  --blue-soft: #e9e8ff;     /* tint for chips and focus halos */
  --blue-line: rgba(255, 255, 255, 0.28); /* borders on blue */
  --canvas: #ffffff;        /* page background */
  --surface: #f5f4fc;       /* lavender sections */
  --ink: #15151f;           /* main text */
  --ink-2: #5d5d70;         /* secondary text */
  --ink-3: #8d8da0;         /* tertiary / meta */
  --line: #e4e3ee;          /* hairlines */
  --line-strong: #cfcde0;
  --white: #ffffff;

  /* Type */
  --font: "Hanken Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --fs-hero: clamp(2.6rem, 1.2rem + 5.6vw, 6.4rem);
  --fs-display: clamp(2.1rem, 1.3rem + 3vw, 4.1rem);
  --fs-sub: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  --fs-lead: clamp(1.2rem, 1.05rem + 0.6vw, 1.6rem);
  --fs-body: 1rem;
  --fs-small: 0.875rem;
  --fs-micro: 0.75rem;

  /* Space & layout */
  --gutter: clamp(16px, 4vw, 64px);
  --maxw: 1360px;
  --section: clamp(80px, 6vw + 40px, 160px);
  --radius: 8px;
  --radius-lg: 14px;
  --header-h: 76px;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur: 0.9s;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
}
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  text-rendering: optimizeLegibility;
}
body.menu-open { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul[role="list"], ol { list-style: none; padding: 0; }
svg { flex-shrink: 0; }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}
.site-footer :focus-visible, .hero :focus-visible, .mobile-menu :focus-visible { outline-color: var(--white); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; margin: -1px; padding: 0; border: 0;
}
.skip-link {
  position: fixed; left: 16px; top: -60px; z-index: 200;
  background: var(--blue); color: var(--white);
  padding: 10px 16px; border-radius: var(--radius);
  transition: top 0.2s;
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: calc(var(--maxw) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section-lav { background: var(--surface); }

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */
.h-display {
  font-size: var(--fs-display);
  font-weight: 300;
  line-height: 1.06;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.h-sub {
  font-size: var(--fs-sub);
  font-weight: 300;
  letter-spacing: -0.025em;
  line-height: 1.15;
}
.label {
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
}
.meta { color: var(--ink); font-size: var(--fs-small); }
.meta-soft { color: var(--ink-3); }
.fineprint {
  font-size: var(--fs-micro);
  color: var(--ink-3);
  margin-top: 20px;
}
.text-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: var(--fs-small); font-weight: 500;
  color: var(--blue);
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px; background-repeat: no-repeat; background-position: 0 100%;
  transition: background-size 0.4s var(--ease-out);
  padding-bottom: 2px;
}
.text-link:hover { background-size: 100% 1px; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  --btn-bg: var(--blue);
  --btn-fg: var(--white);
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 6px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 0.9375rem; font-weight: 500;
  letter-spacing: -0.005em;
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate;
  transition: color 0.35s var(--ease-out), border-color 0.35s, transform 0.35s var(--ease-out);
}
.btn::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: var(--btn-hover, var(--blue-hover));
  transform: translateY(101%);
  transition: transform 0.45s var(--ease-out);
}
.btn:hover::before, .btn:focus-visible::before { transform: translateY(0); }
.btn:active { transform: scale(0.98); }
.btn-sm { min-height: 42px; padding: 0 18px; font-size: 0.875rem; }
.btn-primary { --btn-bg: var(--blue); --btn-fg: var(--white); }
.btn-light { --btn-bg: var(--white); --btn-fg: var(--ink); --btn-hover: var(--blue); }
.btn-light:hover, .btn-light:focus-visible { color: var(--white); }
.btn-ghost-light {
  --btn-bg: transparent; --btn-fg: var(--white); --btn-hover: rgba(255,255,255,0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
}
.btn-outline {
  --btn-bg: transparent; --btn-fg: var(--ink); --btn-hover: var(--blue);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.btn-outline:hover, .btn-outline:focus-visible { color: var(--white); }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 48px; height: 48px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--line-strong);
  color: var(--ink);
  transition: background 0.3s, color 0.3s, box-shadow 0.3s;
}
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:hover:not(:disabled) { background: var(--blue); color: var(--white); box-shadow: inset 0 0 0 1px var(--blue); }
.icon-btn:disabled { opacity: 0.35; cursor: default; }

/* --------------------------------------------------------------------------
   01 Header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  transition: transform 0.45s var(--ease-out), box-shadow 0.3s;
}
.site-header.is-scrolled { box-shadow: 0 1px 0 var(--line); }
.site-header.is-hidden { transform: translateY(-100%); }
.header-inner {
  height: var(--header-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  transition: height 0.35s var(--ease-out);
}
.site-header.is-scrolled .header-inner { height: 64px; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--blue); justify-self: start; }
.brand-crest { width: 34px; height: 34px; }
.brand-name { font-size: 1.125rem; font-weight: 500; letter-spacing: -0.02em; color: var(--ink); }
.brand-light, .brand-light .brand-name { color: var(--white); }

.nav-list { display: flex; align-items: center; gap: 4px; list-style: none; padding: 0; }
.nav-list > li { position: relative; }
.nav-link {
  display: inline-flex; align-items: center; gap: 6px;
  height: 38px; padding: 0 16px;
  border-radius: 999px;
  font-size: 0.875rem; font-weight: 400;
  color: var(--ink-2);
  transition: color 0.25s, box-shadow 0.25s, background 0.25s;
}
.nav-link:hover { color: var(--ink); background: var(--surface); }
.nav-link.is-current { color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.chev { width: 12px; height: 12px; transition: transform 0.3s var(--ease-out); }
.nav-trigger[aria-expanded="true"] { color: var(--ink); background: var(--surface); }
.nav-trigger[aria-expanded="true"] .chev { transform: rotate(180deg); }

.mega {
  position: absolute; left: 50%; top: calc(100% + 14px);
  width: min(640px, 90vw);
  display: grid; grid-template-columns: 1fr 1.1fr; gap: 32px;
  padding: 28px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: 0 0 0 1px var(--line), 0 24px 60px -24px rgba(21, 21, 60, 0.28);
  transform: translate(-50%, -6px);
  opacity: 0;
  transition: opacity 0.25s, transform 0.35s var(--ease-out);
}
.mega.is-open { opacity: 1; transform: translate(-50%, 0); }
.mega-title { font-size: 1.375rem; font-weight: 300; letter-spacing: -0.02em; margin-bottom: 8px; }
.mega-text { font-size: var(--fs-small); color: var(--ink-2); margin-bottom: 16px; }
.mega-list { list-style: none; padding: 0; display: grid; }
.mega-list a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 0;
  font-size: 0.9375rem;
  border-bottom: 1px solid var(--line);
  transition: color 0.2s, padding 0.3s var(--ease-out);
}
.mega-list li:last-child a { border-bottom: 0; }
.mega-list a:hover { color: var(--blue); padding-left: 6px; }

.header-actions { display: flex; align-items: center; gap: 18px; justify-self: end; }
.lang { display: inline-flex; align-items: center; gap: 6px; font-size: 0.875rem; color: var(--ink-3); }
.lang svg { width: 18px; height: 18px; color: var(--ink); }
.menu-toggle {
  display: none;
  width: 44px; height: 44px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--line-strong);
  place-items: center;
}
.menu-lines { position: relative; width: 18px; height: 10px; display: block; }
.menu-lines span {
  position: absolute; left: 0; width: 100%; height: 1.5px; background: var(--ink);
  transition: transform 0.4s var(--ease-out), top 0.4s var(--ease-out), background 0.3s;
}
.menu-lines span:first-child { top: 0; }
.menu-lines span:last-child { top: calc(100% - 1.5px); }
.menu-open .menu-lines span:first-child { top: calc(50% - 0.75px); transform: rotate(45deg); }
.menu-open .menu-lines span:last-child { top: calc(50% - 0.75px); transform: rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  position: fixed; inset: 0; z-index: 90;
  background: var(--blue);
  color: var(--white);
  padding: calc(var(--header-h) + 24px) var(--gutter) 32px;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.6s var(--ease-in-out);
  overflow-y: auto;
}
.mobile-menu.is-open { clip-path: inset(0 0 0 0); }
.mobile-menu-inner { min-height: 100%; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.mobile-list { counter-reset: m; }
.mobile-list li { overflow: hidden; border-bottom: 1px solid var(--blue-line); }
.mobile-list a {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 14px 0;
  font-size: clamp(2rem, 9vw, 3rem);
  font-weight: 300; letter-spacing: -0.03em; line-height: 1.1;
  transform: translateY(105%);
  transition: transform 0.7s var(--ease-out);
}
.mobile-list a::after {
  counter-increment: m; content: "0" counter(m);
  font-size: var(--fs-micro); letter-spacing: 0.04em; opacity: 0.6;
}
.mobile-menu.is-open .mobile-list a { transform: none; }
.mobile-menu.is-open .mobile-list li:nth-child(1) a { transition-delay: 0.18s; }
.mobile-menu.is-open .mobile-list li:nth-child(2) a { transition-delay: 0.22s; }
.mobile-menu.is-open .mobile-list li:nth-child(3) a { transition-delay: 0.26s; }
.mobile-menu.is-open .mobile-list li:nth-child(4) a { transition-delay: 0.30s; }
.mobile-menu.is-open .mobile-list li:nth-child(5) a { transition-delay: 0.34s; }
.mobile-menu.is-open .mobile-list li:nth-child(6) a { transition-delay: 0.38s; }
.mobile-foot { display: grid; gap: 16px; font-size: var(--fs-small); opacity: 0; transition: opacity 0.5s 0.4s; }
.mobile-menu.is-open .mobile-foot { opacity: 1; }
.mobile-foot p { opacity: 0.7; max-width: 32ch; }
.mobile-foot .btn { justify-self: start; }

/* Header over open menu */
.menu-open .site-header { background: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.menu-open .site-header .brand, .menu-open .site-header .brand-name { color: var(--white); }
.menu-open .menu-toggle { box-shadow: inset 0 0 0 1px var(--blue-line); }
.menu-open .menu-lines span { background: var(--white); }
.menu-open .header-cta { opacity: 0; pointer-events: none; }

/* --------------------------------------------------------------------------
   02 Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  height: clamp(560px, calc(100svh - var(--header-h)), 920px);
  color: var(--white);
  overflow: hidden;
  isolation: isolate;
  background: #23232e;
}
.hero-media { position: absolute; inset: -6% 0 -6% 0; z-index: -2; will-change: transform; }
.hero-img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 78%;
  transform: scale(1.12);
  transition: transform 2.2s var(--ease-out);
}
.is-loaded .hero-img { transform: scale(1); }
.hero-shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to top, rgba(10, 10, 30, 0.72) 0%, rgba(10, 10, 30, 0.35) 38%, rgba(10, 10, 30, 0) 62%),
    linear-gradient(to right, rgba(10, 10, 30, 0.25), rgba(10, 10, 30, 0) 55%);
}
.hero-content {
  position: absolute; left: 0; right: 0; bottom: clamp(32px, 6vh, 72px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  align-items: end;
  gap: 32px 64px;
}
.hero-title {
  font-size: var(--fs-hero);
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: -0.045em;
}
.line { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.line-inner { display: inline-block; }
.js .hero-title .line-inner { transform: translateY(105%); transition: transform 1.2s var(--ease-out); }
.js .hero-title .line:nth-child(2) .line-inner { transition-delay: 0.1s; }
.is-loaded .hero-title .line-inner { transform: none; }
.hero-lede { font-size: 1.0625rem; line-height: 1.55; color: rgba(255, 255, 255, 0.86); margin-bottom: 24px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.js .hero-side { opacity: 0; transform: translateY(16px); transition: opacity 1s 0.45s, transform 1s 0.45s var(--ease-out); }
.is-loaded .hero-side { opacity: 1; transform: none; }

.scroll-cue {
  position: absolute; right: var(--gutter); top: 32px;
  width: 1px; height: 64px;
  background: rgba(255, 255, 255, 0.3);
  overflow: hidden;
}
.scroll-cue span {
  position: absolute; left: 0; top: 0; width: 100%; height: 40%;
  background: var(--white);
  animation: cue 2.2s var(--ease-in-out) infinite;
}
.scroll-cue::after { content: ""; position: absolute; inset: -20px; }
@keyframes cue { 0% { transform: translateY(-100%); } 100% { transform: translateY(260%); } }

/* --------------------------------------------------------------------------
   03 Introduction
   -------------------------------------------------------------------------- */
.intro { padding-top: var(--section); overflow: hidden; }
.intro-head {
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 32px 80px; align-items: start;
  margin-bottom: clamp(48px, 6vw, 96px);
}
.intro-head .h-display { max-width: 14ch; }
.intro-lede { color: var(--ink-2); max-width: 46ch; padding-top: 10px; }
.intro-body {
  display: grid; grid-template-columns: minmax(260px, 0.75fr) minmax(0, 1.6fr);
  gap: 48px; align-items: end;
}
.feature-list { display: grid; gap: 36px; padding-bottom: clamp(48px, 6vw, 96px); }
.feature { position: relative; padding-left: 20px; border-left: 1px solid var(--line-strong); max-width: 38ch; }
.feature-icon {
  display: grid; place-items: center;
  width: 26px; height: 26px; border-radius: 5px;
  background: var(--blue); color: var(--white);
  margin-bottom: 14px;
}
.feature-icon svg { width: 14px; height: 14px; }
.feature .label { margin-bottom: 10px; }
.feature p { font-size: 0.9375rem; color: var(--ink-3); }
.feature p strong { font-weight: 400; color: var(--ink); }

.intro-figure {
  position: relative;
  aspect-ratio: 16 / 11.5;
  margin-right: calc(var(--gutter) * -1);
  overflow: hidden;
  border-radius: 0 0 0 52% / 0 0 0 26%;
}
.intro-figure-inner { position: absolute; inset: -8% 0; }
.intro-figure img { width: 100%; height: 100%; object-fit: cover; }

/* --------------------------------------------------------------------------
   05 Faculties + programme finder
   -------------------------------------------------------------------------- */
.faculties { padding-block: var(--section); }
.section-head-center { display: grid; justify-items: center; text-align: center; gap: 14px; margin-bottom: clamp(40px, 5vw, 72px); }
.section-head-center .h-display { max-width: 18ch; }
.section-head-center .btn { margin-top: 8px; }

.faculty-rail {
  display: flex; gap: 12px;
  height: clamp(420px, 38vw, 540px);
}
.faculty {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--white);
  cursor: pointer;
  background: #2a2a38;
  transition: flex-grow 0.8s var(--ease-out);
  outline-offset: 4px;
}
.faculty.is-active { flex-grow: 5.2; cursor: default; }
.faculty-media { position: absolute; inset: 0; }
.faculty-media img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.06);
  transition: transform 1.2s var(--ease-out), filter 0.6s;
  filter: saturate(0.85);
}
.faculty.is-active .faculty-media img { transform: scale(1); filter: none; }
.faculty::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(8, 8, 28, 0.78), rgba(8, 8, 28, 0.08) 55%);
  pointer-events: none;
}
.faculty-body {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1;
  padding: 22px;
  display: grid; gap: 10px;
}
.faculty h3 {
  font-size: 1.0625rem; font-weight: 400; letter-spacing: -0.01em; line-height: 1.2;
  transition: font-size 0.6s var(--ease-out);
}
.faculty.is-active h3 { font-size: clamp(1.5rem, 1.1rem + 1vw, 2rem); font-weight: 300; letter-spacing: -0.025em; }
.faculty h3 { font-size: 0.9375rem; }
.faculty p, .faculty-link {
  max-width: 52ch;
  max-height: 0;
  overflow: hidden;
  opacity: 0; transform: translateY(12px);
  transition: opacity 0.4s, transform 0.5s var(--ease-out);
  visibility: hidden;
}
.faculty.is-active p, .faculty.is-active .faculty-link { max-height: 8em; overflow: visible; }
.faculty p { font-size: 0.9375rem; color: rgba(255, 255, 255, 0.82); }
.faculty-link { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-small); font-weight: 500; justify-self: start; }
.faculty-link svg { width: 18px; height: 18px; transition: transform 0.3s var(--ease-out); }
.faculty-link:hover svg { transform: translateX(4px); }
.faculty.is-active p, .faculty.is-active .faculty-link {
  opacity: 1; transform: none; visibility: visible;
  transition-delay: 0.3s;
}
.faculty:not(.is-active):hover .faculty-media img { transform: scale(1.1); }

.faculty-counts {
  display: flex; gap: 12px; list-style: none; padding: 0; margin-top: 16px;
}
.faculty-counts li {
  flex: 1 1 0; min-width: 0;
  transition: flex-grow 0.8s var(--ease-out);
  font-size: var(--fs-small);
}
.faculty-counts li.is-active { flex-grow: 5.2; }
.faculty-counts small { display: block; font-size: 0.6875rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Finder */
.finder {
  margin-top: clamp(72px, 8vw, 128px);
  padding-top: 40px;
  border-top: 1px solid var(--line);
  scroll-margin-top: calc(var(--header-h) + 16px);
}
.finder-head { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr); gap: 24px 48px; align-items: end; margin-bottom: 28px; }
.finder-note { color: var(--ink-3); font-size: var(--fs-small); margin-top: 8px; max-width: 40ch; }
.finder-controls { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.field-search, .field-select {
  position: relative; display: flex; align-items: center;
  height: 46px;
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px var(--line-strong);
  background: var(--white);
  transition: box-shadow 0.2s;
}
.field-search:focus-within, .field-select:focus-within { box-shadow: inset 0 0 0 1.5px var(--blue); }
.field-search { flex: 1 1 240px; min-width: 0; padding-left: 14px; }
.field-search svg { width: 18px; height: 18px; color: var(--ink-3); }
.field-search input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; padding: 0 14px 0 10px; font-size: 0.9375rem; }
.field-search input:focus { outline: none; }
.field-select select {
  height: 100%; border: 0; background: none; appearance: none;
  padding: 0 40px 0 14px; font-size: 0.9375rem; cursor: pointer;
}
.field-select select:focus { outline: none; }
.field-select::after {
  content: ""; position: absolute; right: 16px; top: 50%;
  width: 7px; height: 7px; border-right: 1.4px solid var(--ink-2); border-bottom: 1.4px solid var(--ink-2);
  transform: translateY(-70%) rotate(45deg); pointer-events: none;
}
.segmented {
  display: inline-flex; margin: 0; padding: 4px; border: 0;
  border-radius: 8px; background: var(--surface);
  height: 46px;
}
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.segmented span {
  display: grid; place-items: center; height: 100%;
  padding: 0 14px; border-radius: 5px;
  font-size: 0.875rem; color: var(--ink-2);
  transition: background 0.25s, color 0.25s, box-shadow 0.25s;
}
.segmented input:checked + span { background: var(--white); color: var(--ink); box-shadow: 0 1px 3px rgba(20, 20, 60, 0.12); }
.segmented input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 1px; }
.finder-status { font-size: var(--fs-small); color: var(--ink-3); margin-bottom: 8px; }

.programme-list { list-style: none; padding: 0; }
.programme {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.3fr) minmax(0, 0.9fr) auto;
  gap: 16px; align-items: center;
  padding: 18px 4px;
  border-bottom: 1px solid var(--line);
  transition: background 0.25s, padding 0.35s var(--ease-out);
  animation: rowIn 0.5s var(--ease-out) both;
}
.programme:hover { background: var(--surface); padding-inline: 16px; }
.programme-name { font-size: 1.125rem; font-weight: 400; letter-spacing: -0.01em; }
.programme-faculty { color: var(--ink-2); font-size: 0.9375rem; }
.programme-level { font-size: var(--fs-small); color: var(--ink-2); }
.programme-level b { font-weight: 500; color: var(--blue); }
.programme-duration { font-size: var(--fs-small); color: var(--ink-3); text-align: right; white-space: nowrap; }
@keyframes rowIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.finder-empty { padding: 40px 0; display: grid; gap: 16px; justify-items: start; color: var(--ink-2); }
.finder-more { margin-top: 24px; }

/* --------------------------------------------------------------------------
   09 Student stories
   -------------------------------------------------------------------------- */
.stories { padding-bottom: var(--section); }
.stories-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 330px);
  grid-template-rows: auto auto;
  column-gap: clamp(24px, 3vw, 48px);
}
.stories-hero {
  grid-column: 1 / -1; grid-row: 1;
  position: relative;
  aspect-ratio: 16 / 7;
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--white);
}
.stories-hero-inner { position: absolute; inset: -10% 0; }
.stories-hero img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.stories-hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(8, 8, 28, 0.6), rgba(8, 8, 28, 0) 45%);
}
.stories-hero-title {
  position: absolute; left: clamp(20px, 3vw, 40px); bottom: clamp(20px, 3vw, 36px); z-index: 1;
}
.stories-hero-title h2 { font-size: var(--fs-display); font-weight: 300; letter-spacing: -0.035em; line-height: 1; }
.stories-intro { grid-column: 1; grid-row: 2; padding-top: 32px; max-width: 640px; }
.stories-intro .label { margin-bottom: 14px; }
.stories-statement { font-size: var(--fs-lead); line-height: 1.35; letter-spacing: -0.015em; }
.stories-statement span { color: var(--ink-3); }

.story-card {
  grid-column: 2; grid-row: 1 / span 2;
  align-self: end;
  position: relative; z-index: 2;
  margin-right: clamp(16px, 2.5vw, 36px);
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 12px 12px 20px;
  box-shadow: 0 30px 60px -30px rgba(20, 20, 70, 0.35), 0 0 0 1px var(--line);
}
.story-viewport { overflow: hidden; border-radius: var(--radius); touch-action: pan-y; }
.story-track { display: flex; list-style: none; padding: 0; transition: transform 0.7s var(--ease-out); }
.story { flex: 0 0 100%; min-width: 0; }
.story-photo { aspect-ratio: 1 / 0.82; overflow: hidden; border-radius: var(--radius); background: var(--surface); }
.story-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; transition: transform 1s var(--ease-out); }
.story:not(.is-current) .story-photo img { transform: scale(1.08); }
.story blockquote { padding: 18px 8px 10px; font-size: 1.0625rem; line-height: 1.4; letter-spacing: -0.01em; min-height: 6.4em; }
.story-name { padding-inline: 8px; font-weight: 500; }
.story-meta { padding-inline: 8px; font-size: var(--fs-small); color: var(--ink-3); }
.story-controls { display: flex; align-items: center; justify-content: space-between; padding: 18px 8px 0; }
.story-controls .icon-btn { width: 42px; height: 42px; }
.story-count { font-size: var(--fs-small); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.story-more { margin: 14px 8px 0; }
.stories .fineprint { margin-top: 28px; }

.story-dialog {
  width: min(880px, calc(100vw - 32px));
  max-height: calc(100svh - 48px);
  padding: 0; border: 0;
  border-radius: var(--radius-lg);
  color: var(--ink);
  overflow: auto;
}
.story-dialog::backdrop { background: rgba(14, 12, 60, 0.55); backdrop-filter: blur(4px); }
.story-dialog[open] { animation: dialogIn 0.5s var(--ease-out); }
@keyframes dialogIn { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.story-dialog-inner { display: grid; grid-template-columns: 0.9fr 1.1fr; position: relative; }
.story-dialog-photo img { width: 100%; height: 100%; object-fit: cover; min-height: 320px; }
.story-dialog-body { padding: clamp(24px, 4vw, 48px); display: grid; gap: 14px; align-content: start; }
.story-dialog-body h2 { font-size: var(--fs-sub); font-weight: 300; letter-spacing: -0.025em; }
.story-dialog-body blockquote { font-size: 1.125rem; line-height: 1.45; color: var(--blue); }
.story-dialog-body [data-story-text] { display: grid; gap: 12px; color: var(--ink-2); }
.story-dialog-close { position: absolute; top: 14px; right: 14px; background: var(--white); z-index: 1; }

/* --------------------------------------------------------------------------
   06 Why Harvod
   -------------------------------------------------------------------------- */
.why { padding-bottom: var(--section); }
.why-head {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr);
  gap: 32px 64px; align-items: end;
  padding-bottom: clamp(32px, 4vw, 56px);
}
.why-aside { display: flex; align-items: flex-start; gap: 24px; }
.why-aside p { font-size: var(--fs-small); color: var(--ink-3); max-width: 30ch; }
.why-head .h-display { justify-self: end; text-align: right; max-width: 15ch; }
.why-body {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.why-media { position: relative; min-height: 520px; overflow: hidden; background: var(--surface); }
.why-media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.06);
  transition: opacity 0.8s var(--ease-out), transform 1.4s var(--ease-out);
}
.why-media img.is-active { opacity: 1; transform: scale(1); }
.why-list {
  list-style: none; padding: 0;
  padding-right: max(var(--gutter), calc((100vw - var(--maxw)) / 2));
}
.why-item { border-bottom: 1px solid var(--line); }
.why-item:last-child { border-bottom: 0; }
.why-item button {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 26px 0 26px clamp(24px, 3vw, 40px);
  text-align: left;
  font-size: clamp(1.3rem, 1.1rem + 0.7vw, 1.75rem);
  font-weight: 300; letter-spacing: -0.02em; line-height: 1.2;
  color: var(--ink-3);
  transition: color 0.3s;
}
.why-item button::after {
  content: ""; width: 12px; height: 12px; flex-shrink: 0;
  background:
    linear-gradient(currentColor, currentColor) center / 100% 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) center / 1.5px 100% no-repeat;
  transition: transform 0.4s var(--ease-out);
}
.why-item button:hover, .why-item.is-open button { color: var(--ink); }
.why-item.is-open button::after { transform: rotate(45deg); color: var(--blue); }
.why-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.55s var(--ease-out); }
.why-panel > div { overflow: hidden; }
.why-item.is-open .why-panel { grid-template-rows: 1fr; }
.why-panel p {
  padding: 0 0 28px clamp(24px, 3vw, 40px);
  max-width: 48ch;
  font-size: 0.9375rem; color: var(--ink-2);
}

/* --------------------------------------------------------------------------
   07 Campus life
   -------------------------------------------------------------------------- */
.campus { padding-bottom: var(--section); overflow: hidden; }
.campus-head { display: flex; justify-content: space-between; align-items: end; gap: 32px; margin-bottom: clamp(32px, 4vw, 56px); }
.campus-lede { color: var(--ink-2); max-width: 44ch; margin-top: 16px; }
.campus-nav { display: flex; gap: 10px; }

.gallery {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  cursor: grab;
  outline-offset: -2px;
}
.gallery::-webkit-scrollbar { display: none; }
.gallery.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.gallery.is-dragging img { pointer-events: none; }
.gallery-track {
  display: flex; align-items: flex-start; gap: clamp(12px, 1.5vw, 20px);
  width: max-content;
  padding-inline: max(var(--gutter), calc((100vw - var(--maxw)) / 2));
}
.shot { scroll-snap-align: start; scroll-margin-inline: max(var(--gutter), calc((100vw - var(--maxw)) / 2)); }
.shot figure { display: grid; gap: 12px; }
.shot-img { overflow: hidden; border-radius: var(--radius); background: var(--surface); }
.shot-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease-out); user-select: none; -webkit-user-drag: none; }
.shot:hover .shot-img img { transform: scale(1.04); }
.shot-tall .shot-img { width: clamp(240px, 24vw, 360px); aspect-ratio: 3 / 4; }
.shot-wide .shot-img { width: clamp(300px, 38vw, 580px); aspect-ratio: 3 / 2; }
.shot-wide { margin-top: clamp(40px, 6vw, 96px); }
.shot figcaption { font-size: 0.9375rem; display: flex; flex-direction: column; }
.shot figcaption span { font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--blue); }
.gallery-progress { position: relative; height: 1px; background: var(--line); margin-top: 32px; }
.gallery-progress span { position: absolute; left: 0; top: -0.5px; height: 2px; width: 100%; background: var(--blue); transform-origin: left; transform: scaleX(0.15); transition: transform 0.15s linear; }

/* --------------------------------------------------------------------------
   08 Research
   -------------------------------------------------------------------------- */
.research { padding-block: var(--section); }
.research-head {
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 24px 80px; align-items: end;
  margin-bottom: clamp(40px, 5vw, 72px);
}
.research-head .h-display { max-width: 16ch; }
.research-head p { color: var(--ink-2); max-width: 48ch; }
.research-figure { position: relative; }
.research-figure > .research-figure-inner {
  position: absolute; inset: -12% 0;
}
.research-figure {
  aspect-ratio: 21 / 9;
  border-radius: var(--radius);
  overflow: hidden;
}
.research-figure img { width: 100%; height: 100%; object-fit: cover; }
.research-figure figcaption {
  position: absolute; left: 20px; bottom: 18px; z-index: 1;
  font-size: var(--fs-micro); color: var(--white);
  background: rgba(10, 10, 40, 0.45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  padding: 6px 12px; border-radius: 999px;
}
.themes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: clamp(40px, 5vw, 64px); }
.theme { border-top: 1px solid var(--ink); padding-top: 20px; }
.theme h3 { font-size: 1.375rem; font-weight: 300; letter-spacing: -0.02em; margin-bottom: 10px; }
.theme p { font-size: 0.9375rem; color: var(--ink-2); max-width: 38ch; }

/* --------------------------------------------------------------------------
   04 About Harvod
   -------------------------------------------------------------------------- */
.about { padding-block: var(--section); }
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 48px clamp(48px, 7vw, 120px); align-items: start; }
.about-copy { position: sticky; top: calc(var(--header-h) + 32px); display: grid; gap: 36px; justify-items: start; }
.about-statement { font-size: var(--fs-lead); line-height: 1.32; letter-spacing: -0.02em; max-width: 24ch; }
.about-statement span { color: var(--ink-3); }
.pillars { display: grid; gap: 0; width: 100%; max-width: 520px; }
.pillars > div { display: grid; grid-template-columns: 9.5em 1fr; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.pillars > div:last-child { border-bottom: 1px solid var(--line); }
.pillars dt { font-size: var(--fs-small); font-weight: 500; }
.pillars dd { font-size: var(--fs-small); color: var(--ink-2); }
.about-title { text-align: right; margin-bottom: clamp(32px, 4vw, 56px); }
.people { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px clamp(16px, 2vw, 28px); }
.person:nth-child(even) { margin-top: clamp(32px, 5vw, 72px); }
.person-img { aspect-ratio: 1; overflow: hidden; border-radius: var(--radius); background: var(--surface); margin-bottom: 14px; }
.person-img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; transition: transform 1s var(--ease-out); }
.person:hover .person-img img { transform: scale(1.04); }
.person-name { font-size: 1.0625rem; letter-spacing: -0.01em; }
.person-role { font-size: var(--fs-micro); color: var(--ink-3); }
.about-side .fineprint { text-align: right; margin-top: 32px; }

/* --------------------------------------------------------------------------
   10 Admissions
   -------------------------------------------------------------------------- */
.admissions { padding-bottom: var(--section); }
.admissions-head { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px 80px; align-items: end; margin-bottom: clamp(40px, 5vw, 64px); }
.admissions-head p { color: var(--ink-2); max-width: 44ch; }
.steps {
  position: relative;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
  padding-top: 36px;
  margin-bottom: clamp(72px, 8vw, 120px);
}
.steps-line { position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--line-strong); }
.steps-line span { position: absolute; inset: 0; background: var(--blue); height: 2px; top: -0.5px; transform-origin: left; transform: scaleX(0); }
.step-num { display: block; font-size: var(--fs-small); color: var(--blue); font-variant-numeric: tabular-nums; margin-bottom: 18px; font-weight: 500; }
.step h3 { font-size: 1.375rem; font-weight: 300; letter-spacing: -0.02em; margin-bottom: 8px; }
.step p { font-size: 0.9375rem; color: var(--ink-2); max-width: 30ch; }
.step::before {
  content: ""; position: absolute; top: -4.5px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--white); box-shadow: inset 0 0 0 1.5px var(--line-strong);
  transition: background 0.4s, box-shadow 0.4s;
}
.step { position: relative; }
.step::before { top: -40.5px; }
.step.is-reached::before { background: var(--blue); box-shadow: inset 0 0 0 1.5px var(--blue); }

.registry {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr);
  grid-template-rows: auto 1fr;
  column-gap: 0;
  scroll-margin-top: calc(var(--header-h) + 16px);
}
.registry-media { position: relative; grid-column: 1 / -1; grid-row: 1; aspect-ratio: 21 / 7; border-radius: var(--radius); overflow: hidden; }
.registry-media img { width: 100%; height: 100%; object-fit: cover; }
.registry-copy { grid-column: 1; grid-row: 2; padding: 28px clamp(24px, 4vw, 64px) 0 0; }
.registry-handle { font-size: 1.0625rem; margin-bottom: 28px; }
.registry-handle span { color: var(--ink-3); }
.registry-text { font-size: var(--fs-lead); line-height: 1.35; letter-spacing: -0.015em; max-width: 26ch; }
.registry-text span { color: var(--ink-3); }
.registry-card {
  grid-column: 2; grid-row: 1 / span 2;
  align-self: end;
  margin-top: clamp(80px, 12vw, 180px);
  background: var(--white);
  border-radius: var(--radius-lg) 0 var(--radius-lg) var(--radius-lg);
  padding: clamp(24px, 3vw, 36px);
  box-shadow: 0 0 0 1px var(--line);
  position: relative; z-index: 1;
}
.form { display: grid; gap: 16px; }
.form-title { font-size: var(--fs-sub); font-weight: 300; letter-spacing: -0.025em; margin-bottom: 6px; }
.field { display: grid; gap: 6px; }
.field label { font-size: var(--fs-micro); color: var(--ink-2); }
.field input, .field select {
  height: 46px; width: 100%;
  border: 0; border-radius: 6px;
  box-shadow: inset 0 0 0 1px var(--line-strong);
  background: var(--white);
  padding: 0 14px;
  font-size: 0.9375rem;
  transition: box-shadow 0.2s;
  appearance: none;
}
.field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%;
  background-size: 5px 5px; background-repeat: no-repeat;
  padding-right: 40px;
}
.field input:focus, .field select:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--blue); }
.field.has-error input, .field.has-error select { box-shadow: inset 0 0 0 1.5px #c42b3a; }
.field-error { font-size: var(--fs-micro); color: #b3202f; min-height: 0; }
.field-error:empty { display: none; }
.form .btn { justify-self: start; margin-top: 6px; }
.form-note { font-size: var(--fs-micro); color: var(--ink-3); }
.form-success { display: grid; gap: 12px; justify-items: start; padding: 12px 0; outline: none; }
.form-success svg { width: 30px; height: 30px; color: var(--blue); }
.form-success h3 { font-size: var(--fs-sub); font-weight: 300; letter-spacing: -0.025em; }
.form-success p { color: var(--ink-2); max-width: 36ch; }

/* --------------------------------------------------------------------------
   11 Final CTA
   -------------------------------------------------------------------------- */
.cta { padding-block: clamp(96px, 10vw, 180px); }
.cta-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 0.8fr); gap: 40px 64px; align-items: end; }
.cta-title {
  font-size: clamp(2.6rem, 1rem + 5.4vw, 6.2rem);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.05em;
  text-wrap: balance;
}
.cta-side { display: grid; gap: 24px; justify-items: start; padding-bottom: 8px; }
.cta-side p { color: var(--ink-2); max-width: 30ch; font-size: 1.0625rem; }

/* --------------------------------------------------------------------------
   12 Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--blue);
  color: var(--white);
  padding-top: clamp(56px, 6vw, 96px);
  overflow: hidden;
}
.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 40px clamp(32px, 4vw, 64px);
  align-items: start;
}
.footer-statement { font-size: clamp(1.75rem, 1.2rem + 1.6vw, 2.5rem); font-weight: 300; line-height: 1.1; letter-spacing: -0.03em; margin-top: 28px; max-width: 12ch; }
.footer-about { display: grid; gap: 24px; padding-top: 6px; font-size: var(--fs-small); }
.footer-about > p:first-child { opacity: 0.8; max-width: 36ch; }
.footer-address {
  display: inline-flex; align-items: center; gap: 10px; justify-self: start;
  padding: 10px 16px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}
.footer-address svg { width: 18px; height: 18px; }
.social { display: flex; gap: 10px; }
.social a {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--blue-line);
  transition: background 0.3s, color 0.3s;
}
.social a:hover { background: var(--white); color: var(--blue); }
.social svg { width: 18px; height: 18px; }
.footer-nav {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px;
  padding: 28px;
  border-radius: var(--radius-lg);
  box-shadow: inset 0 0 0 1px var(--blue-line);
}
.footer-nav-title { font-size: 0.9375rem; margin-bottom: 14px; }
.footer-nav ul { display: grid; gap: 8px; }
.footer-nav a { font-size: var(--fs-small); opacity: 0.72; transition: opacity 0.2s; }
.footer-nav a:hover { opacity: 1; }
.footer-wordmark {
  font-size: clamp(5rem, 22vw, 21rem);
  font-weight: 300;
  letter-spacing: -0.06em;
  line-height: 0.8;
  margin-top: clamp(48px, 6vw, 96px);
  color: rgba(255, 255, 255, 0.1);
  white-space: nowrap;
  user-select: none;
  transform: translateY(0.06em);
}
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px;
  padding-block: 24px;
  border-top: 1px solid var(--blue-line);
  font-size: var(--fs-micro);
  position: relative;
}
.footer-bottom p { opacity: 0.75; }
.footer-bottom ul { display: flex; gap: 24px; }
.footer-bottom a { text-decoration: underline; text-underline-offset: 3px; opacity: 0.85; }
.footer-bottom a:hover { opacity: 1; }

/* --------------------------------------------------------------------------
   Scroll reveals (only when JS is running and motion is allowed)
   -------------------------------------------------------------------------- */
.js [data-reveal="fade"] { opacity: 0; transform: translateY(14px); transition: opacity 1s var(--ease-out), transform 1s var(--ease-out); }
.js [data-reveal="rise"] { opacity: 0; transform: translateY(32px); transition: opacity 0.9s var(--ease-out), transform 1s var(--ease-out); transition-delay: calc(var(--i, 0) * 110ms); }
.js [data-reveal="lines"] .line-inner { transform: translateY(105%); transition: transform 1.1s var(--ease-out); transition-delay: calc(var(--l, 0) * 90ms); }
/* Image reveals use a curtain layer instead of clip-path on the observed
   element, so IntersectionObserver and native lazy-loading keep working. */
.js [data-reveal="curve"]::before,
.js [data-reveal="clip-x"]::before,
.js [data-reveal="clip-up"]::before {
  content: ""; position: absolute; inset: -1px; z-index: 3;
  background: var(--curtain, var(--canvas));
  pointer-events: none;
}
.js [data-reveal="curve"]::before { --curtain: var(--surface); transform-origin: 50% 0; transition: transform 1.4s var(--ease-in-out); }
.js [data-reveal="clip-x"]::before { transform-origin: 100% 50%; transition: transform 1.3s var(--ease-in-out); }
.js [data-reveal="clip-up"]::before { --curtain: var(--surface); transform-origin: 50% 0; transition: transform 1.4s var(--ease-in-out); }
.js [data-reveal="curve"] img,
.js [data-reveal="clip-x"] img,
.js [data-reveal="clip-up"] img { transform: scale(1.12); transition: transform 1.8s var(--ease-out); }
.js .faculty-rail .faculty { opacity: 0; transform: translateY(40px); transition: opacity 0.8s var(--ease-out), transform 1s var(--ease-out), flex-grow 0.8s var(--ease-out); transition-delay: calc(var(--i, 0) * 70ms), calc(var(--i, 0) * 70ms), 0s; }

.js .is-in[data-reveal="fade"], .js .is-in[data-reveal="rise"] { opacity: 1; transform: none; }
.js .is-in[data-reveal="lines"] .line-inner { transform: none; }
.js .is-in[data-reveal="curve"]::before { transform: scaleY(0); }
.js .is-in[data-reveal="clip-x"]::before { transform: scaleX(0); }
.js .is-in[data-reveal="clip-up"]::before { transform: scaleY(0); }
.js .is-in[data-reveal="curve"] img,
.js .is-in[data-reveal="clip-x"] img,
.js .is-in[data-reveal="clip-up"] img { transform: none; }
.js .faculty-rail.is-in .faculty { opacity: 1; transform: none; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1180px) {
  .nav-link { padding: 0 11px; }
  .lang { display: none; }
}

@media (max-width: 1024px) {
  :root { --header-h: 68px; }
  .primary-nav { display: none; }
  .menu-toggle { display: grid; }
  .header-inner { grid-template-columns: 1fr auto; }
  .site-header.is-scrolled .header-inner { height: 60px; }

  .hero-content { grid-template-columns: 1fr; }
  .hero-side { max-width: 460px; }

  .intro-head, .research-head, .admissions-head { grid-template-columns: 1fr; }
  .intro-body { grid-template-columns: 1fr; }
  .feature-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; padding-bottom: 0; }
  .intro-figure { margin-left: calc(var(--gutter) * -1); }

  .faculty-rail { height: 440px; gap: 8px; }
  .faculty-counts { gap: 8px; }
  .finder-head { grid-template-columns: 1fr; }
  .finder-controls { justify-content: flex-start; }

  .stories-grid { grid-template-columns: minmax(0, 1fr); }
  .stories-grid > * { min-width: 0; }
  .stories-hero { aspect-ratio: 16 / 9; }
  .story-card { grid-column: 1; grid-row: 3; margin: 32px 0 0; max-width: 420px; justify-self: end; }
  .stories-intro { grid-row: 2; }

  .why-head { grid-template-columns: 1fr; }
  .why-head .h-display { justify-self: start; text-align: left; grid-row: 1; }
  .why-media { min-height: 440px; }

  .about-grid { grid-template-columns: 1fr; }
  .about-copy { position: static; }
  .about-title { text-align: left; order: -1; }
  .about-side { grid-row: 1; }
  .about-side .fineprint { text-align: left; }

  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 72px; }
  .steps-line { display: none; }
  .step { border-top: 1px solid var(--line-strong); padding-top: 28px; }
  .step::before { top: -4.5px; }

  .registry { grid-template-columns: 1fr; }
  .registry-media { aspect-ratio: 16 / 8; }
  .registry-copy { grid-row: 2; padding-right: 0; }
  .registry-card { grid-column: 1; grid-row: 3; margin-top: 40px; border-radius: var(--radius-lg); box-shadow: 0 0 0 1px var(--line); }

  .cta-grid { grid-template-columns: 1fr; }

  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-nav { grid-column: 1 / -1; }
}

@media (max-width: 767px) {
  :root { --radius-lg: 12px; }
  .header-cta { min-height: 38px; padding: 0 14px; font-size: 0.8125rem; }
  .header-actions { gap: 10px; }

  .hero { height: max(600px, calc(100svh - var(--header-h))); }
  .hero-img { object-position: 42% 88%; }
  .hero-shade { background: linear-gradient(to top, rgba(10, 10, 30, 0.85) 0%, rgba(10, 10, 30, 0.45) 45%, rgba(10, 10, 30, 0.05) 75%); }
  .hero-title { letter-spacing: -0.04em; }
  .hero-actions .btn { flex: 1 1 auto; }
  .scroll-cue { display: none; }

  .feature-list { grid-template-columns: 1fr; gap: 28px; }
  .intro-figure { aspect-ratio: 4 / 3.4; border-radius: 0 0 0 60% / 0 0 0 18%; }

  /* Faculties become a swipeable rail of full cards */
  .faculty-rail {
    height: auto;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
    scroll-padding-inline: var(--gutter);
    scrollbar-width: none;
  }
  .faculty-rail::-webkit-scrollbar { display: none; }
  .faculty, .faculty.is-active { flex: 0 0 84%; height: 460px; scroll-snap-align: start; cursor: default; }
  .faculty h3, .faculty.is-active h3 { font-size: 1.625rem; font-weight: 300; }
  .faculty p, .faculty-link { opacity: 1; transform: none; visibility: visible; }
  .faculty-media img { transform: none; filter: none; }
  .faculty-counts { display: none; }

  .finder-controls { display: grid; grid-template-columns: 1fr; }
  .segmented { width: 100%; }
  .segmented label { flex: 1; }
  .segmented span { padding: 0 8px; }
  .programme { grid-template-columns: 1fr auto; gap: 4px 16px; padding: 16px 0; }
  .programme:hover { padding-inline: 0; background: none; }
  .programme-name { grid-column: 1 / -1; }
  .programme-faculty { grid-column: 1 / -1; font-size: var(--fs-small); }
  .programme-duration { text-align: right; }

  .stories-hero { aspect-ratio: 4 / 3.6; }
  .story-card { max-width: none; justify-self: stretch; }

  .why-body { grid-template-columns: 1fr; }
  .why-media { min-height: 0; aspect-ratio: 4 / 3; }
  .why-list { padding-inline: var(--gutter); }
  .why-item button { padding-left: 0; }
  .why-panel p { padding-left: 0; }
  .why-aside { flex-direction: column; gap: 14px; }

  .campus-head { flex-direction: column; align-items: flex-start; }
  .campus-nav { display: none; }
  .shot-tall .shot-img { width: 66vw; }
  .shot-wide .shot-img { width: 80vw; }
  .shot-wide { margin-top: 32px; }

  .research-figure { aspect-ratio: 4 / 3.2; }
  .themes { grid-template-columns: 1fr; gap: 28px; }

  .pillars > div { grid-template-columns: 1fr; gap: 4px; }
  .people { gap: 28px 14px; }
  .person:nth-child(even) { margin-top: 36px; }

  .steps { grid-template-columns: 1fr; row-gap: 40px; }
  .registry-media { aspect-ratio: 4 / 3; }

  .footer-top { grid-template-columns: 1fr; }
  .footer-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 22px; }
  .footer-nav > div:last-child { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; }
}

@media (max-width: 380px) {
  .brand-name { font-size: 1rem; }
  .brand-crest { width: 30px; height: 30px; }
  .header-cta { padding: 0 12px; }
  .hero-actions { flex-direction: column; }
  .story-dialog-inner { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .story-dialog-inner { grid-template-columns: 1fr; }
  .story-dialog-photo img { min-height: 0; aspect-ratio: 4 / 3; }
}

@media (hover: none) {
  .faculty:not(.is-active):hover .faculty-media img { transform: scale(1.06); }
}

/* --------------------------------------------------------------------------
   Reduced motion: show final states, stop drives
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; transition-delay: 0s !important; }
  .js [data-reveal], .js [data-reveal] img, .js [data-reveal] .line-inner, .js .hero-title .line-inner, .js .hero-side, .js .faculty-rail .faculty, .hero-img {
    opacity: 1 !important; transform: none !important; clip-path: none !important;
  }
  .js [data-reveal]::before { display: none !important; }
  [data-parallax] { transform: none !important; }
  .scroll-cue span { display: none; }
}
