:root {
  --mgb-green: #8bffcd;
  --mgb-green-hover: #00e682;
  --deep-blue: #213243;
  --hero-blue: #004268;
  --dark-teal: #01828e;
  --light-teal: #d9f0f2;
  --medium-teal: #b1e4e3;
  --pale-teal: #ecf7f9;
  --mgb-blue: #003a96;
  --new-blue: #004268;
  --sand: #e7e7e0;
  --neutral: #f3f3ef;
  --text: #213243;
  --text-dark: #131313;
  --muted: #5c6b7a;
  --border: #d4e8eb;
  --focus: #1769ff;
  --heading: "Source Serif 4", "Noto Serif KR", Georgia, serif;
  --body: "Roboto", "Noto Sans KR", sans-serif;
  --condensed: "Roboto Condensed", "Noto Sans KR", sans-serif;
  --radius: 20px;
  --radius-sm: 12px;
  --header-h: 72px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 140px;
}

body {
  font-family: var(--body);
  color: var(--text);
  background: #fff;
  line-height: 1.6;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--mgb-blue);
  text-decoration: none;
}

a:hover {
  color: #1d3ecf;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: #fff;
  padding: 0.75rem 1rem;
  z-index: 2000;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.global-inner {
  width: min(1440px, calc(100% - 48px));
  margin-inline: auto;
}

/* ---------- Utility nav ---------- */
.utility-nav {
  border-bottom: 1px solid #e8e8e8;
  font-size: 0.875rem;
  background: #fff;
}

.utility-nav a {
  color: var(--deep-blue);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.7rem 0.85rem;
  white-space: nowrap;
}

.utility-nav a:hover {
  color: var(--mgb-blue);
}

.utility-nav .ext-icon {
  width: 12px;
  height: 12px;
}

/* ---------- Header ---------- */
.site-header {
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 1040;
}

.site-header.is-stuck .utility-nav {
  display: none;
}

.site-header.is-stuck .main-nav .nav-link {
  padding-top: 1rem !important;
  padding-bottom: 1rem !important;
}

.main-nav-bar {
  background: #fff;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--deep-blue);
  text-decoration: none;
}

.brand:hover {
  color: var(--deep-blue);
}

.brand-mark {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong {
  font-family: var(--condensed);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-text span {
  font-size: 0.7rem;
  color: var(--dark-teal);
  font-weight: 500;
  letter-spacing: 0.02em;
}

@media (max-width: 1399.98px) {
  .brand-text span {
    display: none;
  }
}

.main-nav .nav-link {
  color: var(--deep-blue) !important;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 1.25rem 0.7rem !important;
  white-space: nowrap;
}

.main-nav .nav-link:hover,
.main-nav .dropdown-toggle.show {
  color: var(--mgb-blue) !important;
}

.dropdown-menu {
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(33, 50, 67, 0.12);
  padding: 0.5rem;
  min-width: 240px;
}

.dropdown-item {
  border-radius: 8px;
  padding: 0.6rem 0.85rem;
  color: var(--deep-blue);
}

.dropdown-item:hover {
  background: var(--pale-teal);
  color: var(--mgb-blue);
}

.nav-cta {
  color: var(--mgb-blue) !important;
  font-weight: 600 !important;
}

.icon-btn {
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: var(--deep-blue);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-btn:hover {
  background: var(--pale-teal);
  color: var(--mgb-blue);
}

.navbar-toggler {
  border: 0;
}

/* ---------- Hero ---------- */
.hero {
  background: var(--hero-blue);
  color: #fff;
}

.hero-copy {
  padding: clamp(2.5rem, 6vw, 5.5rem) clamp(1.5rem, 6vw, 6.5rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 520px;
}

.breadcrumb-hero {
  --bs-breadcrumb-divider-color: rgba(255, 255, 255, 0.55);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.breadcrumb-hero .breadcrumb-item,
.breadcrumb-hero .breadcrumb-item a {
  color: rgba(255, 255, 255, 0.85);
}

.breadcrumb-hero .breadcrumb-item.active {
  color: #fff;
}

.breadcrumb-hero .breadcrumb-item + .breadcrumb-item::before {
  color: rgba(255, 255, 255, 0.55);
}

.hero h1 {
  font-family: "Noto Serif KR", var(--heading);
  font-weight: 600;
  font-size: clamp(2.1rem, 4vw, 3.5rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

.hero p {
  font-size: 1.05rem;
  max-width: 38rem;
  opacity: 0.95;
  margin-bottom: 2rem;
}

.hero-image {
  min-height: 420px;
  background:
    linear-gradient(180deg, rgba(0, 66, 104, 0.08), rgba(0, 66, 104, 0.08)),
    url("../images/building_image.png")
      center / cover no-repeat;
}

/* ---------- Buttons ---------- */
.btn-pill {
  border-radius: 999px;
  padding: 0.7rem 1.35rem;
  font-weight: 500;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  line-height: 1.2;
}

.btn-mint {
  background: var(--mgb-green);
  color: var(--deep-blue);
  border: 2px solid var(--mgb-green);
}

.btn-mint:hover {
  background: var(--mgb-green-hover);
  border-color: var(--mgb-green-hover);
  color: var(--deep-blue);
}

.btn-ghost-light {
  background: transparent;
  color: #fff;
  border: 1.5px solid #fff;
}

.btn-ghost-light:hover {
  background: #fff;
  color: var(--hero-blue);
}

.btn-outline-blue {
  background: #fff;
  color: var(--mgb-blue);
  border: 1.5px solid var(--mgb-blue);
}

.btn-outline-blue:hover {
  background: var(--mgb-blue);
  color: #fff;
}

.btn-text {
  color: var(--mgb-blue);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: none;
  border: 0;
  padding: 0;
}

.btn-text:hover {
  color: #1d3ecf;
}

.btn-text-light {
  color: #fff;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.btn-text-light:hover {
  color: var(--mgb-green);
}

/* ---------- Jump links ---------- */
.jump-nav {
  background: #fff;
  border-bottom: 1px solid #ececec;
  position: sticky;
  top: var(--header-h);
  z-index: 1030;
}

.jump-nav .nav {
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
}

.jump-nav .nav-link {
  color: var(--deep-blue);
  font-weight: 500;
  padding: 1rem 1.1rem;
  border-bottom: 3px solid transparent;
  border-radius: 0;
}

.jump-nav .nav-link:hover,
.jump-nav .nav-link.active {
  color: var(--mgb-blue);
  border-bottom-color: var(--mgb-blue);
}

/* ---------- Typography blocks ---------- */
.section {
  padding: 5rem 0;
}

.section-tight {
  padding: 3.5rem 0;
}

.serif-title {
  font-family: "Noto Serif KR", var(--heading);
  font-weight: 600;
  color: var(--deep-blue);
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.h-display {
  font-size: clamp(1.9rem, 3.2vw, 2.85rem);
}

.lede {
  font-size: 1.05rem;
  color: var(--text);
}

.eyebrow {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

.rounded-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
}

.media-frame {
  min-height: 360px;
  border-radius: var(--radius);
  overflow: hidden;
  background: #cfe8ea;
}

.media-frame img {
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
  border-radius: var(--radius);
}

/* ---------- Wayfinding ---------- */
.wayfinding {
  border: 1px solid var(--medium-teal);
  border-radius: var(--radius);
  overflow: hidden;
}

.wayfinding-item {
  padding: 2rem 1.6rem;
  height: 100%;
  border-right: 1px solid var(--medium-teal);
}

.wayfinding .row > :last-child .wayfinding-item {
  border-right: 0;
}

.wayfinding-item h3 {
  font-size: 1.15rem;
  font-weight: 500;
  margin-bottom: 0.7rem;
}

.wayfinding-item h3 a {
  color: var(--mgb-blue);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.wayfinding-item p {
  color: var(--text);
  margin: 0;
  font-size: 0.98rem;
}

/* ---------- Service cards ---------- */
.service-card {
  background: var(--pale-teal);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem 1.6rem;
  height: 100%;
  display: block;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.service-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(1, 130, 142, 0.12);
  color: inherit;
}

.service-card h3 {
  color: var(--mgb-blue);
  font-size: 1.15rem;
  font-weight: 500;
  margin-bottom: 0.65rem;
}

.service-more {
  display: none;
}

.service-more.is-open {
  display: flex;
}

/* ---------- Featured banner ---------- */
.featured-banner {
  background: var(--hero-blue);
  color: #fff;
  border-radius: var(--radius);
  overflow: hidden;
}

.featured-badge {
  background: #0b3554;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem;
}

.badge-card {
  width: min(100%, 280px);
  background: linear-gradient(160deg, #0e4a73, #06263b);
  border: 2px solid #c9a227;
  border-radius: 8px;
  padding: 1.4rem 1.2rem;
  text-align: center;
}

.badge-card .stars {
  color: #e8c547;
  letter-spacing: 0.15em;
  font-size: 0.75rem;
}

.badge-card .badge-title {
  font-family: var(--heading);
  font-size: 1.35rem;
  line-height: 1.2;
  margin: 0.4rem 0 0.2rem;
}

.badge-card .badge-sub {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.9;
}

.featured-copy {
  padding: clamp(2rem, 4vw, 3.5rem);
}

.featured-copy h2 {
  font-family: "Noto Serif KR", var(--heading);
  font-size: clamp(1.7rem, 2.5vw, 2.4rem);
  margin-bottom: 1rem;
}

/* ---------- Stats mosaic (legacy background for research) ---------- */
.stats-wrap {
  background: var(--light-teal);
}

/* ---------- Staff slider ---------- */
.staff-wrap {
  background: var(--light-teal);
}

.staff-slider {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.75rem;
}

.staff-slider__viewport {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  container-type: inline-size;
  container-name: staff;
}

.staff-slider__viewport::-webkit-scrollbar {
  display: none;
}

.staff-slider__track {
  display: flex;
  gap: 1.25rem;
  padding: 0.25rem 0.15rem 0.5rem;
  width: max-content;
}

.staff-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.35rem 1.35rem 1.6rem;
  text-align: center;
  flex: 0 0 280px;
  /* 뷰포트 기준 약 4장 + gap 3개 */
  flex-basis: calc((100cqi - 3 * 1.25rem) / 4);
  max-width: none;
  scroll-snap-align: start;
}

.staff-slider__btn {
  width: 44px;
  height: 44px;
  border: 1.5px solid var(--mgb-blue);
  border-radius: 50%;
  background: #fff;
  color: var(--mgb-blue);
  font-size: 1.6rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.staff-slider__btn:hover {
  background: var(--mgb-blue);
  color: #fff;
}

.staff-slider__btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.staff-slider__btn:disabled:hover {
  background: #fff;
  color: var(--mgb-blue);
}

.staff-card__photo {
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--pale-teal);
  margin-bottom: 1rem;
}

.staff-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.staff-card__role {
  margin: 0 0 0.25rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--dark-teal);
}

.staff-card__name {
  margin: 0;
  font-family: "Noto Serif KR", var(--heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--deep-blue);
  letter-spacing: -0.02em;
}

body.is-corrupted .staff-card__photo img {
  filter: grayscale(0.45) contrast(1.25) brightness(0.85);
}

body.is-corrupted .staff-card--exempt,
body.is-corrupted .staff-card--exempt .staff-card__photo img,
body.is-corrupted img.corrupt-exempt {
  filter: none;
  animation: none;
  text-shadow: none;
  transform: none;
}

body.is-corrupted .staff-card--exempt {
  position: relative;
  z-index: 2001;
  isolation: isolate;
}

/* ---------- Link lists ---------- */
.link-col h3 {
  font-size: 1.35rem;
  font-weight: 500;
  margin-bottom: 1.1rem;
  color: var(--deep-blue);
}

.link-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.link-col li + li {
  margin-top: 0.85rem;
}

.link-col a {
  color: var(--mgb-blue);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* ---------- Contact ---------- */
.contact-section {
  background: var(--light-teal);
}

.contact-rule {
  border-top: 1px solid rgba(33, 50, 67, 0.18);
  padding-top: 1.5rem;
}

/* ---------- Quick links bar ---------- */
.quick-bar {
  background: var(--hero-blue);
  color: #fff;
}

.quick-bar a {
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 500;
  padding: 1.6rem 0.5rem;
}

.quick-bar a:hover {
  color: var(--mgb-green);
}

.quick-bar svg {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

/* ---------- Footer ---------- */
.site-footer {
  background: #f7f6f2;
  padding-top: 3.5rem;
}

.footer-cols h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--deep-blue);
}

.footer-cols a {
  display: block;
  color: var(--deep-blue);
  padding: 0.28rem 0;
  font-size: 0.95rem;
}

.footer-cols a:hover {
  color: var(--mgb-blue);
}

.social-links {
  display: flex;
  gap: 0.75rem;
}

.social-links a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #cfcfc8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--deep-blue);
}

.social-links a:hover {
  background: var(--hero-blue);
  color: #fff;
  border-color: var(--hero-blue);
}

.footer-tagline {
  font-family: var(--heading);
  font-size: 1.15rem;
  color: var(--deep-blue);
  max-width: 42rem;
}

.footer-legal {
  border-top: 1px solid #dddcd4;
  padding: 1.25rem 0 2rem;
  font-size: 0.85rem;
  color: #5a5a54;
}

.footer-legal a {
  color: var(--deep-blue);
}

/* ---------- Cookie ---------- */
.cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  width: min(920px, calc(100% - 24px));
  background: rgba(33, 50, 67, 0.92);
  color: #fff;
  border-radius: 10px;
  padding: 0.95rem 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  z-index: 1080;
  font-size: 0.9rem;
}

.cookie-banner a {
  color: #fff;
  text-decoration: underline;
}

.cookie-close {
  margin-left: auto;
  background: none;
  border: 0;
  color: #fff;
  font-size: 1.3rem;
  line-height: 1;
}

/* ---------- Search modal ---------- */
.search-modal .modal-content {
  border-radius: 16px;
  border: 0;
}

.search-modal .form-control {
  border: 0;
  border-bottom: 2px solid var(--deep-blue);
  border-radius: 0;
  font-size: 1.25rem;
  padding: 0.85rem 0;
  box-shadow: none;
}

/* ---------- Emergency toast (utility) ---------- */
.urgent-dot {
  width: 7px;
  height: 7px;
  background: #cd0016;
  border-radius: 50%;
  display: inline-block;
}

/* ---------- Planner notes [수정 필요] ---------- */
.planner-note {
  color: #cd0016;
  font-weight: inherit;
}

/* ---------- 404 + gamma secret ---------- */
.page-404,
.page-403 {
  --gamma-bg: #f7f7f4;
  /* 배경과 아주 가까운 잉크. 기본 감마에선 거의 안 보이고, 감마를 낮추면 드러납니다. */
  --gamma-ink: #ecece8;
  margin: 0;
  min-height: 100vh;
  background: var(--gamma-bg);
  color: var(--deep-blue);
  position: relative;
  overflow: hidden;
}

.gamma-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  user-select: none;
}

.gamma-secret {
  position: absolute;
  margin: 0;
  color: var(--gamma-ink);
  font-family: "Noto Serif KR", var(--heading);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.45;
  white-space: pre-wrap;
}

.gamma-secret--a {
  top: 12%;
  left: 8%;
  max-width: 18rem;
  font-size: clamp(1.1rem, 2.4vw, 1.55rem);
}

.gamma-secret--b {
  top: 42%;
  right: 6%;
  max-width: 22rem;
  text-align: right;
  font-size: clamp(1.05rem, 2.2vw, 1.45rem);
}

.gamma-secret--c {
  bottom: 14%;
  left: 50%;
  transform: translateX(-50%);
  width: min(36rem, calc(100% - 3rem));
  text-align: center;
  font-size: clamp(0.95rem, 2vw, 1.25rem);
}

.gamma-secret--d {
  bottom: 8%;
  left: 8%;
  max-width: 16rem;
  font-size: clamp(0.95rem, 2vw, 1.25rem);
}

.error-404,
.error-page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(2rem, 6vw, 4rem) 1.5rem;
}

.error-404__eyebrow,
.error-page__eyebrow {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.error-404__code,
.error-page__code {
  font-family: "Noto Serif KR", var(--heading);
  font-size: clamp(5.5rem, 18vw, 9.5rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--deep-blue);
  margin: 0 0 1.25rem;
}

.error-404__title,
.error-page__title {
  font-family: "Noto Serif KR", var(--heading);
  font-size: clamp(1.35rem, 2.8vw, 1.85rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  white-space: nowrap;
}

.error-404__copy,
.error-page__copy {
  max-width: 28rem;
  color: var(--muted);
  margin: 0 0 2rem;
  font-size: 1.02rem;
}

.error-404__home,
.error-page__home {
  text-decoration: none;
}

.error-404__home:hover,
.error-page__home:hover {
  color: var(--deep-blue);
}

/* ---------- 403 easter egg ---------- */
.forbid-warning {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 2500;
  margin: 0;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: -0.01em;
  pointer-events: none;
  user-select: none;
}

body.is-forbid-blackout .forbid-warning,
body.is-forbid-jumpscare .forbid-warning {
  visibility: hidden;
}

.forbid-egg {
  position: fixed;
  inset: 0;
  z-index: 3000;
  pointer-events: none;
  overflow: hidden;
}

.forbid-egg__word {
  position: absolute;
  color: #cd0016;
  font-family: "Noto Serif KR", var(--heading);
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  user-select: none;
  text-shadow: 0 0 10px rgba(205, 0, 22, 0.35);
  animation: forbid-word-in 0.25s ease-out;
}

.forbid-egg__blackout {
  position: absolute;
  inset: 0;
  background: #000;
  opacity: 0;
  animation: forbid-black-in 0.6s ease-out forwards;
}

.forbid-egg__jumpscare {
  position: absolute;
  inset: 0;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.forbid-egg__jumpscare img {
  width: auto;
  height: auto;
  max-width: 92vw;
  max-height: 88vh;
  object-fit: contain;
  display: block;
}

body.is-forbid-blackout .error-page {
  visibility: hidden;
}

@keyframes forbid-word-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes forbid-black-in {
  to {
    opacity: 1;
  }
}

@media (max-width: 575.98px) {
  .error-404__title,
  .error-page__title {
    white-space: normal;
    max-width: 16rem;
  }

  .gamma-secret--a {
    left: 5%;
    top: 8%;
  }

  .gamma-secret--b {
    right: 5%;
    top: 38%;
  }

  .gamma-secret--d {
    left: 5%;
    bottom: 6%;
  }
}

/* ---------- Session corruption (after visiting 404) ---------- */
html.is-corrupted {
  background: #0a1014;
}

body.is-corrupted {
  position: relative;
}

/* body 전체가 아니라 구역 단위로 필터 → driver 제외 가능 */
body.is-corrupted .site-header,
body.is-corrupted .jump-nav,
body.is-corrupted .hero,
body.is-corrupted .section:not(.staff-wrap),
body.is-corrupted .staff-wrap .text-center,
body.is-corrupted .staff-slider__btn,
body.is-corrupted .staff-card:not(.staff-card--exempt),
body.is-corrupted .quick-bar,
body.is-corrupted .site-footer,
body.is-corrupted .cookie-banner,
body.is-corrupted .search-modal {
  filter: saturate(0.55) contrast(1.12) brightness(0.92);
  animation: corruption-hum 4.5s ease-in-out infinite;
}

body.is-corrupted .site-header,
body.is-corrupted .hero,
body.is-corrupted .section,
body.is-corrupted .site-footer,
body.is-corrupted .quick-bar,
body.is-corrupted .jump-nav {
  position: relative;
}

body.is-corrupted .hero {
  filter: saturate(0.55) contrast(1.15) brightness(0.92) hue-rotate(-8deg);
}

body.is-corrupted .hero h1,
body.is-corrupted .serif-title,
body.is-corrupted .brand-text strong {
  text-shadow:
    1px 0 0 rgba(255, 40, 40, 0.45),
    -1px 0 0 rgba(40, 180, 255, 0.4);
}

body.is-corrupted img:not(.corrupt-exempt),
body.is-corrupted .hero-image,
body.is-corrupted .stat-photo {
  filter: grayscale(0.35) contrast(1.2) brightness(0.88);
}

body.is-corrupted.is-glitching .site-header,
body.is-corrupted.is-glitching .jump-nav,
body.is-corrupted.is-glitching .hero,
body.is-corrupted.is-glitching .section:not(.staff-wrap),
body.is-corrupted.is-glitching .staff-wrap .text-center,
body.is-corrupted.is-glitching .staff-slider__btn,
body.is-corrupted.is-glitching .staff-card:not(.staff-card--exempt),
body.is-corrupted.is-glitching .quick-bar,
body.is-corrupted.is-glitching .site-footer,
body.is-corrupted.is-glitching .cookie-banner {
  animation: corruption-burst 0.18s steps(2, end);
}

body.is-corrupted.is-glitching .hero h1,
body.is-corrupted.is-glitching .serif-title {
  transform: translateX(2px) skewX(-2deg);
  text-shadow:
    3px 0 0 rgba(255, 30, 30, 0.75),
    -3px 0 0 rgba(30, 200, 255, 0.7);
}

.corruption-fx {
  position: fixed;
  inset: 0;
  z-index: 2000;
  pointer-events: none;
  overflow: hidden;
}

.corruption-fx__noise {
  position: absolute;
  inset: -20%;
  opacity: 0.12;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  animation: corruption-noise 0.35s steps(3, end) infinite;
}

.corruption-fx__scan {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.08) 0,
    rgba(0, 0, 0, 0.08) 1px,
    transparent 1px,
    transparent 3px
  );
  opacity: 0.35;
  mix-blend-mode: multiply;
}

.corruption-fx__tear {
  position: absolute;
  left: 0;
  right: 0;
  height: 8%;
  top: 32%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.08) 40%,
    rgba(0, 0, 0, 0.15) 55%,
    transparent 100%
  );
  opacity: 0;
  transform: scaleY(1.4);
  mix-blend-mode: soft-light;
}

body.is-glitching .corruption-fx__tear {
  opacity: 1;
  animation: corruption-tear 0.2s steps(2, end);
}

.corruption-fx__vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    transparent 40%,
    rgba(8, 12, 16, 0.45) 100%
  );
}

@keyframes corruption-hum {
  0%,
  100% {
    filter: saturate(0.55) contrast(1.12) brightness(0.92);
  }
  40% {
    filter: saturate(0.4) contrast(1.18) brightness(0.88) hue-rotate(-4deg);
  }
  70% {
    filter: saturate(0.6) contrast(1.08) brightness(0.95) hue-rotate(3deg);
  }
}

@keyframes corruption-burst {
  0% {
    filter: saturate(0.2) contrast(1.4) brightness(1.05) hue-rotate(-20deg);
    transform: translate(1px, -1px);
  }
  50% {
    filter: saturate(0.8) contrast(1.3) brightness(0.75) hue-rotate(25deg);
    transform: translate(-2px, 1px);
  }
  100% {
    filter: saturate(0.55) contrast(1.12) brightness(0.92);
    transform: none;
  }
}

@keyframes corruption-noise {
  0% {
    transform: translate(0, 0);
  }
  25% {
    transform: translate(-2%, 3%);
  }
  50% {
    transform: translate(3%, -2%);
  }
  75% {
    transform: translate(-1%, -3%);
  }
  100% {
    transform: translate(2%, 1%);
  }
}

@keyframes corruption-tear {
  0% {
    top: 18%;
    transform: translateX(-3%) scaleY(1.2);
  }
  50% {
    top: 54%;
    transform: translateX(4%) scaleY(2);
  }
  100% {
    top: 72%;
    transform: translateX(-1%) scaleY(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.is-corrupted {
    animation: none;
  }

  body.is-corrupted.is-glitching {
    animation: none;
  }

  .corruption-fx__noise {
    animation: none;
    opacity: 0.08;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
  .hero-copy {
    min-height: auto;
    padding: 2.5rem 1.5rem 2.75rem;
  }

  .hero-image {
    min-height: 280px;
  }

  .jump-nav .nav {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .jump-nav .nav-link {
    white-space: nowrap;
    padding: 0.85rem 0.8rem;
  }

  .wayfinding-item {
    border-right: 0;
    border-bottom: 1px solid var(--medium-teal);
  }

  .wayfinding .row > :last-child .wayfinding-item {
    border-bottom: 0;
  }

  .staff-card {
    flex-basis: calc((100cqi - 1.25rem) / 2);
  }

  .main-nav .nav-link {
    padding: 0.65rem 0.4rem !important;
  }

  .quick-bar a {
    padding: 0.9rem 0;
  }
}

@media (max-width: 575.98px) {
  .global-inner {
    width: min(1440px, calc(100% - 28px));
  }

  .staff-card {
    flex-basis: min(78cqi, 280px);
  }

  .staff-slider {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .staff-slider__btn {
    display: none;
  }

  .cookie-banner {
    align-items: flex-start;
  }

  .hero h1 {
    font-size: 2rem;
  }
}
