/* Cyberpunk Civilizations: shared styles */
:root {
  --dark: #000;
  --light: #f7f1ee;
  --brand: #04dd03;
  --pad-x: 3rem;
  --max-w: 90rem;
}
* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100svh;
  background: var(--dark);
  color: var(--light);
  font-family: Orbitron, sans-serif;
  font-size: clamp(0.8125rem, 0.51vw + 0.315em, 1.1rem);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
  overflow-x: clip;
}
a {
  color: inherit;
}
img {
  display: block;
  max-width: 100%;
}

/* Matrix rain behind everything */
.matrix {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100vw;
  height: 100svh;
  pointer-events: none;
}

.page {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}
.page main {
  flex: 1;
}

.back {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 30;
  padding: 6px 12px;
  border: 1px solid var(--brand);
  background: rgba(0, 0, 0, 0.8);
  color: var(--brand);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.back:hover,
.back:focus-visible {
  background: var(--brand);
  color: #000;
}

/* ---------- Home: header ---------- */
.home {
  height: 100svh;
  overflow: clip;
}
.home main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2rem;
}
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #fff;
  background: linear-gradient(transparent, #000);
  text-align: center;
}
.eyebrow {
  font-size: 0.875rem;
}
.eyebrow a {
  text-decoration: none;
}
.eyebrow a:hover {
  color: var(--brand);
}
h1 {
  margin: 0;
  font-size: clamp(2.25rem, 5.6vw, 7rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
}

/* ---------- Home: slider ---------- */
.slider {
  position: relative;
}
.slider .swiper {
  overflow: visible;
}
.swiper-slide {
  filter: grayscale(1);
  transition: filter 0.4s;
}
.swiper-slide.is-active {
  filter: none;
}
.slide-link {
  position: relative;
  display: block;
  text-decoration: none;
}
.slide-img {
  position: relative;
  padding-top: 114%;
  overflow: hidden;
}
.slide-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.swiper-slide.is-active .slide-img img {
  transform: scale(1.2);
}
.slide-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 6%;
  background: linear-gradient(to top, #0009, #0000 57%);
  transition: font-size 0.2s;
}
.swiper-slide.is-active .slide-text {
  font-size: 2em;
}
.slide-title {
  font-size: 1.6em;
  line-height: 1;
  letter-spacing: -0.03em;
}
.nav-btn {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 5em;
  margin: auto 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--light);
  cursor: pointer;
  transition: color 0.2s;
}
.nav-btn:hover,
.nav-btn:focus-visible {
  color: var(--brand);
}
.nav-btn svg {
  width: 100%;
  height: auto;
}
.nav-btn.prev {
  left: 0;
  transform: translateX(-1.65rem);
}
.nav-btn.next {
  right: 0;
  transform: translateX(1.65rem);
}
.nav-btn.prev svg {
  transform: rotate(180deg);
}

/* ---------- Footer ---------- */
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  border-top: 0.5px solid #fff;
}
.copyright {
  font-size: 0.75rem;
}
.menu {
  display: flex;
  gap: 0.5rem;
}
.menu a {
  padding: 0.5rem;
  font-size: 1.25rem;
  text-decoration: none;
  text-transform: uppercase;
}
.menu a:hover {
  text-decoration: underline;
}
.menu a[aria-current="page"]:hover {
  color: var(--brand);
}

/* ---------- Detail and about pages ---------- */
.detail {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  padding: 5rem 0 3rem;
}
.top-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
}
.intro {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 90ch;
}
.kicker {
  font-size: 1rem;
  text-transform: uppercase;
}
.heading {
  margin: 0;
  font-size: clamp(2.25rem, 4.5vw, 4rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
}
.description {
  font-size: 1.1rem;
  line-height: 1.5;
}
.description p {
  margin: 0 0 1em;
}
.pager {
  display: flex;
  flex: none;
  gap: 1.5em;
}
.pager a {
  display: flex;
  width: 3.5em;
  color: var(--light);
  transition: color 0.2s;
}
.pager a:hover,
.pager a:focus-visible {
  color: var(--brand);
}
.pager a svg {
  width: 100%;
  height: auto;
}
.pager a.prev svg {
  transform: rotate(180deg);
}
.divider {
  height: 1px;
  background: #fff;
  margin-bottom: -2rem;
}
.characters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3rem;
}
.character {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 0;
}
.character img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}
.character figcaption {
  font-size: 2rem;
  line-height: 1;
  letter-spacing: -0.03em;
}
.about {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
  align-items: start;
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
  :root {
    --pad-x: 2rem;
  }
  .home {
    height: auto;
    overflow: visible;
  }
  .menu a {
    font-size: 1.05rem;
  }
  .description {
    font-size: 1rem;
  }
}
@media (max-width: 767px) {
  :root {
    --pad-x: 1rem;
  }
  .home main {
    padding-top: 4rem;
  }
  .hero {
    background: none;
  }
  .nav-btn {
    width: 3.5em;
  }
  .nav-btn.prev {
    transform: translateX(-0.5rem);
  }
  .nav-btn.next {
    transform: translateX(0.5rem);
  }
  .menu a {
    font-size: 1rem;
  }
  .characters,
  .about {
    grid-template-columns: 1fr;
  }
  .detail {
    padding-top: 4rem;
  }
}
@media (max-width: 479px) {
  .footer {
    flex-direction: column-reverse;
  }
  .copyright {
    font-size: 0.7rem;
    text-align: center;
  }
  .top-row {
    flex-direction: column-reverse;
    align-items: flex-start;
  }
  .character figcaption {
    font-size: 1.5rem;
  }
}
