@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;800;900&display=swap');

:root {
  --bg: #0c0c0e;
  --fg: #eceae6;
  --muted: rgba(236, 234, 230, 0.45);
  --accent: #d8ff3e;
  --font: 'Archivo', system-ui, sans-serif;
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: radial-gradient(120% 120% at 50% 40%, #17171a 0%, var(--bg) 55%, #060607 100%);
  color: var(--fg);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

#gl {
  position: fixed;
  inset: 0;
  display: block;
  cursor: grab;
  touch-action: none;
}
#gl.is-dragging { cursor: grabbing; }
#gl.is-hover { cursor: pointer; }

.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(85% 85% at 50% 50%, transparent 55%, rgba(0, 0, 0, 0.55) 100%);
  z-index: 2;
}

/* ---------------- HUD ---------------- */

.hud {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 36px;
  pointer-events: none;
  mix-blend-mode: difference;
}
.hud--top { top: 0; }
.hud--bottom { bottom: 0; align-items: flex-end; }

.hud__logo {
  pointer-events: auto;
  color: var(--fg);
  text-decoration: none;
  font-weight: 900;
  font-size: 15px;
  letter-spacing: 0.18em;
}

.hud__right { display: flex; gap: 14px; align-items: baseline; }
.hud__label { font-weight: 800; font-size: 13px; letter-spacing: 0.3em; }
.hud__count { font-size: 12px; color: var(--muted); letter-spacing: 0.15em; }

.hud__hint {
  font-size: 11px;
  letter-spacing: 0.35em;
  color: var(--muted);
  transition: opacity 0.6s ease;
}
.hud__hint.is-hidden { opacity: 0; }

.hud__title {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  text-align: right;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.hud__title.is-visible { opacity: 1; transform: translateY(0); }
.hud__title-cat {
  font-size: 10px;
  letter-spacing: 0.35em;
  color: var(--accent);
  mix-blend-mode: normal;
}
.hud__title-name {
  font-size: clamp(20px, 3.2vw, 38px);
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ---------------- Detail page ---------------- */

.detail {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: var(--bg);
  overflow-y: auto;
  overflow-x: hidden;
  visibility: hidden;
  opacity: 0;
}
.detail.is-open { visibility: visible; }

.detail__inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 110px 36px 120px;
}

.detail__back {
  position: fixed;
  top: 26px;
  left: 36px;
  z-index: 12;
  background: none;
  border: 1px solid rgba(236, 234, 230, 0.25);
  border-radius: 999px;
  color: var(--fg);
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  padding: 12px 22px;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.detail__back:hover {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

.detail__head { margin-bottom: 42px; }

.detail__title {
  font-size: clamp(44px, 8vw, 110px);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  overflow: hidden;
}
.detail__title .line { display: block; transform: translateY(110%); }

.detail__meta {
  margin-top: 22px;
  display: flex;
  gap: 28px;
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--muted);
}
.detail__meta span:first-child { color: var(--accent); }

.detail__player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
}
.detail__poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.85;
}
.detail__iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  z-index: 3;
}
.detail__player.is-playing .detail__poster,
.detail__player.is-playing .detail__play { display: none; }
.detail__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 92px;
  height: 92px;
  border-radius: 50%;
  border: none;
  background: var(--fg);
  color: var(--bg);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.detail__play:hover { transform: translate(-50%, -50%) scale(1.12); }
.detail__play svg { margin-left: 4px; }

.detail__body {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 60px;
  margin-top: 64px;
}

.detail__desc {
  font-size: 17px;
  line-height: 1.7;
  color: rgba(236, 234, 230, 0.8);
}

.detail__credits {
  display: flex;
  flex-direction: column;
  gap: 20px;
  border-left: 1px solid rgba(236, 234, 230, 0.15);
  padding-left: 32px;
}
.detail__credits div { display: flex; flex-direction: column; gap: 5px; }
.detail__credits span {
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--muted);
}
.detail__credits strong {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

@media (max-width: 760px) {
  .detail__body { grid-template-columns: 1fr; gap: 36px; }
  .detail__credits { border-left: none; padding-left: 0; }
  .hud { padding: 20px; }
  .detail__back { left: 20px; }
  .detail__inner { padding: 96px 20px 90px; }
}

/* ---------------- Fader ---------------- */

.fader {
  position: fixed;
  inset: 0;
  z-index: 8;
  background: #000;
  opacity: 0;
  pointer-events: none;
}
