/* =========================================================
   LeaseUp Bulldog — INTRO overlay
   Full-screen bulldog video that morphs into the hero phone.
   ========================================================= */

/* Hide hero content while intro is active so it doesn't peek through */
body.intro-active .pf-hero-copy,
body.intro-active .pf-phone {
  opacity: 0;
  will-change: opacity, transform;
}

/* The overlay container is what we animate. It starts as a full-viewport
   fixed rectangle holding the video; we then animate its bounds to match
   the phone's bounding rectangle. */
#intro-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 200;
  overflow: hidden;
  background: #000;
  border-radius: 0;
  box-shadow: 0 0 0 rgba(200, 16, 46, 0);
  will-change: top, left, width, height, border-radius, box-shadow;
}

#intro-overlay.is-done {
  pointer-events: none;
}

#intro-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Subtle vignette + scan line during intro */
.intro-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 50%, rgba(0, 0, 0, 0.45) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, transparent 18%, transparent 82%, rgba(0, 0, 0, 0.55) 100%);
  z-index: 2;
}

.intro-brand {
  position: absolute;
  top: 26px;
  left: 36px;
  z-index: 4;
  display: inline-block;
  width: 240px;
  height: 56px;
  background-image: url('/assets/wordmark-transparent.png');
  background-position: left center;
  background-size: contain;
  background-repeat: no-repeat;
  font-size: 0;
  line-height: 0;
  color: transparent;
  opacity: 0;
  animation: intro-brand-in 0.7s ease-out 0.3s forwards;
}
.intro-brand-mark { display: none; }

@keyframes intro-brand-in {
  to { opacity: 1; }
}

/* Tagline that appears during intro */
.intro-tagline {
  position: absolute;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent-light);
  text-align: center;
  padding: 8px 18px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  white-space: nowrap;
  opacity: 0;
  animation: intro-tag-in 0.7s ease-out 0.6s forwards;
}
.intro-tagline .dot {
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  margin: 0 12px;
  vertical-align: middle;
  box-shadow: 0 0 10px var(--accent);
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes intro-tag-in {
  to { opacity: 1; }
}

/* Skip button */
.intro-skip {
  position: absolute;
  top: 22px;
  right: 30px;
  z-index: 4;
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  animation: intro-skip-in 0.7s ease-out 1s forwards;
  transition: border-color 0.3s, color 0.3s, background 0.3s;
}
.intro-skip:hover {
  border-color: var(--accent);
  color: var(--accent-light);
  background: rgba(200, 16, 46, 0.15);
}
@keyframes intro-skip-in {
  to { opacity: 1; }
}

/* When the intro morph starts, hide the tagline + skip */
body.intro-morphing .intro-tagline,
body.intro-morphing .intro-skip,
body.intro-morphing .intro-brand { opacity: 0; transition: opacity 0.3s; }

/* Frame outline that appears as the overlay nears the phone size — sells the "becomes the phone" handoff */
#intro-overlay .intro-phone-frame {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  box-shadow: 0 0 0 0 rgba(200, 16, 46, 0);
  transition: opacity 0.4s;
}
body.intro-morphing #intro-overlay .intro-phone-frame {
  opacity: 1;
  box-shadow: 0 30px 80px -20px rgba(200, 16, 46, 0.55), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

/* ── Mobile (≤ 640px) ───────────────────────────────────────────────────────
   Shrink the wordmark + Skip button and drop the tagline below the top row
   so the three elements don't collide on narrow viewports. Tagline can wrap
   if needed instead of overflowing off-screen. */
@media (max-width: 640px) {
  .intro-brand {
    top: 16px;
    left: 16px;
    width: 150px;
    height: 36px;
  }
  .intro-skip {
    top: 14px;
    right: 14px;
    font-size: 10px;
    letter-spacing: 0.16em;
    padding: 6px 10px;
    gap: 6px;
  }
  .intro-tagline {
    top: 68px;
    font-size: 9.5px;
    letter-spacing: 0.22em;
    padding: 6px 12px;
    max-width: calc(100vw - 24px);
    white-space: normal;
    line-height: 1.5;
  }
  .intro-tagline .dot {
    width: 5px;
    height: 5px;
    margin: 0 8px;
  }
}
