html,
body {
  width: 100%;
  height: 100%;
}

@font-face {
  font-family: "OficiaMONO-Regular";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./font/OficiaMONO-Regular.woff") format("woff");
}

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

body {
  background: #0b0b0b;
  color: #fff;
  font-family: "OficiaMONO-Regular", "Space Grotesk", "Doto Rounded", system-ui, sans-serif;
  height: 250vh;
  max-height: 250vh;
  overflow-x: hidden;
  overscroll-behavior: none;
  line-height: 1.6;
}

html {
  scroll-behavior: smooth;
  overscroll-behavior: none;
  background: #000000;
}

#intro {
  position: relative;
  width: 100%;
  height: 250vh;
  background: #000000;
}

.intro-sticky {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-intro {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  pointer-events: none;
}

.logo-intro img {
  display: block;
  width: 200px;
  height: 200px;
  object-fit: contain;
  opacity: 0;
  visibility: hidden;
}

.intro-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

.intro-overlay.visible {
  opacity: 1;
}

.intro-overlay.visible .filter-container,
.intro-overlay.visible .hero-editorial-link {
  pointer-events: auto;
}

#logo-slideshow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 60vw;  
  max-height: 60vh; 
  width: auto;
  height: auto;
  object-fit: contain;
  pointer-events: none;
  z-index: 2; /* Ensure it's above the canvas */
  opacity: 0; /* Hidden by default, managed by JS */
}

#cursorCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 11; /* Topmost layer for cursor (above overlay and interactive canvas) */
  opacity: 0;
  transition: opacity 0.6s ease;
}

.intro-overlay.visible {
  position: relative;
}

.filter-container {
  position: absolute;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column-reverse;
  gap: 1rem;
  align-items: center;
  z-index: 100;
  mix-blend-mode: difference;
}

.filter-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-main-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 20px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-family: "Oficia Mono", "IBM Plex Mono", monospace;
  font-size: 10pt;
  text-decoration: none;
  background: rgba(3, 3, 3, 0.85);
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
  color: #fff;
}

.filter-main-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
}

.filter-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.filter-close.visible {
  opacity: 1;
  pointer-events: auto;
}

.filter-close:hover {
  color: #fff;
}

.bubble-filters {
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.bubble-filters.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.filter-item {
  display: flex;
  align-items: center;
}

.filter-item input[type="checkbox"] {
  display: none;
}

.filter-item label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-family: "Oficia Mono", monospace;
  font-size: 10pt;
  padding: 16px;
  background: rgba(3, 3, 3, 0.85);
  color: #fff;
  cursor: pointer;
  user-select: none;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.filter-item label:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.6);
}

.filter-item input[type="checkbox"]:checked + label {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.6);
}


.mobile-filter-controls {
  display: none !important;
  pointer-events: auto;
}

.mobile-filter-display {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 24px;
  min-width: 120px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  font-family: "Oficia Mono", monospace;
  font-size: 16px;
  background: transparent;
  color: #fff;
  user-select: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.mobile-filter-display.active-category {
  background: transparent;
}

.filter-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 0;
}

.filter-arrow svg {
  width: 40px; /* Wider for arrow shape */
  height: auto;
  display: block;
}

@media (max-width: 630px) {
  .filter-header,
  .bubble-filters {
    display: none !important;
  }

  .mobile-filter-controls {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
  }
  
  .filter-container {
    bottom: 40px;
    left: 0;
    right: 0;
    transform: none;
    width: 100%;
    flex-direction: row;
    justify-content: center;
  }

  /* Performance Optimizations for Mobile */
  .noise-overlay {
    display: none !important; /* Disable expensive noise filter */
  }

  .mobile-filter-display.active-category {
    background: transparent;
  }

  .scroll-icon-container {
    filter: none !important; /* Disable drop-shadow */
  }

  /* Force Hardware Acceleration on key elements */
  #bubbleCanvas,
  #cursorCanvas,
  .intro-overlay,
  .fixed-logo,
  .scroll-icon-container,
  .filter-container {
    transform: translateZ(0);
    will-change: transform, opacity, filter;
  }
}

#bubbleCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
  pointer-events: none;
}

#bubbleCanvas.interactive {
  pointer-events: auto;
  z-index: 5;
}

#detailsCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 6;
  pointer-events: none;
}

.content {
  position: relative;
  max-width: min(90vw, 960px);
  text-align: center;
  z-index: 1;
  color: #f5f5f5;
}

.content h1 {
  font-size: clamp(2rem, 6vw, 4.5rem);
  letter-spacing: -0.02em;
  margin-bottom: clamp(0.5rem, 1.5vw, 1rem);
}

.content p {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: rgba(255, 255, 255, 0.85);
  max-width: 42rem;
  margin: 0 auto;
}


.noise-overlay {
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.12;
  background-repeat: repeat;
  background-size: 128px 128px;
  mix-blend-mode: overlay;
  animation: noise-animation 8s steps(2) infinite;
}

@keyframes noise-animation {
  0% { transform: translate(0, 0); }
  50% { transform: translate(-5%, 5%); }
  100% { transform: translate(0, 0); }
}

.scroll-icon-container {
  position: fixed;
  bottom: 4rem;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 60px;
  z-index: 5;
  pointer-events: none;
  opacity: .9;
  transition: opacity 1s ease;
  filter: drop-shadow(0 0 8px rgba(251, 248, 217, 0.4)) drop-shadow(0 0 15px rgba(251, 248, 217, 0.4));
}

.scroll-icon-container svg {
  overflow: visible !important;
}

.scroll-icon-container .scroll-mouse__dot {
  transform-origin: center;
  animation: scroll-mouse-dot 1.2s ease-in-out infinite;
}

@keyframes scroll-mouse-dot {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  70% {
    transform: translateY(10px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 0;
  }
}

.scroll-icon-container.hidden {
  opacity: 0;
}
