/* ═══ LAYOUT — Page structure, scroll container, iOS bar transparency ═══ */

/* Video background — position:absolute (NOT fixed) for iOS bar transparency */
.vbg {
  position: absolute;
  top: -60px;
  left: -10px;
  right: -10px;
  height: calc(100vh + 120px);
  z-index: 0;
  overflow: hidden;
  will-change: transform;
}

.vbg canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#bgcanvas2 {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
}

.vbg-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 20%, rgba(0, 0, 0, .5) 100%);
  pointer-events: none;
}

/* Morph video — hidden by default, shown during transitions */
.morph-video {
  position: absolute;
  top: -60px;
  left: 0;
  width: 100%;
  height: calc(100vh + 120px);
  object-fit: cover;
  z-index: 1;
  opacity: 0;
  pointer-events: none;
}

.morph-video.active {
  opacity: 1;
}

/* Smoke overlay — position:sticky for iOS bar compatibility */
.smoke {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: calc(100vh + 80px);
  margin-bottom: calc(-100vh - 80px);
  z-index: 4;
  pointer-events: none;
  mix-blend-mode: screen;
}

/* Scroll gradient — fixed on desktop, hidden on mobile */
.scroll-gradient {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 80vh;
  background: linear-gradient(to top, rgba(0, 0, 0, .7) 0%, rgba(0, 0, 0, .45) 40%, transparent 100%);
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  transition: opacity .8s ease;
}

.scroll-gradient.vis {
  opacity: 1;
}

/* Scroll container — all scrollable content lives here */
.scroll-container {
  position: relative;
  z-index: 5;
  height: calc(100vh + 80px);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

/* Page content area */
#pageContent {
  position: relative;
  z-index: 10;
}

/* Section base */
.section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 80px;
  position: relative;
}

.section-full {
  min-height: 100vh;
  width: 100%;
  position: relative;
}

/* About overlay — full page blur effect */
.about-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: all .5s var(--ease-expo);
}

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

.about-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.about-scroll {
  position: relative;
  z-index: 1;
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 80px 60px;
}

.about-content {
  max-width: 800px;
  margin: 0 auto;
}

.about-close {
  position: fixed;
  top: 20px;
  right: 24px;
  z-index: 210;
  width: 48px;
  height: 48px;
  border: none;
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  color: rgba(255, 255, 255, .6);
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .3s;
}

.about-close:hover {
  background: rgba(255, 255, 255, .12);
  color: #fff;
}
