
  .animate-on-scroll,
  .animate-on-load {
      opacity: 0;
      transform: translateY(20px);
      transition: all 0.8s ease-out;
  }

  .visible {
      opacity: 1;
      transform: translateY(0);
  }

  /* ===============================
     Variables de diseño
  ================================== */
  :root{
    --bg-page: rgb(219, 65, 19);               /* color de fondo global */
    --text-color: rgba(199, 12, 0);            /* color del texto principal */
    --muted: #000000;                 /* texto secundario */
    --accent: #a0971f;                /* acento */
    --line-color: rgba(199, 12, 0, 0.18);  /* color de la línea vertical */
    --year-color: rgba(199, 12, 0, 0.18);  /* años (traslúcidos) */
    --card-bg: rgba(255, 255, 255, 0.55);   /* fondo del bloque de texto */
    --card-border: rgba(255,255,255,0.06);
    --card-blur: 8px;                 /* intensidad de blur */
    --title-size: clamp(1.5rem, 3vw + 1rem, 3rem);
    --year-size: clamp(4rem, 16vw, 18rem);
    --line-width: 2px;                /* grosor base de la línea (antes de escala por profundidad) */
  }

  /* ===============================
     Reset mínimo y base
  ================================== */
  * { box-sizing: border-box; }
  html, body {
    height: 100%;
  }
  body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", "Apple Color Emoji", "Segoe UI Emoji";
    line-height: 1.45;
    color: var(--text-color);

  }

  /* ===============================
     Contenedor Parallax
  ================================== */
  .parallax {
    height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    perspective: 300px;
    -webkit-perspective: 300px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE y Edge antiguos */
  }

  .parallax::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Edge */
  }


  .parallax__group {
    position: relative;
    height: 100vh;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
  }

  .parallax__layer {
    position: absolute;
    inset: 0; /* top:0; right:0; bottom:0; left:0; */
    pointer-events: none; /* capas de fondo no capturan eventos */
  }

  /* Profundidades (velocidades) */
  .parallax__layer--fore {
    transform: translateZ(90px) scale(.7);
    -webkit-transform: translateZ(90px) scale(.7);
    z-index: 1;
  }

  .parallax__layer--base {
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    z-index: 4; /* encima de años y línea */
    pointer-events: auto; /* el texto sí puede seleccionarse */
  }

  .parallax__layer--back {
    transform: translateZ(-300px) scale(2);
    -webkit-transform: translateZ(-300px) scale(2);
    z-index: 2;
  }

  .parallax__layer--deep {
    transform: translateZ(-600px) scale(3);
    -webkit-transform: translateZ(-600px) scale(3);
    z-index: 3;
  }

  /* ===============================
     Línea vertical (fondo más profundo)
  ================================== */
  .timeline-line {
    position: absolute;
    top: 0; bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: var(--line-width);
    background:
      /* línea discontinua sutil; cambia a sólido si prefieres */
      repeating-linear-gradient(
        to bottom,
        var(--line-color),
        var(--line-color) 22px,
        transparent 22px,
        transparent 36px
      );
    opacity: 0.9;
  }

  /* ===============================
     Años (capa de fondo)
  ================================== */
  .year {
    position: absolute;
    top: 50%;
    left: calc(30% + 10px); /* a la derecha de la línea */
    transform: translateY(-50%);
    font-weight: 800;
    font-size: var(--year-size);
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--year-color);
    user-select: none;
    white-space: nowrap;
  }

  /* ===============================
     Texto (capa base)
  ================================== */
  .title {
    position: absolute;
    left: calc(50% + 28px); /* alineado con el año */
    top: 50%;
    transform: translateY(-50%);
    text-align: left;
    max-width: min(68ch, 70vw);
    padding: 1.25rem 1.25rem;
    border-radius: 14px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(var(--card-blur));
    -webkit-backdrop-filter: blur(var(--card-blur));
    box-shadow:
      0 10px 30px rgba(0,0,0,0.25),
      0 2px 0 rgba(255,255,255,0.04) inset;
    color: var(--text-color);
  }
  .title h2 {
    margin: 0 0 .2rem 0;
    font-size: var(--title-size);
    line-height: 1.2;
  }
  .title p {
    margin: .25rem 0 0 0;
    color: var(--muted);
    font-size: clamp(.95rem, .6vw + .7rem, 1.1rem);
  }

  /* ===============================
     Z-index por grupo (superposición)
  ================================== */
  #group1 { z-index: 5; } /* sobre 2 */
  #group2 { z-index: 3; } /* bajo 1 y 3 */
  #group3 { z-index: 1; } /* sobre 2 y 4 */
  #group4 { z-index: 2; } /* bajo 3 y 5 */
  #group5 { z-index: 3; } /* sobre 4 y 6 */
  #group6 { z-index: 2; } /* bajo 5 y 7 */
  #group7 { z-index: 3; } /* sobre 6 */

  /* ===============================
     Accesibilidad: reduce motion
  ================================== */
  @media (prefers-reduced-motion: reduce) {
    .parallax { perspective: none; }
    .parallax__layer--fore,
    .parallax__layer--base,
    .parallax__layer--back,
    .parallax__layer--deep {
      transform: none !important;
    }
  }

  /* ===============================
     Responsivo
  ================================== */
@media (max-width: 1024px) {
  .year {
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(3rem, 12vw, 8rem);
    text-align: center;
  }
  .img-background {
    display: none!important;
  }
  .title {
    left: 50%;
    top: calc(60%); /* un poco más abajo del año */
    transform: translate(-50%, -50%);
    max-width: 85vw;
    text-align: center;
  }

  .parallax__layer img {
    max-width: 80%;
    height: auto !important;
    margin: 0 auto;
    display: block;
  }
}

/* ====== MÓVIL (pantallas pequeñas) ====== */
@media (max-width: 720px) {
  h1 {
    font-size: 1.8rem;
    margin-top: 2rem !important;
  }

  .img-background {
    display: none!important;
  }

  .year {
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(2.5rem, 18vw, 6rem);
    text-align: center;
  }

  .title {
    position: relative;
    top: auto;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 2rem;
    width: 90%;
    text-align: center;
    padding: 1rem;
  }

  .title h2 {
    font-size: 1.4rem;
  }

  .title p {
    font-size: 1rem;
  }

  .parallax__layer img {
    max-width: 90%;
    height: auto !important;
    margin: 1rem auto;
    display: block;
  }

  .timeline-line {
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
  }
}
