/*
 * Portada Depto51: réplica estática de la página de cierre (antes https://depto51.cl/password).
 * Basado en el tema Shopify "timeline.css" (t/26), sin reglas sin uso ni de apps de terceros.
 *
 * Fuentes (autoalojadas, SIL Open Font License 1.1, ver fuentes/OFL-*.txt):
 *   - "Nunito Sans" reemplaza a Harmonia Sans W01 (Monotype, licencia comercial).
 *   - "EB Garamond" 800 reemplaza a goudy-old-style 800 (Adobe Fonts, no autoalojable).
 * Los ascent/descent-override replican las métricas verticales de las fuentes originales
 * para conservar alturas de línea y posiciones.
 */

/* ---------- Fuentes ---------- */

/* Nunito Sans (variable, eje wght) declarada como 400 y 700, igual que Harmonia Sans W01.
   La negrita va al 99 % para igualar el ancho de Harmonia Sans Bold (mismos cortes de línea);
   sus overrides (97,3 % / 25,8 % de Harmonia Bold) van divididos por 0,99 porque size-adjust los escala. */
@font-face {
  font-family: "Nunito Sans";
  src: url(fuentes/nunito-sans-latin.woff2) format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  ascent-override: 95.9%;
  descent-override: 25.7%;
  line-gap-override: 0%;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Nunito Sans";
  src: url(fuentes/nunito-sans-latin-ext.woff2) format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  ascent-override: 95.9%;
  descent-override: 25.7%;
  line-gap-override: 0%;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Nunito Sans";
  src: url(fuentes/nunito-sans-latin.woff2) format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  size-adjust: 99%;
  ascent-override: 98.28%;
  descent-override: 26.06%;
  line-gap-override: 0%;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Nunito Sans";
  src: url(fuentes/nunito-sans-latin-ext.woff2) format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  size-adjust: 99%;
  ascent-override: 98.28%;
  descent-override: 26.06%;
  line-gap-override: 0%;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* EB Garamond ExtraBold: el original pedía 900 y el navegador usaba Goudy Old Style 800 */
@font-face {
  font-family: "EB Garamond";
  src: url(fuentes/eb-garamond-800-latin.woff2) format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
  ascent-override: 89.4%;
  descent-override: 25.6%;
  line-gap-override: 0%;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "EB Garamond";
  src: url(fuentes/eb-garamond-800-latin-ext.woff2) format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
  ascent-override: 89.4%;
  descent-override: 25.6%;
  line-gap-override: 0%;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Base ---------- */

body {
  margin: 0;
  padding: 0;
  font-family: "Nunito Sans", sans-serif;
  font-weight: 300;
  letter-spacing: 1px;
  zoom: 90%;
  background: #fff;
  color: #000;
}
h1 {
  text-align: center;
  margin-top: 50px;
  font-size: 60px;
  font-family: "EB Garamond", serif;
  font-weight: 900;
}

/* ---------- Navegación ---------- */

nav {
  display: grid;
  grid-template-columns: 1fr 2fr;
  place-items: center;
  margin-top: 40px;
  margin-bottom: 100px;
  padding: 0 10px;
}
nav img.logo {
  max-width: 230px;
  width: 100%;
}
nav ul.links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  column-gap: 60px;
  justify-content: flex-end;
}
nav ul li a {
  text-decoration: none;
  color: #000;
  transition: 0.3s linear all;
  display: flex;
  gap: 5px;
  justify-content: center;
  align-items: center;
  position: relative;
}
nav ul li a:after {
  content: "";
  display: block;
  width: calc(100% + 20px);
  height: 6px;
  position: absolute;
  left: -10px;
  bottom: 1px;
  background: #f4ccc6;
  opacity: 0.6;
  z-index: 1;
}
nav ul li a:hover:after {
  background: #c9fdc9;
}
nav ul li a svg {
  margin: 1px 0 0;
  position: relative;
  z-index: 2;
}
nav ul li a span {
  position: relative;
  z-index: 2;
}
nav ul li a:hover {
  opacity: 0.7;
}
nav .hamburger-menu {
  display: none;
  font-size: 30px;
  background: none;
  border: none;
  cursor: pointer;
}

/* ---------- Contenido ---------- */

main {
  padding: 20px;
  margin: 50px auto;
}
div.subtitle {
  max-width: 880px;
  margin: 0 auto;
  font-size: 21px;
  line-height: 1.5;
  text-align: center;
  font-weight: 400;
}

/* ---------- Línea de tiempo ---------- */

section.timeline {
  position: relative;
  max-width: 1100px;
  margin: 60px auto 160px;
}
section.timeline:before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 5px;
  height: 100%;
  background: #020024;
  background: linear-gradient(180deg, #020024, #f1ab96 0%, #cff6d7);
}
section.timeline:after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  left: 0;
  width: 20px;
  height: 20px;
  background: #e4e4e4;
  border-radius: 50%;
  box-shadow: 0 0 5px #e4e4e4;
  place-self: center;
  margin-left: 5px;
}
section.timeline article img {
  max-width: 480px;
  width: 100%;
  display: block;
  margin: 0;
  height: auto;
}
section.timeline article img.bg-green {
  box-shadow: 12px 15px #d3fbcd;
  border-radius: 15px;
}
section.timeline article img.bg-blue {
  box-shadow: 12px 15px #c3e4f1;
  border-radius: 15px;
}
section.timeline article img.bg-red {
  box-shadow: 12px 15px #f1ab96;
  border-radius: 15px;
}
section.timeline article.year-element {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 5px;
  place-items: center;
}
section.timeline article.year-element.first-element {
  padding-top: 30px;
}
section.timeline article.year-element .year:after {
  content: "";
  position: absolute;
  top: 50%;
  right: -11%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  background: #e4e4e4;
  border-radius: 50%;
  box-shadow: 0 0 5px #e4e4e4;
  margin-left: 3px;
}
section.timeline article .year-cirle {
  display: none;
}
section.timeline article.year-element .year {
  font-size: 72px;
  font-family: "EB Garamond", serif;
  font-weight: 900;
  margin: 0 70px 0 0;
  width: 100%;
  text-align: right;
  align-self: start;
  position: -webkit-sticky;
  position: sticky;
  top: 46%;
  z-index: 10;
  background-color: transparent;
}
section.timeline article.year-element .year-content {
  font-size: 20px;
  padding-left: 30px;
  margin-bottom: 60px;
}
section.timeline article.year-element .year-content:last-child {
  margin-bottom: 0;
}
section.timeline article.year-element .year-content ul {
  padding-left: 20px;
}
section.timeline article.year-element .year-content ul li {
  font-weight: 700;
  -webkit-text-stroke: 0.3px #fff;
  line-height: 1.4em;
}
section.timeline article.year-element:not(.first-element) {
  margin-top: 150px;
}
section.timeline video {
  max-width: 480px;
}
section.timeline article.last-element {
  position: absolute;
  bottom: -140px;
  left: 0;
  width: 100%;
  text-align: center;
  font-size: 72px;
  font-family: "EB Garamond", serif;
  font-weight: 900;
}
section.timeline article {
  transition: 0.3s linear all;
}

/* ---------- Cierre ---------- */

.bottom-buttons {
  width: 100%;
  max-width: 650px;
  text-align: center;
  margin: 0 auto 50px;
  font-size: 21px;
  line-height: 1.5em;
}
.bottom-buttons img.main {
  display: block;
  width: 480px;
  max-width: none;
  height: auto;
  margin: 20px auto 60px;
  box-shadow: 12px 15px #d3fbcd;
  border-radius: 15px;
}
.bottom-buttons h4 {
  font-size: 28px;
}

/* ---------- Pie con degradado ---------- */

.last-one {
  width: 100%;
  height: auto;
  background-image: linear-gradient(to right, #bbd11c, #dbf901, #e1c2e2, #e6a9ed);
  background-size: 600%;
  background-position: 0 0;
  animation-duration: 10s;
  animation-iteration-count: infinite;
  animation-name: gradients;
  padding: 120px 0 0;
}
@keyframes gradients {
  0% {
    background-position: 0 0;
  }
  25% {
    background-position: 50% 0;
  }
  50% {
    background-position: 90% 0;
  }
  60% {
    background-position: 60%;
  }
  75% {
    background-position: 40%;
  }
  to {
    background-position: 0 0;
  }
}
.last-one .inner {
  max-width: 950px;
  margin: 0 auto;
  text-align: center;
}
.last-one h3 {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.4em;
  margin-top: 0;
}
.last-one h3 a {
  color: #000;
}
.last-one .buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  margin-top: 50px;
}
.last-one .buttons a {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 60px;
  border-radius: 30px;
  background-color: #fff;
  border: 3px solid #000;
  transition: all 0.25s ease-out;
}
.last-one .buttons a:hover {
  background-color: #000;
  border: 3px solid #ba96c5;
}
.last-one .buttons a svg {
  width: 80px;
}
.last-one .buttons a.bag51 svg {
  position: relative;
  top: 2px;
}
.last-one .buttons a:hover svg > * {
  fill: #fff;
}
footer {
  display: grid;
  place-items: center;
  text-align: center;
  margin: 120px auto 0;
  font-size: 18px;
  padding: 0 0 40px;
}
footer a {
  color: #000;
  text-decoration: none;
  transition: color 0.3s ease;
}

/* ---------- Menú móvil (sin JavaScript: atributo popover) ---------- */

.solo-mobile {
  display: none;
}
.menu-mobile-close {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
}

@media (max-width: 830px) {
  .solo-mobile {
    display: block;
  }
  nav {
    grid-template-columns: 1fr;
    margin: 40px 0 20px;
    position: relative;
  }
  nav img.logo {
    max-width: 160px;
    position: relative;
  }
  nav .hamburger-menu {
    display: block;
    color: #000;
    position: absolute;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
  }
  nav ul.links {
    display: none;
  }
  #menu-mobile {
    display: block;
    opacity: 0;
    visibility: hidden;
    position: fixed;
    inset: 0 0 auto auto;
    margin: 0;
    border: 0;
    overflow: visible;
    color: #000;
    height: 100%;
    width: 70%;
    background-color: #fff;
    box-shadow: -2px 0 10px #0000004d;
    padding: 20px;
    z-index: 1000;
    transform: translate(100%);
    transition: all 0.25s ease-out;
    text-align: center;
  }
  #menu-mobile:popover-open {
    opacity: 1;
    visibility: visible;
    transform: translate(0);
  }
  #menu-mobile ul {
    display: block;
    list-style-type: none;
    padding: 0;
    margin: 0;
  }
  #menu-mobile ul li {
    margin: 20px 0;
  }
  #menu-mobile a {
    text-decoration: none;
    font-size: 18px;
    color: #000;
    display: inline-block;
  }
  .menu-mobile-close {
    text-align: right;
    font-size: 30px;
    cursor: pointer;
  }
  main {
    margin: 0 auto 50px;
  }
  h1 {
    font-size: 35px;
  }
  div.subtitle {
    font-size: 18px;
    padding: 0 30px;
  }
  section.timeline {
    display: block;
    padding-left: 15px;
  }
  section.timeline:before {
    left: 0;
  }
  section.timeline article.year-element {
    display: block;
    margin: 30px 0;
  }
  section.timeline article.year-element .year {
    text-align: left;
    font-size: 40px;
    position: unset;
  }
  section.timeline article img {
    max-width: 100%;
    display: block;
    margin: 20px 0;
  }
  section.timeline article.year-element.first-element {
    padding-top: 0;
  }
  section.timeline article.year-element .year-content {
    padding-left: 0;
    text-align: left;
    font-size: 16px;
  }
  section.timeline:after {
    left: -100%;
  }
  section.timeline article.year-element .year:after {
    display: none;
  }
  section.timeline article .year-cirle {
    display: block;
    position: sticky;
    top: 20%;
    transform: translate(-127%, 65%);
    width: 20px;
    height: 20px;
    background: #e4e4e4;
    border-radius: 50%;
    box-shadow: 0 0 5px #e4e4e4;
    margin-left: 3px;
  }
  section.timeline article.first-element .year-cirle {
    transform: translate(-127%, -5%);
  }
  section.timeline video {
    max-width: 360px;
  }
  section.timeline article.last-element {
    font-size: 56px;
  }
  .bottom-buttons {
    font-size: 18px;
  }
  .bottom-buttons p {
    padding: 0 30px;
  }
  .bottom-buttons img.main {
    max-width: 360px;
  }
  .last-one {
    padding: 80px 0 0;
  }
  .last-one .inner {
    padding: 0 30px;
  }
  .last-one h3 {
    font-size: 22px;
  }
  .last-one .buttons {
    grid-template-columns: 1fr;
    gap: 30px;
    width: 70%;
    margin: 20px auto 0;
  }
  footer {
    width: 98%;
    font-size: 16px;
    margin: 80px auto 0;
    line-height: 1.4em;
  }
}
