/* ============================================================
   NEA Entertainment — Main Page V2
   Immersive stacked-layer street scene.
   All layers share the 1915×821 (~21:9) canvas and are
   pre-aligned; the stage letterboxes and scales uniformly so
   percentage-based hitboxes stay aligned on every screen.
   ============================================================ */

:root {
  /* Scene canvas */
  --v2-ratio-w: 1915;
  --v2-ratio-h: 821;

  /* Z-index scale */
  --v2-z-bg:      1;
  --v2-z-drone:   2;
  --v2-z-rat:     2;
  --v2-z-peek:    3;
  --v2-z-door:    4;
  --v2-z-sign:    5;
  --v2-z-prop:    6;
  --v2-z-fx:      7;
  --v2-z-vignette:8;
  --v2-z-zone:    10;
  --v2-z-modal:   50;

  /* Motion */
  --v2-fade: .55s ease;
  --v2-door-open: .5s cubic-bezier(.22,.61,.36,1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0a0a0a;
}

/* ── Skip link (visible on focus) ── */
.v2-skip-link {
  position: absolute;
  left: 8px;
  top: -48px;
  z-index: 100;
  padding: 10px 16px;
  background: #111;
  color: #fff;
  border-radius: 8px;
  font: 600 14px/1 system-ui, sans-serif;
  text-decoration: none;
  transition: top .2s ease;
}
.v2-skip-link:focus { top: 8px; }

/* ── Scene / stage ── */
.v2-scene {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
}

.v2-stage {
  position: relative;
  width: min(100vw, calc(100vh * var(--v2-ratio-w) / var(--v2-ratio-h)));
  width: min(100vw, calc(100dvh * var(--v2-ratio-w) / var(--v2-ratio-h)));
  aspect-ratio: var(--v2-ratio-w) / var(--v2-ratio-h);
  margin: auto;
  overflow: hidden;
}

/* Every stacked layer fills the stage identically → perfect alignment */
.v2-layer,
.v2-bg,
.v2-ambient-video,
.v2-reflection-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

/* ── Backgrounds (day/night crossfade) ── */
.v2-bg {
  z-index: var(--v2-z-bg);
  opacity: 0;
  transition: opacity 1.2s ease;
}
.v2-scene.is-day  #v2-bg-day   { opacity: 1; }
.v2-scene.is-night #v2-bg-night { opacity: 1; }

/* ── Ambient videos ── */
.v2-ambient-video {
  opacity: 0;
  transition: opacity .6s ease;
}
.v2-drone {
  z-index: var(--v2-z-drone);
  clip-path: polygon(32.2% 30%, 49.2% 30%, 49.2% 42%, 32.2% 42%);
}
.v2-rat {
  z-index: var(--v2-z-rat);
  clip-path: polygon(52% 69%, 54.9% 69%, 54.9% 78%, 52% 78%);
  filter: drop-shadow(0 8px 4px rgba(0,0,0,.6));
}
.v2-ambient-video.is-playing { opacity: 1; }

.v2-reflection-video {
  opacity: 0;
  pointer-events: none;
  transition: opacity .6s ease;
}
.v2-rat-reflection {
  z-index: var(--v2-z-rat);
  clip-path: polygon(52% 69%, 54.9% 69%, 54.9% 78%, 52% 78%);
  filter: blur(1px) brightness(.55) saturate(.75);
  transform: scaleY(-.45);
  transform-origin: 53.45% 78%;
}
.v2-rat-reflection.is-playing { opacity: .28; }

.v2-clip-debug {
  position: absolute;
  z-index: calc(var(--v2-z-zone) - 1);
  pointer-events: none;
  border: 2px dashed rgba(255,255,255,.95);
  box-shadow: 0 0 0 1px rgba(0,0,0,.75), 0 0 18px rgba(255,255,255,.35);
}
.v2-clip-debug-drone {
  left: 32.2%;
  top: 30%;
  width: 17%;
  height: 12%;
  border-color: rgba(0,240,255,.95);
}
.v2-clip-debug-rat {
  left: 52%;
  top: 69%;
  width: 2.9%;
  height: 9%;
  border-color: rgba(255,70,190,.95);
}

/* ── Doors ──
   Doors swing open on a hinge (rotateY around their hinge edge),
   revealing the "peek" interior layer that sits behind them.
   transform-origin values are the hinge edge, tuned to the artwork. */
.v2-door {
  z-index: var(--v2-z-door);
  transition: transform .5s ease;              /* close (fast) */
}
.v2-door-shop   { transform-origin: 17% 60%; }

/* Studio double door — pre-aligned left/right assets, hinged on their outer
   edges and swung into the room so the studio peek opens from the center. */
.v2-door-studio-left  { transform-origin: 31.85% 62.5%; }
.v2-door-studio-right { transform-origin: 33.85% 62.5%; }

/* Open swing — slower ease-out */
.v2-stage.hover-shop   .v2-door-shop,
.v2-stage.hover-studio .v2-door-studio-left,
.v2-stage.hover-studio .v2-door-studio-right {
  transition: transform 1.2s cubic-bezier(.22,.61,.36,1);
}
.v2-stage.hover-shop   .v2-door-shop        { transform: perspective(1600px) rotateY(-42deg) skewY(-4deg); }
.v2-stage.hover-studio .v2-door-studio-left  { transform: perspective(1600px) rotateY(64deg) skewY(.8deg); }
.v2-stage.hover-studio .v2-door-studio-right { transform: perspective(1600px) rotateY(-64deg) skewY(-.8deg) scaleX(1.42); }

/* Artist door + CREW sign swing as ONE rigid panel.
   Hinge = door's right edge; heavy metal door opens outward wide. */
.v2-door-artist,
#v2-crew-dark,
#v2-crew-lit { transform-origin: 90% 60%; }

.v2-door-artist { transition: transform .6s ease; }               /* close */
#v2-crew-dark   { transition: transform .6s ease; }
#v2-crew-lit    { transition: opacity var(--v2-fade), transform .6s ease; }

.v2-stage.hover-artist .v2-door-artist,
.v2-stage.hover-artist #v2-crew-dark,
.v2-stage.hover-artist #v2-crew-lit {
  transform: perspective(1600px) rotateY(76deg) skewY(1.4deg) scaleX(1.3);
  transition: transform 1.6s cubic-bezier(.34,.5,.2,1);           /* heavy */
}

/* ── Peek reveals (sit BEHIND the doors; revealed as the door swings) ── */
.v2-peek {
  z-index: var(--v2-z-peek);
  opacity: 0;
  transition: opacity var(--v2-fade);
}
.v2-stage.hover-shop   .v2-peek-shop   { opacity: 1; }
.v2-stage.hover-artist .v2-peek-artist { opacity: 1; }
.v2-stage.hover-studio .v2-peek-studio { opacity: 1; }

/* ── Mailboxes ── */
.v2-mailbox {
  z-index: var(--v2-z-prop);
}
.v2-mailbox-contact-lit {
  z-index: calc(var(--v2-z-prop) + 1);
}
.v2-stage.hover-mailbox .v2-mailbox-contact-lit {
  opacity: 1;
}

/* ── Signs (dark base + lit overlay) ── */
.v2-sign-dark { z-index: var(--v2-z-sign); }
.v2-sign-lit  { z-index: calc(var(--v2-z-sign) + 1); }
.v2-nea-dot-mask {
  z-index: calc(var(--v2-z-sign) + 2);
  opacity: 0;
  will-change: opacity;
}

/* Lit overlays default off; JS ignites + flickers them */
.v2-lit {
  opacity: 0;
  transition: opacity var(--v2-fade);
  will-change: opacity;
}
.v2-lit.is-on { opacity: 1; }

/* Ignition: flicker up to steady-on */
@keyframes v2-ignite {
  0%   { opacity: 0; }
  8%   { opacity: 1; }
  12%  { opacity: .15; }
  18%  { opacity: 1; }
  26%  { opacity: .35; }
  34%  { opacity: 1; }
  46%  { opacity: .55; }
  54%  { opacity: 1; }
  100% { opacity: 1; }
}
.v2-lit.igniting {
  animation: v2-ignite 900ms linear forwards;
}

/* Ambient blip: brief dip while lit */
@keyframes v2-blip {
  0%, 100% { opacity: 1; }
  18% { opacity: .25; }
  24% { opacity: 1; }
  40% { opacity: .5; }
  46% { opacity: 1; }
  70% { opacity: .8; }
}
.v2-lit.blip {
  animation: v2-blip 320ms linear;
}

/* Hover pulse: one restrained dim and return, separate from startup ignition. */
@keyframes v2-hover-dim {
  0%, 100% { opacity: 1; }
  48% { opacity: .28; }
}
.v2-lit.hover-dim {
  animation: v2-hover-dim 420ms ease-in-out;
}

/* The N.E.A. hover uses the dot-dark asset as a mask over the full lit sign,
   so only the dot before the A appears to dim out once. */
@keyframes v2-nea-dot-hover-dim {
  0%, 100% { opacity: 0; }
  48% { opacity: 1; }
}
.v2-nea-dot-mask.hover-dim {
  animation: v2-nea-dot-hover-dim 420ms ease-in-out;
}

/* Crew sign keeps its own ambient flicker; it just swings with the artist door. */
/* Studio sign lights with the studio door on hover */
.v2-stage.hover-studio #v2-studiosign-lit { opacity: 1; }

/* ── Future FX placeholder layers ── */
.v2-fx {
  z-index: var(--v2-z-fx);
  opacity: 0;
}

/* ── Vignette for depth ── */
.v2-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: var(--v2-z-vignette);
  background: radial-gradient(circle at center, transparent 55%, rgba(0,0,0,.4) 100%);
}

/* ── Interactive hitboxes ──
   Positioned as % of the stage. Values tuned to the artwork;
   verify alignment against the visible objects on desktop + mobile. */
.v2-zone {
  position: absolute;
  z-index: var(--v2-z-zone);
  display: block;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.v2-zone:focus-visible {
  outline: 2px solid rgba(255,255,255,.85);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Positions tuned to the artwork (see verification screenshots) */
.v2-zone-shop     { left: 12%; top: 46%; width: 8%;  height: 27%; }
.v2-zone-studio   { left: 32%; top: 54%; width: 2.4%;  height: 14%; }
.v2-zone-events   { left: 45%; top: 52%; width: 8%;  height: 25%; }
.v2-zone-artists  { left: 82%; top: 38%; width: 9%;  height: 46%; }
.v2-zone-nea-sign { left: 58%; top: 16%; width: 24%; height: 22%; }
.v2-zone-mailbox  { left: 74%; top: 54%; width: 4%;  height: 12%; }
.v2-zone-daynight { right: 4%; top: 4%;  width: 8%;  height: 12%; }
/* .v2-zone-studio {
  background: rgba(0,240,255,.14);
  outline: 2px dashed rgba(0,240,255,.95);
  outline-offset: -2px; 
} */
/* Hidden "call the drone" trigger — wall above/right of the gorilla mural */
.v2-zone-drone    { left: 30%; top: 40%; width: 7%;  height: 9%; }
/* Hidden rat test trigger — lower street/sidewalk area near the middle of the scene */
.v2-zone-rat      { left: 39%; top: 75%; width: 14%; height: 10%; }

/* ── Studio "coming soon" modal ── */
.v2-modal {
  position: fixed;
  inset: 0;
  z-index: var(--v2-z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity .3s ease;
}
.v2-modal[hidden] { display: none; }
.v2-modal.is-open { opacity: 1; }

.v2-modal-card {
  position: relative;
  max-width: min(90vw, 440px);
  padding: 40px 32px 32px;
  background: #141414;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 18px;
  text-align: center;
  color: #fff;
  box-shadow: 0 24px 70px rgba(0,0,0,.6);
}
.v2-modal-title {
  font: 700 clamp(22px, 4vw, 30px)/1.15 system-ui, sans-serif;
  letter-spacing: .01em;
  margin-bottom: 12px;
}
.v2-modal-text {
  font: 400 15px/1.5 system-ui, sans-serif;
  color: rgba(255,255,255,.7);
}
.v2-modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  width: 40px;
  height: 40px;
  font-size: 26px;
  line-height: 1;
  color: rgba(255,255,255,.6);
  background: transparent;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: color .2s ease, background .2s ease;
}
.v2-modal-close:hover { color: #fff; background: rgba(255,255,255,.08); }

.v2-contact-card {
  width: min(92vw, 520px);
  padding: 38px 32px 30px;
  text-align: left;
  background:
    linear-gradient(135deg, rgba(255,255,255,.07), transparent 38%),
    #131313;
}
.v2-contact-kicker {
  margin-bottom: 8px;
  color: rgba(255,213,139,.78);
  font: 700 12px/1 system-ui, sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.v2-contact-title {
  margin-bottom: 24px;
}
.v2-contact-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid rgba(255,255,255,.12);
}
.v2-contact-row {
  display: grid;
  grid-template-columns: minmax(88px, 28%) 1fr;
  gap: 18px;
  padding: 16px 0;
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
a.v2-contact-row {
  transition: color .2s ease, transform .2s ease;
}
a.v2-contact-row:hover,
a.v2-contact-row:focus-visible {
  color: #ffd58b;
  transform: translateX(3px);
  outline: none;
}
.v2-contact-label {
  color: rgba(255,255,255,.48);
  font: 700 11px/1.35 system-ui, sans-serif;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.v2-contact-value {
  font: 600 15px/1.45 system-ui, sans-serif;
  overflow-wrap: anywhere;
}
.v2-contact-address .v2-contact-value {
  font-weight: 500;
  color: rgba(255,255,255,.82);
}
.v2-contact-socials {
  display: flex;
  gap: 12px;
  margin-top: 22px;
}
.v2-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 50%;
  color: #fff;
  background: rgba(255,255,255,.06);
  font: 800 13px/1 system-ui, sans-serif;
  text-decoration: none;
  text-transform: uppercase;
  transition: color .2s ease, background .2s ease, border-color .2s ease, transform .2s ease;
}
.v2-social-link:hover,
.v2-social-link:focus-visible {
  color: #141414;
  background: #ffd58b;
  border-color: #ffd58b;
  transform: translateY(-2px);
  outline: none;
}

@media (max-width: 520px) {
  .v2-contact-card {
    padding: 34px 22px 24px;
  }
  .v2-contact-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .v2-bg, .v2-ambient-video, .v2-reflection-video, .v2-door, .v2-peek, .v2-lit, .v2-modal {
    transition: none;
  }
  .v2-lit.igniting, .v2-lit.blip, .v2-lit.hover-dim, .v2-nea-dot-mask.hover-dim { animation: none; }
  .v2-ambient-video, .v2-reflection-video { display: none; }
}

/* ── Visually hidden content for search engines / screen readers ── */
.nea-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  border: 0;
}
