:root {
  --bg: #0a0a0a;
  --bg-soft: #111218;
  --cyan: #00f0ff;
  --magenta: #ff2d95;
  --white: #f7fbff;
  --muted: rgba(247,251,255,0.78);
  --glass: rgba(255,255,255,0.08);
  --glass-strong: rgba(255,255,255,0.12);
  --glass-border: rgba(255,255,255,0.16);
}
* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
}
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--white);
  font-family: 'Noto Sans Thai', sans-serif;
  overflow-x: hidden;
}
body {
  min-height: 500vh;
}
#hero-canvas, .overlay-gradient {
  position: fixed;
  inset: 0;
}
#hero-canvas {
  width: 100vw;
  height: 100vh;
  z-index: 0;
  background: radial-gradient(circle at top, #12131a, #050505 55%);
}
#source-video {
  display: none;
}
.overlay-gradient {
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 20%, rgba(0,240,255,0.18), transparent 35%),
    radial-gradient(circle at 80% 70%, rgba(255,45,149,0.16), transparent 30%),
    linear-gradient(180deg, rgba(0,0,0,0.08), rgba(0,0,0,0.52));
}
.progress-rail {
  position: fixed;
  top: 50%;
  right: 20px;
  width: 4px;
  height: 28vh;
  transform: translateY(-50%);
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  z-index: 3;
  overflow: hidden;
}
.progress-rail span {
  display: block;
  width: 100%;
  height: 0%;
  border-radius: inherit;
  background: linear-gradient(180deg, var(--cyan), var(--magenta));
  box-shadow: 0 0 16px rgba(0,240,255,0.35);
}
.sound-orb {
  position: fixed;
  left: 4vw;
  bottom: 4vh;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  z-index: 3;
  background: linear-gradient(135deg, var(--cyan), var(--magenta));
  box-shadow: 0 0 0 0 rgba(0,240,255,0.35);
  animation: pulse 2.2s infinite;
}
#scroller {
  position: relative;
  z-index: 2;
}
.panel {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8vw;
}
.hero { justify-content: flex-start; }
.mid { justify-content: flex-end; }
.blast, .outro { justify-content: center; }
.glass {
  max-width: 760px;
  padding: 2rem 2.2rem;
  border: 1px solid var(--glass-border);
  border-radius: 28px;
  background: linear-gradient(180deg, var(--glass-strong), var(--glass));
  backdrop-filter: blur(18px) saturate(135%);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
  box-shadow:
    0 0 40px rgba(0, 240, 255, 0.08),
    0 0 80px rgba(255, 45, 149, 0.06),
    inset 0 1px 0 rgba(255,255,255,0.08);
  opacity: 0;
  transform: translateY(32px) scale(0.98);
  will-change: transform, opacity;
}
.glass-left { margin-right: auto; }
.glass-right { margin-left: auto; }
.glass.accent, .glass.strong { text-align: center; }
.eyebrow {
  letter-spacing: 0.24em;
  font-size: 0.78rem;
  color: var(--cyan);
  margin: 0 0 1rem;
}
h1, h2 {
  margin: 0;
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-shadow:
    0 0 12px rgba(0,240,255,0.25),
    0 0 24px rgba(255,45,149,0.18);
}
h1 {
  font-size: clamp(3rem, 9vw, 6.6rem);
}
h2 {
  font-size: clamp(2.2rem, 6vw, 4.8rem);
}
.lead, .glass p:not(.eyebrow) {
  font-size: clamp(1rem, 2vw, 1.35rem);
  line-height: 1.7;
  color: var(--muted);
}
.cta {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.95rem 1.5rem;
  border-radius: 999px;
  color: var(--white);
  text-decoration: none;
  font-weight: 800;
  background: linear-gradient(135deg, rgba(0,240,255,0.22), rgba(255,45,149,0.24));
  border: 1px solid rgba(255,255,255,0.2);
  box-shadow: 0 0 24px rgba(0,240,255,0.18);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.cta:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 0 28px rgba(255,45,149,0.22);
  background: linear-gradient(135deg, rgba(0,240,255,0.32), rgba(255,45,149,0.34));
}
.loading-state {
  position: fixed;
  inset: auto 0 24px 0;
  z-index: 4;
  text-align: center;
  color: rgba(255,255,255,0.68);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  transition: opacity 0.3s ease;
}
.loading-state.hidden {
  opacity: 0;
  pointer-events: none;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(0,240,255,0.35); transform: scale(1); }
  70% { box-shadow: 0 0 0 18px rgba(0,240,255,0); transform: scale(1.08); }
  100% { box-shadow: 0 0 0 0 rgba(0,240,255,0); transform: scale(1); }
}
@media (max-width: 768px) {
  .panel {
    align-items: end;
    justify-content: center;
    padding: 6vw 5vw 12vh;
  }
  .hero, .mid, .blast, .outro { justify-content: center; }
  .glass {
    padding: 1.3rem 1.2rem;
    border-radius: 22px;
  }
  .progress-rail {
    right: 12px;
    height: 22vh;
  }
}
