:root {
  color-scheme: dark;
  --ink: #f7fbff;
  --muted: #aeb9c7;
  --line: rgba(255, 255, 255, 0.16);
  --panel: rgba(10, 16, 26, 0.82);
  --green: #32d48a;
  --cyan: #37ddf4;
  --gold: #f4b451;
  --red: #ff6b6b;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: #071019;
  color: var(--ink);
  font-family: Arial, "Segoe UI", sans-serif;
  overflow: hidden;
}

.video-stage {
  align-items: stretch;
  background:
    radial-gradient(circle at 18% 20%, rgba(55, 221, 244, 0.23), transparent 32%),
    radial-gradient(circle at 82% 74%, rgba(50, 212, 138, 0.22), transparent 34%),
    linear-gradient(135deg, #071019 0%, #111b29 48%, #070b12 100%);
  display: grid;
  min-height: 100vh;
  padding: clamp(18px, 4vw, 36px);
  position: relative;
}

.ambient-grid {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 42px 42px;
  inset: 0;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.92), transparent);
  opacity: 0.35;
  position: absolute;
  transform: perspective(700px) rotateX(58deg) translateY(12%);
  transform-origin: center bottom;
}

.story-card {
  align-self: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  display: grid;
  gap: clamp(12px, 2vw, 18px);
  isolation: isolate;
  margin: auto;
  max-width: 960px;
  min-height: min(640px, calc(100vh - 44px));
  overflow: hidden;
  padding: clamp(18px, 4vw, 44px);
  position: relative;
  width: min(100%, 1100px);
}

.story-card::before {
  background: linear-gradient(90deg, transparent, rgba(55, 221, 244, 0.2), transparent);
  content: "";
  height: 1px;
  left: -20%;
  position: absolute;
  right: -20%;
  top: 0;
  transform: translateX(-35%);
  animation: scanline 4.5s cubic-bezier(.2, .9, .2, 1) infinite;
}

.story-top {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-height: 34px;
}

.story-top span,
.story-top strong {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  padding: 7px 10px;
  text-transform: uppercase;
}

.story-top strong {
  background: rgba(50, 212, 138, 0.12);
  color: var(--green);
}

h1 {
  font-size: clamp(34px, 7vw, 72px);
  letter-spacing: 0;
  line-height: 0.96;
  margin: 0;
  max-width: 820px;
}

p {
  color: var(--muted);
  font-size: clamp(15px, 2vw, 21px);
  line-height: 1.45;
  margin: 0;
  max-width: 780px;
}

.signal-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 9px;
  max-width: 520px;
  padding: 14px;
}

.signal-line {
  background: linear-gradient(90deg, var(--cyan), transparent);
  border-radius: 999px;
  height: 8px;
  width: 88%;
  animation: linePulse 3.2s ease-in-out infinite;
}

.signal-line.short {
  animation-delay: .25s;
  width: 62%;
}

.signal-line.alert {
  animation-delay: .5s;
  background: linear-gradient(90deg, var(--gold), transparent);
  width: 72%;
}

.signal-meter {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  height: 12px;
  overflow: hidden;
}

.signal-meter span {
  background: linear-gradient(90deg, var(--green), var(--cyan));
  display: block;
  height: 100%;
  transform-origin: left center;
  animation: meter 7.5s ease-in-out infinite;
}

.scene-list {
  counter-reset: scene;
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.scene-list li {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  display: grid;
  font-size: clamp(13px, 1.6vw, 16px);
  grid-template-columns: 34px 1fr;
  line-height: 1.3;
  min-height: 46px;
  opacity: .58;
  padding: 8px 10px;
  transform: translateY(8px);
  animation: sceneIn 7.5s linear infinite;
  animation-delay: calc(var(--i) * 1.15s);
}

.scene-list li::before {
  color: var(--cyan);
  content: "0" counter(scene);
  counter-increment: scene;
  font-size: 12px;
  font-weight: 900;
}

.product-cta {
  align-items: center;
  background: var(--green);
  border-radius: 8px;
  color: #061018;
  display: inline-flex;
  font-weight: 900;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  text-decoration: none;
  width: fit-content;
}

.progress {
  background: rgba(255, 255, 255, 0.1);
  bottom: 0;
  height: 4px;
  left: 0;
  overflow: hidden;
  position: absolute;
  right: 0;
}

.progress span {
  background: linear-gradient(90deg, var(--cyan), var(--green), var(--gold));
  display: block;
  height: 100%;
  transform-origin: left center;
  animation: progress 7.5s linear infinite;
}

@keyframes scanline {
  0% { transform: translateX(-35%); }
  65%, 100% { transform: translateX(35%); }
}

@keyframes linePulse {
  0%, 100% { opacity: .45; transform: scaleX(.72); }
  50% { opacity: 1; transform: scaleX(1); }
}

@keyframes meter {
  0% { transform: scaleX(.18); }
  45% { transform: scaleX(.72); }
  72%, 100% { transform: scaleX(1); }
}

@keyframes sceneIn {
  0%, 8% { opacity: .4; transform: translateY(8px); }
  16%, 64% { opacity: 1; transform: translateY(0); }
  78%, 100% { opacity: .58; transform: translateY(0); }
}

@keyframes progress {
  0% { transform: scaleX(0); }
  100% { transform: scaleX(1); }
}

@media (max-width: 640px) {
  .video-stage {
    padding: 12px;
  }

  .story-card {
    min-height: calc(100vh - 24px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
