/* ===========================================================
   ESPECIAL REYMA — estilos
   Paleta inspirada en la identidad editorial/comercial de
   referencia: azul marino corporativo + azul cielo de acento
   sobre fondo blanco, tipografía sans en negritas.
   =========================================================== */

:root{
  --navy: #0f2f5e;
  --navy-deep: #081b38;
  --reyma-navy: #0e2034;
  --sky: #8fd0ea;
  --sky-deep: #2f8fc4;
  --sky-tint: #eaf6fb;
  --bg: #ffffff;
  --bg-alt: #f4f8fb;
  --border: #dde5ec;
  --text: #17212b;
  --text-dim: #5c6b7a;
  --nav-h: 76px;
  --serif: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --max: 1080px;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }

body{
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a{ color: inherit; text-decoration: none; }
img{ max-width: 100%; display: block; }

/* ================= NAV ================= */
.topnav{
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: var(--reyma-navy);
  border-bottom: 1px solid rgba(255,255,255,.12);
}

.topnav__side{
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand{
  display: flex;
  align-items: center;
  height: 52px;
}
.brand img{ height: 100%; width: auto; }

.hamburger{
  width: 40px;
  height: 40px;
  border: 1.5px solid rgba(255,255,255,.35);
  border-radius: 8px;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  flex-shrink: 0;
}
.hamburger:hover{ border-color: var(--sky); }
.hamburger span{
  width: 18px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform .25s ease, opacity .25s ease;
}
.hamburger[aria-expanded="true"] span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2){ opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }

/* ================= SIDE MENU ================= */
.side-menu{
  position: fixed;
  top: 0; left: 0;
  height: 100%;
  width: 340px;
  max-width: 88vw;
  background: var(--bg);
  border-right: 1px solid var(--border);
  box-shadow: 2px 0 24px rgba(15,47,94,.12);
  z-index: 600;
  transform: translateX(-100%);
  transition: transform .32s cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.side-menu.is-open{ transform: translateX(0); }

.side-menu__head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 3px solid var(--navy);
  position: sticky;
  top: 0;
  background: var(--navy);
}
.side-menu__title{
  font-family: var(--serif);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #fff;
}
.side-menu__close{
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: -8px;
  background: none;
  border: none;
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.side-menu__close:hover{ opacity: .75; }

.side-menu__list{
  list-style: none;
  margin: 0;
  padding: 8px 0 24px;
}
.side-menu__list li a{
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 13px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  color: var(--text-dim);
  transition: background .15s ease, color .15s ease;
}
.side-menu__list li a:hover,
.side-menu__list li a.is-active{
  background: var(--sky-tint);
  color: var(--navy);
}
.side-menu__num{
  font-family: var(--serif);
  font-weight: 800;
  font-size: 13px;
  color: var(--sky-deep);
  flex-shrink: 0;
  width: 22px;
}
.side-menu__label{
  font-weight: 600;
}
.side-menu__tag{
  margin-left: auto;
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-dim);
  opacity: .7;
}

.side-menu__num--icon{
  font-size: 15px;
}
.side-menu__list-item--congrats{
  border-top: 2px solid var(--border);
}
.side-menu__list-item--back a{
  color: var(--text-dim);
  font-style: italic;
}
.side-menu__list-item--back .side-menu__num--icon{
  color: var(--text-dim);
}

/* ================= BARRA DE PROGRESO ================= */
.progress-bar{
  position: fixed;
  top: var(--nav-h);
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--sky-deep), var(--sky));
  z-index: 480;
  transition: width .12s linear;
}

/* ================= INDICADOR DE NOTA ACTUAL (puntos) ================= */
.dots-nav{
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 11px;
  z-index: 400;
  padding: 14px 8px;
  border-radius: 20px;
  background: rgba(255,255,255,.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 20px rgba(8,27,56,.15);
}
@media (min-width: 1440px){
  .dots-nav{ display: flex; }
}
.dots-nav__dot{
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid var(--sky-deep);
  background: transparent;
  transition: transform .2s ease, background .2s ease;
}
.dots-nav__dot:hover{ transform: scale(1.35); }
.dots-nav__dot.is-active{
  background: var(--navy);
  border-color: var(--navy);
  transform: scale(1.35);
}

.overlay{
  position: fixed;
  inset: 0;
  background: rgba(8,27,56,.55);
  z-index: 550;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease;
}
.overlay.is-visible{ opacity: 1; visibility: visible; }

/* ================= COVER (portada) ================= */
.cover{
  position: relative;
  margin-top: var(--nav-h);
  height: min(78vh, 760px);
  min-height: 420px;
  overflow: hidden;
  background: var(--navy-deep);
}
.cover__img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}
.cover__gradient{
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8,27,56,.05) 0%, rgba(8,27,56,.35) 55%, rgba(8,27,56,.92) 100%);
}
.cover__content{
  position: absolute;
  left: 0; right: 0; bottom: 0;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px 46px;
  text-align: left;
}
.hero__kicker{
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--navy);
  background: var(--sky);
  border-radius: 999px;
  padding: 5px 16px;
  margin: 0 0 16px;
}
.hero__title{
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(30px, 5vw, 56px);
  color: #fff;
  margin: 0 0 16px;
  line-height: 1.08;
  letter-spacing: -.01em;
  max-width: 820px;
  text-shadow: 0 2px 18px rgba(0,0,0,.25);
}
.hero__subtitle{
  color: #f0f4f8;
  font-size: 18px;
  font-weight: 600;
  max-width: 640px;
  margin: 0;
  padding-left: 16px;
  border-left: 4px solid var(--sky);
}
.hero__subtitle::before{
  content: "» ";
  color: var(--sky);
  font-weight: 800;
}

.cover__credit{
  max-width: var(--max);
  margin: 0 auto;
  padding: 12px 24px;
  font-size: 13px;
  font-style: italic;
  color: var(--text-dim);
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}
.cover__credit span{
  font-style: normal;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--sky-deep);
  margin-left: 6px;
}

/* ================= CASCADE / NOTES ================= */
.cascade{ max-width: var(--max); margin: 0 auto; padding: 0 24px 60px; }

.note{
  position: relative;
  padding: 60px 0;
  border-top: 1px solid var(--border);
  scroll-margin-top: var(--nav-h);
}
.note:first-child{ border-top: none; }
.note:nth-child(even){ background: var(--bg-alt); }

/* Marcador de capítulo sobre la línea divisoria */
.note:not(:first-child)::after{
  content: attr(data-num);
  position: absolute;
  top: 0; left: 50%;
  transform: translate(-50%, -50%);
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-family: var(--serif);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: .02em;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(15,47,94,.35);
  z-index: 2;
}

/* Numeral decorativo de fondo, alterna de lado para romper la repetición visual */
.note__watermark{
  position: absolute;
  top: 4px;
  z-index: -1;
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(110px, 16vw, 200px);
  line-height: 1;
  color: var(--navy);
  opacity: .05;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}
.note__watermark--right{ right: 4px; }
.note__watermark--left{ left: 4px; }

.note__title{
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  color: var(--navy);
  margin: 0 auto 14px;
  max-width: 720px;
  text-align: center;
}
.note__deck{
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin: 0 auto 18px;
  max-width: 680px;
  padding-left: 18px;
  border-left: 4px solid var(--sky-deep);
}
.note__deck::before{
  content: "» ";
  color: var(--sky-deep);
  font-weight: 800;
}
.note__byline{
  display: block;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--navy);
  margin: 0 0 30px;
  padding: 12px 0;
  border-top: 1px solid var(--sky);
  border-bottom: 1px solid var(--sky);
}
.note__body{
  max-width: 680px;
  margin: 0 auto 32px;
}
.note__body p{
  margin: 0 0 16px;
  color: var(--text);
  font-size: 16px;
}

.note.is-placeholder .note__body p{
  color: var(--text-dim);
  font-style: italic;
}

.note__subheading{
  font-family: var(--serif);
  font-weight: 800;
  font-size: 22px;
  color: var(--navy);
  text-align: center;
  margin: 36px auto 18px;
  max-width: 680px;
  padding-top: 20px;
  border-top: 2px solid var(--sky);
}

.pullquote{
  max-width: 680px;
  margin: 28px auto;
  padding: 22px 26px;
  background: var(--sky-tint);
  border-left: 4px solid var(--navy);
  border-radius: 0 10px 10px 0;
  display: flex;
  align-items: center;
  gap: 18px;
}
.pullquote__photo{
  width: 76px;
  height: 76px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid var(--navy);
}
.pullquote__photo img{ width: 100%; height: 100%; object-fit: cover; }
.pullquote .pullquote__text{
  margin: 0;
  font-family: var(--serif);
  font-weight: 700;
  font-style: italic;
  font-size: 19px;
  line-height: 1.4;
  color: var(--navy);
}

.stat-card{
  max-width: 680px;
  margin: 28px auto;
  padding: 24px 28px;
  background: var(--navy);
  border-radius: 12px;
  text-align: center;
}
.stat-card__value{
  display: block;
  font-family: var(--serif);
  font-weight: 900;
  font-size: 52px;
  color: var(--sky);
  line-height: 1;
  margin-bottom: 8px;
}
.stat-card .stat-card__text{
  margin: 0;
  color: #fff;
  font-size: 15px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.callout-list{
  max-width: 680px;
  margin: 28px auto;
  padding: 22px 26px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-left: 4px solid var(--sky-deep);
  border-radius: 0 10px 10px 0;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "photo heading" "list list";
  column-gap: 14px;
}
.callout-list__photo{
  grid-area: photo;
  align-self: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--navy);
}
.callout-list__photo img{ width: 100%; height: 100%; object-fit: cover; }
.callout-list__heading{
  grid-area: heading;
  align-self: center;
  margin: 0;
  font-family: var(--serif);
  font-weight: 800;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--navy);
}
.callout-list ol{
  grid-area: list;
  margin: 14px 0 0;
  padding-left: 20px;
}
.callout-list li{
  color: var(--text);
  font-size: 15px;
  margin-bottom: 8px;
}
.callout-list li::marker{
  color: var(--sky-deep);
  font-weight: 700;
}

.info-card{
  max-width: 680px;
  margin: 28px auto;
  padding: 20px 26px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-left: 4px solid var(--navy);
  border-radius: 0 10px 10px 0;
}
.info-card__text{
  margin: 0;
  font-size: 15px;
  color: var(--text);
  font-style: italic;
}

/* Gallery grid */
.gallery{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.gallery__item{
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  cursor: zoom-in;
  background: var(--sky-tint);
  border: 1px solid var(--border);
  aspect-ratio: 4 / 3;
}
.gallery__item img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.gallery__item:hover img{ transform: scale(1.06); }
.gallery__item:hover{ border-color: var(--sky-deep); }

/* first image bigger — hero of the gallery */
.gallery__item--hero{
  grid-column: span 2;
  grid-row: span 2;
}

/* Cuando la galería tiene una sola foto, se muestra a todo lo ancho */
.gallery__item--full{
  grid-column: 1 / -1;
  aspect-ratio: 16 / 9;
}

.gallery__empty{
  color: var(--text-dim);
  font-size: 14px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 26px;
  text-align: center;
  background: var(--bg-alt);
}

/* ================= SUBARTICLE (recuadro complementario) ================= */
.subarticle{
  margin-top: 50px;
  padding-top: 40px;
  border-top: 3px double var(--sky);
}
.subarticle__title{
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(24px, 3vw, 32px);
  color: var(--navy);
  margin: 0 auto 14px;
  max-width: 720px;
  line-height: 1.15;
  text-align: center;
}

.quotes__title{
  font-family: var(--serif);
  font-weight: 800;
  font-size: 20px;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin: 10px auto 20px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--navy);
  display: table;
}

.quotes-grid{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}
.quote-card{
  margin: 0;
  padding: 18px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: zoom-in;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.quote-card__photo{
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--sky-deep);
  margin-bottom: 14px;
  flex-shrink: 0;
}
.quote-card__photo img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.quote-card__quote{
  margin: 0 0 14px;
  font-size: 14.5px;
  font-style: italic;
  color: var(--text);
  line-height: 1.55;
}
.quote-card__meta{
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.quote-card__name{
  font-weight: 700;
  font-size: 13.5px;
  color: var(--navy);
}
.quote-card__role{
  font-size: 12px;
  color: var(--text-dim);
}
.quote-card--no-photo{
  cursor: default;
  justify-content: center;
}

/* ================= FELICITACIONES (masonry) ================= */
.congrats{
  background: var(--navy-deep);
  padding: 70px 0 80px;
  scroll-margin-top: var(--nav-h);
}
.congrats__inner{
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
}
.congrats__title{
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(30px, 4.5vw, 46px);
  color: #fff;
  margin: 0 0 12px;
}
.congrats__subtitle{
  color: #b9c6d6;
  font-size: 16px;
  max-width: 560px;
  margin: 0 auto 40px;
}

.masonry{
  column-count: 4;
  column-gap: 14px;
  text-align: left;
}
.masonry__item{
  break-inside: avoid;
  margin-bottom: 14px;
  border-radius: 8px;
  overflow: hidden;
  cursor: zoom-in;
  background: #fff;
  border: 1px solid rgba(255,255,255,.08);
  transition: transform .25s ease, box-shadow .25s ease;
}
.masonry__item:hover{
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0,0,0,.35);
}
.masonry__item img{
  width: 100%;
  display: block;
}

/* ================= FOOTER ================= */
.site-footer{
  text-align: center;
  padding: 40px 24px 60px;
  color: var(--text-dim);
  font-size: 13px;
  border-top: 3px solid var(--navy);
}
.site-footer__logo{
  height: 32px;
  width: auto;
  margin: 0 auto 14px;
}

.site-footer__legal{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 22px;
  max-width: var(--max);
  margin: 24px auto 0;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 12px;
}
.site-footer__copy{
  color: var(--text-dim);
}
.site-footer__links{
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}
.site-footer__links a{
  color: var(--text-dim);
}
.site-footer__links a:hover{
  color: var(--navy);
  text-decoration: underline;
}

/* ================= LIGHTBOX ================= */
.lightbox{
  position: fixed;
  inset: 0;
  background: rgba(8,27,56,.96);
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease;
}
.lightbox.is-open{ opacity: 1; visibility: visible; }

.lightbox__img{
  max-width: min(92vw, 1200px);
  max-height: 86vh;
  object-fit: contain;
  border-radius: 4px;
}
.lightbox__close{
  position: absolute;
  top: 12px; right: 12px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: #fff;
  font-size: 34px;
  cursor: pointer;
  line-height: 1;
}
.lightbox__nav{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.25);
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 26px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox__nav:hover{ background: var(--sky-deep); border-color: var(--sky-deep); }
.lightbox__nav--prev{ left: 18px; }
.lightbox__nav--next{ right: 18px; }
.lightbox__counter{
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  color: var(--sky);
  letter-spacing: .05em;
  max-width: 80vw;
  text-align: center;
}

/* ================= REVEAL ON SCROLL (animación en cascada) ================= */
@media (prefers-reduced-motion: no-preference){
  .note__title,
  .note__deck,
  .note__byline,
  .note__body,
  .gallery,
  .gallery__empty,
  .subarticle{
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .6s ease, transform .6s ease;
  }
  .note.is-visible .note__title,
  .note.is-visible .note__deck,
  .note.is-visible .note__byline,
  .note.is-visible .note__body,
  .note.is-visible .gallery,
  .note.is-visible .gallery__empty,
  .note.is-visible .subarticle{
    opacity: 1;
    transform: translateY(0);
  }

  .gallery__item{
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .5s ease, transform .5s ease, border-color .2s ease;
  }
  .note.is-visible .gallery__item{
    opacity: 1;
    transform: translateY(0);
  }

  .quote-card{
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .5s ease, transform .5s ease;
  }
  .note.is-visible .quote-card{
    opacity: 1;
    transform: translateY(0);
  }

  .congrats__title,
  .congrats__subtitle,
  .masonry{
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .6s ease, transform .6s ease;
  }
  .congrats.is-visible .congrats__title,
  .congrats.is-visible .congrats__subtitle,
  .congrats.is-visible .masonry{
    opacity: 1;
    transform: translateY(0);
  }
}

/* ================= RESPONSIVE ================= */
@media (max-width: 1100px){
  .masonry{ column-count: 3; }
}

@media (max-width: 900px){
  .gallery{ grid-template-columns: repeat(3, 1fr); }
  .masonry{ column-count: 2; }
}

@media (max-width: 640px){
  :root{ --nav-h: 64px; }
  .topnav{ padding: 0 14px; }
  .brand{ height: 40px; }
  .cover{ height: 62vh; min-height: 340px; }
  .cover__content{ padding: 0 18px 30px; }
  .hero__subtitle{ font-size: 15px; }
  .cascade{ padding: 0 18px 40px; }
  .note{ padding: 40px 0; }
  .note__watermark{ font-size: 76px; top: 2px; }
  .gallery{ grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .gallery__item--hero{ grid-column: span 2; grid-row: span 1; aspect-ratio: 16/9; }
  .quotes-grid{ grid-template-columns: 1fr; }
  .pullquote{ flex-direction: column; text-align: center; }
  .stat-card__value{ font-size: 42px; }
  .congrats{ padding: 50px 0 60px; }
  .masonry{ column-count: 1; }
  .lightbox__nav{ width: 44px; height: 44px; font-size: 22px; }
  .lightbox__close{ font-size: 28px; }
}
