.topbar {
  position: fixed;
  z-index: 80;
  top: 0;
  left: 0;
  right: 0;
  height: var(--topbar-height);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 18px clamp(18px, 4vw, 54px);
  pointer-events: none;
}

.topbar > * {
  pointer-events: auto;
}

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: var(--warm-ivory);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 800;
  background: var(--olive-deep);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  box-shadow: 0 14px 30px rgba(32, 36, 25, 0.16);
}

.chapter-rail {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(79, 90, 58, 0.12);
  border-radius: 999px;
  background: rgba(247, 241, 230, 0.76);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 38px rgba(32, 36, 25, 0.08);
}

.chapter-dot {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: rgba(32, 36, 25, 0.58);
  font-size: 0.68rem;
  font-weight: 700;
  background: transparent;
  border-radius: 999px;
  transition:
    color 220ms var(--ease-soft),
    background 220ms var(--ease-soft),
    transform 220ms var(--ease-soft);
}

.chapter-dot:hover,
.chapter-dot.is-active {
  color: var(--warm-ivory);
  background: var(--olive-deep);
  transform: translateY(-1px);
}

.menu-toggle {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  gap: 0;
  background: rgba(247, 241, 230, 0.76);
  border: 1px solid rgba(79, 90, 58, 0.12);
  border-radius: 50%;
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 38px rgba(32, 36, 25, 0.08);
}

.menu-toggle span {
  width: 20px;
  height: 1px;
  display: block;
  background: var(--charcoal-olive);
  transition: transform 240ms var(--ease-soft);
}

.menu-open .menu-toggle span:first-child {
  transform: translateY(5px) rotate(45deg);
}

.menu-open .menu-toggle span:last-child {
  transform: translateY(-5px) rotate(-45deg);
}

.progress-shell {
  position: fixed;
  z-index: 82;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(79, 90, 58, 0.12);
}

.progress-line {
  width: 100%;
  height: 100%;
  display: block;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, var(--olive-deep), var(--champagne-gold), var(--blush-nude));
}

.scene-counter {
  position: fixed;
  z-index: 70;
  right: clamp(18px, 4vw, 54px);
  bottom: 28px;
  display: flex;
  gap: 6px;
  color: rgba(32, 36, 25, 0.54);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 75;
  display: grid;
  place-items: center;
  padding: 28px;
  opacity: 0;
  visibility: hidden;
  background: rgba(32, 36, 25, 0.48);
  backdrop-filter: blur(16px);
  transition:
    opacity 320ms var(--ease-soft),
    visibility 320ms var(--ease-soft);
}

.menu-open .menu-overlay {
  opacity: 1;
  visibility: visible;
}

.menu-panel {
  width: min(720px, 100%);
  padding: clamp(28px, 5vw, 56px);
  color: var(--charcoal-olive);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.52), rgba(247, 241, 230, 0.94)),
    var(--paper);
  border: 1px solid rgba(200, 169, 106, 0.38);
  border-radius: 8px;
  box-shadow: var(--shadow-card);
}

#menuChapters {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.scroll-host {
  --scene-count: 9;
  position: relative;
  width: 100vw;
  height: 100svh;
  overflow: hidden;
}

.experience {
  position: relative;
  top: 0;
  width: 100vw;
  height: 100svh;
  overflow: hidden;
  perspective: 1200px;
  transform-style: preserve-3d;
}

.horizontal-track {
  width: max-content;
  height: 100%;
  display: flex;
  will-change: transform;
  transition: transform 900ms var(--ease-out);
}

.scene {
  position: relative;
  width: 100vw;
  min-width: 100vw;
  height: 100svh;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
  transform-style: preserve-3d;
}

.scene-bg,
.scene-mid,
.scene-content,
.scene-fg {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

.scene-bg {
  z-index: 1;
}

.scene-mid {
  z-index: 2;
  pointer-events: none;
}

.scene-content {
  z-index: 3;
}

.scene-fg {
  z-index: 4;
  pointer-events: none;
}

.mobile-cta {
  display: none;
}

.scene-nav-controls {
  position: fixed;
  z-index: 83;
  left: 50%;
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateX(-50%);
  pointer-events: none;
}

.scene-arrow {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  color: var(--olive-deep);
  background: rgba(247, 241, 230, 0.82);
  border: 1px solid rgba(79, 90, 58, 0.14);
  border-radius: 50%;
  box-shadow: 0 16px 38px rgba(32, 36, 25, 0.12);
  backdrop-filter: blur(16px);
  pointer-events: auto;
  transition:
    opacity 220ms var(--ease-soft),
    transform 220ms var(--ease-soft),
    background 220ms var(--ease-soft);
}

.scene-arrow:hover {
  color: var(--warm-ivory);
  background: var(--olive-deep);
  transform: translateY(-2px);
}

.scene-arrow.is-disabled,
.scene-arrow:disabled {
  cursor: default;
  opacity: 0.34;
  transform: none;
}

.rotate-hint {
  position: fixed;
  z-index: 84;
  left: 50%;
  bottom: 82px;
  display: none;
  width: min(320px, calc(100vw - 34px));
  padding: 10px 14px;
  color: rgba(32, 36, 25, 0.72);
  font-size: 0.74rem;
  font-weight: 700;
  text-align: center;
  background: rgba(247, 241, 230, 0.82);
  border: 1px solid rgba(200, 169, 106, 0.22);
  border-radius: 999px;
  box-shadow: 0 14px 34px rgba(32, 36, 25, 0.1);
  transform: translateX(-50%);
  backdrop-filter: blur(14px);
}
