:root {
  color-scheme: dark;
  --bg-base: #040507;
  --bg-top: #11131a;
  --panel-bg: rgba(14, 16, 24, 0.82);
  --panel-border: rgba(255, 255, 255, 0.1);
  --shadow-soft: 0 28px 70px rgba(0, 0, 0, 0.55);
  --shadow-glow: 0 0 0 1px rgba(255, 255, 255, 0.04), 0 18px 45px rgba(97, 118, 255, 0.16);
  --radius-panel: 30px;
  --radius-video: 24px;
}

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

html {
  background:
    radial-gradient(circle at top, rgba(122, 146, 255, 0.14), transparent 36%),
    radial-gradient(circle at 80% 20%, rgba(92, 114, 193, 0.18), transparent 24%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-base) 62%, #020304 100%);
}

body {
  margin: 0;
  min-height: 100svh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: transparent;
}

img,
video {
  display: block;
  max-width: 100%;
}

.reel-feed {
  height: 100svh;
  height: 100dvh;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  animation: page-fade 700ms ease-out both;
}

.reel-slide {
  min-height: 100svh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  padding: clamp(1.25rem, 4vw, 2.5rem);
}

.feature-card {
  width: min(100%, 31rem);
  padding: clamp(0.65rem, 1.6vw, 0.9rem);
  border-radius: var(--radius-panel);
  background: linear-gradient(180deg, rgba(20, 23, 33, 0.88), var(--panel-bg));
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow-soft), var(--shadow-glow);
  backdrop-filter: blur(18px);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.feature-card:hover,
.feature-card:focus-within {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow:
    0 36px 80px rgba(0, 0, 0, 0.62),
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 20px 50px rgba(97, 118, 255, 0.2);
}

.video-frame {
  position: relative;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: var(--radius-video);
  background:
    radial-gradient(circle at top, rgba(118, 138, 255, 0.14), transparent 30%),
    #000;
}

.reel-player {
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
  background: #000;
}

.reel-player:fullscreen,
.reel-player:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  object-fit: contain;
  background: #000;
}

.reel-title-wrap {
  position: absolute;
  top: clamp(1rem, 3vw, 1.45rem);
  left: 50%;
  z-index: 4;
  width: min(calc(100% - 2rem), 25rem);
  text-align: center;
  transform: translateX(-50%);
  pointer-events: none;
}

.intro-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-content: center;
  padding: clamp(1.5rem, 5vw, 2.5rem);
  color: #f7f9ff;
  background:
    linear-gradient(180deg, rgba(4, 5, 7, 0.28) 0%, rgba(4, 5, 7, 0.62) 100%),
    radial-gradient(circle at top, rgba(126, 150, 255, 0.24), transparent 34%);
  backdrop-filter: blur(10px);
  pointer-events: none;
  transition:
    opacity 220ms ease,
    visibility 220ms ease,
    transform 220ms ease,
    background-color 220ms ease;
}

.intro-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.overlay-stack {
  display: grid;
  justify-items: center;
  gap: 1.3rem;
  width: min(82vw, 24rem);
  justify-self: center;
  text-align: center;
}

.overlay-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  min-width: 12.5rem;
  padding: 0.9rem 1.3rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(12, 14, 20, 0.68);
  color: #f7f9ff;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(14px);
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease;
}

.overlay-cta:hover,
.overlay-cta:focus-visible {
  transform: translateY(-1px);
  background: rgba(20, 24, 34, 0.82);
  border-color: rgba(255, 255, 255, 0.2);
}

.overlay-logo-frame {
  width: min(82vw, 19rem);
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.overlay-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  margin-inline: auto;
  transform: translateY(-1.5%) scale(1.08);
  filter: drop-shadow(0 22px 34px rgba(0, 0, 0, 0.35));
}

.overlay-chip-icon {
  position: relative;
  width: 2rem;
  height: 2rem;
  flex: 0 0 2rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #c44cf8 0%, #3dbdff 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.overlay-chip-icon::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-35%, -50%);
  border-left: 0.54rem solid #f7f9ff;
  border-top: 0.36rem solid transparent;
  border-bottom: 0.36rem solid transparent;
}

.overlay-chip-label {
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.reel-kicker {
  margin: 0 0 0.45rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(247, 249, 255, 0.7);
  text-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.reel-title {
  margin: 0;
  font-size: clamp(1.3rem, 4vw, 2.15rem);
  line-height: 0.96;
  font-weight: 800;
  letter-spacing: -0.045em;
  color: transparent;
  background: linear-gradient(135deg, #ffffff 0%, #d8cbff 46%, #84d6ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow: 0 14px 28px rgba(0, 0, 0, 0.24);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes page-fade {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .reel-slide {
    padding-inline: 1rem;
    padding-block: 1.25rem 1.5rem;
  }

  .feature-card {
    border-radius: 24px;
  }

  .video-frame {
    border-radius: 18px;
  }

  .overlay-logo {
    transform: translateY(-1.5%) scale(1.05);
  }
}

@media (hover: none) and (pointer: coarse), (max-width: 820px) {
  html,
  body {
    background: #000;
  }

  .reel-slide {
    padding: 0;
  }

  .feature-card,
  .feature-card:hover,
  .feature-card:focus-within {
    width: 100vw;
    height: 100svh;
    height: 100dvh;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    transform: none;
  }

  .video-frame {
    width: 100vw;
    height: 100svh;
    height: 100dvh;
    aspect-ratio: auto;
    border-radius: 0;
    background: #000;
  }

  .intro-overlay {
    padding: clamp(1.5rem, 7vw, 3rem);
  }

  .reel-title-wrap {
    top: calc(env(safe-area-inset-top, 0px) + 1rem);
    width: min(calc(100% - 1.5rem), 22rem);
  }

  .overlay-stack {
    width: min(86vw, 21rem);
  }

  .overlay-logo-frame {
    width: min(86vw, 18rem);
  }

  .overlay-logo {
    transform: translateY(-2.2%) scale(1.09);
  }

  .overlay-chip-label {
    font-size: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reel-feed,
  .feature-card,
  .intro-overlay,
  .overlay-cta {
    animation: none;
    transition: none;
  }
}
