/* ==========================================================================
   Landing page — light editorial system for Ma Ko Pan Memorial College
   Used only by index.html.
   ========================================================================== */

:root {
  color-scheme: light;
  --page-bg: #f8f6f6;
  --primary: #161616;
  --secondary: rgb(22 22 22 / 0.7);
  --border: #e0dcdb;
  --surface: #efedec;
  --white: #ffffff;
  --lime: #d3e509;
  --cyan: #35cbfd;
  --orange: #f85c0e;
  --orange-ink: #a63d06;
  --lavender: #b9abff;
  --keyline: #d3caff;
  --font-sans: "Geist", "PingFang HK", "Microsoft JhengHei", "Noto Sans CJK TC",
    "Noto Sans TC", "Heiti TC", system-ui, -apple-system, sans-serif;
  --font-pixel: "Silkscreen", "Geist Mono", ui-monospace, monospace;
  --max-width: 1114px;
  --nav-height: 80px;
  --ease-editorial: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-ui: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--page-bg);
  color: var(--primary);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

h1,
h2,
h3,
p {
  margin: 0;
}

::selection {
  background: var(--lime);
  color: var(--primary);
}

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

.mkp-skip {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 2000;
  padding: 12px 18px;
  border-radius: 4px;
  background: var(--primary);
  color: var(--white);
  font-size: 14px;
  transform: translateY(-200%);
  transition: transform 150ms var(--ease-ui);
}

.mkp-skip:focus {
  transform: translateY(0);
}

.mkp-container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 24px;
}

.mkp-eyebrow {
  color: var(--secondary);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.12em;
  line-height: 1.35;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.mkp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 24px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 650;
  line-height: 1.35;
  text-align: center;
  transition:
    background-color 150ms var(--ease-ui),
    border-color 150ms var(--ease-ui),
    color 150ms var(--ease-ui),
    transform 150ms var(--ease-ui);
}

.mkp-btn:active {
  transform: translateY(1px);
}

.mkp-btn--primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

.mkp-btn--primary:hover {
  background: #2c2c2c;
  border-color: #2c2c2c;
}

.mkp-btn--light {
  background: var(--white);
  border-color: var(--white);
  color: var(--primary);
}

.mkp-btn--light:hover {
  background: var(--surface);
  border-color: var(--surface);
}

.mkp-btn--outline {
  background: transparent;
  border-color: var(--primary);
  color: var(--primary);
}

.mkp-btn--outline:hover {
  background: rgb(22 22 22 / 0.06);
}

.mkp-btn--nav {
  min-height: 44px;
  padding: 10px 18px;
  font-size: 14px;
}

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */

.mkp-nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  height: var(--nav-height);
  background: var(--page-bg);
  border-bottom: 1px solid var(--border);
}

.mkp-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  max-width: 1920px;
  height: 100%;
  margin-inline: auto;
  padding-inline: 24px;
}

.mkp-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}

.mkp-brand__mark {
  width: 28px;
  height: 28px;
  flex: none;
  color: var(--primary);
}

.mkp-brand__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.1;
}

.mkp-brand__school {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.mkp-brand__unit {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--secondary);
}

.mkp-nav__links {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;
}

.mkp-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--secondary);
  font-size: 14px;
  font-weight: 550;
  transition: color 150ms var(--ease-ui);
}

.mkp-nav__link:hover,
.mkp-nav__link[aria-current="page"] {
  color: var(--primary);
}

.mkp-nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 7px;
  height: 1px;
  background: var(--primary);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.mkp-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 90vh;
  min-height: 640px;
  max-height: 1000px;
  margin-top: calc(var(--nav-height) * -1);
  padding: calc(var(--nav-height) + 32px) 24px 64px;
  overflow: hidden;
  background: #315b84;
  color: var(--white);
}

.mkp-hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
}

.mkp-hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgb(8 18 30 / 0.44), rgb(8 18 30 / 0.16) 42%, rgb(8 18 30 / 0.58)),
    radial-gradient(80% 60% at 50% 40%, transparent, rgb(8 18 30 / 0.2));
}



.mkp-hero__line {
  position: absolute;
  top: var(--nav-height);
  bottom: 0;
  z-index: 1;
  width: 1px;
  background: rgb(255 255 255 / 0.16);
  pointer-events: none;
}

.mkp-hero__line--left {
  left: calc(50% - 557px);
}

.mkp-hero__line--right {
  left: calc(50% + 557px);
}

.mkp-hero__block {
  position: absolute;
  z-index: 1;
  pointer-events: none;
}

.mkp-hero__block--lime {
  top: 0;
  right: calc(50% + 557px);
  width: 11.32%;
  height: 22.47%;
  background: var(--lime);
}

.mkp-hero__block--orange {
  bottom: 9%;
  right: calc(50% + 557px);
  width: 5.49%;
  aspect-ratio: 1;
  background: var(--orange);
}

.mkp-hero__block--cyan {
  bottom: 16%;
  left: calc(50% + 557px);
  width: 11.32%;
  height: 7.53%;
  background: var(--cyan);
}

.mkp-hero__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: var(--max-width);
  text-align: center;
}

.mkp-hero__eyebrow {
  color: rgb(255 255 255 / 0.82);
  animation: mkp-rise 650ms 280ms var(--ease-editorial) both;
}

.mkp-hero__word {
  position: relative;
  width: min(100%, 1040px);
  aspect-ratio: 1200 / 240;
  margin-top: 24px;
}

.mkp-hero__word-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-family: var(--font-pixel);
  font-size: clamp(56px, 12vw, 170px);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: -0.015em;
  white-space: nowrap;
  transition: opacity 120ms linear;
}

.mkp-hero__scan {
  position: absolute;
  inset: 0;
  display: none;
  width: 100%;
  height: 100%;
}

.mkp-hero__word.is-scanning .mkp-hero__word-text {
  opacity: 0;
}

.mkp-hero__word.is-scanning .mkp-hero__scan {
  display: block;
}

.mkp-hero__headline {
  max-width: 24ch;
  margin-top: 28px;
  font-size: clamp(24px, 3.2vw, 44px);
  font-weight: 550;
  line-height: 1.15;
  letter-spacing: -0.01em;
  animation: mkp-rise 750ms 390ms var(--ease-editorial) both;
}

.mkp-hero__sub {
  max-width: 620px;
  margin-top: 16px;
  color: rgb(255 255 255 / 0.84);
  font-size: clamp(15px, 1.4vw, 19px);
  font-weight: 450;
  line-height: 1.45;
  animation: mkp-rise 750ms 450ms var(--ease-editorial) both;
}

.mkp-hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
  animation: mkp-rise 750ms 510ms var(--ease-editorial) both;
}

/* --------------------------------------------------------------------------
   Latest events
   -------------------------------------------------------------------------- */

.mkp-events {
  position: relative;
  background: var(--page-bg);
  border-top: 1px solid var(--keyline);
}

.mkp-events__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 64px 64px 40px;
}

.mkp-events__title {
  margin-top: 10px;
  font-size: clamp(34px, 4vw, 48px);
  font-weight: 550;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.mkp-events__intro {
  max-width: 52ch;
  margin-top: 12px;
  color: var(--secondary);
  font-size: 18px;
  font-weight: 450;
  line-height: 1.45;
}

.mkp-events__all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--primary);
  font-size: 15px;
  font-weight: 650;
}

.mkp-events__all::after {
  content: "→";
  transition: transform 200ms var(--ease-editorial);
}

.mkp-events__all:hover::after {
  transform: translateX(4px);
}

.mkp-cards {
  border-top: 1px solid var(--keyline);
}

.mkp-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 313px;
  border-top: 1px solid var(--keyline);
  transform: translateY(16px);
  transition: transform 700ms var(--ease-editorial);
}

.mkp-card:first-child {
  border-top: 0;
}

.mkp-card.is-visible {
  transform: translateY(0);
  transition-delay: calc(var(--i, 0) * 90ms);
}

.mkp-card__link {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 0;
}

.mkp-card:focus-within {
  outline: 2px solid var(--cyan);
  outline-offset: -2px;
}

.mkp-card__media {
  position: relative;
  min-height: 313px;
  overflow: hidden;
  background: var(--surface);
}

.mkp-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.01);
  transition:
    opacity 800ms var(--ease-editorial),
    transform 700ms var(--ease-editorial);
}

.mkp-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.mkp-card:hover .mkp-slide.is-active {
  transform: scale(1.035);
}

.mkp-card__tag {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 3;
  padding: 16px;
  background: var(--tag-color, var(--orange));
  color: var(--primary);
  font-size: 32px;
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: 0.04em;
}

.mkp-slideshow__dots {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 4;
  display: flex;
  gap: 2px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgb(22 22 22 / 0.28);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.mkp-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.mkp-dot::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.55);
  transition:
    background-color 200ms var(--ease-ui),
    transform 200ms var(--ease-ui);
}

.mkp-dot[aria-current="true"]::before {
  background: var(--white);
  transform: scale(1.45);
}

.mkp-dot:hover::before {
  background: var(--white);
}

.mkp-card__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 40px;
  padding: 40px 64px;
  transition: background-color 300ms var(--ease-ui);
}

.mkp-card:hover .mkp-card__body {
  background: rgb(22 22 22 / 0.07);
}

.mkp-card__copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mkp-card__meta {
  color: var(--secondary);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mkp-card__title {
  font-size: 20px;
  font-weight: 650;
  line-height: 1.35;
}

.mkp-card__text {
  color: var(--secondary);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.45;
}

.mkp-card__excerpt {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 4px;
  color: var(--secondary);
  font-size: 15px;
  font-weight: 450;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.mkp-card__cta {
  position: relative;
  z-index: 2;
  align-self: flex-start;
}

.mkp-loading,
.mkp-empty {
  padding: 64px;
  color: var(--secondary);
  font-size: 16px;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.mkp-footer {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  min-height: 760px;
  padding: 64px 24px 40px;
  overflow: hidden;
  background: #315b84;
  color: var(--white);
}

.mkp-footer__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 62%;
}

.mkp-footer__overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgb(8 18 30 / 0.15), rgb(8 18 30 / 0.72)),
    rgb(8 18 30 / 0.2);
}

.mkp-footer__content {
  display: flex;
  flex-direction: column;
  gap: 56px;
  width: 100%;
}

.mkp-footer__eyebrow {
  color: rgb(255 255 255 / 0.86);
}

.mkp-footer__title {
  max-width: 14ch;
  margin-top: 10px;
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 550;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.mkp-footer__text {
  max-width: 58ch;
  margin-top: 14px;
  color: rgb(255 255 255 / 0.84);
  font-size: clamp(16px, 1.6vw, 20px);
  font-weight: 450;
  line-height: 1.5;
}

.mkp-footer__cta {
  margin-top: 24px;
}

.mkp-footer__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  color: rgb(255 255 255 / 0.86);
  font-size: 16px;
  font-weight: 500;
}

.mkp-footer__meta a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.mkp-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
  padding-top: 24px;
  border-top: 1px solid rgb(255 255 255 / 0.24);
  color: rgb(255 255 255 / 0.72);
  font-size: 13px;
}

.mkp-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.mkp-footer__links a,
.mkp-footer__credit a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.mkp-footer__links a:hover,
.mkp-footer__credit a:hover {
  color: var(--white);
}

/* --------------------------------------------------------------------------
   Motion
   -------------------------------------------------------------------------- */

@keyframes mkp-rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes mkp-rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .mkp-card {
    transform: none;
  }

  .mkp-hero__bg,
  .mkp-hero__overlay {
    clip-path: none;
  }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1023px) {
  .mkp-nav__links {
    display: none;
  }
}

@media (max-width: 767px) {
  :root {
    --nav-height: 64px;
  }

  .mkp-nav__inner {
    padding-inline: 16px;
  }

  .mkp-brand__mark {
    width: 24px;
    height: 24px;
  }

  .mkp-brand__school {
    font-size: 13px;
  }

  .mkp-brand__unit {
    font-size: 9px;
  }

  .mkp-btn--nav {
    padding: 9px 14px;
    font-size: 13px;
  }

  .mkp-hero {
    height: 82vh;
    min-height: 540px;
    padding: calc(var(--nav-height) + 20px) 20px 48px;
  }

  .mkp-hero__line,
  .mkp-hero__block {
    display: none;
  }

  .mkp-hero__word {
    margin-top: 20px;
  }

  .mkp-hero__headline {
    margin-top: 20px;
    font-size: 28px;
  }

  .mkp-hero__sub {
    font-size: 15px;
  }

  .mkp-events__head {
    padding: 40px 20px 16px;
  }

  .mkp-events__title {
    font-size: 31.6px;
  }

  .mkp-events__intro {
    font-size: 15.6px;
  }

  .mkp-card {
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 0 20px 40px;
  }

  .mkp-card__media {
    width: 100%;
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .mkp-card__body {
    gap: 16px;
    padding: 24px 0 0;
  }

  .mkp-card__title {
    font-size: 19.5px;
  }

  .mkp-card__text {
    font-size: 15.6px;
  }

  .mkp-card__tag {
    right: 8px;
    bottom: 8px;
    padding: 8px;
    font-size: 18px;
    letter-spacing: 0.04em;
  }

  .mkp-slideshow__dots {
    left: 6px;
    bottom: 6px;
  }

  .mkp-dot {
    width: 44px;
    height: 44px;
  }

  .mkp-footer {
    min-height: 0;
    padding: 48px 20px 32px;
  }

  .mkp-footer__content {
    gap: 40px;
  }

  .mkp-footer__title {
    font-size: 40px;
  }
}

.noscript-note {
  padding-block: 24px;
  border-top: 1px solid var(--border);
  color: var(--secondary);
  font-size: 14px;
}

.noscript-note a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Official school logo, dynamic island and mobile menu
   -------------------------------------------------------------------------- */

.mkp-brand__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex: none;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--white);
}

.mkp-brand__logo img {
  width: 32px;
  height: auto;
  object-fit: contain;
}

.mkp-nav__inner {
  transition:
    max-width var(--duration-slow, 500ms) var(--ease-editorial),
    height var(--duration-slow, 500ms) var(--ease-editorial),
    padding var(--duration-slow, 500ms) var(--ease-editorial),
    margin var(--duration-slow, 500ms) var(--ease-editorial),
    border-radius var(--duration-slow, 500ms) var(--ease-editorial),
    background-color 320ms var(--ease-ui),
    border-color 320ms var(--ease-ui),
    box-shadow 320ms var(--ease-ui);
}

.mkp-nav {
  transition:
    background-color 320ms var(--ease-ui),
    border-color 320ms var(--ease-ui);
}

.mkp-nav.is-island {
  background: transparent;
  border-bottom-color: transparent;
  pointer-events: none;
}

.mkp-nav.is-island .mkp-nav__inner {
  pointer-events: auto;
  max-width: 760px;
  height: 58px;
  margin-top: 10px;
  padding: 0 10px;
  border: 1px solid rgb(255 255 255 / 0.14);
  border-radius: 999px;
  background: rgb(22 22 22 / 0.92);
  box-shadow: 0 18px 50px rgb(0 0 0 / 0.28);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  color: var(--white);
}

.mkp-nav.is-island .mkp-brand__logo {
  border-color: rgb(255 255 255 / 0.18);
  background: var(--white);
}

.mkp-nav.is-island .mkp-brand__school {
  color: var(--white);
}

.mkp-nav.is-island .mkp-brand__unit {
  color: rgb(255 255 255 / 0.58);
}

.mkp-nav.is-island .mkp-nav__link {
  color: rgb(255 255 255 / 0.68);
}

.mkp-nav.is-island .mkp-nav__link:hover,
.mkp-nav.is-island .mkp-nav__link[aria-current="page"] {
  color: var(--white);
}

.mkp-nav.is-island .mkp-nav__link[aria-current="page"]::after {
  background: var(--lime);
}

.mkp-nav.is-island .mkp-btn--primary {
  border-color: var(--white);
  background: var(--white);
  color: var(--primary);
}

.mkp-nav.is-island .mkp-btn--primary:hover {
  border-color: var(--lime);
  background: var(--lime);
}

.mkp-menu-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 44px;
  height: 44px;
  flex: none;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--primary);
  transition:
    border-color 150ms var(--ease-ui),
    background-color 150ms var(--ease-ui);
}

.mkp-nav.is-island .mkp-menu-toggle {
  border-color: rgb(255 255 255 / 0.28);
  color: var(--white);
}

.mkp-menu-toggle__line {
  display: block;
  width: 18px;
  height: 1.5px;
  background: currentColor;
  transition:
    transform 220ms var(--ease-editorial),
    opacity 180ms var(--ease-ui);
}

.mkp-menu-toggle[aria-expanded="true"] .mkp-menu-toggle__line:nth-child(1) {
  transform: translateY(5.5px) rotate(45deg);
}

.mkp-menu-toggle[aria-expanded="true"] .mkp-menu-toggle__line:nth-child(2) {
  opacity: 0;
}

.mkp-menu-toggle[aria-expanded="true"] .mkp-menu-toggle__line:nth-child(3) {
  transform: translateY(-5.5px) rotate(-45deg);
}

.mkp-mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: calc(var(--nav-height) + 28px) 24px 32px;
  background: var(--page-bg);
  transform: translateY(-100%);
  visibility: hidden;
  transition:
    transform 520ms var(--ease-editorial),
    visibility 520ms var(--ease-editorial);
  overflow-y: auto;
}

.mkp-mobile-menu.is-open {
  transform: translateY(0);
  visibility: visible;
}

.mkp-mobile-menu__nav {
  display: flex;
  flex-direction: column;
}

.mkp-mobile-menu__link {
  display: flex;
  align-items: center;
  min-height: 68px;
  border-bottom: 1px solid var(--border);
  color: var(--primary);
  font-size: 28px;
  font-weight: 550;
  letter-spacing: -0.01em;
}

.mkp-mobile-menu__link[aria-current="page"] {
  color: var(--orange-ink);
}

.mkp-mobile-menu .mkp-btn {
  width: 100%;
}

.mkp-footer__crest {
  width: 40px;
  height: 39px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--white);
  object-fit: contain;
}

@media (max-width: 1023px) {
  .mkp-menu-toggle {
    display: inline-flex;
  }

  .mkp-nav.is-island .mkp-nav__inner {
    max-width: calc(100vw - 24px);
    height: 54px;
    margin-top: 8px;
  }
}

@media (max-width: 767px) {
  .mkp-brand__logo {
    width: 32px;
    height: 32px;
  }

  .mkp-brand__logo img {
    width: 27px;
  }

  .mkp-nav.is-island .mkp-nav__inner {
    height: 52px;
    padding: 0 8px;
  }
}

/* --------------------------------------------------------------------------
   Pixel cursor and pixel-hover buttons
   -------------------------------------------------------------------------- */

.pixel-cursor,
.pixel-cursor a,
.pixel-cursor button,
.pixel-cursor input,
.pixel-cursor select,
.pixel-cursor textarea {
  cursor: none;
}

.mkp-cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 3000;
  width: 10px;
  height: 10px;
  pointer-events: none;
  background: var(--lime);
  box-shadow:
    0 0 8px var(--lime),
    0 0 20px rgb(211 229 9 / 0.55),
    0 0 42px rgb(53 203 253 / 0.28);
  transform: translate3d(-50px, -50px, 0);
  opacity: 0;
  will-change: transform;
}

.mkp-cursor.is-visible {
  opacity: 1;
}

.mkp-cursor::before {
  content: "";
  position: absolute;
  inset: -7px;
  border: 1px solid rgb(255 255 255 / 0.55);
  box-shadow: 0 0 0 1px rgb(22 22 22 / 0.25);
}

.mkp-cursor::after {
  content: "";
  position: absolute;
  width: 3px;
  height: 3px;
  right: -4px;
  bottom: -4px;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
}

.mkp-cursor-trail {
  position: fixed;
  inset: 0;
  z-index: 2999;
  overflow: hidden;
  pointer-events: none;
}

.mkp-cursor-trail span {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--lime);
  box-shadow: 0 0 6px currentColor;
  animation: pixel-fade 460ms steps(5) forwards;
}

@keyframes pixel-fade {
  from {
    opacity: 0.9;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.35);
  }
}

.mkp-btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.mkp-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    linear-gradient(90deg, var(--lime) 50%, transparent 50%),
    linear-gradient(0deg, var(--cyan) 50%, transparent 50%),
    linear-gradient(135deg, var(--orange) 50%, transparent 50%);
  background-size: 12px 12px;
  opacity: 0;
  -webkit-mask-image: linear-gradient(90deg, #000, transparent 32%, transparent 68%, #000);
  mask-image: linear-gradient(90deg, #000, transparent 32%, transparent 68%, #000);
}

.mkp-btn:hover::before,
.mkp-btn:focus-visible::before {
  animation: pixel-hover 480ms steps(7) both;
}

@keyframes pixel-hover {
  0% {
    opacity: 0;
    background-size: 24px 24px;
  }
  35% {
    opacity: 0.42;
  }
  100% {
    opacity: 0.2;
    background-size: 8px 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mkp-cursor,
  .mkp-cursor-trail {
    display: none;
  }

  .pixel-cursor,
  .pixel-cursor a,
  .pixel-cursor button {
    cursor: auto;
  }

  .mkp-btn::before {
    display: none;
  }
}

/* Direct file:// warning: modules and fetch are blocked by browsers. */
.file-warning {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 4000;
  max-width: min(460px, calc(100vw - 32px));
  padding: 16px 18px;
  border: 1px solid #f85c0e;
  border-radius: 4px;
  background: #fff;
  color: #161616;
  box-shadow: 0 16px 40px rgb(0 0 0 / 0.18);
  font-size: 14px;
  line-height: 1.5;
}

.file-warning strong {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
}

.file-warning p {
  margin: 0;
  color: rgb(22 22 22 / 0.72);
}

.file-warning code {
  padding: 1px 4px;
  background: #f8f6f6;
  border: 1px solid #e0dcdb;
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 12px;
}
