@font-face {
  font-family: "Inter";
  src: url("fonts/inter.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Playfair Display";
  src: url("fonts/playfairdisplay.ttf") format("truetype");
  font-weight: 400 900;
  font-display: swap;
}

:root {
  --bg: #15100b;
  --surface: #231a14;
  --text: #f5efe7;
  --muted: #bb9457;
  --accent: #bb9457;
  --cta: #6f1d1b;
  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Inter", system-ui, sans-serif;
  --line: color-mix(in srgb, var(--text) 12%, transparent);
  --line-strong: color-mix(in srgb, var(--accent) 42%, transparent);
  --accent-soft: color-mix(in srgb, var(--accent) 14%, transparent);
  --shadow: 0 24px 60px rgb(0 0 0 / 0.45);
  --radius: 18px;
  --max: 1240px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(70rem 40rem at 15% -10%, var(--accent-soft), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
input,
a {
  font: inherit;
}

button {
  color: inherit;
}

a {
  color: var(--accent);
}

.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;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px clamp(18px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(16px);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.wordmark-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 19px;
  line-height: 1;
}

.brand-switch {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
}

.brand-option {
  min-width: 86px;
  padding: 8px 15px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    color 160ms ease,
    background 160ms ease;
}

.brand-option:hover {
  color: var(--text);
}

.brand-option[aria-pressed="true"] {
  background: var(--accent);
  color: var(--bg);
}

main {
  width: min(var(--max), 100%);
  margin: 0 auto;
  padding: 0 clamp(18px, 4vw, 48px) 80px;
}

.hero {
  padding: clamp(56px, 10vw, 108px) 0 42px;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1 {
  max-width: 14ch;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6.6rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.94;
}

.lede {
  max-width: 58ch;
  margin: 26px 0 0;
  color: color-mix(in srgb, var(--text) 68%, transparent);
  font-size: clamp(1rem, 1.5vw, 1.14rem);
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 34px;
  margin: 38px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--line);
}

.stats div {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.stats dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.stats dd {
  margin: 0;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1;
}

.toolbar {
  display: grid;
  gap: 18px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.search {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(360px, 100%);
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: color-mix(in srgb, var(--surface) 56%, transparent);
}

.search:focus-within {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.search svg {
  width: 17px;
  height: 17px;
  flex: none;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.8;
}

.search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.search input::placeholder {
  color: color-mix(in srgb, var(--muted) 78%, transparent);
}

.categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
  padding-bottom: 2px;
}

.chip {
  flex: none;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    color 160ms ease,
    background 160ms ease;
}

.chip:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.chip[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--bg);
}

.chip span {
  margin-left: 6px;
  opacity: 0.65;
  font-size: 11px;
}

.result-count {
  margin: 22px 0 14px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 24px 20px;
}

.scene-card {
  min-width: 0;
}

.scene-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.poster {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, var(--accent-soft), transparent 60%),
    var(--surface);
  box-shadow: 0 10px 30px rgb(0 0 0 / 0.18);
  transition:
    border-color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.poster img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
  transition:
    opacity 180ms ease,
    transform 400ms ease;
}

.scene-open:hover .poster,
.scene-open:focus-visible .poster {
  border-color: var(--line-strong);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.scene-open:hover img {
  opacity: 1;
  transform: scale(1.025);
}

.scene-open:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius);
}

.play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid color-mix(in srgb, var(--text) 30%, transparent);
  border-radius: 50%;
  background: color-mix(in srgb, var(--bg) 66%, transparent);
  backdrop-filter: blur(8px);
}

.play svg {
  width: 13px;
  height: 13px;
  margin-left: 2px;
  fill: var(--text);
}

.duration {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 4px 7px;
  border-radius: 5px;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  color: var(--text);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.scene-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 2px 0;
}

.scene-meta h2 {
  margin: 0;
  overflow: hidden;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scene-meta p {
  flex: none;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.empty {
  padding: 60px 0;
  color: var(--muted);
  text-align: center;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  width: min(var(--max), 100%);
  margin: 0 auto;
  padding: 28px clamp(18px, 4vw, 48px) 42px;
  border-top: 1px solid var(--line);
  color: color-mix(in srgb, var(--text) 48%, transparent);
  font-size: 12px;
}

.footer p {
  margin: 0;
}

.player {
  width: min(980px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 20px;
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}

.player::backdrop {
  background: rgb(0 0 0 / 0.74);
  backdrop-filter: blur(6px);
}

.player-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 2px 2px 16px;
}

.player-category {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.player h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.icon-button:hover {
  border-color: var(--line-strong);
  color: var(--accent);
}

.icon-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.player-stage {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
}

.player video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--bg);
}

.player-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 2px 2px;
}

.player-foot p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.download {
  flex: none;
  padding: 9px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.download:hover {
  background: var(--accent);
  color: var(--bg);
}

@media (max-width: 640px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .brand-switch {
    width: 100%;
  }

  .brand-option {
    flex: 1;
    min-width: 0;
  }

  .hero {
    padding-top: 46px;
  }

  .search {
    width: 100%;
  }

  .player {
    padding: 14px;
  }

  .player-foot {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
