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

html,
body {
  font-family: "DM Sans", sans-serif;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
}

.stage {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Turn sound up */

.sound-banner {
  position: fixed;
  left: var(--cx, 50%);
  top: var(--cy, 50%);
  transform: translate(18px, -50%);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: #ffffffe6;
  background: #000000d9;
  padding: 0.6em 1em;
  white-space: nowrap;
  pointer-events: none;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sound-banner--visible {
  opacity: 1;
}

/* Footer */

.footer {
  position: absolute;
  bottom: 2.4rem;
  left: 2.8rem;
  right: 2.8rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  z-index: 2;
  pointer-events: none;
  transition: opacity var(--footer-fade, 4s) ease;
}

/* The pause/resume toggle moves the footer at its own brisk pace, rather than
   the cinematic one used by the open and close sequences. */
.footer--quick-reveal {
  --footer-fade: 2s;
}

.footer-left,
.footer-right {
  display: flex;
  flex-direction: column;
  gap: 0.2em;
}

.footer-right {
  text-align: right;
  padding-right: 15px
}

.footer--hidden {
  opacity: 0;
}

.footer span {
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: #ffffffbf;
  line-height: 1.5;
}

/* Email click-to-copy */

.footer-right {
  align-items: flex-end;
}

.email-wrap {
  position: relative;
  display: inline-flex;
}

.footer .email {
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.5;
  color: #ffffffbf;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  /* .footer is pointer-events:none, so re-enable just this control — and only
     while the footer is on screen, so a faded-out address is never clickable. */
  pointer-events: auto;
  transition: color 0.3s ease;
}

.footer--hidden .email {
  pointer-events: none;
}

.footer .email:hover,
.footer .email:focus-visible {
  color: #fff;
}

/* Small pill that slides out to the right of the address on hover. Absolutely
   positioned so revealing it never nudges the address itself. */
.footer .email-action {
  position: absolute;
  left: 100%;
  top: 50%;
  margin-left: 0.4em;
  transform: translate(-6px, -50%);
  font-size: 0.55rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: #ffffffe6;
  background: #ffffff1f;
  padding: 0.28em 0.5em;
  border-radius: 10px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease,
    transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Pinned keeps the "copied" state up if the cursor has already left. */
.footer .email:hover ~ .email-action,
.footer .email:focus-visible ~ .email-action,
.footer .email-action--pinned {
  opacity: 1;
  transform: translate(0, -50%);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* --- Showreel video --- */

/* The reel sits paused on frame 0 with the logo laid over it. */
.showreel {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 1;
  cursor: pointer;
  transform: translateZ(0);
  will-change: transform;
}

/* Clicks pass through to the reel, which starts playback. The first two
   shadows pulse on their own; the outer two bloom as the cursor closes in. */
.logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(9vw, 16vh);
  height: auto;
  z-index: 2;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  filter: drop-shadow(0 0 calc(10px + 3px * var(--pulse-t, 0)) rgba(255, 255, 255, calc(0.2 + 0.5 * var(--pulse-t, 0))))
    drop-shadow(0 0 calc(22px + 6px * var(--pulse-t, 0)) rgba(255, 255, 255, calc(0.08 + 0.2 * var(--pulse-t, 0))))
    drop-shadow(0 0 calc(45px * var(--proximity, 0)) rgba(255, 255, 255, calc(0.4 * var(--proximity, 0))))
    drop-shadow(0 0 calc(80px * var(--proximity, 0)) rgba(255, 255, 255, calc(0.15 * var(--proximity, 0))));
  transition: opacity 1s ease;
}

.logo--hidden {
  opacity: 0;
}

/* --- Play/pause flash icon --- */

.video-icon-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.video-icon {
  width: 72px;
  height: 72px;
  animation: icon-flash 0.75s cubic-bezier(0.4, 0, 0.6, 1) forwards;
  filter: drop-shadow(0 0 18px rgba(255, 255, 255, 0.35));
}

@keyframes icon-flash {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  18% {
    opacity: 0.72;
    transform: scale(1);
  }
  60% {
    opacity: 0.72;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.06);
  }
}

