@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Oswald:wght@500&display=swap');

* { box-sizing: border-box; }

html, body { height: 100%; overflow: hidden; overscroll-behavior: none; }

/* Recorta todo lo que se estaciona fuera de pantalla (miniaturas, cortina, barra).
   Sin esto, los navegadores móviles ensanchan la página y rompen el diseño. */
#stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

body {
  margin: 0;
  background-color: #1a1a1a;
  color: #FFFFFFDD;
  position: relative;
  overflow: hidden;
  font-family: "Inter", sans-serif;
}

/* ---------- Timer bar + cover ---------- */
.indicator {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 5px;
  z-index: 60;
  background-color: #5EE0CB;
}

.cover {
  position: absolute;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  z-index: 100;
  background-color: #fff;
  /* Seguro: si el script no arranca, la cortina blanca se oculta sola. */
  animation: coverFailsafe 1ms linear 9s forwards;
}
@keyframes coverFailsafe { to { visibility: hidden; } }

/* ---------- Navbar ---------- */
nav {
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 36px;
  font-weight: 500;
  background: transparent;
}
nav > div {
  display: inline-flex;
  align-items: center;
  text-transform: uppercase;
  font-size: 14px;
}
nav > div:first-child { gap: 10px; }
nav > div:last-child { gap: 24px; }
nav svg, nav .svg-container { width: 20px; height: 20px; }
nav > div:first-child .svg-container, nav > div:first-child svg { width: 26px; height: 26px; }
nav a { color: inherit; text-decoration: none; }
nav a:focus-visible, .discover:focus-visible, .bookmark:focus-visible { outline: 2px solid #5EE0CB; outline-offset: 4px; }
nav .active { position: relative; }
nav .active::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 99px;
  background-color: #5EE0CB;
}

/* ---------- Cards ---------- */
.card {
  position: absolute;
  left: 0;
  top: 0;
  background-position: center;
  background-size: cover;
  background-color: #0f1424;
  box-shadow: 6px 6px 10px 2px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}
.thumb {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  border-radius: inherit;
}
.card-content {
  position: absolute;
  left: 0;
  top: 0;
  color: #FFFFFFDD;
  padding-left: 16px;
}
.content-start {
  width: 30px;
  height: 5px;
  border-radius: 99px;
  background-color: #FFFFFFDD;
}
.content-place {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 500;
}
.content-title-1,
.content-title-2 {
  font-family: "Oswald", sans-serif;
  font-weight: 600;
  font-size: 20px;
}

/* ---------- Details panels ---------- */
.details {
  position: absolute;
  top: 240px;
  left: 60px;
  z-index: 22;
}
.place-box { height: 46px; overflow: hidden; }
.place-box .text {
  position: relative;
  padding-top: 16px;
  font-size: 20px;
}
.place-box .text::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 30px;
  height: 4px;
  border-radius: 99px;
  background-color: white;
}
.title-box-1,
.title-box-2 {
  margin-top: 2px;
  height: 100px;
  overflow: hidden;
}
.title-1,
.title-2 {
  font-family: "Oswald", sans-serif;
  font-weight: 600;
  font-size: 72px;
  line-height: 100px;
}
.desc {
  margin-top: 16px;
  width: 500px;
}
.cta {
  width: 500px;
  margin-top: 24px;
  display: flex;
  align-items: center;
}
.bookmark {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 99px;
  background-color: #5EE0CB;
  color: #0B1226;
  display: grid;
  place-items: center;
  padding: 0;
  text-decoration: none;
}
.bookmark svg { width: 20px; height: 20px; }
.discover {
  border: 1px solid #ffffff;
  background: transparent;
  height: 36px;
  border-radius: 99px;
  color: #ffffff;
  padding: 4px 24px;
  font-family: inherit;
  font-size: 12px;
  margin-left: 16px;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  white-space: nowrap;
}

/* ---------- Pagination HUD ---------- */
.pagination {
  position: absolute;
  left: 0px;
  top: 0px;
  display: inline-flex;
}
.arrow {
  width: 50px;
  height: 50px;
  border-radius: 999px;
  border: 2px solid #ffffff55;
  display: grid;
  place-items: center;
  z-index: 60;
}
.arrow svg { width: 24px; height: 24px; color: #ffffff99; }
.arrow-right { margin-left: 20px; }
.progress-sub-container {
  margin-left: 24px;
  width: var(--pw, 500px);
  height: 50px;
  display: flex;
  align-items: center;
  z-index: 60;
}
.progress-sub-background {
  width: var(--pw, 500px);
  height: 3px;
  background-color: #ffffff33;
}
.progress-sub-foreground {
  height: 3px;
  background-color: #5EE0CB;
}
.slide-numbers {
  width: 50px;
  height: 50px;
  overflow: hidden;
  position: relative;
  z-index: 60;
}
.slide-numbers .item {
  width: 50px;
  height: 50px;
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  color: white;
  font-size: 32px;
  font-weight: bold;
}

/* ---------- Móvil (<= 820px): el script usa los fondos verticales m-slide-N.svg ---------- */
@media (max-width: 820px) {
  nav { padding: 14px 20px; }
  nav > div:last-child { gap: 0; }
  nav > div:last-child a:not(.svg-container) { display: none; }
  nav > div:first-child { font-size: 16px; }

  /* La ilustración se dimensiona desde JS (--art-h / --art-y) para que quede
     siempre por encima del texto y nunca se monte con él. */
  .card {
    background-repeat: no-repeat;
    background-size: auto var(--art-h, 50%);
    background-position: center var(--art-y, 60px);
    background-color: #0f1424;
    box-shadow: 3px 3px 8px 1px rgba(0, 0, 0, 0.6);
  }
  .card-content { display: none; }

  .details {
    top: auto;
    bottom: var(--details-bottom, 220px);
    left: 20px;
    right: 20px;
  }
  .place-box .text { font-size: 16px; }
  .title-box-1, .title-box-2 { height: 52px; }
  .title-1, .title-2 { font-size: min(42px, 11.5vw); line-height: 52px; white-space: nowrap; }
  .desc { width: auto; max-width: 520px; margin-top: 12px; font-size: 14px; line-height: 20px; }
  .cta { width: auto; margin-top: 16px; }
  .discover { padding: 4px 16px; margin-left: 12px; }
  html.no-desc .desc { display: none; }

  .arrow { display: none; }
  .progress-sub-container { margin-left: 0; }
}
@media (max-width: 820px) and (max-height: 740px) {
  .title-box-1, .title-box-2 { height: 48px; }
  .title-1, .title-2 { font-size: min(38px, 10.5vw); line-height: 48px; }
}
