
/* ============================================
   ANIMATIONS & MICRO-INTERACTIONS
   ============================================ */

/* Smooth scroll */
html { scroll-behavior: smooth; }

/* Page transition fade-in */
main { animation: pageFade .55s cubic-bezier(.2,.7,.2,1) both; }
@keyframes pageFade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1);
  will-change: opacity, transform;
}
.reveal.is-in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }
.reveal[data-delay="4"] { transition-delay: .32s; }
.reveal[data-delay="5"] { transition-delay: .40s; }

.reveal--left { transform: translateX(-32px); }
.reveal--left.is-in { transform: none; }
.reveal--right { transform: translateX(32px); }
.reveal--right.is-in { transform: none; }
.reveal--scale { transform: scale(.96); }
.reveal--scale.is-in { transform: none; }

/* Hero entry */
.hero-home .eyebrow-text { animation: heroIn .7s .05s cubic-bezier(.2,.7,.2,1) both; }
.hero-home h1 { animation: heroIn .9s .2s cubic-bezier(.2,.7,.2,1) both; }
.hero-home p { animation: heroIn .9s .42s cubic-bezier(.2,.7,.2,1) both; }
.hero-home__actions { animation: heroIn .9s .6s cubic-bezier(.2,.7,.2,1) both; }
@keyframes heroIn {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Slow hero zoom — continuous Ken Burns pan + zoom */
.hero-home::before {
  content: '';
  position: absolute; inset: -8% -4%;
  z-index: 0;
  background:
    linear-gradient(rgba(0,0,0,0.45), rgba(0,0,0,0.55)),
    url('https://images.unsplash.com/photo-1582555172866-f73bb12a2ab3?w=2400&q=85') center/cover no-repeat;
  animation: heroKenBurns 22s ease-in-out infinite alternate;
  will-change: transform;
}
.hero-home {
  background: #1a1a1a;
}
@keyframes heroKenBurns {
  0%   { transform: scale(1.05) translate(-1%, -1%); }
  50%  { transform: scale(1.15) translate(1.5%, 1%); }
  100% { transform: scale(1.10) translate(-1%, 2%); }
}

/* Card hover lift */
.exh-card, .bcard, .team-card, .work-card, .year-card, .fac-card,
.gallery-card, .news-page-card, .news-feed__item, .news-item, .stat-card {
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s ease;
}
.exh-card:hover,
.gallery-card:hover,
.team-card:hover,
.year-card:hover,
.fac-card:hover,
.work-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}
.bcard:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(0,0,0,0.10); }
.stat-card:hover { transform: translateY(-3px); }

/* Image zoom inside cards */
.exh-card img,
.gallery-card__img img,
.team-card__img img,
.fac-card__img img,
.work-card__img img,
.news-page-card__img img,
.news-item__img img,
.news-feed__img img,
.bcard__img img,
.about-grid__img img,
.curr-hero__img img,
.highlight__img img,
.year-card--dark img {
  transition: transform .8s cubic-bezier(.2,.7,.2,1), filter .5s ease;
}
.exh-card:hover img,
.gallery-card:hover .gallery-card__img img,
.team-card:hover .team-card__img img,
.fac-card:hover .fac-card__img img,
.work-card:hover .work-card__img img,
.news-page-card:hover .news-page-card__img img,
.news-item:hover .news-item__img img,
.news-feed__item:hover .news-feed__img img,
.bcard:hover .bcard__img img {
  transform: scale(1.06);
}
.fac-card:hover .fac-card__img img,
.team-card:hover .team-card__img img { filter: none; }

/* Buttons */
.btn { position: relative; overflow: hidden; }
.btn::after {
  content: ''; position: absolute; inset: 0;
  background: rgba(255,255,255,0.18);
  transform: translateX(-110%) skewX(-20deg);
  transition: transform .55s ease;
}
.btn:hover::after { transform: translateX(110%) skewX(-20deg); }
.btn:active { transform: scale(.97); }
.btn--primary:hover { box-shadow: 0 10px 24px rgba(229,52,63,0.35); }

/* Nav underline grow */
.nav a { transition: color .2s ease; }
.nav a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px; background: var(--red); border-radius: 2px;
  transform: scaleX(0); transform-origin: left center;
  transition: transform .35s cubic-bezier(.2,.7,.2,1);
}
.nav a:hover::after, .nav a.is-active::after { transform: scaleX(1); }

/* Play button pulse */
.video-block__play .play-btn {
  transition: transform .3s ease;
}
.video-block__play .play-btn::before {
  content: ''; position: absolute;
  width: 72px; height: 72px; border-radius: 50%;
  background: rgba(255,255,255,0.6);
  animation: pulseRing 2.2s ease-out infinite;
}
.video-block__play .play-btn:hover { transform: scale(1.08); }
@keyframes pulseRing {
  0% { transform: scale(1); opacity: .8; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* Footer socials pop */
.footer__socials a, .contact-socials a { transition: transform .25s ease, color .2s ease; }
.footer__socials a:hover, .contact-socials a:hover { transform: translateY(-3px); color: var(--red); }

/* Number counter style — make red big numbers pop */
.stat-card .num { transition: transform .4s ease; }
.stat-card:hover .num { transform: scale(1.08); }

/* Big admission step numbers ride in */
.adm-step__num { transition: transform .5s ease; display: block; }
.adm-step:hover .adm-step__num { transform: translateX(8px); }

/* exh-card arrow nudge */
.exh-card__cta { transition: gap .25s ease, transform .25s ease; }
.exh-card:hover .exh-card__cta { gap: 12px; }

/* lnk-arrow / read more links */
a.lnk-arrow svg, .news-page-card__more, .exh-card__cta svg {
  transition: transform .25s ease;
}
a.lnk-arrow:hover svg { transform: translateX(4px); }

/* Footer signup button */
.footer__news button { transition: background .2s ease, transform .2s ease; }
.footer__news button:active { transform: scale(.97); }

/* Logo subtle bob */
.brand-logo { transition: color .2s ease; }
a:hover > .brand-logo, a:hover .brand-sub { /* placeholder */ }

/* Map subtle frame */
.map-card { box-shadow: 0 10px 30px rgba(0,0,0,0.06); }

/* ============================================
   MOBILE HAMBURGER
   ============================================ */
.hamburger {
  display: none;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  border-radius: 10px;
  background: transparent;
  flex-shrink: 0;
}
.hamburger:hover { background: #f3f3f3; }
.hamburger__bars {
  position: relative; width: 22px; height: 16px;
}
.hamburger__bars span {
  position: absolute; left: 0; right: 0; height: 2px;
  background: var(--ink); border-radius: 2px;
  transition: transform .35s ease, top .35s ease, opacity .25s ease;
}
.hamburger__bars span:nth-child(1) { top: 0; }
.hamburger__bars span:nth-child(2) { top: 7px; }
.hamburger__bars span:nth-child(3) { top: 14px; }
.hamburger.is-open .hamburger__bars span:nth-child(1) { top: 7px; transform: rotate(45deg); }
.hamburger.is-open .hamburger__bars span:nth-child(2) { opacity: 0; }
.hamburger.is-open .hamburger__bars span:nth-child(3) { top: 7px; transform: rotate(-45deg); }

/* Mobile drawer */
.drawer-backdrop {
  position: fixed; inset: 0;
  background: rgba(20,20,20,0.45);
  opacity: 0; pointer-events: none;
  transition: opacity .35s ease;
  z-index: 60;
  backdrop-filter: blur(2px);
}
.drawer-backdrop.is-open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(86vw, 360px);
  background: #fff;
  z-index: 61;
  transform: translateX(100%);
  transition: transform .42s cubic-bezier(.4,.2,.2,1);
  display: flex; flex-direction: column;
  box-shadow: -20px 0 60px rgba(0,0,0,0.15);
}
.drawer.is-open { transform: translateX(0); }
.drawer__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 22px;
  border-bottom: 1px solid #eee;
}
.drawer__close {
  width: 40px; height: 40px; border-radius: 10px;
  display: grid; place-items: center;
  font-size: 24px; color: #444;
}
.drawer__close:hover { background: #f3f3f3; }
.drawer__nav {
  display: flex; flex-direction: column;
  padding: 14px 8px;
  gap: 2px;
  flex: 1;
}
.drawer__nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  font-size: 16px; font-weight: 500; color: #2a2a2a;
  border-radius: 10px;
  transition: background .2s ease, color .2s ease, padding-left .25s ease;
}
.drawer__nav a:hover { background: #f5f5f5; color: var(--red); padding-left: 24px; }
.drawer__nav a.is-active { color: var(--red); background: #fdecec; }
.drawer__foot {
  padding: 20px 22px;
  border-top: 1px solid #eee;
  display: flex; flex-direction: column; gap: 14px;
}
.drawer__foot .flags { justify-content: center; }
.drawer__foot .btn { justify-content: center; }

/* lock scroll when drawer open */
body.no-scroll { overflow: hidden; }

/* ============================================
   RESPONSIVE — TABLET (≤ 980px)
   ============================================ */
@media (max-width: 980px) {
  .container { padding: 0 22px; }
  .section { padding: 56px 0; }
  .section--tight { padding: 44px 0; }

  /* Hamburger visible, hide nav */
  .nav { display: none; }
  .hamburger { display: flex; }
  .header__right .btn { display: none; }
  .header__right .flags { display: none; }

  .header__inner { height: 76px; }

  /* Hero */
  .hero-home { min-height: 540px; }
  .hero-home h1 { font-size: 52px; }
  .hero-home p { font-size: 15px; }

  /* Video block stack */
  .video-block { grid-template-columns: 1fr; }
  .video-block__copy { padding: 36px 22px 28px; }
  .video-block__copy h2 { font-size: 28px; }
  .video-block__copy .accent { font-size: 22px; }

  /* Exhibitions grid stack */
  .exh-grid { grid-template-columns: 1fr; }
  .exh-card { aspect-ratio: 4/3; }
  .exh-card--tall, .exh-card--sm { aspect-ratio: 4/3; height: auto; }
  .exh-grid__right { grid-template-columns: 1fr 1fr; }
  .exh-grid__right > .exh-card:first-child { grid-column: 1 / -1; }

  /* Home news */
  .news-row, [class*="HomeNews"] > * { grid-template-columns: 1fr !important; }

  /* Highlight */
  .highlight { grid-template-columns: 1fr; gap: 28px; }
  .highlight__title { font-size: 28px; }

  /* Admissions */
  .adm-head h2 { font-size: 44px; }
  .adm-steps { grid-template-columns: 1fr; gap: 32px; }
  .adm-step__num { font-size: 140px; }
  .adm-quals { grid-template-columns: 1fr; padding: 32px 26px; gap: 28px; }
  .adm-quals__list { grid-template-columns: 1fr 1fr; gap: 22px; }

  /* Bottom cards */
  .bottom-grid { grid-template-columns: 1fr; }

  /* CTA */
  .cta-strip { padding: 52px 0; }
  .cta-strip h2 { font-size: 28px; }

  /* About */
  .about-grid { grid-template-columns: 1fr; gap: 28px; }
  .about-grid__img { aspect-ratio: 4/3; max-width: 480px; margin: 0 auto; }
  .team-grid, .faculty-grid { grid-template-columns: 1fr 1fr; gap: 18px; }
  .work-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-card .num { font-size: 44px; }
  .stat-card .num sup { font-size: 22px; vertical-align: 14px; }

  /* Curriculum */
  .curr-hero__grid { grid-template-columns: 1fr; gap: 32px; padding: 48px 0; }
  .curr-hero h1 { font-size: 44px; }
  .curr-years { grid-template-columns: 1fr; }
  .year-card--dark { grid-template-columns: 1fr; }
  .year-card--dark img { aspect-ratio: 16/9; }
  .curr-header-row { flex-direction: column; align-items: stretch; }

  /* Exhibitions page */
  .news-feed__item { grid-template-columns: 140px 1fr; gap: 16px; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }

  /* News page */
  .news-page-grid { grid-template-columns: 1fr 1fr; }

  /* Contact */
  .contact-grid { grid-template-columns: 1fr; }

  /* Page intro */
  .page-intro h1 { font-size: 40px; }
  .page-intro { padding: 40px 0 28px; }

  /* Section title */
  .section-title h2 { font-size: 18px; }

  /* Footer */
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 36px 28px; }
  .footer__brand { grid-column: 1 / -1; max-width: 100%; }
  .footer__news { grid-column: 1 / -1; }
  .footer__bottom { flex-direction: column; gap: 18px; }

  /* Research */
  .research { grid-template-columns: 1fr; }
}

/* ============================================
   RESPONSIVE — PHONE (≤ 620px)
   ============================================ */
@media (max-width: 620px) {
  .container { padding: 0 18px; }
  .section, .section--tight { padding: 36px 0; }

  body { font-size: 15px; }

  .header__inner { height: 64px; }

  /* Smaller brand on phone */
  .brand-logo { font-size: 16px; }
  .brand-sub { font-size: 7.5px; }

  /* Hero */
  .hero-home { min-height: 480px; padding: 60px 0 40px; align-items: flex-start; }
  .hero-home__inner { padding-top: 30px; }
  .hero-home .eyebrow-text { font-size: 11px; letter-spacing: 0.14em; }
  .hero-home h1 { font-size: 38px; line-height: 1.08; }
  .hero-home p { font-size: 14px; line-height: 1.65; }
  .hero-home__actions { flex-direction: column; align-items: stretch; gap: 10px; }
  .hero-home__actions .btn { justify-content: center; }
  .btn--lg { padding: 14px 22px; font-size: 14px; }

  /* Buttons full-width tap */
  .btn { padding: 12px 20px; font-size: 14px; }

  /* Section heads */
  .section-title { flex-wrap: wrap; }
  .section-title h2 { font-size: 17px; }

  /* Video player caption smaller */
  .video-block__copy h2 { font-size: 22px; }
  .video-block__copy .accent { font-size: 16px; }
  .video-block__caption { padding: 8px 12px; font-size: 11px; }
  .video-block__caption strong { font-size: 12px; }

  /* Exh cards */
  .exh-card__body { padding: 20px; }
  .exh-card__title { font-size: 18px; }
  .exh-card--sm .exh-card__title { font-size: 15px; }

  /* News on home */
  .news-item { grid-template-columns: 96px 1fr; gap: 14px; }
  .news-item__img { width: 96px; height: 72px; }
  .news-item__title { font-size: 14px; }
  .news-item__meta { font-size: 11px; flex-wrap: wrap; gap: 10px; }

  /* Highlight */
  .highlight__title { font-size: 24px; }
  .highlight__desc { font-size: 14px; }
  .highlight__meta { font-size: 13px; padding: 12px 14px; }

  /* Admissions */
  .adm-head h2 { font-size: 36px; }
  .adm-head p { font-size: 14px; }
  .adm-step__num { font-size: 120px; }
  .adm-step__title { font-size: 22px; }
  .adm-quals { padding: 24px 20px; }
  .adm-quals__list { grid-template-columns: 1fr; gap: 18px; }
  .adm-quals h3 { font-size: 19px; }

  /* Bottom cards */
  .bcard--red h3 { font-size: 19px; }

  /* CTA */
  .cta-strip h2 { font-size: 22px; }
  .cta-strip p { font-size: 13px; }

  /* About / faculty / news */
  .team-grid, .faculty-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .stat-card { padding: 22px 16px; }
  .gallery-grid { grid-template-columns: 1fr; }
  .news-page-grid { grid-template-columns: 1fr; }

  /* News feed on exh */
  .news-feed__item { grid-template-columns: 110px 1fr; gap: 12px; padding: 18px 0; }
  .news-feed__img { aspect-ratio: 4/3; }
  .news-feed__title { font-size: 15px; }
  .news-feed__meta { font-size: 12px; flex-wrap: wrap; gap: 10px; }

  /* Curriculum */
  .curr-hero h1 { font-size: 34px; }
  .year-card { padding: 22px; }
  .year-card__title { font-size: 19px; }
  .year-card--dark .year-card__body { padding: 26px 24px; }

  /* Contact */
  .contact-card { padding: 26px 22px; }
  .contact-card__head h3 { font-size: 18px; }
  .contact-card p { font-size: 14px; }
  .map-card, .map-card iframe { min-height: 320px; }

  /* Page intro */
  .page-intro h1 { font-size: 32px; }
  .page-intro p { font-size: 14px; }

  /* Footer */
  .footer { padding: 44px 0 22px; }
  .footer__grid { grid-template-columns: 1fr; gap: 32px; }
  .footer__news .form { flex-direction: column; gap: 10px; }
  .footer__news input { border-radius: 8px; }
  .footer__news button { border-radius: 8px; padding: 12px 24px; }

  /* Hide pulse ring on phones to save paint */
  .video-block__play .play-btn::before { display: none; }
}

/* ============================================
   RESPONSIVE — SMALL PHONE (≤ 400px)
   ============================================ */
@media (max-width: 400px) {
  .hero-home h1 { font-size: 32px; }
  .adm-head h2 { font-size: 30px; }
  .page-intro h1 { font-size: 28px; }
  .brand-logo { font-size: 14px; }
  .brand-sub { display: none; }
}

/* ============================================
   ACCESSIBILITY — reduced motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}
