* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: system-ui, sans-serif;
  background: #000;
  overflow-x: hidden;
}

#bg-video {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  object-fit: cover;
  z-index: 0;
}
#bg-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.5);
  z-index: 1;
}

/* ── SCROLL SPACERS ── */
#hero-spacer   { height: 30vh; }
#panels-spacer { height: 280vh; }

/* ── HERO ── */
#hero {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  z-index: 4;
  pointer-events: none;
}

#hero-content {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: auto;
  transition: top 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

#logo-wrapper {
  width: 30vw;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

#logo-svg {
  display: block;
  width: 100%;
  height: auto;
}

rect.on {
  fill: #00ffff;
  filter: drop-shadow(0 0 3px rgba(0,255,255,0.4));
  cursor: pointer;
}
rect.flicker {
  animation: flicker var(--dur) ease-in-out infinite alternate;
}
@keyframes flicker {
  0%   { opacity: 0.5; }
  100% { opacity: 1; }
}

#demo-frame {
  width: 30vw;
  aspect-ratio: 16 / 9;
  margin-top: 24px;
  border: 2px solid rgba(0,255,255,0.4);
  border-radius: 8px;
  overflow: hidden;
  background: #000;
  position: relative;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
#demo-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* ── PANELS ── */
#panels-container {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  z-index: 3;
  pointer-events: none;
}

.panel {
  display: flex;
  align-items: center;
  justify-content: center;
}

#panels-container .panel {
  position: absolute;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  transition: transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}

.panel-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 40px;
  width: 80%;
  max-width: 1000px;
  padding: 5%;
  background: rgba(0,0,0,0.4);
  border-radius: 16px;
  pointer-events: auto;
}

.panel-text {
  flex: 1;
  color: #ccc;
}
.panel-text h2 {
  color: #00ffff;
  font-size: 1.5rem;
  margin-bottom: 12px;
  letter-spacing: 0.05em;
}
.panel-text p {
  line-height: 1.6;
  color: #fff;
}

.panel-image {
  flex: 1;
  aspect-ratio: 16 / 10;
  background: rgba(0,255,255,0.06);
  border: 1px solid rgba(0,255,255,0.2);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(0,255,255,0.4);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  overflow: hidden;
}
.panel-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.panel:last-child .panel-card {
  border: 1px solid rgba(0,255,255,0.35);
  text-align: center;
}
.panel:last-child .panel-image {
  background: rgba(0,255,255,0.12);
  border-color: rgba(0,255,255,0.4);
  color: #00ffff;
  font-weight: 600;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.3s;
}
.panel:last-child .panel-image:hover {
  background: rgba(0,255,255,0.2);
}

@media (max-width: 640px) {
  #logo-wrapper { width: 60vw; }
  #demo-frame  { width: 60vw; }
  .panel-card {
    flex-direction: column;
    width: 90%;
    padding: 8% 5%;
  }
}

/* ── NO-JS FALLBACK ── */
.no-js-fallback { display: none; }
.no-js .no-js-fallback { display: block; position: relative; z-index: 2; }
.no-js .js-only { display: none; }

.no-js body { background: #000; color: #ccc; overflow-x: hidden; }
.no-js #hero { position: static; height: auto; pointer-events: auto; }
.no-js #hero-spacer, .no-js #panels-spacer { display: none; }
.no-js #panels-container { position: static; height: auto; overflow: visible; }
.no-js .panel { position: static; transform: none !important; height: auto; margin-bottom: 2rem; }
.no-js #hero-content { position: static; transform: none; }
.no-js #logo-wrapper { transform: none !important; width: 30vw; max-width: 300px; }
.no-js #logo-svg { display: block; width: 100%; height: auto; }
.no-js #demo-frame { transform: none !important; }
#panels-source { position: relative; z-index: 2; padding: 5vh 5vw; max-width: 1000px; margin: 0 auto; }
#panels-source .panel { margin-bottom: 2rem; }
#panels-source .panel:first-child { margin-top: 10vh; }
