  :root {
    --bg-page: #f2f2f7; --navy: #1d3957; --navy-text: #1c3857; --navy-60: rgba(29,57,87,.6);
    --grey: #d9d9d9; --ice: #e7eef4; --sky: #70b0f2; --sand: #ede7db; --sand-muted: #b8afa0; --white: #fff;
    --font-display: "Bricolage Grotesque", sans-serif; --font-body: "Inter", sans-serif;
    --font-script: "Ballet", cursive; --font-mono: "Space Mono", monospace;
    --fs-body: clamp(0.8125rem, 0.72rem + 0.35vw, 1rem);
    --fs-small: clamp(0.75rem, 0.7rem + 0.2vw, 0.8125rem);
    --pad-y: clamp(3rem, 5vw, 5rem);
  }
  *, *::before, *::after { box-sizing: border-box; }
  html, body { margin: 0; padding: 0; }
  body { background: var(--bg-page); font-family: var(--font-body); font-size: var(--fs-body); color: var(--navy); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
  p, h1, h2, h3 { margin: 0; font-weight: inherit; }
  img { display: block; }
  a { color: inherit; }
  .display { font-family: var(--font-display); font-weight: 600; font-variation-settings: "opsz" 14, "wdth" 100; text-transform: uppercase; }
  .script { font-family: var(--font-script); font-weight: 400; text-transform: none; font-variation-settings: normal; }

  /* ---------- StackSpread (port vanilla del componente Hyperiux Vault) ----------
     Sección de scrollLength vh; escenario sticky de 100vh. Las tarjetas parten
     apiladas en el centro y se dispersan hacia sus targets con el scroll. */
  .stack { position: relative; width: 100%; height: 350vh; background: var(--bg-page); }
  .stack__stage { position: sticky; top: 0; height: 100svh; width: 100%; overflow: hidden; }
  .stack__copy {
    position: absolute; inset: 0; z-index: 5; pointer-events: none;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 0 1.5rem; text-align: center; color: var(--navy); opacity: 0;
    will-change: opacity, transform;
  }
  .stack__title { width: 100%; font-size: 4.5vw; line-height: 1; letter-spacing: -0.02em; }
  .stack__title .dim { opacity: .6; }
  .stack__title .script { font-size: 5.5vw; letter-spacing: 0; }
  .stack__sub { margin-top: 1.2vw; max-width: 42ch; font-size: 1.15vw; line-height: 1.6; letter-spacing: -0.01em; color: var(--navy); opacity: .6; }
  .stack__cards { position: absolute; inset: 0; z-index: 10; }
  .card { position: absolute; left: 50%; top: 50%; will-change: transform; }
  .card__face { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: 8px; }
  .card__face img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; }
  .stack__hint {
    position: absolute; left: 0; right: 0; bottom: 3vh; z-index: 20; pointer-events: none;
    display: flex; flex-direction: column; align-items: center; gap: .6vh;
    font-family: var(--font-mono); font-size: .8vw; letter-spacing: .2em; text-transform: uppercase; color: var(--navy);
  }
  .stack__hint svg { animation: bounce 1s infinite; }
  @keyframes bounce { 0%, 100% { transform: translateY(-25%); animation-timing-function: cubic-bezier(.8,0,1,1); } 50% { transform: none; animation-timing-function: cubic-bezier(0,0,.2,1); } }
  @media (max-width: 768px) {
    .stack__copy { padding: 0 2rem; }
    .stack__title { font-size: 10vw; }
    .stack__title .script { font-size: 12vw; }
    .stack__sub { margin-top: .75rem; font-size: 3.6vw; }
    .card__face { border-radius: 4vw !important; }
    .stack__hint { bottom: 1.5rem; gap: .25rem; font-size: 2.8vw; }
    .stack__hint svg { width: 4vw; height: 4vw; }
  }

  /* ---------- ImageGallery (port vanilla del componente) ----------
     Masonry de 3 columnas (2 en tablet, 1 en móvil); cada imagen entra con
     fade de 1 s cuando está en viewport y ya ha cargado. */
  .gallery-wrap { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; min-height: 100vh; padding: var(--pad-y) clamp(1.25rem, 5.3vw, 5rem); }
  .gallery { display: grid; width: 100%; gap: clamp(0.5rem, 1.6vw, 1.5rem); grid-template-columns: 1fr; }
  .gallery__col { gap: clamp(0.5rem, 1.6vw, 1.5rem) !important; }
  .gallery__col { display: grid; gap: 1.5rem; align-content: start; }
  .aspect { position: relative; width: 100%; border-radius: .5rem; border: 1px solid var(--navy-20, rgba(28,56,87,.2)); background: rgba(28,56,87,.06); overflow: hidden; }
  .aspect img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: .5rem; opacity: 0; transition: opacity 1s ease-in-out; }
  .aspect img.is-visible { opacity: 1; }
  .aspect { display: block; text-decoration: none; color: var(--white); }
  .aspect__caption {
    position: absolute; inset: auto 0 0 0; z-index: 1;
    display: flex; flex-direction: column; gap: .5rem;
    padding: 3rem 1.125rem 1.125rem;
    background: linear-gradient(to top, rgba(29,57,87,.75), rgba(29,57,87,0));
    opacity: 0; transform: translateY(8px); transition: opacity .6s ease .4s, transform .6s ease .4s;
  }
  .aspect img.is-visible + .aspect__caption { opacity: 1; transform: none; }
  .aspect__tag { font-family: var(--font-mono); font-size: .625rem; letter-spacing: .15em; text-transform: uppercase; opacity: .8; }
  .aspect__name { font-size: clamp(1.125rem, 1.4vw, 1.5rem); line-height: 1.01; }
  @media (min-width: 640px)  { .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  @media (min-width: 1024px) { .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

  /* ---------- Footer (igual que index.html) ---------- */
  .footer { width: 100%; background: var(--navy); padding: var(--pad-y) clamp(1.25rem, 5.3vw, 5rem) 2.5rem; display: flex; flex-direction: column; gap: 1.875rem; }
  .footer__divider { border-top: 1px solid rgba(184,175,160,.3); }
  .footer__info { display: flex; align-items: flex-start; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
  .footer__brand { max-width: 25.3125rem; display: flex; flex-direction: column; gap: 1rem; }
  .footer__name { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; color: var(--sand); }
  .footer__desc { font-weight: 300; font-size: var(--fs-small); line-height: 1.6; color: var(--sand-muted); }
  .footer__cols { display: flex; gap: 3rem; white-space: nowrap; }
  .footer__col { display: flex; flex-direction: column; gap: .75rem; }
  .footer__col-title { font-size: .6875rem; text-transform: uppercase; color: var(--sky); }
  .footer__col p:not(.footer__col-title) { font-size: var(--fs-small); color: var(--sand-muted); }
  .footer__legal { padding-top: 1.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-family: var(--font-mono); font-size: .625rem; color: var(--sand-muted); }
  @media (max-width: 640px) { .footer__cols { flex-direction: column; gap: 1.5rem; } .d { display: none !important; } }

  #menu { --sm-logo-color: #1d3957; }
  html.lenis, html.lenis body { height: auto; }
  .lenis.lenis-smooth { scroll-behavior: auto !important; }
