@charset "UTF-8";

@font-face {
  font-family: "baikal";
  src: url(../fonts/Baikal-Medium.otf);
}

@font-face {
  font-family: "baikal-var";
  src: url("../fonts/Baikal VAR-VF.ttf.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 50% 200%;
}

html {
  /* scroll-behavior: smooth; */
  animation: fadeIn 1.5s;
  transition: 0.4s;
  background-color: #ffffff;
  color: rgb(202, 202, 202);
}

::selection {
  background-color: var(--accent-color);
  color: #ffffff;
}

::-moz-selection {
  background-color: var(--accent-color);
}

::selection {
  background-color: var(--accent-color);
  color: #ffffff;
}

::-moz-selection {
  background-color: var(--accent-color);
  color: #ffffff;
}

body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  width: 100%;
}

:root {
  --accent-color: #ff0000;
  --accent-bg-alpha: rgba(255, 0, 0, 0.15);
  --accent-shadow-alpha: rgba(255, 0, 0, 0.2);

  /* Variable Font Defaults */
  --font-wght: 500;
  --font-wdth: 100;
}

body.theme-acqua {
  --accent-color: #00acc1;
  --accent-bg-alpha: rgba(0, 172, 193, 0.15);
  --accent-shadow-alpha: rgba(0, 172, 193, 0.2);
}

body.theme-gold {
  --accent-color: #d4af37;
  --accent-bg-alpha: rgba(212, 175, 55, 0.15);
  --accent-shadow-alpha: rgba(212, 175, 55, 0.2);
}

body.theme-purple {
  --accent-color: #a855f7;
  --accent-bg-alpha: rgba(168, 85, 247, 0.15);
  --accent-shadow-alpha: rgba(168, 85, 247, 0.2);
}

h1 {
  font-size: 1.5em;
  font-family: "baikal-var", baikal, sans-serif;
  color: var(--accent-color);
  font-variation-settings: "wght" var(--local-wght, var(--font-wght)), "wdth" var(--font-wdth);
  transition: color 0.3s ease, font-variation-settings 0.05s linear;
}

.tab {
  display: inline-block;
  margin-left: 1.5em;
}

h2 {
  font-size: 1em;
  font-family: "baikal-var", baikal, sans-serif;
  color: var(--accent-color);
  font-variation-settings: "wght" var(--local-wght, var(--font-wght)), "wdth" var(--font-wdth);
  transition: color 0.3s ease, font-variation-settings 0.05s linear;
}

h2:hover {
  color: var(--accent-color);
}

/* Quadrant-specific heading styles */
.container-inner h1 {
  font-size: 1.25em;
  margin: 0;
  color: var(--accent-color);
  font-family: baikal;
}

.container-inner h2 {
  font-size: 1em;
  margin: 0;
  color: var(--accent-color);
}

h3 {
  color: #090909;
  font-size: 1em;
  font-family: baikal;
  text-indent: -4em;
  margin-left: 4em;
  transition: all 0.3s ease;
  opacity: 0.8;
}

h3:hover {
  color: var(--accent-color);
  opacity: 1;
}

ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: max-content auto;
}

li {
  display: grid;
  grid-column: span 2;
  grid-template-columns: subgrid;
  gap: .4rem;
}


@media (max-width: 900px) {


  h1 {
    font-size: 1em;
    font-family: baikal;
  }

}

@keyframes fadeIn {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}


header {
  /* background-color: rgb(0, 225, 255); */
  padding: 0;
  /* padding removed from here to prevent grid shift */

  height: 5vh;
  display: grid;
  grid-template-columns: 50% 25% 25%;
  align-items: center;
  box-sizing: border-box;
  position: relative;
  z-index: 110;
  /* Ensure header stays above everything */
  width: 100%;
}

header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background-color: var(--accent-color);
  z-index: 1100;
  pointer-events: none;
}

.header-section {
  height: 100%;
  display: flex;
  align-items: center;
  border-right: 1px solid var(--accent-color);
  box-sizing: border-box;
  padding-left: 1vw;
  /* Base padding for sections */
}

.header-section:first-child {
  padding-left: 1vw;
}

.header-section:nth-child(2) {
  border-right: none;
}

.header-section:last-child {
  border-right: none;
  justify-content: flex-end;
  padding-right: 1vw;
  padding-left: 0;
}

.container {
  display: grid;
  grid-template-columns: 50% 50%;
  grid-template-rows: 1fr 1fr;
  width: 100%;
  height: 95vh;
  position: relative;
  transition: opacity 3.0s ease;
}

.container.faded-out {
  opacity: 0;
}

.container.fade-in {
  opacity: 1;
}

/* Central Cross Divider */
.container::before,
.container::after {
  content: '';
  position: absolute;
  background-color: var(--accent-color);
  z-index: 10;
  pointer-events: none;
}

/* Vertical Line */
.container::before {
  left: 50%;
  top: 0;
  width: 1px;
  height: 100%;
  transform: translateX(-100%);
  /* Shifts the 1px line to sit INSIDE the first 50% area, matching border-right */
}

/* Horizontal Line */
.container::after {
  top: 50%;
  left: 0;
  width: 100%;
  height: 1px;
}

.container-inner {
  padding: 1vw;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  transition: all 300ms ease-in-out;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
}

.visualizer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

.container-inner.hovered {
  background-color: var(--accent-bg-alpha);
  box-shadow: inset 0 0 40px var(--accent-shadow-alpha);
}

header hr {
  display: none;
}

.dropdown {
  position: relative;
  cursor: pointer;
}

.dropdown.open h3 {
  opacity: 1;
  color: var(--accent-color);
}

.dropdown-menu {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  position: absolute;
  top: 100%;
  left: 0;
  display: block;
  list-style: none;
  padding: 0 1vw 1vh 1vw;
  margin: 0;
  width: calc(100% - 1px);
  height: 95vh;
  z-index: 1000;
  border-right: none;
  box-sizing: border-box;
  overflow: hidden;
  background-color: rgba(255, 255, 255, 0.002);
  backdrop-filter: blur(13px);
  -webkit-backdrop-filter: blur(13px);
  border-bottom: 1px solid var(--accent-color);
  clip-path: inset(0 0 100% 0);
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    visibility 0.4s,
    clip-path 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-link {
  text-decoration: none;
  display: flex;
  align-items: center;
  height: 100%;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0.8;
}

.header-link:hover {
  opacity: 1;
}

.dropdown-menu li {
  display: block;
  color: #090909;
  font-family: baikal;
  font-size: 1em;
  transition: all 0.3s ease;
  cursor: pointer;
  border-top: 1px solid var(--accent-color);
  padding-top: 1vh;
  padding-bottom: 1vh;
  opacity: 0.8;
}

.dropdown-menu li:first-child {
  border-top: none;
}

.dropdown-menu li:hover {
  /* background-color: var(--accent-bg-alpha); */
  color: var(--accent-color);
  opacity: 1;
}

#aboutgestures-dropdown .dropdown-menu {
  width: 200%;
  left: 0;
}

#about-dropdown .dropdown-menu.about-overlay {
  width: 100vw;
  left: -75vw;
  /* Align to left edge (50% + 25% = 75% offset) */
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 1vw 1vh 1vw;
  /* 5vh padding from bottom to huddle text at base */
}

.about-content h1 {
  font-size: 2rem;
  font-family: baikal, sans-serif;
  color: var(--accent-color);
  max-width: 95vw;
  line-height: 1;
  margin: 0;
}

.dropdown.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  clip-path: inset(0 0 0 0);
  pointer-events: auto;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), clip-path 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s;
}

/* --- START OVERLAY --- */
#start-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1vw;
  z-index: 10000;
  cursor: pointer;
  transition: opacity 0.5s ease;
  box-sizing: border-box;
}

#start-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

#start-overlay.switching-track .start-credits {
  display: none;
}

#start-overlay.switching-track .start-button {
  animation: splashFadeIn 1s ease forwards;
}

#start-overlay.switching-track .album-cover,
#start-overlay.camera-active .album-cover {
  animation: coverEntrance 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.album-cover {
  position: absolute;
  right: 5vw;
  bottom: 5vh;
  width: 25vw;
  max-height: 25vw;
  object-fit: contain;
  opacity: 0;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  /* shadow removed */
}

@keyframes coverEntrance {
  0% {
    opacity: 0;
    transform: translateX(30px);
  }

  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes splashFadeIn {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

@keyframes trackTitleReveal {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }

  20% {
    opacity: 1;
    transform: translateY(0);
  }

  80% {
    opacity: 1;
    transform: translateY(0);
  }

  100% {
    opacity: 0;
    transform: translateY(-10px);
  }
}

#start-overlay.track-switch-active .start-button {
  animation: trackTitleReveal 2.5s ease forwards;
}

#start-overlay.track-switch-active .start-credits {
  display: none;
}

@keyframes splashExitDown {
  0% {
    transform: translateY(0);
    opacity: 1;
    /* color inherited from inline style in JS */
  }

  100% {
    transform: translateY(100px);
    opacity: 0;
    color: #ffffff;
    border-color: #ffffff;
  }
}

.start-button,
.start-credits {
  padding-bottom: 7vh;
  text-align: left;
  padding: 20px 0;
  border: none;
  /* border-bottom: 1px solid #000000; */
  color: #000000;
  font-family: baikal, sans-serif;
  font-size: 1.5rem;
  letter-spacing: -0.05rem;
  transition: all 0.3s ease;
  background: transparent;
  opacity: 0;
  /* Hidden by default */
}

.start-credits {
  text-align: right;
}

#start-overlay.camera-active .start-button,
#start-overlay.camera-active .start-credits {
  animation: splashFadeIn 2s ease forwards;
}

#start-overlay.exit-active .start-button,
#start-overlay.exit-active .start-credits,
#start-overlay.exit-active .album-cover {
  animation: splashExitDown 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.start-button:hover {
  opacity: 1;
  /* background-color: rgba(0, 0, 0, 0.05); */
}

video,
canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  transform: scaleX(-1);
  z-index: -1;
}

video {
  opacity: 0;
}

.bar-container {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  height: 80vh;
  width: 50px;
  display: flex;
  flex-direction: column-reverse;
  justify-content: space-between;
  z-index: 10;
  pointer-events: none;
}

.bar-container.left {
  left: 20px;
}

.bar-container.right {
  right: 20px;
}

.bar-block {
  flex: 1;
  margin: 3px 0;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
}

.bar-container.right .bar-block.active {
  background: #848484ff;
}

.bar-container.left .bar-block.active {
  background: var(--accent-color);
}

.bottom-hud {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 8px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: baikal, sans-serif;
  font-size: 16px;
  color: rgb(0, 0, 0);
  /* text-shadow: 0 0 4px rgba(0, 0, 0, 0.8); */
  box-sizing: border-box;
  z-index: 20;
  pointer-events: none;
}

.bottom-hud>div {
  transition: color 0.3s ease;
}

.bottom-hud>div.active {
  color: var(--accent-color);
}

.bottom-hud span.label {
  /* font-weight: bold; */
  margin-right: 1vw;
}

/* Ensure header and container are on top of the video */
.container {
  position: relative;
  z-index: 5;
}