:root {
  --bg: #06070a;
  --ink: #f4f0e8;
  --accent: #e9b872;
  --line: rgba(244, 240, 232, 0.16);
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Consolas, "Liberation Mono", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  background: var(--bg);
}

body {
  overflow: hidden;
  color: var(--ink);
  font-family: var(--mono);
  -webkit-font-smoothing: antialiased;
}

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.stage {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}

.stage__video {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--bg);
}

.stage__vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(to top, rgba(6, 7, 10, 0.55) 0%, transparent 22%),
    radial-gradient(130% 110% at 50% 50%, transparent 55%, rgba(6, 7, 10, 0.45) 100%);
}

.controls {
  position: absolute;
  right: max(18px, env(safe-area-inset-right));
  top: max(18px, env(safe-area-inset-top));
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(8, 10, 14, 0.5);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  opacity: 0.55;
  transition: opacity 0.25s ease;
}

.controls:hover,
.controls:focus-within {
  opacity: 1;
}

.controls[hidden] {
  display: none;
}

.control {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.2s ease;
}

.control:hover {
  background: rgba(244, 240, 232, 0.12);
}

.control:active {
  background: rgba(244, 240, 232, 0.18);
}

.icon {
  width: 20px;
  height: 20px;
}

[data-playing="true"] .icon--play,
[data-playing="false"] .icon--pause,
[data-muted="true"] .icon--sound-on,
[data-muted="false"] .icon--sound-off {
  display: none;
}

.gate {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 16px;
  padding: 24px;
  border: 0;
  background: rgba(6, 7, 10, 0.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  color: var(--ink);
  cursor: pointer;
}

.gate[hidden] {
  display: none;
}

.gate__ring {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border: 1px solid rgba(244, 240, 232, 0.4);
  border-radius: 50%;
  background: rgba(6, 7, 10, 0.3);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.gate__ring svg {
  width: 26px;
  height: 26px;
  margin-left: 3px;
}

.gate:hover .gate__ring {
  transform: scale(1.06);
  border-color: var(--accent);
}

.gate__label {
  font-size: 10.5px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}

.fallback {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-content: center;
  gap: 8px;
  margin: 0;
  padding: 24px;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  background: radial-gradient(60% 60% at 50% 50%, rgba(6, 7, 10, 0.9), rgba(6, 7, 10, 0.6));
}

.fallback[hidden] {
  display: none;
}

.fallback a {
  color: var(--ink);
}

@media (prefers-reduced-motion: reduce) {
  .control,
  .gate__ring {
    transition: none;
  }
}
