/* ---------- Home intro (index.html only) ----------
   Plays once per tab session (js/intro.js): a quick photo montage, the
   AL FALLO logo revealed over it, then a wave of wine rises to fill the
   screen and the page fades in from behind it. Click / tap / Esc skips.
   Only transform, opacity and clip-path are animated. */
#intro-overlay{
  position: fixed; inset: 0; z-index: 900;
  background: var(--bg);
  overflow: hidden;
  cursor: pointer;
  /* Pure-CSS failsafe: if intro.js never runs or throws, the overlay
     still gets out of the way after 7s instead of blocking the site. */
  animation: intro-failsafe 0s linear 7s forwards;
}
@keyframes intro-failsafe{ to{ visibility: hidden; opacity: 0; } }

#intro-video{
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
}

#intro-montage{ position: absolute; inset: 0; }
#intro-montage img{
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.06);
}
#intro-scrim{
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(11,6,5,.55), rgba(11,6,5,.9));
  opacity: 0;
}

#intro-logo{
  position: absolute; left: 50%; top: 50%;
  width: min(72vw, 520px); height: auto;
  transform: translate(-50%, -50%);
  clip-path: inset(0 100% 0 0);
}

/* The wave: an SVG twice the viewport width so its crest can drift
   sideways forever (translateX loop) while the whole block rises with
   translateY. The solid body below the crest guarantees full coverage. */
#intro-wave{
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 100%;
  transform: translateY(calc(100% + 64px));
  pointer-events: none;
}
#intro-wave svg{
  position: absolute; left: 0; top: -60px;
  width: 200%; height: 62px;
  fill: var(--wine);
  animation: intro-wave-drift 1.4s linear infinite;
}
#intro-wave::after{
  content: ''; position: absolute; left: 0; right: 0; top: 2px; bottom: 0;
  background: var(--wine);
}
@keyframes intro-wave-drift{ to{ transform: translateX(-50%); } }

@media (prefers-reduced-motion: reduce){
  #intro-overlay{ display: none; }
}
