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

html, body {
  background: #000;
  color: #fff;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  overflow-x: hidden;
}

/* ── Nav ─────────────────────────────────────── */
#nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 28px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#nav::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 120px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0) 100%);
  z-index: -1;
  pointer-events: none;
}

.logo {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
}

.nav-btn {
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
  padding: 10px 28px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.6);
}

/* ── Frame canvas ────────────────────────────── */
#frame-canvas {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  border-radius: 6px;
  opacity: 0;
}

/* ── Scroll track ────────────────────────────── */
#scroll-track {
  position: relative;
  z-index: 10;
}

/* ── Mobile video fallback ───────────────────── */
#mobile-video {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 88vw;
  max-height: 92vh;
  width: auto;
  height: auto;
  object-fit: contain;
  z-index: 1;
  opacity: 0.9;
  transition: opacity 0.3s ease;
}

body.mobile-mode #mobile-video {
  display: block;
}

body.mobile-mode #frame-canvas {
  display: none;
}

/* ── Panels ──────────────────────────────────── */
.panel {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 10vw;
  max-width: 960px;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.panel.visible {
  opacity: 1;
  transform: translateY(0);
}

/* First panel intro slide-up */
.panel.intro-ready {
  opacity: 0;
  transform: translateY(80px);
  transition: opacity 1s ease-out, transform 1s ease-out;
}

.panel.intro-ready.visible {
  opacity: 1;
  transform: translateY(0);
}

.panel h2 {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 20px;
  color: #fff;
}

.panel p {
  font-size: clamp(14px, 1.4vw, 17px);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.6);
  max-width: 720px;
}

/* ── Scrollbar ───────────────────────────────── */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Firefox */
html {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

/* ── Scroll indicator ────────────────────────── */
.scroll-indicator {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  opacity: 0;
  animation: indicatorFadeIn 0.6s ease-out 0.5s forwards;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.scroll-indicator.hidden {
  opacity: 0 !important;
  animation: none;
}

.scroll-indicator svg {
  display: block;
}

.scroll-dot {
  animation: bobUpDown 1.8s ease-in-out infinite;
}

@keyframes indicatorFadeIn {
  from { opacity: 0; }
  to   { opacity: 0.5; }
}

@keyframes bobUpDown {
  0%   { cy: 80; }
  50%  { cy: 180; }
  100% { cy: 80; }
}

/* ── Footer ──────────────────────────────────── */
#footer {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 60px 40px 48px;
}

#footer a {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.06em;
  transition: color 0.3s ease;
}

#footer a:hover {
  color: #fff;
}

/* ── Responsive ──────────────────────────────── */
@media (max-width: 768px) {
  #nav {
    padding: 20px 24px;
  }

  .panel {
    padding: 0 7vw;
  }
}
