@font-face {
  font-family: Inter;
  src: url("assets/inter.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --background: #0d1014;
  --panel: #161a20;
  --text: #f3f1ed;
  --muted: #a9aeb7;
  --line: #ffffff16;
  --accent: #efb879;
  --on-accent: #18120b;
  --radius: 14px;
  font-family: Inter, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--background); color: var(--text); }
body:has(dialog[open]) { overflow: hidden; }
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.container { width: min(100% - 80px, 1440px); margin-inline: auto; }
.skip-link { position: fixed; left: 1rem; top: -3rem; z-index: 5; padding: .6rem 1rem; background: var(--accent); color: var(--on-accent); }
.skip-link:focus { top: 1rem; }

.site-header { border-bottom: 1px solid var(--line); background: #101318; }
.header-content { min-height: 72px; display: flex; align-items: center; gap: 42px; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; font-weight: 800; font-size: 27px; letter-spacing: -.07em; }
.brand-dot { color: var(--accent); }
.brand-icon { width: 30px; height: 23px; display: grid; place-items: center; border: 1.5px solid var(--accent); border-radius: 6px; position: relative; }
.brand-icon::before, .brand-icon::after { content: ""; position: absolute; height: 5px; width: 1.5px; background: var(--accent); left: 4px; }
.brand-icon::before { top: 3px; }
.brand-icon::after { bottom: 3px; }
.brand-icon span, .play-icon { width: 0; height: 0; border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-left: 8px solid currentColor; }
.brand-icon span { color: var(--accent); margin-left: 3px; }
.nav-link { display: inline-flex; align-items: center; min-height: 44px; color: #dadce1; font-size: 14px; font-weight: 600; }
.nav-link:hover, .footer-content > a:last-child:hover { color: var(--accent); }

.search { min-width: 0; width: 260px; margin-left: auto; position: relative; }
.search input { width: 100%; padding: 10px 13px 10px 38px; border: 1px solid #ffffff1d; border-radius: 8px; background: #171b21; color: var(--text); font-size: 13px; }
.search input::placeholder { color: #a4a9b1; opacity: 1; }
.search input:focus { border-color: var(--accent); outline: none; }
.search-icon { width: 13px; height: 13px; border: 1.5px solid #acb1ba; border-radius: 50%; position: absolute; z-index: 1; left: 13px; top: calc(50% - 7px); pointer-events: none; }
.search-icon::after { content: ""; width: 5px; height: 1.5px; position: absolute; left: 8px; top: 9px; background: #acb1ba; transform: rotate(45deg); }

.hero { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: end; min-height: 420px; height: clamp(420px, 35vw, 540px); border: 1px solid var(--line); border-radius: 17px; margin-top: 26px; background: #211c20; }
.hero-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; z-index: -2; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, #101017f6 0%, #101017d1 22%, #1010175a 55%, #10101712 85%), linear-gradient(0deg, #100e17a6, transparent 56%); }
.hero-content { padding: clamp(28px, 4.6vw, 68px); max-width: 630px; }
.hero-label { margin: 0 0 15px; display: flex; align-items: center; gap: 9px; color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.hero-label span { width: 17px; height: 1px; background: currentColor; }
.hero h1 { margin: 0; font-size: clamp(3rem, 7vw, 7rem); line-height: .97; font-weight: 850; letter-spacing: -.082em; text-wrap: balance; }
.hero-description { margin: 19px 0 10px; max-width: 420px; color: #eeebee; font-size: clamp(14px, 1.4vw, 17px); line-height: 1.55; }
.hero-meta { margin: 0 0 24px; color: #c2bbbf; font-size: 13px; }
.watch-button { min-height: 45px; display: inline-flex; align-items: center; justify-content: center; gap: 11px; padding: 0 18px; border: 0; border-radius: 8px; background: var(--accent); color: var(--on-accent); font-size: 14px; font-weight: 750; transition: background 160ms ease; }
.watch-button:hover { background: #ffd39f; }
.play-icon { flex: none; }

.catalog { scroll-margin-top: 24px; margin: 39px 0 52px; }
.catalog-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 15px 25px; margin-bottom: 18px; }
.catalog h2 { margin: 0; font-size: clamp(24px, 3vw, 35px); letter-spacing: -.055em; }
.genres { display: flex; flex-wrap: wrap; gap: 8px; }
.genre { min-height: 35px; border: 1px solid var(--line); padding: 0 11px; border-radius: 99px; background: #171b21; color: var(--muted); font-size: 12px; font-weight: 600; }
.genre:hover { color: var(--text); border-color: #ffffff40; }
.genre[aria-pressed="true"] { color: var(--on-accent); background: var(--accent); border-color: transparent; }
.video-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 17px; }
.card { display: block; position: relative; min-width: 0; padding: 0; text-align: left; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: border-color 160ms ease, transform 160ms ease; }
.card:hover, .card:focus-visible { border-color: #efb87980; transform: translateY(-2px); }
.card-media { display: block; position: relative; overflow: hidden; aspect-ratio: 16 / 9; background: #222734; }
.card-media img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; transition: transform 240ms ease; }
.card:hover .card-media img { transform: scale(1.045); }
.card-play { position: absolute; right: 10px; bottom: 10px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: white; background: #111318c9; border: 1px solid #ffffff33; transition: background 160ms ease, color 160ms ease; }
.card-length { position: absolute; bottom: 10px; left: 10px; padding: 3px 5px; border-radius: 4px; background: #111318d9; color: white; font-size: 11px; font-weight: 650; font-variant-numeric: tabular-nums; }
.card-play .play-icon { margin-left: 2px; }
.card:hover .card-play, .card:focus-visible .card-play { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.card-content { display: block; padding: 13px 13px 15px; }
.card-title { display: block; overflow-wrap: anywhere; font-size: 15px; font-weight: 700; letter-spacing: -.02em; }
.card-meta { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.empty { min-height: 115px; display: grid; place-items: center; padding: 20px; color: var(--muted); border: 1px dashed #ffffff22; border-radius: var(--radius); text-align: center; font-size: 14px; }

.site-footer { border-top: 1px solid var(--line); }
.footer-content { display: flex; justify-content: space-between; align-items: center; min-height: 86px; gap: 15px; }
.footer-brand { font-size: 21px; }
.footer-brand .brand-icon { width: 25px; height: 19px; }
.footer-content > a:last-child { font-size: 13px; color: var(--muted); }

.player-dialog { max-width: min(100% - 32px, 1020px); width: 100%; max-height: calc(100dvh - 32px); padding: 0; border-radius: 15px; background: #171b21; border: 1px solid #ffffff25; color: var(--text); }
.player-dialog::backdrop { background: #080a0de8; backdrop-filter: blur(5px); }
.player-toolbar { min-height: 54px; padding: 0 12px 0 20px; display: flex; align-items: center; justify-content: space-between; font-size: 20px; font-weight: 800; letter-spacing: -.07em; }
.player-toolbar form { display: flex; }
.close-button { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: transparent; color: var(--text); border: 0; }
.close-button:hover { background: #ffffff15; }
.close-button span { position: relative; width: 18px; height: 18px; }
.close-button span::before, .close-button span::after { content: ""; position: absolute; top: 8px; left: 0; width: 18px; height: 1.5px; background: currentColor; transform: rotate(45deg); }
.close-button span::after { transform: rotate(-45deg); }
.player-dialog video { display: block; width: 100%; max-height: 64dvh; aspect-ratio: 16 / 9; background: #000; }
.player-info { padding: 19px 23px 24px; }
.player-info h2 { margin: 4px 0; font-size: clamp(21px, 4vw, 30px); letter-spacing: -.04em; }
.player-info p { color: var(--muted); margin: .5em 0; font-size: 14px; line-height: 1.55; }
.player-info .player-meta { margin: 0; color: var(--accent); font-size: 12px; }
.player-info a { display: inline-block; color: var(--accent); font-weight: 600; font-size: 13px; margin-top: 8px; }
.player-info a:hover { text-decoration: underline; }

.credits { max-width: 780px; margin-block: 44px 70px; line-height: 1.65; }
.credits h1 { letter-spacing: -.05em; font-size: clamp(28px, 5vw, 48px); line-height: 1.1; }
.credits p, .credits li { color: var(--muted); }
.credits li + li { margin-top: 10px; }
.credits a { color: var(--accent); text-decoration: underline; }

@media (max-width: 1020px) {
  .container { width: calc(100% - 48px); }
}

@media (max-width: 720px) {
  .container { width: calc(100% - 28px); }
  .header-content { min-height: 60px; gap: 20px; }
  .brand { font-size: 23px; gap: 8px; }
  .search { width: min(180px, 100%); }
  .hero { margin-top: 16px; min-height: 430px; height: clamp(430px, 72vw, 520px); }
  .hero::after { background: linear-gradient(0deg, #101017fa, #101017bc 32%, #1010171a 76%); }
  .hero-image { object-position: var(--hero-mobile-position, 58% center); }
  .hero-content { width: 100%; padding: 23px; }
  .hero-description { margin-top: 14px; }
  .hero-meta { margin-bottom: 17px; }
  .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .catalog { margin: 29px 0 40px; }
  .catalog-heading { margin-bottom: 13px; }
}

@media (max-width: 390px) {
  .header-content { gap: 13px; }
  .search input { font-size: 12px; }
  .nav-link { font-size: 12px; }
  .hero { min-height: 390px; }
  .hero-image { object-position: 80% center; }
  .hero-content { padding: 18px; }
  .card-content { padding: 10px; }
  .card-title { font-size: 14px; }
  .card-meta { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
