/*
 * VERČA & VILDA — intro 6 s (5,2 s sceny + 0,8 s fade/blur).
 * Wyłącznie selektory o prefiksie vv-, aby nie kolidować z Elementorem.
 * Kolory koperty, układ warstw i tekst przeniesione z naszego intro V1.5.
 */
:root { --vv-intro-duration: 5.2s; --vv-exit-duration: .8s; }
#vv-wedding-intro.vv-intro,
#vv-wedding-intro.vv-intro * { box-sizing: border-box; }
#vv-wedding-intro.vv-intro {
  position: fixed; inset: 0; z-index: 2147483000;
  display: flex; align-items: center; justify-content: center;
  isolation: isolate; overflow: hidden;
  width: 100%; height: 100vh; height: 100dvh;
  background: radial-gradient(ellipse at 50% 43%, #a2a283 0%, #62765e 34%, #233a2d 83%);
  color: #fff9eb;
  font-family: Georgia, 'Times New Roman', serif;
  opacity: 1; filter: blur(0px); visibility: visible;
  transition: opacity var(--vv-exit-duration) ease, filter var(--vv-exit-duration) ease, visibility 0s var(--vv-exit-duration);
}
#vv-wedding-intro.vv-intro.vv-intro--out {
  opacity: 0; filter: blur(15px); visibility: hidden; pointer-events: none;
}
html.vv-intro-already-seen #vv-wedding-intro.vv-intro { display: none !important; }
#vv-wedding-intro.vv-intro::before {
  content: ''; position: absolute; inset: 0; opacity: .16; pointer-events: none;
  background-image: url('paper-noise.webp'); background-size: 280px;
  mix-blend-mode: screen;
}
#vv-wedding-intro .vv-haze {
  position: absolute; width: min(850px, 120vw); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,234,186,.28), transparent 68%);
  filter: blur(30px); animation: vv-glow var(--vv-intro-duration) ease both;
}
#vv-wedding-intro .vv-leaves {
  position: absolute; font-size: clamp(7rem, 25vw, 19rem); color: #ebe1bb;
  opacity: .19; line-height: 1; pointer-events: none; filter: blur(1px);
}
#vv-wedding-intro .vv-leaves--left { left: -.16em; bottom: -.07em; animation: vv-foliage-l var(--vv-intro-duration) ease both; }
#vv-wedding-intro .vv-leaves--right { right: -.14em; top: -.16em; animation: vv-foliage-r var(--vv-intro-duration) ease both; }
#vv-wedding-intro .vv-envelope-scene {
  position: relative; width: min(440px, 82vw); aspect-ratio: 1.32;
  perspective: 1000px;
  filter: drop-shadow(0 28px 30px #1c231b65);
  animation: vv-arrive var(--vv-intro-duration) cubic-bezier(.22,.68,.16,1) both;
}
#vv-wedding-intro .vv-envelope-shadow {
  position: absolute; left: 0; right: 0; bottom: 0; height: 22%; border-radius: 50%;
  background: #10251e55; filter: blur(30px); transform: translateY(35%);
}
#vv-wedding-intro .vv-envelope-body {
  position: absolute; inset: 10% 0 6%; transform-style: preserve-3d; isolation: isolate;
}
#vv-wedding-intro .vv-envelope-back {
  position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(135deg, #d58a69, #b9664b 42%, #9d4f3e);
  border-radius: 5px; box-shadow: inset 0 0 0 1px #673b34a1;
}
#vv-wedding-intro .vv-letter {
  position: absolute; left: 8%; top: 4%; width: 84%; height: 90%; z-index: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: .38em; border-radius: 4px;
  color: #593c2c; background: linear-gradient(160deg, #fff9ea, #eee0c3 68%, #e1cfaa);
  box-shadow: 0 5px 18px #55332155, inset 0 0 0 3px #fff5dd, inset 0 0 0 5px #b9986957;
  opacity: 0; transform: translateY(0) scale(.96);
  animation: vv-letter-rise var(--vv-intro-duration) ease-in-out both;
}
#vv-wedding-intro .vv-letter::before {
  content: ''; position: absolute; inset: 6px; border: 1px solid #ab8b6249; pointer-events: none;
}
#vv-wedding-intro .vv-letter-small { font: 600 clamp(.47rem, 1.9vw, .68rem)/1.2 Arial, sans-serif; letter-spacing: .23em; color: #8d7657; }
#vv-wedding-intro .vv-letter-main { font: italic clamp(1.1rem, 4vw, 1.85rem)/1.05 Georgia, serif; }
#vv-wedding-intro .vv-letter-names { font: 600 clamp(1.32rem, 5vw, 2.25rem)/1.08 Georgia, serif; }
#vv-wedding-intro .vv-letter-date { font: clamp(.72rem, 2.3vw, .94rem)/1.2 Georgia, serif; color: #785c42; }
#vv-wedding-intro .vv-letter-flower { font: 2em/1 Georgia, serif; color: #967047; }
#vv-wedding-intro .vv-envelope-fold { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
#vv-wedding-intro .vv-envelope-fold--left { background: linear-gradient(140deg,#cd7c5c,#ad6148); clip-path: polygon(0 0,54% 53%,0 100%); }
#vv-wedding-intro .vv-envelope-fold--right { background: linear-gradient(220deg,#ca7958,#a6533d); clip-path: polygon(100% 0,46% 53%,100% 100%); }
#vv-wedding-intro .vv-envelope-front {
  position: absolute; inset: 0; z-index: 4; pointer-events: none;
  background: linear-gradient(0deg, #ae6147 0%, #c97858 70%, #d48b69);
  clip-path: polygon(0 100%, 50% 44%, 100% 100%);
}
#vv-wedding-intro .vv-envelope-flap {
  position: absolute; left: 0; right: 0; top: 0; height: 60%; z-index: 5;
  background: linear-gradient(180deg,#d68b69,#af5944);
  clip-path: polygon(0 0,100% 0,50% 100%);
  transform-origin: 50% 0%; backface-visibility: visible;
  animation: vv-flap var(--vv-intro-duration) ease-in-out both;
}
#vv-wedding-intro .vv-wax-seal {
  position: absolute; z-index: 6; left: 50%; top: 47%; width: 56px; height: 56px;
  display: grid; place-items: center; border-radius: 50%; color: #efddac;
  font: 1.65rem/1 Georgia,serif;
  background: radial-gradient(circle at 32% 25%,#bf8060,#854d39 67%);
  border: 3px ridge #cc9a67; box-shadow: 0 4px 13px #47302391;
  transform: translate(-50%,-50%);
  animation: vv-seal var(--vv-intro-duration) ease both;
}
#vv-wedding-intro .vv-intro-label {
  position: absolute; bottom: max(6%, env(safe-area-inset-bottom)); left: 0; right: 0;
  padding: 0 16px; text-align: center; color: #f1e7d2e0;
  font: italic clamp(.9rem,2.5vw,1.15rem)/1.3 Georgia,serif; letter-spacing: .07em;
  animation: vv-caption var(--vv-intro-duration) ease both;
}
#vv-wedding-intro .vv-intro-skip {
  all: unset; box-sizing: border-box; cursor: pointer;
  position: absolute; z-index: 15;
  right: clamp(14px,4vw,34px); top: max(16px,env(safe-area-inset-top));
  padding: 12px 16px; background: #25382bcc; color: #fff6e7;
  border: 1px solid #e1d7bc77; border-radius: 100px;
  font: 600 13px/1.2 Arial,sans-serif;
  transition: background .2s, transform .2s;
}
#vv-wedding-intro .vv-intro-skip:hover { background: #162a20; transform: translateY(-1px); }
#vv-wedding-intro .vv-intro-skip:focus-visible { outline: 3px solid #fff6e7; outline-offset: 4px; }
@keyframes vv-arrive {
  0% { opacity: 0; transform: translateY(14vh) scale(.76) rotate(-5deg); }
  20% { opacity: 1; transform: translateY(4vh) scale(1) rotate(0); }
  55% { transform: translateY(4vh) scale(1); }
  100% { opacity: 1; transform: translateY(0) scale(1.04); }
}
@keyframes vv-flap {
  0%, 31% { transform: rotateX(0deg); z-index: 5; }
  54%, 100% { transform: rotateX(178deg); z-index: 0; }
}
@keyframes vv-seal {
  0%, 27% { opacity: 1; transform: translate(-50%,-50%) scale(1); }
  36% { opacity: 1; transform: translate(-50%,-50%) scale(1.12); }
  47%, 100% { opacity: 0; transform: translate(-50%,-50%) scale(.3) rotate(-45deg); }
}
@keyframes vv-letter-rise {
  0%, 47% { opacity: 0; transform: translateY(0) scale(.96); }
  58% { opacity: 1; transform: translateY(9%) scale(.93); }
  81% { opacity: 1; transform: translateY(-36%) scale(1.02); }
  100% { opacity: 1; transform: translateY(-38%) scale(1.03); }
}
@keyframes vv-glow {
  0% { opacity: 0; transform: scale(.6); }
  65% { opacity: 1; }
  100% { opacity: .55; transform: scale(1.2); }
}
@keyframes vv-foliage-l {
  0% { opacity: 0; transform: translateX(-20px) rotate(-32deg); }
  55% { opacity: .2; }
  100% { opacity: .08; transform: translateX(0) rotate(-16deg); }
}
@keyframes vv-foliage-r {
  0% { opacity: 0; transform: translateX(20px) scaleX(-1) rotate(-38deg); }
  55% { opacity: .2; }
  100% { opacity: .08; transform: translateX(0) scaleX(-1) rotate(-22deg); }
}
@keyframes vv-caption {
  0%, 18% { opacity: 0; transform: translateY(12px); }
  40%, 90% { opacity: 1; transform: translateY(0); }
  100% { opacity: .7; }
}
@media (max-width: 420px) {
  #vv-wedding-intro .vv-envelope-scene { width: 86vw; }
  #vv-wedding-intro .vv-wax-seal { width: 46px; height: 46px; }
  #vv-wedding-intro .vv-letter { gap: .29em; }
  #vv-wedding-intro .vv-intro-label { bottom: 8%; }
}
@media (prefers-reduced-motion: reduce) {
  #vv-wedding-intro.vv-intro { display: none !important; }
  #vv-wedding-intro.vv-intro *, #vv-wedding-intro.vv-intro { animation: none !important; transition: none !important; }
}
