/* ============================================================
   hero-scroll.css — v5 (namespace dam-)
   Detroit Altar — Hero Canvas Image-Sequence (mobile-only)

   IMPORTANTE: este CSS solo se aplica en mobile (< 768px) via
   media query. Toda clase usa prefijo "dam-" (Detroit Altar
   Mobile) para evitar colisiones con el CSS del v25 desktop
   que ya usa .hero, .hero-overlay, .hero-content, etc.

   Histórico:
   v3:  tipografía Champagne
   v4:  ajustes UX iPhone (overlay arriba, ALTAR oscuro,
        subtítulo gris, sub-logos sobre edificios, runway 300vh,
        debug oculto)
   v4.1: sub-logos reducidos
   v4.2: jerarquía visual sub-logos < logo principal
   v4.3: bloque compacto, sub-logos pegados al subtítulo
   v4.4: sub-logos un poco más arriba
   v4.5: ALTAR a #F5E6A8, logo +20%
   v4.6: logo +35% total
   v5:  namespace dam- para integración mobile-only en v27
   ============================================================ */

/* Importar fuente custom Champagne (regular + italic, base64 inline) */
@import url('champagne-fonts.css');

/* Solo activa esta sección en mobile.
   Desktop nunca ve nada de esto porque .dam-mobile-only tiene
   display:none arriba de 768px en el HTML host. */
@media (max-width: 767px) {

  /* ============================================================
     PRELOADER
     ============================================================ */

  .dam-preloader {
    position: fixed;
    inset: 0;
    background: #F5F1E8;
    z-index: 9999;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    padding: 0 0 48px 48px;
    transition: opacity 400ms ease-out;
  }

  .dam-preloader.dam-preloader--hidden {
    opacity: 0;
    pointer-events: none;
  }

  .dam-preloader__counter {
    font-size: clamp(120px, 20vw, 280px);
    font-weight: 700;
    line-height: 0.85;
    color: #1a1a1a;
    letter-spacing: -0.04em;
    font-variant-numeric: tabular-nums;
    user-select: none;
    font-family: 'Inter', -apple-system, sans-serif;
  }

  /* ============================================================
     SCROLL RUNWAY (200vh — mobile, ajustado para cerrar limpio antes de About)
     ============================================================ */

  .dam-runway {
    position: relative;
    width: 100vw;
    height: 200vh;
    background: #F5F1E8;
    margin: 0;
    padding: 0;
  }

  /* ============================================================
     STICKY VIEWPORT
     ============================================================ */

  .dam-sticky {
    position: sticky;
    top: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    background: #F5F1E8;
    margin: 0;
    padding: 0;
  }

  /* ============================================================
     CANVAS
     ============================================================ */

  .dam-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    z-index: 1;
  }

  /* ============================================================
     OVERLAY — Logo + H1 + Subtítulo + 3 sub-logos
     ============================================================ */

  .dam-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: clamp(16px, 4vh, 40px) 24px clamp(40px, 8vh, 80px);
    opacity: 1;
    transition: opacity 100ms linear;
    text-align: center;
    color: #FFFFFF;
  }

  .dam-overlay__logo {
    width: clamp(86px, 19vw, 130px);
    height: auto;
    margin: 0 0 clamp(16px, 3vh, 32px) 0;
    filter: brightness(0) invert(1); /* fuerza blanco */
  }

  /* H1 con tipografía Champagne */
  .dam-overlay__title {
    font-family: 'Champagne', 'Cormorant Garamond', 'Optima', serif;
    font-size: clamp(2.2rem, 4.5vw, 3.5rem);
    line-height: 1.05;
    letter-spacing: 0.02em;
    font-weight: 400;
    color: #FFFFFF;
    margin: 0 0 clamp(12px, 2vh, 24px) 0;
    text-transform: uppercase;
    max-width: 22ch;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.25);
  }

  /* ALTAR accent — champagne pálido vibrante, sin italic */
  .dam-overlay__accent {
    color: #F5E6A8;
    font-style: normal;
    font-weight: 400;
  }

  /* Subtítulo gris oscuro */
  .dam-overlay__subtitle {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: clamp(11px, 2.5vw, 14px);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #2c2c2c;
    margin: 0 0 clamp(12px, 2.5vh, 24px) 0;
    font-weight: 500;
    max-width: 38ch;
    line-height: 1.5;
    text-shadow: 0 2px 12px rgba(255, 255, 255, 0.2);
  }

  /* Sub-logos pegados al subtítulo, jerarquía visual menor */
  .dam-overlay__sublogos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(20px, 6vw, 48px);
  }

  .dam-overlay__sublogo {
    width: clamp(56px, 18vw, 72px);
    height: auto;
    filter: brightness(0) invert(1);
    opacity: 0.92;
  }

  /* ============================================================
     SCROLL HINT
     ============================================================ */

  .dam-hint {
    position: absolute;
    bottom: clamp(24px, 6vh, 56px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    opacity: 0.85;
    transition: opacity 300ms ease-out;
  }

  .dam-hint__label {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 11px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
  }

  .dam-hint__line {
    width: 1px;
    height: 28px;
    background: rgba(255, 255, 255, 0.6);
    animation: damHintPulse 2s ease-in-out infinite;
  }

  @keyframes damHintPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
    50% { opacity: 1; transform: scaleY(1); }
  }

  .dam-hint--faded {
    opacity: 0;
  }

  /* ============================================================
     ACCESIBILIDAD
     ============================================================ */

  @media (prefers-reduced-motion: reduce) {
    .dam-preloader,
    .dam-overlay,
    .dam-hint {
      transition: none;
    }
    .dam-hint__line {
      animation: none;
    }
  }

  /* ============================================================
     DEBUG (oculto en producción)
     ============================================================ */

  .dam-debug {
    display: none;
    position: fixed;
    top: 24px;
    right: 24px;
    font-size: 11px;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    font-variant-numeric: tabular-nums;
    z-index: 100;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.3);
    padding: 6px 10px;
    border-radius: 4px;
    backdrop-filter: blur(4px);
  }
}
