/* Reset margins and hide body overflow so only our container scrolls */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body, html {
  height: 100%;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  overflow: hidden;
  background-color: #000;
}

/* Full-bleed on phone; centers the mockup on larger screens */
.phone-stage {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.snowfall {
  display: none;
}

.phone,
.phone-bezel,
.phone-screen {
  width: 100%;
  height: 100%;
}

.phone {
  position: relative;
  z-index: 1;
}

.phone-screen {
  position: relative;
  overflow: hidden;
  background: #000;
}

.phone-notch {
  display: none;
}

.floating-title {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 1.25rem;
  text-align: center;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #fff;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  pointer-events: none;
}

.sound-toggle {
  position: absolute;
  top: 3.25rem;
  right: 1rem;
  z-index: 110;
  border: 0;
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  cursor: pointer;
}

.sound-toggle[hidden] {
  display: none;
}

.sound-toggle:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.start-gate {
  position: absolute;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  border: 0;
  margin: 0;
  padding: 1.5rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  cursor: pointer;
  font: inherit;
}

.start-gate[hidden] {
  display: none;
}

.start-gate__label {
  padding: 0.85rem 1.35rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 120;
  width: 5.5rem;
  height: 5.5rem;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 50%;
  padding: 0;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  cursor: pointer;
}

.play-overlay[hidden] {
  display: none;
}

.play-overlay:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.play-overlay__icon {
  width: 0;
  height: 0;
  margin-left: 0.35rem;
  border-top: 0.85rem solid transparent;
  border-bottom: 0.85rem solid transparent;
  border-left: 1.35rem solid rgba(255, 255, 255, 0.92);
}

/* Container that holds all slides */
.video-container {
  height: 100%;
  width: 100%;
  overflow-y: scroll;

  /* Enables vertical snap scrolling */
  scroll-snap-type: y mandatory;

  /* Hides the scrollbar for a clean app feel */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

.video-container::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

/* Individual full-screen slide */
.slide {
  height: 100%;
  width: 100%;
  flex-shrink: 0;

  /* Forces each slide to lock into place when scrolling stops */
  scroll-snap-align: start;
  scroll-snap-stop: always;

  /* Layout to position text at the bottom left */
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  background-color: #111;
}

.slide video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* Overlay box for title and description */
.overlay-info {
  position: relative;
  z-index: 1;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  color: #fff;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  max-width: 85%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.overlay-info p {
  font-size: 0.95rem;
  opacity: 0.9;
  line-height: 1.4;
}

/* Desktop / tablet: Figma-style phone mockup */
@media (min-width: 768px) {
  .phone-stage {
    background:
      linear-gradient(
        180deg,
        #1b2d45 0%,
        #3a5674 38%,
        #7a92a8 68%,
        #c5d4e0 88%,
        #e8eef3 100%
      );
    padding: 2rem;
  }

  .phone-stage::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
      radial-gradient(ellipse 90% 40% at 50% 100%, rgba(255, 255, 255, 0.55) 0%, transparent 70%),
      radial-gradient(ellipse 50% 30% at 15% 75%, rgba(255, 255, 255, 0.2) 0%, transparent 60%),
      radial-gradient(ellipse 40% 25% at 85% 80%, rgba(255, 255, 255, 0.18) 0%, transparent 55%);
  }

  .snowfall {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
  }

  .phone {
    width: min(390px, calc((100vh - 4rem) * 9 / 19.5));
    height: min(844px, calc(100vh - 4rem));
    aspect-ratio: 390 / 844;
    flex: 0 0 auto;
  }

  .phone-bezel {
    position: relative;
    padding: 12px;
    border-radius: 48px;
    background: linear-gradient(160deg, #3a3a3e 0%, #1c1c1f 40%, #0f0f10 100%);
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.08),
      0 0 0 2px #0a0a0a,
      0 25px 60px rgba(0, 0, 0, 0.55),
      0 8px 20px rgba(0, 0, 0, 0.35);
  }

  .phone-notch {
    display: block;
    position: absolute;
    top: 20px;
    left: 50%;
    z-index: 200;
    width: 96px;
    height: 28px;
    transform: translateX(-50%);
    border-radius: 20px;
    background: #0a0a0a;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  }

  .phone-screen {
    border-radius: 36px;
  }

  .floating-title {
    padding-top: 2.25rem;
  }

  .sound-toggle {
    top: 4.25rem;
  }
}
