/* =====================================================================
   Водопада — opening intro
   The waterfall in the mountain above the restaurant, the gold name,
   then the curtain lifts onto the site. Shown once per visit (see the
   inline guard in <head> and js/intro.js). Hidden unless
   html.intro-playing is set, so no JS means no intro.
   ===================================================================== */

.intro { display: none; }
html.intro-playing .intro, .intro.is-leaving {
  display: block;
  position: fixed; inset: 0; z-index: 2000;
  overflow: hidden; background: #0d110b; color: #fff;
}
html.intro-playing, html.intro-playing body { overflow: hidden; }

/* Hold the hero's own entrance until the curtain lifts */
html.intro-playing .hero-img,
html.intro-playing .hero-content > * { animation-play-state: paused; }

/* ---------- Footage ---------- */
.intro-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 40%;
  transform: scale(1.12);
}
/* Safari will not autoplay a video it considers invisible, so the clip itself is never
   transparent: a black veil on top fades away instead */
.intro-veil { position: absolute; inset: 0; z-index: 1; background: #0d110b; pointer-events: none; }
.intro.is-playing .intro-veil { animation: intro-veil-out 1600ms ease-out both; }
.intro.is-playing .intro-video { animation: intro-video-drift 9000ms linear both; }
@keyframes intro-veil-out { to { opacity: 0; } }
@keyframes intro-video-drift { from { transform: scale(1.12); } to { transform: scale(1); } }
.intro-shade {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(60% 45% at 50% 50%, rgba(8, 10, 6, 0.62) 0%, rgba(8, 10, 6, 0.25) 70%, rgba(8, 10, 6, 0) 100%),
    linear-gradient(180deg, rgba(8, 10, 6, 0.75) 0%, rgba(8, 10, 6, 0.1) 28%, rgba(8, 10, 6, 0.1) 70%, rgba(8, 10, 6, 0.85) 100%);
}
.intro-grain { /* a whisper of warm light from above, like sun through the mist */
  position: absolute; inset: 0; z-index: 1; pointer-events: none; mix-blend-mode: screen; opacity: 0;
  background: radial-gradient(50% 40% at 50% 0%, rgba(255, 214, 150, 0.35), rgba(255, 214, 150, 0) 70%);
}
.intro.is-playing .intro-grain { animation: intro-fade-in 2400ms ease 600ms both; }

/* ---------- Title block ---------- */
.intro-content {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px; text-align: center;
}
.intro-mark { width: clamp(64px, 9vw, 96px); height: auto; overflow: visible; margin-bottom: 22px; filter: drop-shadow(0 4px 18px rgba(0, 0, 0, 0.6)); }
.intro-mark .intro-stone { opacity: 0; transform: translateY(10px); transform-box: fill-box; }
.intro-mark .intro-water { transform: scaleY(0); transform-origin: 50% 0; transform-box: fill-box; }
.intro.is-playing .intro-stone { animation: intro-rise 1100ms cubic-bezier(0.22, 1, 0.36, 1) 300ms both; }
.intro.is-playing .intro-water { animation: intro-pour 1300ms cubic-bezier(0.65, 0, 0.35, 1) both; }
.intro.is-playing .intro-water:nth-of-type(1) { animation-delay: 900ms; }
.intro.is-playing .intro-water:nth-of-type(2) { animation-delay: 780ms; }
.intro.is-playing .intro-water:nth-of-type(3) { animation-delay: 1020ms; }
@keyframes intro-pour { to { transform: scaleY(1); } }

.intro-kicker {
  margin: 0 0 6px; font-family: 'Mulish', system-ui, sans-serif; font-weight: 700;
  font-size: clamp(0.72rem, 1.4vw, 0.95rem); letter-spacing: 0.9em; text-indent: 0.9em; text-transform: uppercase;
  color: #ecd9ae; opacity: 0;
}
.intro.is-playing .intro-kicker { animation: intro-kicker 1600ms cubic-bezier(0.22, 1, 0.36, 1) 1200ms both; }
@keyframes intro-kicker { from { opacity: 0; letter-spacing: 1.6em; text-indent: 1.6em; } to { opacity: 1; letter-spacing: 0.9em; text-indent: 0.9em; } }

.intro-title {
  position: relative; margin: 0; white-space: nowrap;
  font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 600;
  font-size: clamp(3.2rem, 13.5vw, 10rem); line-height: 1; letter-spacing: 0.05em;
  text-transform: uppercase;
}
.intro-title .l {
  display: inline-block; opacity: 0;
  background: linear-gradient(170deg, #fff4d2 0%, #f0d08a 28%, #c99a45 55%, #8f6623 78%, #d9b467 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 0 rgba(70, 45, 10, 0.55)) drop-shadow(0 10px 28px rgba(0, 0, 0, 0.55));
}
.intro.is-playing .intro-title .l { animation: intro-letter 1300ms cubic-bezier(0.22, 1, 0.36, 1) both; animation-delay: calc(1650ms + var(--i) * 90ms); }
@keyframes intro-letter {
  from { opacity: 0; transform: translateY(0.35em) scale(0.92); filter: blur(14px); }
  to   { opacity: 1; transform: none; }
}
/* the shine: the same word in light, swept across once the letters land */
.intro-title::after {
  content: attr(data-text); position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 0%, transparent 40%, rgba(255, 252, 238, 0.95) 50%, transparent 60%, transparent 100%);
  background-size: 250% 100%; background-position: 120% 0;
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.intro.is-playing .intro-title::after { animation: intro-shine 1800ms ease-in-out 2900ms both; }
@keyframes intro-shine { from { background-position: 120% 0; } to { background-position: -20% 0; } }

.intro-rule {
  display: block; width: min(320px, 60vw); height: 1px; margin: 26px auto 20px;
  background: linear-gradient(90deg, rgba(236, 217, 174, 0), #ecd9ae 50%, rgba(236, 217, 174, 0));
  transform: scaleX(0);
}
.intro.is-playing .intro-rule { animation: intro-rule 1400ms cubic-bezier(0.22, 1, 0.36, 1) 2700ms both; }
@keyframes intro-rule { to { transform: scaleX(1); } }

.intro-tag, .intro-story { margin: 0; opacity: 0; text-shadow: 0 2px 14px rgba(0, 0, 0, 0.7); }
.intro-tag { font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic; font-size: clamp(1.35rem, 2.6vw, 2.1rem); color: #fff; }
.intro-story { margin-top: 12px; max-width: 520px; font-family: 'Mulish', system-ui, sans-serif; font-size: clamp(0.82rem, 1.3vw, 0.98rem); letter-spacing: 0.04em; color: rgba(255, 255, 255, 0.82); }
.intro.is-playing .intro-tag { animation: intro-rise 1200ms cubic-bezier(0.22, 1, 0.36, 1) 3150ms both; }
.intro.is-playing .intro-story { animation: intro-rise 1200ms cubic-bezier(0.22, 1, 0.36, 1) 3700ms both; }
@keyframes intro-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes intro-fade-in { to { opacity: 1; } }

/* ---------- Skip ---------- */
.intro-skip {
  position: absolute; z-index: 3; right: 24px; bottom: 24px;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px; cursor: pointer;
  background: rgba(10, 12, 8, 0.35); color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  font: 700 0.72rem/1 'Mulish', system-ui, sans-serif; letter-spacing: 0.22em; text-transform: uppercase;
  opacity: 0; animation: intro-fade-in 600ms ease 1000ms both;
  transition: background 300ms ease, color 300ms ease;
}
.intro-skip:hover, .intro-skip:focus-visible { background: #ecd9ae; color: #1f2519; outline: none; }

/* ---------- Exit: the curtain lifts ---------- */
.intro.is-leaving { pointer-events: none; animation: intro-lift 1250ms cubic-bezier(0.76, 0, 0.24, 1) 200ms forwards; }
.intro.is-leaving .intro-content { animation: intro-out 600ms ease forwards; }
.intro.is-leaving .intro-skip { opacity: 0; transition: opacity 200ms ease; }
.intro.is-leaving::after { /* gold edge on the rising curtain */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: linear-gradient(90deg, rgba(236, 217, 174, 0), #ecd9ae 50%, rgba(236, 217, 174, 0));
  box-shadow: 0 0 24px 4px rgba(236, 200, 130, 0.45);
}
@keyframes intro-lift { to { transform: translateY(-100%); } }
@keyframes intro-out { to { opacity: 0; transform: translateY(-40px) scale(0.98); } }

@media (max-width: 600px) {
  .intro-skip { right: 16px; bottom: 16px; }
  .intro-kicker { letter-spacing: 0.7em; text-indent: 0.7em; }
}
