*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: #0f0e0c;
  --bg-soft: #1a1814;
  --text: #e8e4dc;
  --text-muted: #9a9488;
  --accent: #c4a574;
  --grain-opacity: 0.072;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --search-bg: rgba(255, 255, 255, 0.04);
  --search-border: rgba(255, 255, 255, 0.08);
  --search-focus-ring: rgba(196, 165, 116, 0.35);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background-color: var(--bg);
}

.site-header,
.main-stage,
.site-footer {
  position: relative;
  z-index: 1;
}

.site-header {
  z-index: 20;
}

/* Subtle film grain — fixed overlay, non-interactive */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  overflow: hidden;
}

.grain::before {
  content: "";
  position: absolute;
  inset: -50%;
  width: 200%;
  height: 200%;
  opacity: var(--grain-opacity);
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  display: grid;
  grid-template-columns: 1fr minmax(12rem, 26rem) 1fr;
  align-items: center;
  gap: 1rem 1.5rem;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 2rem 1.25rem 0;
}

.logo-wrap {
  position: relative;
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-left: 0.15rem;
}

.logo {
  font-weight: 500;
  letter-spacing: 0.04em;
}

.disc-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.6rem;
  height: 3.6rem;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  overflow: visible;
}

.disc-btn[hidden] {
  display: none;
}

.disc {
  position: relative;
  display: block;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.22), transparent 26%),
    repeating-radial-gradient(
      circle at 50% 50%,
      #070707 0 1px,
      #1c1c1c 1px 2px,
      #0b0b0b 2px 3px
    );
  box-shadow:
    0 0 0 1px #050505,
    0 6px 16px rgba(0, 0, 0, 0.55);
}

.disc__ring {
  position: absolute;
  inset: 36%;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 34%, #ff5a4a, #e1261c 62%, #b01010);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.disc__label {
  display: none;
}

.disc__hole {
  position: absolute;
  inset: 47%;
  border-radius: 50%;
  background: #f3f3f3;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
}

.disc-notes {
  position: absolute;
  inset: -1.25rem;
  pointer-events: none;
  overflow: visible;
}

.disc-note {
  position: absolute;
  left: 50%;
  top: 50%;
  font-size: var(--note-size, 0.9rem);
  line-height: 1;
  color: var(--note-color, var(--accent));
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
  opacity: 0;
  animation: disc-note-pop var(--note-dur, 1.35s) var(--ease-out) forwards;
}

@keyframes disc-note-pop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.35) rotate(var(--note-rot, 0deg));
  }
  16% {
    opacity: 1;
    transform: translate(
        calc(-50% + var(--note-x, 0px) * 0.35),
        calc(-50% + var(--note-y, -20px) * 0.35)
      )
      scale(1.08) rotate(var(--note-rot, 0deg));
  }
  100% {
    opacity: 0;
    transform: translate(
        calc(-50% + var(--note-x, 0px)),
        calc(-50% + var(--note-y, -36px))
      )
      scale(0.8) rotate(calc(var(--note-rot, 0deg) + 16deg));
  }
}

.disc-btn.is-playing .disc {
  animation: disc-spin 2.8s linear infinite;
}

.disc-btn:hover .disc {
  box-shadow:
    0 0 0 1px #050505,
    0 8px 20px rgba(0, 0, 0, 0.65);
}

@keyframes disc-spin {
  to {
    transform: rotate(360deg);
  }
}

.disc-menu {
  position: absolute;
  top: calc(100% + 0.7rem);
  left: 0;
  z-index: 70;
  width: min(20.5rem, calc(100vw - 2rem));
  padding: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.7rem;
  background: rgba(18, 16, 14, 0.97);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}

.disc-menu[hidden] {
  display: none;
}

.disc-menu__title {
  margin: 0 0 0.6rem;
  font-family: "Simplifica", "DM Sans", system-ui, sans-serif;
  font-size: 1.2rem;
  letter-spacing: 0.06em;
}

.disc-add {
  display: flex;
  gap: 0.4rem;
}

.disc-add input {
  flex: 1;
  min-width: 0;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--search-border);
  border-radius: 0.4rem;
  background: var(--search-bg);
  color: var(--text);
  font: inherit;
  font-size: 0.8125rem;
}

.disc-add input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--search-focus-ring);
}

.disc-add button,
.disc-list button {
  padding: 0.4rem 0.65rem;
  border: 1px solid var(--search-border);
  border-radius: 0.4rem;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font: inherit;
  font-size: 0.75rem;
  cursor: pointer;
}

.disc-add button:hover,
.disc-list button:hover {
  border-color: var(--search-focus-ring);
}

.disc-menu__hint {
  margin: 0.45rem 0 0.65rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.disc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 12rem;
  overflow: auto;
}

.disc-list:empty::after {
  content: "Noch keine Tracks.";
  font-size: 0.8rem;
  color: var(--text-muted);
}

.disc-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.disc-item__play {
  flex: 1;
  min-width: 0;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.disc-item.is-current .disc-item__play {
  border-color: var(--accent);
  color: var(--accent);
}

.disc-item__kind {
  flex-shrink: 0;
  font-size: 0.625rem;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.disc-item__remove {
  color: #f08a8a;
}

.disc-player {
  margin-top: 0.75rem;
}

.disc-player[hidden],
.disc-embed[hidden] {
  display: none;
}

.disc-embed {
  margin-bottom: 0.45rem;
}

.disc-embed iframe {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 0.5rem;
}

.disc-controls {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.2rem 0.1rem;
}

.disc-controls__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  padding: 0;
  border: none;
  border-radius: 0.3rem;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.disc-controls__btn:hover {
  background: rgba(255, 255, 255, 0.06);
}

.disc-controls__btn.is-on {
  color: #8fe596;
}

.disc-controls__volume {
  flex: 1;
  height: 22px;
  margin: 0;
  accent-color: #fff;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
}

.disc-controls__volume::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
}

.disc-controls__volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  margin-top: -4px;
  border: none;
  border-radius: 50%;
  background: #fff;
}

.disc-controls__volume::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
}

.disc-controls__volume::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: none;
  border-radius: 50%;
  background: #fff;
}

.site-nav {
  justify-self: end;
  display: flex;
  gap: 1.5rem;
}

.site-header a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9375rem;
  transition: color 0.25s var(--ease-out);
}

.site-header a:hover {
  color: var(--text);
}

.account {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.account-btn[hidden] {
  display: none;
}

.account-btn {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--search-border);
  border-radius: 0.5rem;
  background: var(--search-bg);
  color: var(--text-muted);
  font: inherit;
  font-size: 0.9375rem;
  line-height: 1.3;
  cursor: pointer;
  transition:
    color 0.25s var(--ease-out),
    border-color 0.25s var(--ease-out),
    background-color 0.25s var(--ease-out);
}

.account-btn:hover,
.account-btn.is-logged-in {
  color: var(--text);
  border-color: var(--search-focus-ring);
  background: rgba(255, 255, 255, 0.07);
}

.account-btn:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--search-focus-ring);
}

.account-menu {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  min-width: 11.5rem;
  padding: 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.6rem;
  background: rgba(18, 16, 14, 0.96);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
}

.account-menu[hidden] {
  display: none;
}

.account-menu button {
  padding: 0.5rem 0.7rem;
  border: none;
  border-radius: 0.4rem;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.875rem;
  text-align: left;
  cursor: pointer;
}

.account-menu button:hover {
  background: rgba(255, 255, 255, 0.06);
}

.login-overlay,
.admin-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(8, 7, 6, 0.72);
}

.login-overlay[hidden],
.admin-overlay[hidden] {
  display: none;
}

.login-card,
.admin-panel {
  width: min(28rem, 100%);
  padding: 1.35rem 1.4rem 1.45rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.85rem;
  background: #161410;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.admin-panel {
  width: min(36rem, 100%);
  max-height: min(42rem, calc(100vh - 2.5rem));
  overflow: auto;
}

.login-card h2,
.admin-head h2 {
  margin: 0 0 1rem;
  font-family: "Simplifica", "DM Sans", system-ui, sans-serif;
  font-size: 1.45rem;
  font-weight: 400;
  letter-spacing: 0.06em;
}

.admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.25rem;
}

.admin-close,
.login-cancel {
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--search-border);
  border-radius: 0.45rem;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
}

.admin-close:hover,
.login-cancel:hover {
  color: var(--text);
  border-color: var(--search-focus-ring);
}

.login-field[hidden],
.login-error[hidden],
.login-hint[hidden] {
  display: none;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.login-field input,
.login-field textarea {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--search-border);
  border-radius: 0.45rem;
  background: var(--search-bg);
  color: var(--text);
  font: inherit;
  font-size: 0.9375rem;
}

.login-field input:focus,
.login-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--search-focus-ring);
}

.login-hint {
  margin: 0 0 0.85rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.login-error {
  margin: 0 0 0.85rem;
  font-size: 0.8125rem;
  color: #f08a8a;
}

.login-actions {
  display: flex;
  gap: 0.6rem;
}

.login-submit,
.admin-item button {
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--search-border);
  border-radius: 0.45rem;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
}

.login-submit:hover,
.admin-item button:hover {
  border-color: var(--search-focus-ring);
  background: rgba(255, 255, 255, 0.1);
}

.login-submit:disabled {
  opacity: 0.55;
  cursor: wait;
}

.admin-upload {
  margin-bottom: 1.25rem;
  padding-bottom: 1.15rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.admin-item {
  padding: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.55rem;
  background: rgba(255, 255, 255, 0.03);
}

.admin-item__form input,
.admin-item__form textarea {
  width: 100%;
  margin-bottom: 0.45rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--search-border);
  border-radius: 0.4rem;
  background: var(--search-bg);
  color: var(--text);
  font: inherit;
  font-size: 0.875rem;
}

.admin-item__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.admin-item__file {
  margin-right: auto;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.admin-item__delete {
  color: #f08a8a;
}

.search {
  justify-self: center;
  width: 100%;
  margin: 0;
}

.search-field {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 1rem 0.55rem 0.95rem;
  border-radius: 999px;
  background: var(--search-bg);
  border: 1px solid var(--search-border);
  box-shadow: 0 0 0 0 var(--search-focus-ring);
  transform: scale(1);
  transition:
    background 0.35s var(--ease-out),
    border-color 0.35s var(--ease-out),
    box-shadow 0.45s var(--ease-out),
    transform 0.45s var(--ease-out);
}

.search-field::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.12),
    rgba(255, 255, 255, 0.02) 40%,
    rgba(196, 165, 116, 0.15)
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.45s var(--ease-out);
  pointer-events: none;
}

.search-field:focus-within {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 0 0 3px var(--search-focus-ring);
  transform: scale(1.015);
}

.search-field:focus-within::before {
  opacity: 1;
}

.search-icon {
  flex-shrink: 0;
  color: var(--text-muted);
  transition:
    color 0.35s var(--ease-out),
    transform 0.45s var(--ease-out);
}

.search-field:focus-within .search-icon {
  color: var(--accent);
  transform: scale(1.06);
}

.search-input {
  flex: 1;
  min-width: 0;
  padding: 0.15rem 0;
  border: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.9375rem;
  letter-spacing: 0.01em;
  outline: none;
}

.search-input::placeholder {
  color: var(--text-muted);
  opacity: 0.85;
  transition:
    opacity 0.3s var(--ease-out),
    transform 0.3s var(--ease-out);
}

.search-input:focus::placeholder {
  opacity: 0.45;
  transform: translateX(2px);
}

.search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.search-clear {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border: none;
  border-radius: 999px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  opacity: 0;
  transform: scale(0.85);
  transition:
    opacity 0.25s var(--ease-out),
    transform 0.25s var(--ease-out),
    color 0.2s ease,
    background 0.2s ease;
}

.search-field.has-value .search-clear {
  opacity: 1;
  transform: scale(1);
}

.search-field.has-value .search-clear:not([hidden]) {
  display: flex;
}

.search-clear:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
}

.search-clear:active {
  transform: scale(0.92);
}

@media (max-width: 720px) {
  .site-header {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "logo nav"
      "search search";
  }

  .logo-wrap {
    grid-area: logo;
  }

  .site-nav {
    grid-area: nav;
  }

  .search {
    grid-area: search;
    max-width: none;
  }

  .search-field:focus-within {
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .disc-btn.is-playing .disc,
  .disc-note {
    animation: none;
  }

  .search-field,
  .search-icon,
  .search-input::placeholder,
  .search-clear {
    transition-duration: 0.01ms;
  }

  .search-field:focus-within {
    transform: none;
  }
}

.main-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 5.5rem);
  padding: 2.25rem 1.5rem 3rem;
}

/* Intro phases on <body>:
   is-loading → is-loader-out → is-notice → is-notice-out → (none = site) */
.site-header,
.site-footer {
  transition: opacity 0.5s var(--ease-out);
}

/* Starts fading in only after the videos are already visible */
.dev-notice {
  transition: opacity 0.5s var(--ease-out) 0.35s;
}

body:is(.is-loading, .is-loader-out, .is-notice, .is-notice-out) .dev-notice {
  transition-delay: 0s;
}

body:is(.is-loading, .is-loader-out, .is-notice, .is-notice-out)
  :is(.site-header, .site-footer, .video-card, .dev-notice) {
  opacity: 0 !important;
  pointer-events: none;
}

/* Permanent note above the videos */
.dev-notice {
  width: min(36rem, 92%);
  margin: 0 0 1.5rem;
  font-family: "Simplifica", "DM Sans", system-ui, sans-serif;
  font-size: clamp(1.15rem, 2.8vmin, 1.45rem);
  font-weight: 400;
  letter-spacing: 0.06em;
  line-height: 1.45;
  text-align: center;
}

/* Shown once as a centred overlay after the loader, then gone */
.volume-notice {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 50;
  width: min(36rem, 92%);
  margin: 0;
  transform: translate(-50%, -50%);
  font-family: "Simplifica", "DM Sans", system-ui, sans-serif;
  font-size: clamp(1.15rem, 2.8vmin, 1.45rem);
  font-weight: 400;
  letter-spacing: 0.06em;
  line-height: 1.45;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.7s var(--ease-out),
    visibility 0.7s var(--ease-out);
}

body.is-notice .volume-notice {
  opacity: 1;
  visibility: visible;
}

.volume-notice__body {
  color: #fff;
}

.volume-notice__accent {
  color: #f08a8a;
}

.volume-notice__accent--yellow {
  color: #e8dc7a;
}

.video-stage {
  --video-active: clamp(19rem, 42vmin, 34rem);
  --video-inactive: clamp(8.5rem, 18vmin, 14rem);
  /* 25% of side card width tucks behind the active video */
  --video-side-overlap: calc(var(--video-inactive) * 0.25);
  -webkit-user-select: none;
  user-select: none;
  position: relative;
  width: min(92rem, 100%);
  height: calc(var(--video-active) + 3.75rem);
  margin: 0 auto;
}

.stage-boot-loader {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 1;
  transition:
    opacity 0.55s var(--ease-out),
    visibility 0.55s var(--ease-out);
}

/* Loader is only ever visible during the first phase */
body:not(.is-loading) .stage-boot-loader {
  opacity: 0;
  visibility: hidden;
}

.stage-boot-loader__stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.35rem;
  max-width: min(26rem, 92vw);
  padding: 0 1rem;
  text-align: center;
}

.stage-boot-loader__hint {
  margin: 0;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: clamp(0.88rem, 2vmin, 1.02rem);
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: 0.01em;
  color: #fff;
  white-space: nowrap;
  animation: boot-hint-pulse 3.2s ease-in-out infinite;
}

@keyframes boot-hint-pulse {
  0%,
  100% {
    opacity: 0.52;
  }
  50% {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .stage-boot-loader__hint {
    animation: none;
    opacity: 0.85;
  }
}

.dot-spinner {
  position: relative;
  width: 2.75rem;
  height: 2.75rem;
  animation: dot-spinner-rotate 0.95s linear infinite;
}

.dot-spinner span {
  --orbit: 1.22rem;
  position: absolute;
  left: 50%;
  top: 50%;
  width: 3px;
  height: 3px;
  margin: -1.5px 0 0 -1.5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  transform: rotate(calc(var(--i, 0) * 30deg)) translateY(calc(-1 * var(--orbit)));
  opacity: 0.28;
}

.dot-spinner span:nth-child(1) {
  --i: 0;
  opacity: 1;
}
.dot-spinner span:nth-child(2) {
  --i: 1;
  opacity: 0.92;
}
.dot-spinner span:nth-child(3) {
  --i: 2;
  opacity: 0.84;
}
.dot-spinner span:nth-child(4) {
  --i: 3;
  opacity: 0.76;
}
.dot-spinner span:nth-child(5) {
  --i: 4;
  opacity: 0.68;
}
.dot-spinner span:nth-child(6) {
  --i: 5;
  opacity: 0.6;
}
.dot-spinner span:nth-child(7) {
  --i: 6;
  opacity: 0.52;
}
.dot-spinner span:nth-child(8) {
  --i: 7;
  opacity: 0.44;
}
.dot-spinner span:nth-child(9) {
  --i: 8;
  opacity: 0.36;
}
.dot-spinner span:nth-child(10) {
  --i: 9;
  opacity: 0.32;
}
.dot-spinner span:nth-child(11) {
  --i: 10;
  opacity: 0.3;
}
.dot-spinner span:nth-child(12) {
  --i: 11;
  opacity: 0.28;
}

@keyframes dot-spinner-rotate {
  to {
    transform: rotate(-360deg);
  }
}

.video-card {
  position: absolute;
  top: 50%;
  margin: 0;
  padding: 0;
  overflow: visible;
  background: transparent;
  border: none;
  box-shadow: none;
  transition:
    left 0.7s var(--ease-out),
    width 0.7s var(--ease-out),
    opacity 0.32s var(--ease-out),
    filter 0.7s var(--ease-out),
    transform 0.7s var(--ease-out);
  will-change: left, width, transform, opacity, filter;
}

.video-frame {
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
  border-radius: 1.125rem;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 24px 48px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  transform: scale(1);
  transform-origin: center center;
  transition:
    border-color 0.7s var(--ease-out),
    box-shadow 0.7s var(--ease-out),
    transform 0.45s var(--ease-out);
}

.video-card.is-active .video-frame,
.video-card.is-active .video-frame:hover {
  transform: scale(1);
}

.video-card.is-inactive.is-side-left .video-frame:hover,
.video-card.is-inactive.is-side-right .video-frame:hover {
  transform: scale(1.035);
}

.video-card.is-active {
  left: 50%;
  z-index: 3;
  width: var(--video-active);
  opacity: 1;
  filter: none;
  transform: translate(-50%, -50%);
}

.video-card.is-active .video-frame {
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow:
    0 28px 56px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}

.video-card.is-inactive {
  z-index: 1;
  width: var(--video-inactive);
  opacity: 0.94;
  filter: none;
  transform: translate(-50%, -50%);
  cursor: pointer;
}

.video-card.is-inactive .video-frame {
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}

.video-title {
  position: absolute;
  top: calc(100% + 0.9rem);
  left: 0;
  right: 0;
  margin: 0;
  font-family: "Simplifica", "DM Sans", system-ui, sans-serif;
  font-size: clamp(1.35rem, 3.2vmin, 1.75rem);
  font-weight: 400;
  font-style: normal;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-align: center;
  color: #fff;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.55);
  white-space: nowrap;
  transition: opacity 0.45s var(--ease-out);
}

.video-note {
  --video-note-icon: 1.3rem;
  --video-note-gap: 0.65rem;
  position: absolute;
  top: calc(100% + 1.15rem);
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: auto 1fr;
  width: max-content;
  max-width: min(36rem, calc(100vw - 2rem));
  z-index: 4;
}

.video-note__heading {
  margin: 0;
  grid-column: 1 / -1;
  grid-row: 1;
  padding-inline: calc(var(--video-note-icon) + var(--video-note-gap));
  font-family: "Simplifica", "DM Sans", system-ui, sans-serif;
  font-size: clamp(1.35rem, 3.2vmin, 1.75rem);
  font-weight: 400;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-align: center;
  color: #fff;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.55);
  white-space: normal;
}

.video-note__trigger {
  display: inline-flex;
  grid-column: 1;
  grid-row: 1;
  z-index: 1;
  align-self: start;
  padding: 0;
  margin-top: 0.2em;
  border: none;
  background: transparent;
  cursor: pointer;
  line-height: 0;
}

.video-note__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.3rem;
  height: 1.3rem;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1;
  color: #fff;
  transition: transform 0.2s var(--ease-out), border-color 0.2s var(--ease-out);
}

.video-note__trigger:hover .video-note__icon,
.video-note__trigger:focus-visible .video-note__icon {
  transform: scale(1.08);
  border-color: #fff;
}

.video-note__popover {
  position: fixed;
  z-index: 10000;
  width: min(18rem, calc(100vw - 1.5rem));
  padding: 0.65rem 0.75rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 0.5rem;
  background: rgba(12, 11, 10, 0.92);
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease-out);
}

.video-note__popover.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.video-note__text {
  margin: 0;
  font-family: "Simplifica", "DM Sans", system-ui, sans-serif;
  font-size: clamp(0.875rem, 2.2vmin, 1.05rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1.38;
  text-align: left;
  color: #fff;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5);
}

.video-card.is-inactive .video-title,
.video-card.is-inactive .video-note {
  display: none;
}

.video-card.is-inactive.is-side-right {
  left: calc(
    50% + (var(--video-active) / 2) + (var(--video-inactive) / 2) -
      var(--video-side-overlap)
  );
}

.video-card.is-inactive.is-side-left {
  left: calc(
    50% - (var(--video-active) / 2) - (var(--video-inactive) / 2) +
      var(--video-side-overlap)
  );
}

.video-card.is-inactive.is-side-queue {
  left: calc(
    50% + (var(--video-active) / 2) + (var(--video-inactive) * 1.5) -
      (var(--video-side-overlap) * 1.5)
  );
  z-index: 0;
  opacity: 0;
  pointer-events: none;
  filter: none;
  cursor: default;
}

.video-card.is-inactive.is-side-queue-left {
  left: calc(
    50% - (var(--video-active) / 2) - (var(--video-inactive) * 1.5) +
      (var(--video-side-overlap) * 1.5)
  );
  z-index: 0;
  opacity: 0;
  pointer-events: none;
  filter: none;
  cursor: default;
}

.video-card.is-inactive.is-side-queue .video-frame,
.video-card.is-inactive.is-side-queue-left .video-frame {
  box-shadow: none;
}

.video-card.is-side-vault {
  opacity: 0;
  pointer-events: none;
  z-index: 0;
}

.video-card.is-inactive.is-side-left:hover,
.video-card.is-inactive.is-side-right:hover {
  opacity: 1;
}

.video-card.is-inactive:not(.is-side-queue):not(.is-side-queue-left):hover
  .video-frame {
  border-color: rgba(255, 255, 255, 0.12);
}

.stage-video {
  display: block;
  width: 100%;
  height: 100%;
  background: #0a0908;
  object-fit: cover;
  pointer-events: auto;
  opacity: 1;
  -webkit-user-drag: none;
  user-drag: none;
}

.video-card.is-inactive .stage-video {
  pointer-events: none;
}

.video-controls {
  display: flex;
  position: absolute;
  inset: auto 0 0;
  z-index: 6;
  align-items: center;
  gap: 0.35rem;
  padding: 0.38rem 0.45rem 0.42rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.35));
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s var(--ease-out);
}

.video-card:not(.is-active) .video-controls {
  display: none;
}

.video-controls.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.video-controls__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.65rem;
  height: 1.65rem;
  padding: 0;
  border: none;
  border-radius: 0.2rem;
  color: #fff;
  background: transparent;
  cursor: pointer;
  transition: color 0.2s var(--ease-out), transform 0.2s var(--ease-out);
}

.video-controls__btn:hover {
  transform: scale(1.06);
}

.video-controls__progress {
  flex: 1 1 44%;
  width: 44%;
  max-width: 10.5rem;
  min-width: 3.5rem;
  height: 24px;
  margin: 0;
  accent-color: #fff;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
}

.video-controls__time {
  flex-shrink: 0;
  min-width: 4.75rem;
  font-size: 0.6875rem;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.88);
  white-space: nowrap;
}

.video-controls__volume-group {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.2rem;
}

.video-controls__volume {
  flex-shrink: 0;
  width: 3.25rem;
  height: 24px;
  margin: 0;
  accent-color: #fff;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
}

.video-controls__tail {
  display: inline-flex;
  align-items: center;
  gap: 0.1rem;
  margin-left: auto;
}

.video-loop-btn.is-loop-on {
  color: #8fe596;
}

.video-loop-btn.is-loop-on:hover {
  color: #aef0b3;
}

.video-controls__progress::-webkit-slider-runnable-track,
.video-controls__volume::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
}

.video-controls__progress::-webkit-slider-thumb,
.video-controls__volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  /* (track 4px − thumb 12px) / 2 keeps the thumb centred on the track */
  margin-top: -4px;
  border-radius: 50%;
  background: #fff;
  border: none;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
}

.video-controls__progress::-moz-range-track,
.video-controls__volume::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
}

.video-controls__progress::-moz-range-thumb,
.video-controls__volume::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: none;
  border-radius: 50%;
  background: #fff;
}

.video-switch-trigger {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  background: rgba(8, 7, 6, 0.22);
  cursor: pointer;
  transition: background 0.35s var(--ease-out);
}

.video-switch-trigger:hover {
  background: rgba(8, 7, 6, 0.08);
}

.video-switch-label {
  padding: 0.45rem 0.85rem;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  backdrop-filter: blur(6px);
  opacity: 0;
  transform: translateY(4px);
  transition:
    opacity 0.35s var(--ease-out),
    transform 0.35s var(--ease-out);
}

.video-card.is-inactive:hover .video-switch-label {
  opacity: 1;
  transform: translateY(0);
}

.video-card.is-active .video-switch-trigger {
  display: none;
}

.stage-video:focus {
  outline: none;
}

.stage-video:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (max-width: 720px) {
  .video-stage {
    --video-active: clamp(15rem, 46vmin, 21rem);
    --video-inactive: clamp(7rem, 22vmin, 10rem);
    height: calc(var(--video-active) + 3rem);
  }

  .video-card.is-inactive.is-side-left,
  .video-card.is-inactive.is-side-right {
    opacity: 0.9;
  }
}

@media (prefers-reduced-motion: reduce) {
  .video-card,
  .video-switch-label,
  .video-frame {
    transition-duration: 0.01ms;
  }

  .video-card.is-active .video-frame:hover,
  .video-card.is-inactive.is-side-left .video-frame:hover,
  .video-card.is-inactive.is-side-right .video-frame:hover {
    transform: none;
  }
}

.site-footer {
  max-width: 56rem;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  border-top: 1px solid rgba(232, 228, 220, 0.06);
}

.site-footer p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}
