/* Intro video overlay */
.intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 3500;
  display: grid;
  place-items: center;
  color: var(--text-light);
  background: var(--gradient-forest-deep);
  overflow: hidden;
  opacity: 1;
  visibility: visible;
  transition: opacity 1.1s ease, visibility 1.1s ease;
}

.intro-overlay[data-state="hidden"] {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Curtain reveal on first load */
.intro-curtain {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  z-index: 6;
  background: var(--gradient-forest);
  box-shadow: 0 0 60px rgba(10, 25, 19, 0.36);
  transition: transform 1.6s cubic-bezier(0.7, 0, 0.3, 1);
}

.intro-curtain::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, transparent 0%, var(--warm-gold) 50%, transparent 100%);
  opacity: 0.6;
}

.intro-curtain--left {
  left: 0;
  transform: translateX(0);
}

.intro-curtain--right {
  right: 0;
  transform: translateX(0);
}

.intro-curtain--right::after {
  right: 0;
}

.intro-overlay[data-state="opening"] .intro-curtain--left {
  transform: translateX(-105%);
  transition-delay: 0.15s;
}

.intro-overlay[data-state="opening"] .intro-curtain--right {
  transform: translateX(105%);
  transition-delay: 0.15s;
}

/* Iris-out when the user skips or the video ends */
.intro-overlay[data-state="closing"] {
  transition: opacity 0.6s ease 0.8s, visibility 0.6s ease 1.4s;
}

.intro-overlay[data-state="closing"] .intro-curtain--left {
  transform: translateX(-105%);
  transition: transform 0.9s cubic-bezier(0.7, 0, 0.3, 1);
  transition-delay: 0s;
}

.intro-overlay[data-state="closing"] .intro-curtain--right {
  transform: translateX(105%);
  transition: transform 0.9s cubic-bezier(0.7, 0, 0.3, 1);
  transition-delay: 0s;
}

.intro-overlay[data-state="closing"] .intro-content,
.intro-overlay[data-state="closing"] .intro-progress,
.intro-overlay[data-state="closing"] .intro-glow,
.intro-overlay[data-state="closing"] .intro-shimmer {
  opacity: 0;
  transition: opacity 0.5s ease;
}

/* Video base */
.intro-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  transform: scale(1.05);
  animation: introZoom 12s ease-out forwards;
}

@keyframes introZoom {
  0% { transform: scale(1.18); }
  100% { transform: scale(1.02); }
}

/* Gradient tint and warm radial glow */
.intro-tint {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(5, 7, 6, .58) 0%, rgba(18, 51, 34, .28) 50%, rgba(5, 7, 6, .76) 100%),
    radial-gradient(ellipse at center, rgba(29, 75, 49, .2) 0%, rgba(5, 7, 6, .58) 72%);
  pointer-events: none;
}

.intro-glow {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse 80% 60% at 50% 60%, rgba(127, 168, 134, .16) 0%, transparent 70%);
  animation: introGlow 6s ease-in-out infinite alternate;
}

@keyframes introGlow {
  0% { opacity: 0.7; }
  100% { opacity: 1; }
}

/* Diagonal shimmer sweep across the screen */
.intro-shimmer {
  position: absolute;
  inset: -25%;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(115deg,
    transparent 0%,
    transparent 40%,
    rgba(184, 203, 189, .06) 48%,
    rgba(127, 168, 134, .16) 50%,
    rgba(184, 203, 189, .06) 52%,
    transparent 60%,
    transparent 100%);
  animation: introShimmer 5.5s ease-in-out infinite;
}

@keyframes introShimmer {
  0% { transform: translateX(-30%) translateY(0); }
  100% { transform: translateX(30%) translateY(0); }
}

/* Soft vignette to draw the eye to the centre */
.intro-vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(ellipse 90% 80% at 50% 50%, transparent 50%, rgba(5, 7, 6, .52) 100%);
}

/* Floating leaf particles */
.intro-particles {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
}

.intro-leaf {
  position: absolute;
  width: 14px;
  height: 22px;
  background: linear-gradient(135deg, var(--green-pale) 0%, rgba(55, 107, 74, .68) 100%);
  border-radius: 0 100% 0 100%;
  opacity: 0;
  transform-origin: center;
  filter: blur(0.4px);
  animation: leafDrift 12s linear infinite;
  box-shadow: none;
}

.intro-leaf.lf-1 { left: 8%; top: 110%; animation-delay: 0s; transform: scale(0.8) rotate(20deg); }
.intro-leaf.lf-2 { left: 22%; top: 110%; animation-delay: 1.8s; transform: scale(1.1) rotate(-30deg); }
.intro-leaf.lf-3 { left: 38%; top: 110%; animation-delay: 3.4s; transform: scale(0.6) rotate(40deg); }
.intro-leaf.lf-4 { left: 58%; top: 110%; animation-delay: 4.7s; transform: scale(0.9) rotate(-15deg); }
.intro-leaf.lf-5 { left: 74%; top: 110%; animation-delay: 6.2s; transform: scale(1.05) rotate(25deg); }
.intro-leaf.lf-6 { left: 90%; top: 110%; animation-delay: 7.6s; transform: scale(0.7) rotate(-40deg); }

@keyframes leafDrift {
  0% { transform: translateY(0) translateX(0) rotate(0deg); opacity: 0; }
  10% { opacity: 0.7; }
  50% { transform: translateY(-55vh) translateX(40px) rotate(180deg); opacity: 0.9; }
  90% { opacity: 0.5; }
  100% { transform: translateY(-110vh) translateX(-30px) rotate(360deg); opacity: 0; }
}

/* Content */
.intro-content {
  position: relative;
  z-index: 5;
  max-width: 720px;
  padding: 0 28px;
  text-align: center;
  animation: introFade 1.2s ease-out 0.4s both;
}

.intro-content .kicker {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--green-light);
}

.intro-content .intro-heading {
  font-size: clamp(2.2rem, 6.5vw, 5.4rem);
  line-height: 1.05;
  letter-spacing: 0;
  margin: 0 0 18px;
  color: var(--text-light);
  text-shadow: 0 8px 30px rgba(10, 25, 19, 0.45);
}

.intro-content p {
  margin: 0 auto 32px;
  max-width: 520px;
  color: var(--text-muted);
  font-size: clamp(0.95rem, 1.4vw, 1.15rem);
  line-height: 1.7;
}

.intro-skip {
  border-radius: 100px;
  padding: 16px 34px;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  box-shadow: 0 18px 45px rgba(10, 25, 19, 0.32);
}

.intro-progress {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 32px;
  width: min(280px, 60vw);
  height: 2px;
  transform: translateX(-50%);
  background: rgba(127, 168, 134, .2);
  border-radius: 100px;
  overflow: hidden;
}

.intro-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--green-muted) 0%, var(--green-pale) 100%);
  transition: width 0.15s linear;
}

@keyframes introFade {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .intro-video { animation: none; transform: none; }
  .intro-glow { animation: none; }
  .intro-content { animation: none; }
  .intro-shimmer { animation: none; }
  .intro-leaf { animation: none; opacity: 0; }
  .intro-curtain--left,
  .intro-curtain--right { transition: none; }
}

@media (max-width: 640px) {
  .intro-content .intro-heading { font-size: clamp(1.95rem, 9vw, 2.8rem); }
  .intro-content { padding: 0 18px; }
  .intro-progress { bottom: 22px; }
  .intro-leaf { width: 10px; height: 16px; }
}
