* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: #000;
  color: #fff;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  overflow: hidden;
}

.portal {
  position: relative;
  width: 100vw;
  height: 100vh;
  background: #000;
}

/* Portal video is the hero */
.portal__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
  transform: scale(1.02);
  filter: contrast(1.06) saturate(1.08);
  transition: transform 700ms ease, filter 700ms ease;
}

/* End warp (subtle) */
.portal.is-transitioning .portal__video {
  transform: scale(1.08);
  filter: blur(2px) contrast(1.12) saturate(1.12);
}

/* Vignette to frame the portal */
.portal__vignette{
  pointer-events:none;
  position:absolute; inset:0;
  background: radial-gradient(circle at 50% 50%, transparent 56%, rgba(0,0,0,0.72) 100%);
}

/* Film grain (adds flavor, very subtle) */
.portal__grain{
  pointer-events:none;
  position:absolute; inset:0;
  opacity: 0.12;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.45'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
  animation: grainMove 6s steps(10) infinite;
}
@keyframes grainMove{
  0%{ transform: translate3d(0,0,0); }
  25%{ transform: translate3d(-2%, 1%,0); }
  50%{ transform: translate3d(1%, -2%,0); }
  75%{ transform: translate3d(2%, 2%,0); }
  100%{ transform: translate3d(0,0,0); }
}

/* Brand: top-center, minimal but spicy */
.brand{
  position:absolute;
  top: 16px;
  left:50%;
  transform: translateX(-50%);
  text-align:center;
  pointer-events:none;
  user-select:none;
  text-transform: uppercase;
  letter-spacing: .22em;
  z-index: 10;
}

.brand__line1{
  font-weight: 900;
  font-size: 14px;
  opacity: .9;
  text-shadow: 0 0 22px rgba(165,90,255,.35), 0 0 40px rgba(80,220,255,.12);
}
.brand__line2{
  margin-top: 4px;
  font-weight: 700;
  font-size: 10px;
  opacity: .75;
}

/* Glitch effect (Funky Bunny flavor) */
.glitch{
  position:relative;
  display:inline-block;
  animation: glitchFlicker 5.5s infinite;
}
.glitch::before,
.glitch::after{
  content: attr(data-text);
  position:absolute;
  left:0; top:0;
  width:100%;
  overflow:hidden;
  opacity:.8;
  clip-path: inset(0 0 0 0);
}
.glitch::before{
  transform: translate(1px,0);
  color: rgba(202,166,255,.85);
  mix-blend-mode: screen;
  animation: glitchSlice 2.2s infinite linear alternate-reverse;
}
.glitch::after{
  transform: translate(-1px,0);
  color: rgba(80,220,255,.7);
  mix-blend-mode: screen;
  animation: glitchSlice2 2.6s infinite linear alternate-reverse;
}

@keyframes glitchFlicker{
  0%, 100%{ opacity:.92; }
  6%{ opacity:.75; }
  7%{ opacity:.95; }
  22%{ opacity:.7; }
  23%{ opacity:.92; }
  58%{ opacity:.8; }
  60%{ opacity:.95; }
  86%{ opacity:.72; }
  88%{ opacity:.92; }
}
@keyframes glitchSlice{
  0%{ clip-path: inset(0 0 85% 0); }
  15%{ clip-path: inset(40% 0 40% 0); }
  30%{ clip-path: inset(80% 0 5% 0); }
  45%{ clip-path: inset(15% 0 70% 0); }
  60%{ clip-path: inset(55% 0 25% 0); }
  75%{ clip-path: inset(25% 0 55% 0); }
  100%{ clip-path: inset(0 0 85% 0); }
}
@keyframes glitchSlice2{
  0%{ clip-path: inset(85% 0 0 0); }
  18%{ clip-path: inset(35% 0 45% 0); }
  36%{ clip-path: inset(5% 0 80% 0); }
  54%{ clip-path: inset(70% 0 15% 0); }
  72%{ clip-path: inset(20% 0 60% 0); }
  100%{ clip-path: inset(85% 0 0 0); }
}

/* Skip button (only UI, corner) */
.skip{
  position:absolute;
  top: 16px;
  right: 16px;
  z-index: 20;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(0,0,0,.35);
  color: rgba(255,255,255,.88);
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
  cursor:pointer;
}
.skip:hover{ border-color: rgba(255,255,255,.45); }

/* Transition fade */
.fade{
  position:absolute; inset:0;
  background:#000;
  opacity:0;
  pointer-events:none;
  transition: opacity 700ms ease;
  z-index: 30;
}
.portal.is-transitioning .fade{
  opacity:1;
}

@media (prefers-reduced-motion: reduce){
  .portal__grain, .glitch::before, .glitch::after, .glitch { animation:none; }
  .portal__video, .fade{ transition:none; }
}
