@font-face {
  font-family: 'NeueHaasDisplayBold';
  src: url('assets/fonts/NeueHaasDisplayBold.woff2') format('woff2'),
       url('assets/fonts/NeueHaasDisplayBold.woff') format('woff');
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

/* -------------------- Reset & Base -------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  outline: none;
}

html, body {
  height: 100%;
  overflow: hidden;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-text-size-adjust: 100%;
  font-family: 'NeueHaasDisplayBold', Arial, Helvetica, sans-serif;
  color: #000;
  line-height: 1.6;
  transition: opacity 0.3s ease;
  color-scheme: light;
}

html:has(body.graphics-page),
html:has(body.sound-page),
html:has(body.visual-page) {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  height: auto !important;
}

body.graphics-page,
body.sound-page,
body.visual-page {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  height: auto !important;
  min-height: 100vh;
}

body:not(.graphics-page):not(.sound-page):not(.visual-page) * {
  touch-action: none;
}

body.graphics-page *,
body.sound-page *,
body.visual-page * {
  touch-action: auto;
}

body.lightbox-open {
  overflow: hidden !important;
}

html:has(body.lightbox-open) {
  overflow: hidden !important;
}

/* -------------------- Z-Index Layer System -------------------- */
/*
  --z-base:      1
  --z-overlay:   100
  --z-lightbox:  200
  --z-grain:     300
  --z-loading:   400
*/
:root {
  --z-base:     1;
  --z-overlay:  100;
  --z-lightbox: 200;
  --z-grain:    300;
  --z-loading:  400;
}

/* -------------------- Fullscreen Background Image -------------------- */
.bg-image {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 104vw;
  height: 104vh;
  max-width: 1800px;
  max-height: 1800px;
  min-width: 600px;
  min-height: 400px;
  transform: translate(-50%, -50%) scale(0.95);
  z-index: -2;
  pointer-events: none;
  user-select: none;
  background-color: #fff;
  background-image: url('assets/images/NATURAL-PROGRESSION.jpg');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

@media (max-width: 1100px) {
  .bg-image {
    background-image: url('assets/images/NATURAL-PROGRESSION-2.jpg');
    transform: translate(-50%, -50%) scale(1.2);
    left: 55%;
    width: 100vw;
    height: 100vh;
    max-width: 100%;
    max-height: 100%;
    min-width: 0;
    min-height: 0;
    background-size: contain;
  }
}

/* -------------------- Loading Screen -------------------- */
.loading-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  z-index: var(--z-loading);
  opacity: 1;
  visibility: visible;
  transition: opacity 1s ease, visibility 1s ease;
}

.loading-screen.fade-out {
  opacity: 0;
  visibility: hidden;
}

.loading-logo {
  font-family: 'NeueHaasDisplayBold', Arial, Helvetica, sans-serif;
  font-size: clamp(18px, 1.5vw, 20px);
  text-transform: lowercase;
  color: #fff;
}

/* -------------------- Site Nav -------------------- */
.site-nav {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: var(--z-overlay);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  pointer-events: none;
  font-family: 'NeueHaasDisplayBold', Arial, Helvetica, sans-serif;
  font-size: clamp(0.65rem, 1vw, 0.67rem);
  line-height: 1;
  text-transform: lowercase;
  color: #000;
}

.site-nav-logo {
  font-size: clamp(0.66rem, 1.4vw, 0.76rem);
  color: #000;
  text-decoration: none;
  pointer-events: all;
  transition: color 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
}

.site-nav-logo:hover {
  opacity: 0.65;
}

.site-nav-sep {
  display: none;
}

.site-nav-links {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  pointer-events: all;
}

.site-nav-link {
  color: #000;
  text-decoration: none;
  pointer-events: all;
  transition: color 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
  margin: 0;
}

.site-nav-link:hover {
  opacity: 0.55;
}

.site-nav-link--active {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
  text-decoration: none;
}

.site-nav-link--soon {
  opacity: 0.3;
  cursor: not-allowed;
}

/* -------------------- Site Nav — Mobile -------------------- */
@media (max-width: 768px) {
  .site-nav {
    align-items: center;
    padding: 18px 0;
    font-size: 0.68rem;
  }

  .site-nav-logo {
    text-align: center;
  }

  .site-nav-links {
    justify-content: center;
    white-space: nowrap;
  }
}

/* -------------------- Grain Overlay -------------------- */
#grain-overlay-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: var(--z-grain);
}