* {
  box-sizing: border-box;
}

body.libiac {
  margin: 0;
  background: #0b1220;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.libiac-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 4vw;
  background: transparent;
  transition: background 0.3s ease, backdrop-filter 0.3s ease;
}

.libiac-nav.is-scrolled {
  background: rgba(17, 41, 69, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.libiac-nav__logo {
  display: block;
  line-height: 0;
}

.libiac-nav__logo img {
  display: block;
  height: 68px;
  width: auto;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.4));
  transition: height 0.3s ease;
}

.libiac-nav.is-scrolled .libiac-nav__logo img {
  height: 46px;
}

.libiac-nav__links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.libiac-nav__links a {
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  text-transform: uppercase;
}

.libiac-nav__links a:hover {
  opacity: 0.8;
}

.libiac-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100vh;
  min-height: 620px;
  max-height: 950px;
  padding: 4.5rem 4vw 2rem;
  background-image:
    url("../img/games/the-book-of-libiac/site/hero/L2 (Montañas).png"),
    url("../img/games/the-book-of-libiac/site/hero/L1 (FONDO_parallax).png");
  background-repeat: no-repeat, repeat-x;
  background-position: center bottom, 0 center;
  background-size: cover, 220vw 100%;
  animation: libiac-sky-drift 70s linear infinite;
}

@keyframes libiac-sky-drift {
  from {
    background-position: center bottom, 0 center;
  }
  to {
    background-position: center bottom, -220vw center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .libiac-hero {
    animation: none;
  }
}

.libiac-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 45%, #0a1226 100%);
  pointer-events: none;
  z-index: 1;
}

.libiac-hero__art {
  display: block;
  width: min(100%, 900px, 68vh);
  max-width: 900px;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.45));
}

.libiac-hero__title-sr {
  position: relative;
  z-index: 2;
  margin: clamp(-4.5rem, -11vw, -2.5rem) 0 0;
  width: min(50%, 420px);
  line-height: 0;
  pointer-events: none;
}

.libiac-hero__title-sr img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.5));
}

@media (min-width: 761px) {
  .libiac-hero__art {
    width: min(100%, 950px, calc(min(100vh, 950px) - 140px));
  }

  .libiac-hero__title-sr {
    margin-top: clamp(-13rem, -11vw, -8rem);
  }
}

.libiac-intro {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 55% 40% at 88% 46%, rgba(63, 168, 208, 0.1), transparent 62%),
    radial-gradient(ellipse 50% 38% at 8% 92%, rgba(90, 168, 120, 0.08), transparent 65%),
    #0a1226;
  padding: 9vh 4vw;
  display: flex;
  align-items: center;
}

.libiac-intro__mountains {
  position: absolute;
  inset: auto 0 0 0;
  height: 50%;
  background: #000000;
  -webkit-mask-image: url("../img/games/the-book-of-libiac/captures/web/mountains.webp");
  mask-image: url("../img/games/the-book-of-libiac/captures/web/mountains.webp");
  -webkit-mask-repeat: repeat-x;
  mask-repeat: repeat-x;
  -webkit-mask-size: auto 100%;
  mask-size: auto 100%;
  -webkit-mask-position: bottom left;
  mask-position: bottom left;
  pointer-events: none;
  z-index: 0;
}

.libiac-intro__row {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.libiac-intro__media {
  position: relative;
}

.libiac-intro__video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  border-radius: 8px;
  border: 4px solid #05070f;
  outline: 1px solid rgba(255, 255, 255, 0.18);
  outline-offset: -5px;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.55);
}

.libiac-intro__copy {
  color: rgba(255, 255, 255, 0.88);
}

.libiac-intro__kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.65em;
  margin: 0 0 1rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: #8ecbff;
}

.libiac-intro__kicker::before {
  content: "";
  width: 26px;
  height: 2px;
  background: linear-gradient(90deg, #8ecbff, #2f80ed);
}

.libiac-intro__copy h2 {
  margin: 0 0 1.25rem;
  font-size: clamp(1.9rem, 5vw, 2.4rem);
  font-weight: 800;
  line-height: 1.18;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  color: #dcefff;
  -webkit-text-stroke: 0.045em #05070f;
  paint-order: stroke fill;
  text-shadow: 0.07em 0.07em 0 rgba(5, 7, 15, 0.75);
}

.libiac-intro__copy p {
  margin: 0 0 1rem;
  line-height: 1.7;
}

.libiac-intro__copy p:last-child {
  margin-bottom: 0;
}

@media (min-width: 761px) {
  .libiac-intro__row {
    flex-direction: row;
    align-items: center;
    gap: 5rem;
  }

  .libiac-intro__media {
    flex: 1 1 56%;
  }

  .libiac-intro__copy {
    flex: 1 1 44%;
    max-width: 46ch;
  }

  .libiac-intro__copy h2 {
    font-size: clamp(2rem, 3vw, 2.9rem);
  }
}

.libiac-characters {
  position: relative;
  overflow: hidden;
  background: #070c1a;
  padding: 5rem 0 6rem;
}

.libiac-characters::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url("../img/games/the-book-of-libiac/site/characters/pattern-bg.png");
  background-repeat: repeat-x;
  background-position: center;
  background-size: auto 100%;
  opacity: 0.2;
  pointer-events: none;
}

.libiac-characters__head {
  position: relative;
  z-index: 2;
  max-width: 1360px;
  margin: 0 auto 2.5rem;
  padding: 0 4vw;
}

.libiac-characters__head h2 {
  margin: 0;
  font-size: clamp(2.4rem, 7vw, 4.2rem);
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1;
  letter-spacing: -0.01em;
  color: #dcefff;
  -webkit-text-stroke: 0.045em #05070f;
  paint-order: stroke fill;
  text-shadow: 0.05em 0.05em 0 rgba(5, 7, 15, 0.75);
}

.libiac-characters__stage {
  position: relative;
  z-index: 2;
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 4vw;
}

.libiac-characters__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(142, 203, 255, 0.4);
  background: rgba(10, 18, 38, 0.65);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.libiac-characters__arrow::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  border-top: 2px solid #8ecbff;
  border-right: 2px solid #8ecbff;
}

.libiac-characters__arrow--prev {
  left: 0;
}

.libiac-characters__arrow--prev::before {
  transform: translate(-30%, -50%) rotate(-135deg);
}

.libiac-characters__arrow--next {
  right: 0;
}

.libiac-characters__arrow--next::before {
  transform: translate(-70%, -50%) rotate(45deg);
}

.libiac-characters__arrow:hover {
  background: rgba(142, 203, 255, 0.16);
  border-color: #8ecbff;
}

.libiac-characters__list {
  position: relative;
  width: 100%;
}

.libiac-character {
  display: none;
  position: relative;
}

.libiac-character.is-active {
  display: block;
}

.libiac-character__info {
  position: relative;
  z-index: 2;
  width: 100%;
}

.libiac-character__info > * {
  max-width: 420px;
}

.libiac-character__role {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #8ecbff;
}

.libiac-character__name {
  margin: 0;
  font-size: clamp(3rem, 11vw, 5.5rem);
  font-weight: 800;
  line-height: 0.95;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  color: #dcefff;
  -webkit-text-stroke: 0.03em #05070f;
  paint-order: stroke fill;
  text-shadow: 0.04em 0.04em 0 rgba(5, 7, 15, 0.75);
}

.libiac-character__divider {
  position: relative;
  width: 100%;
  max-width: 300px;
  height: 1px;
  margin: 1.5rem 0;
  background: rgba(142, 203, 255, 0.35);
}

.libiac-character__divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  background: #8ecbff;
  transform: translate(-50%, -50%) rotate(45deg);
}

.libiac-character__bio {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.7;
}

.libiac-character__portrait {
  position: relative;
  width: 100%;
  max-width: 360px;
  margin: 2.5rem auto 0;
}

.libiac-character__blob {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 0;
  width: 150%;
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 35% 30%, #4a63d6, #161c3f 72%);
  -webkit-mask-image: url("../img/games/the-book-of-libiac/site/characters/mancha.png");
  mask-image: url("../img/games/the-book-of-libiac/site/characters/mancha.png");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-position: center;
  mask-position: center;
  opacity: 0.65;
  pointer-events: none;
}

.libiac-character__art {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
}

@media (min-width: 761px) {
  .libiac-characters__stage {
    min-height: clamp(380px, 40vw, 560px);
    display: flex;
    align-items: center;
  }

  .libiac-characters__list {
    min-height: inherit;
  }

  .libiac-character {
    min-height: inherit;
    align-items: center;
  }

  .libiac-character.is-active {
    display: flex;
  }

  .libiac-character__info > * {
    max-width: 460px;
  }

  .libiac-character__portrait {
    position: absolute;
    z-index: 1;
    right: 0;
    bottom: 0;
    margin: 0;
    height: 100%;
    width: auto;
    max-width: 56%;
  }

  .libiac-character__blob {
    width: 135%;
  }

  .libiac-character__art {
    height: 100%;
    width: auto;
    object-fit: contain;
    object-position: bottom right;
    -webkit-mask-image: linear-gradient(to left, black 68%, transparent 100%);
    mask-image: linear-gradient(to left, black 68%, transparent 100%);
  }
}

.libiac-support {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(
      to bottom,
      #070c1a 0%,
      rgba(7, 12, 26, 0.55) 16%,
      rgba(6, 10, 21, 0.72) 55%,
      #05070f 100%
    ),
    url("../img/games/the-book-of-libiac/site/support/valley-bg.png") center/cover no-repeat;
  padding: 6rem 4vw 5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.libiac-support__copy {
  max-width: 620px;
}

.libiac-support__kicker {
  margin: 0 0 1rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: #8ecbff;
}

.libiac-support__copy h2 {
  margin: 0 0 1.25rem;
  font-size: clamp(2.1rem, 5vw, 3rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  color: #dcefff;
  -webkit-text-stroke: 0.045em #05070f;
  paint-order: stroke fill;
  text-shadow: 0.05em 0.05em 0 rgba(5, 7, 15, 0.75);
}

.libiac-support__copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.7;
}

.libiac-support__cast {
  display: block;
  width: min(100%, 720px);
  height: auto;
  margin: 3rem 0 2.5rem;
  filter: drop-shadow(0 24px 32px rgba(0, 0, 0, 0.55));
}

.libiac-support__btn {
  display: inline-flex;
  align-items: center;
  padding: 0.9em 2.2em;
  background: #ff424d;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 999px;
  box-shadow: 0 14px 28px rgba(255, 66, 77, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.libiac-support__btn:hover {
  background: #e8323d;
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(255, 66, 77, 0.45);
}

.libiac-footer {
  background: #05070f;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.75rem 4vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 2.5rem;
  flex-wrap: wrap;
}

.libiac-footer__legal {
  display: flex;
  align-items: center;
}

.libiac-footer__legal a {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-decoration: none;
  transition: color 0.2s ease;
}

.libiac-footer__legal a:hover {
  color: #ffffff;
}

.libiac-footer__legal a + a {
  position: relative;
  margin-left: 1.5rem;
}

.libiac-footer__legal a + a::before {
  content: "";
  position: absolute;
  left: -0.85rem;
  top: 50%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.3);
}

.libiac-footer__studio {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.libiac-footer__studio:hover {
  color: #ffffff;
}

.libiac-footer__studio img {
  display: block;
  width: 28px;
  height: 28px;
}

@media (max-width: 640px) {
  .libiac-footer {
    flex-direction: column;
    text-align: center;
  }
}
