/* Base */
:root{
  --bg: #000;      /* negro para evitar bordes blancos */
  --text: #111;
}

*{ box-sizing: border-box; }
html, body { height: 100%; }
body{
  margin:0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

/* Full bleed */
.page{
  width: 100%;
  margin: 0;
}

/* INTRO */
.intro{
  position: relative;
  height: 280vh;

  width: 100vw;
}

/* STAGE sticky */
.stage{
  position: sticky;
  top: 0;
  height: 100vh;

  width: 100vw;
}

/* Recorte del vídeo */
.video-viewport{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #000;
}

/* Hint de scroll (minimal) */
.scroll-hint{
  position: absolute;
  left: 50%;
  /* Más arriba (en el cuarto inferior del vídeo) */
  bottom: clamp(28px, 12vh, 160px);
  transform: translateX(-50%);
  /* Un pelín más grande */
  width: 28px;
  height: 28px;
  opacity: 0.75;
  pointer-events: none;
  z-index: 20;
  animation: scrollHintFloat 1.6s ease-in-out infinite;
}
.scroll-hint svg{
  width: 100%;
  height: 100%;
  fill: none;
  stroke: rgba(255,255,255,0.9);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.55));
}
@keyframes scrollHintFloat{
  0%,100%{ transform: translateX(-50%) translateY(0); }
  50%{ transform: translateX(-50%) translateY(-5px); }
}

/* Vídeo alto para pan vertical (desktop/tablet) */
.hero-video{
  width: 100%;
  height: 200vh;
  object-fit: cover;
  object-position: 50% 10%;
  display:block;
  transform: translateY(0px);
  will-change: transform;
}

/* Desktop ultra-ancho: ajusta el encuadre del reel para que el logo del vídeo no se pierda */
@media (min-aspect-ratio: 16/9){
  .hero-video{ object-position: 50% 45%; }
}
@media (min-aspect-ratio: 21/9){
  .hero-video{ object-position: 50% 55%; }
}


/* Overlay (Portada) */
.overlay{
  position: absolute;
  inset: 0;
  transform: translateY(100%);
  will-change: transform;
  /* IMPORTANTE: dejar click-through SOLO para el fondo, pero permitir el CTA */
  pointer-events: auto;

  width: 100vw;

  height: 100vh;
}
.overlay-bg,

.overlay-bg{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit: cover;
  display:block;

  pointer-events: none;
}

.logo-beige{
  position: absolute;
  left: 50%;
  top: 18%;
  transform: translate(-50%, -50%) translateY(-70px);
  width: min(720px, 78vw);
  height: auto;
  clip-path: inset(100% 0 0 0);
  will-change: clip-path, transform;
  pointer-events: none;
}


/* Logo beige (reveal + baja a su sitio) */
.logo-beige{
  position:absolute;
  left: 50%;
  top: 18%;
  transform: translate(-50%, -50%) translateY(-90px);
  width: min(720px, 78vw);
  height: auto;
  clip-path: inset(100% 0 0 0);
  will-change: clip-path, transform;
}

/* CTA: solo texto, JetBrains Mono Bold + hover */
.cta{
  pointer-events: auto;
  z-index: 5;
  position: absolute;
  left: 50%;
  bottom: 8vh;
  transform: translateX(-50%);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.02em;
  color: rgba(255,255,255,0.92);
  text-decoration: none;
  padding: 0;
  background: transparent;
  border: 0;
  transition: transform 140ms ease, color 140ms ease;
  cursor: pointer;
}
@media (hover:hover) and (pointer:fine){
  .cta:hover{
    transform: translateX(-50%) scale(1.045);
    color: rgba(255,255,255,1);
  }
}

/* WIP */
.wip{
  position:absolute;
  top: calc(48px + env(safe-area-inset-top));
  color: rgba(255,255,255,0.78);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  pointer-events: none;
}
.wip-left{ left: calc(16px + env(safe-area-inset-left)); }
.wip-right{ right: calc(16px + env(safe-area-inset-right)); }
.wip:not(.wip-left):not(.wip-right){ right: calc(16px + env(safe-area-inset-right)); }

@media (min-width: 641px){
  .wip-left{ left: calc(64px + env(safe-area-inset-left)); }
  .wip-right{ right: calc(80px + env(safe-area-inset-right)); }
  .wip:not(.wip-left):not(.wip-right){ right: calc(80px + env(safe-area-inset-right)); }
}


/* Después */

/* Móvil: reduce recorte => contain y sin pan */
@media (max-width: 640px){
  .intro{ height: 180vh; } /* menos scroll en móvil */

  .hero-video{
    height: 100vh;
    object-fit: contain;         /* muestra el vídeo completo */
    object-position: 50% 50%;
    transform: translateY(0px) !important;
  }
  .logo-beige{
    top: 28%;
    width: 54vw; /* ~50% más pequeño */
    transform: translate(-50%, -50%) translateY(-80px);
  }
  .cta{
  pointer-events: auto;
  z-index: 5;
    bottom: 10vh;
    font-size: 15px;
  }
}


/* Email helper toast (solo desktop; aparece si mailto no abre nada) */
#emailToast{
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 9999;
  max-width: min(520px, calc(100vw - 32px));
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
}
#emailToast.show{
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
#emailToast .emailToast__inner{
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 12px 12px;
  border-radius: 14px;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(8px);
  color: rgba(255,255,255,0.92);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-weight: 700;
  font-size: 12px;
  line-height: 1.25;
}
#emailToast .emailToast__email{ opacity: 1; }
#emailToast .emailToast__btn,
#emailToast .emailToast__close{
  border: 0;
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.92);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
}
#emailToast .emailToast__close{
  width: 34px;
  height: 34px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size: 18px;
  line-height: 1;
}
@media (max-width: 640px){
  #emailToast{ display:none; }
}

