:root {
  --ink: #111111;
  --paper: #fff7df;
  --red: #e9392f;
  --yellow: #ffd84a;
  --mint: #78e0bb;
  --blue: #3577ff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Noto Sans SC", system-ui, sans-serif;
  letter-spacing: 0;
}

body.modal-open {
  overflow: hidden;
}

.pixel-font {
  font-family: "Press Start 2P", "Noto Sans SC", monospace;
}

.pixel-border {
  border: 3px solid var(--ink);
  box-shadow: 7px 7px 0 var(--ink);
}

.pixel-card {
  border: 3px solid var(--ink);
  background: #fffdf4;
  box-shadow: 6px 6px 0 var(--ink);
  transition: transform .18s ease, box-shadow .18s ease;
}

.pixel-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 9px 9px 0 var(--ink);
}

.pixel-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  border: 3px solid var(--ink);
  background: var(--yellow);
  color: var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
  font-weight: 900;
  text-decoration: none;
  overflow: hidden;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}

.pixel-btn::after {
  content: "";
  position: absolute;
  inset: -60% auto -60% -45%;
  width: 42%;
  transform: rotate(18deg);
  background: rgba(255, 255, 255, .65);
  animation: shine 2.6s infinite;
}

.pixel-btn:hover {
  background: #fff06b;
}

.pixel-btn:active {
  transform: translate(5px, 5px);
  box-shadow: 1px 1px 0 var(--ink);
}

.pixel-btn.secondary {
  background: var(--mint);
}

.pixel-btn.dark {
  background: var(--ink);
  color: #fffdf4;
}

.nav-link {
  border-bottom: 3px solid transparent;
}

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

.hero-bg {
  background-image:
    linear-gradient(rgba(17, 17, 17, .48), rgba(17, 17, 17, .62)),
    url("../images/youyanzhihua-hero-01.webp");
  background-position: center;
  background-size: cover;
}

.section-band-red {
  background: var(--red);
  color: #fffdf4;
}

.section-band-black {
  background: var(--ink);
  color: #fffdf4;
}

.section-band-blue {
  background: var(--blue);
  color: #fffdf4;
}

.section-band-yellow {
  background: var(--yellow);
}

.gallery-img {
  aspect-ratio: 4 / 3;
  width: 100%;
  object-fit: cover;
  border: 3px solid var(--ink);
  filter: saturate(1.05) contrast(1.05);
  transition: transform .18s ease, filter .18s ease;
}

.gallery-button:hover .gallery-img {
  transform: scale(1.035);
  filter: saturate(1.2) contrast(1.12);
}

.accordion-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height .24s ease;
}

.accordion-item.is-open .accordion-panel {
  max-height: 420px;
}

.modal,
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, .78);
}

.modal.is-open,
.lightbox.is-open {
  display: flex;
}

.modal-body,
.lightbox-body {
  max-height: min(86vh, 900px);
  overflow: auto;
}

.tab-btn[aria-selected="true"] {
  background: var(--ink);
  color: #fffdf4;
}

.review-card {
  opacity: 0;
  transform: translateY(18px);
}

.review-card.in-view {
  animation: riseIn .55s ease forwards;
}

@keyframes shine {
  0% { left: -55%; }
  45%, 100% { left: 130%; }
}

@keyframes riseIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .pixel-border,
  .pixel-card {
    box-shadow: 4px 4px 0 var(--ink);
  }

  .pixel-card:hover {
    transform: none;
    box-shadow: 4px 4px 0 var(--ink);
  }
}
