@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/cormorant-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/cormorant-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

:root {
  color-scheme: dark;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  background: #171219;
  color: #f8eee7;
  --display: "Cormorant Garamond", Georgia, serif;
  --muted: #cbbfc4;
  --line: #44323d;
  --line-strong: #5c4652;
  --surface: #231923;
  --accent: #ffc087;
  --accent-hover: #ffcea2;
  --ink: #2b1a1c;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 24px; }
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(ellipse at 62% 0, #36232f 0, #211821 44%, #171219 74%);
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.wrap { width: min(100% - 64px, 1240px); margin-inline: auto; }

.top {
  border-bottom: 1px solid #f8c29e26;
  background: #171219b0;
}
.bar {
  min-height: 77px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font: 600 2rem/1 var(--display);
  letter-spacing: -.02em;
  white-space: nowrap;
}
.brand-mark {
  display: block;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid #dfab8c43;
  background: #231a22;
}
nav { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(14px, 2.4vw, 34px); }
nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 600;
  white-space: nowrap;
}
nav a:hover { color: #fff; }
nav a[aria-current] {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 6px;
}

main { padding-block: clamp(24px, 4.2vw, 58px) 65px; }
.site-intro {
  max-width: 720px;
  margin-inline: auto;
  padding-block: clamp(40px, 11vh, 116px);
  text-align: center;
}
.site-intro p {
  max-width: 570px;
  margin: 22px auto 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.65;
  text-wrap: pretty;
}
.site-section > h1, .site-section .collection-head h1, .site-section .fetch-intro h1 {
  font-size: clamp(2.1rem, 4vw, 3rem);
}
.site-section.site-intro h1 { font-size: clamp(3.25rem, 8vw, 6rem); }
.site-section h1:focus { outline: none; }
.feature {
  display: grid;
  grid-template-columns: minmax(0, .94fr) minmax(0, 1.52fr);
  grid-template-areas: "copy screen";
  min-width: 0;
  align-items: center;
  padding: 12px;
  overflow: hidden;
  background: linear-gradient(125deg, #342431, #211922 67%);
  border: 1px solid var(--line);
  border-radius: 25px;
  box-shadow: 0 22px 64px #0f091369;
}
.feature-copy {
  grid-area: copy;
  padding: clamp(24px, 3.55vw, 50px);
  min-width: 0;
}
.category {
  display: inline-flex;
  align-items: center;
  margin: 0 0 15px;
  border-radius: 100px;
  color: #ffd2ae;
  background: #63402f55;
  border: 1px solid #ab795447;
  padding: 5px 10px;
  font-size: .78rem;
  font-weight: 620;
}
h1, h2 { font-family: var(--display); font-weight: 600; color: #fff1e5; }
h1 {
  margin: 0;
  font-size: clamp(2.3rem, 4vw, 3.1rem);
  line-height: .99;
  letter-spacing: -.026em;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
h2 { margin: 0; font-size: clamp(1.8rem, 3.15vw, 2.55rem); line-height: 1; letter-spacing: -.025em; }
.detail { color: var(--muted); line-height: 1.55; margin: 12px 0 0; font-size: .94rem; }
.actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 25px; }

.screen {
  grid-area: screen;
  position: relative;
  display: grid;
  width: 100%;
  aspect-ratio: 16 / 9;
  place-items: center;
  overflow: hidden;
  border: 1px solid #654b5b70;
  border-radius: 15px;
  background: linear-gradient(#1a11186b, #120d15b3), #1a1118 url("/cinema-cover.webp") center / cover no-repeat;
}
.screen video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #110b10;
  object-fit: contain;
}
#placeholder {
  z-index: 1;
  max-width: calc(100% - 32px);
  padding: 10px 15px;
  border: 1px solid #cab1bc46;
  border-radius: 8px;
  background: #20161bdd;
  color: #fff4ec;
  text-align: center;
  font-size: .9rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 15px;
  border: 1px solid transparent;
  border-radius: 9px;
  text-align: center;
  background: var(--accent);
  color: var(--ink);
  font-size: .88rem;
  font-weight: 720;
  cursor: pointer;
}
.button:not(:disabled):hover { background: var(--accent-hover); }
.button:disabled { opacity: .64; cursor: wait; }
.button-play::before {
  content: "";
  border-block: 5px solid transparent;
  border-left: 8px solid currentColor;
}
.button.secondary {
  background: #ffffff0c;
  border-color: var(--line-strong);
  color: #faede7;
}
.button.secondary:hover { background: #ffffff17; }

.library-section {
  display: grid;
  gap: 20px;
}
.collection, .fetch-panel {
  min-width: 0;
  padding: clamp(21px, 3vw, 33px);
  border: 1px solid var(--line);
  border-radius: 19px;
}
.collection { background: #201822c7; }
.fetch-panel { background: linear-gradient(150deg, #33232f, #231923 85%); }
.collection-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 13px;
}
#search { width: min(100%, 240px); }
.cards:not(:empty) {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 10px;
  margin-top: 16px;
}
.card {
  min-width: 0;
  padding: 14px;
  color: inherit;
  background: #2b202b;
  border: 1px solid var(--line);
  border-radius: 9px;
  text-align: left;
  cursor: pointer;
  overflow-wrap: anywhere;
}
.card:hover { background: #382a35; }
.card[aria-pressed="true"] { border-color: var(--accent); }
.card strong, .card small { display: block; }
.card small { color: var(--muted); margin-top: 5px; }
.catalog-status:empty { display: none; }
.catalog-status {
  margin: 19px 0 0;
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.55;
}
.catalog-link {
  display: inline-block;
  margin-top: 12px;
  color: var(--accent);
  font-size: .9rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.film-search {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-top: 19px;
}
.film-search[data-catalog-only] { grid-template-columns: minmax(0, 1fr) auto; }
.film-controls {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, .8fr) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-top: 18px;
}
.film-featured {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: clamp(280px, 38vw, 430px);
  overflow: hidden;
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #181320;
}
.film-featured-art, .film-featured-art::after { position: absolute; inset: 0; }
.film-featured-art { z-index: -1; }
.film-featured-art img { width: 100%; height: 100%; object-fit: cover; object-position: center 42%; }
.film-featured-art::after {
  content: "";
  background: linear-gradient(90deg, #130e18 4%, #130e18df 27%, #130e1852 62%, #130e181a 100%);
}
.film-featured-copy { padding: clamp(17px, 5vw, 52px); max-width: 56%; }
.film-featured-copy h2 { margin: 0; font-size: clamp(2.1rem, 4.7vw, 4rem); line-height: .98; }
.film-featured-copy .sources { margin: 13px 0 20px; }
.free-toggle { display: inline-flex; gap: 8px; min-height: 46px; align-items: center; font-size: .9rem; }
.free-toggle input { width: 18px; min-height: 0; height: 18px; margin: 0; accent-color: var(--accent); }
#free-count { margin: 0; }
.studio-films {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}
.film-card { display: flex; flex-direction: column; gap: 9px; padding: 7px; }
.film-thumb {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 6px;
  color: var(--accent);
  background: linear-gradient(138deg, #432c3c, #201521);
}
.film-thumb img { width: 100%; height: 100%; object-fit: cover; grid-area: 1 / 1; }
.film-thumb::before { content: "\25B6"; grid-area: 1 / 1; }
.film-card-time {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 3px 6px;
  border-radius: 5px;
  color: #fff1e5;
  background: #171219e8;
  font-size: .72rem;
}
.film-card strong { padding: 0 4px; font-size: .95rem; line-height: 1.25; }
.film-card small { padding: 0 4px; margin: auto 0 3px; font-size: .76rem; }
.film-services { margin-top: 28px; padding-top: 17px; border-top: 1px solid var(--line); }
.film-services h2 { margin: 0; }
.film-services .sources { margin-top: 4px; }
.film-service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 185px), 1fr));
  gap: 10px;
  margin-top: 13px;
}
.film-service { display: flex; flex-direction: column; justify-content: space-between; gap: 6px; text-decoration: none; }
#free-more { margin-top: 17px; }
.free-screen { border: 1px solid var(--line); margin-top: 20px; padding: 12px; border-radius: 15px; background: #171219; }
.free-screen-head, .free-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.free-screen-head h3 { margin: 0; font-size: 1.15rem; }
.free-screen-head .sources { margin: 4px 0 0; }
.free-video { margin-top: 10px; }
.free-video iframe, .free-video video { width: 100%; aspect-ratio: 16 / 9; display: block; border: 0; border-radius: 8px; background: #130d14; }
.free-actions { justify-content: flex-start; margin-top: 10px; }
.free-actions .catalog-link { margin-top: 0; }
.free-parts { display: flex; gap: 8px; flex-wrap: wrap; }
.free-parts .button[aria-pressed="true"] { border-color: var(--accent); }
@media (max-width: 860px) {
  .studio-films { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .film-search, .film-search[data-catalog-only] { grid-template-columns: minmax(0, 1fr); }
  .film-controls, .studio-films { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .film-controls .field:first-child { grid-column: 1 / -1; }
  .film-featured { align-items: end; }
  .film-featured-art::after { background: linear-gradient(0deg, #130e18 1%, #130e18a6 48%, #130e181a 100%); }
  .film-featured-copy { max-width: 100%; }
  .free-video { margin-inline: -8px; }
}

#fetch-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-top: 17px;
}
.url-field { grid-column: 1 / -1; }
.field { min-width: 0; display: grid; gap: 6px; color: #e7d7e0; font-size: .84rem; font-weight: 620; }
input, select {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  background: #1c151e;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: #f8eee7;
  font-size: .96rem;
}
input::placeholder { color: #b4a3b0; }
.sources { margin: 13px 0 0; color: var(--muted); font-size: .83rem; line-height: 1.5; }
.fetch-result {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  padding-top: 14px;
  margin-top: 15px;
  border-top: 1px solid var(--line);
}
.fetch-result .detail { margin: 0; overflow-wrap: anywhere; }
.fetch-result[data-kind="error"] .detail { color: #ffd1c6; }
.fetch-meter {
  flex: 1 0 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.fetch-meter progress {
  appearance: none;
  display: block;
  flex: 1;
  min-width: 0;
  height: 8px;
  border: 0;
  border-radius: 100px;
  overflow: hidden;
  background: #59414e;
  accent-color: var(--accent);
}
.fetch-meter progress::-webkit-progress-bar { background: transparent; }
.fetch-meter progress::-webkit-progress-value { background: var(--accent); border-radius: 100px; }
.fetch-meter progress::-moz-progress-bar { background: var(--accent); border-radius: 100px; }
.fetch-meter progress:indeterminate {
  background: repeating-linear-gradient(115deg, #59414e 0 12px, #975d55 12px 24px);
  background-size: 48px 100%;
  animation: fetch-stripes 1.2s linear infinite;
}
.fetch-meter progress:indeterminate::-moz-progress-bar { background: transparent; }
#fetch-percent { color: var(--accent); font-size: .83rem; font-variant-numeric: tabular-nums; white-space: nowrap; }

.video-intro { margin: 4px 0 22px; color: var(--muted); line-height: 1.5; }
.video-forms { display: grid; grid-template-columns: 1.15fr 1fr; gap: 14px; }
.video-form {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #171219;
}
.video-form .button { min-height: 44px; }
.video-input { flex: 1 1 170px; }
.video-form .sources { flex-basis: 100%; margin: 0; }
.video-selection, .video-results { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.video-player-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; }
.video-player-head h2 { margin: 0; font-size: clamp(1.65rem, 3.8vw, 2.35rem); overflow-wrap: anywhere; }
.video-player-head > div { flex: 1 1 245px; min-width: 0; }
.video-player-head > a { color: var(--accent); }
.video-player-head > a.button { color: #fff1e5; }
.video-source { margin: 0 0 3px; color: var(--accent); font-size: .81rem; font-weight: 650; }
.video-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.video-screen {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0e0b0f;
  overflow: hidden;
}
.video-screen iframe, .video-screen video { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; }
.video-screen[data-orientation="vertical"] :is(video, iframe) { margin: auto; width: min(100%, 354px); aspect-ratio: 9 / 16; }
.video-results .detail:empty { margin: 0; }
.video-player-head > .video-results-tools {
  flex: 0 1 auto;
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.video-results-tools > a { color: var(--accent); padding-block: 12px; }
.video-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.video-download-list { display: grid; gap: 8px; padding: 0; margin: 12px 0 0; list-style: none; }
.video-download-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow-wrap: anywhere;
}
.video-download-list li > div { flex: 1 1 220px; min-width: 0; }
.video-download-list p { margin: 4px 0; }
.video-download-list [data-kind="error"] p { color: #ffd1c6; }
.video-card {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #171219;
  color: inherit;
  cursor: pointer;
  text-align: left;
}
.video-card:hover { border-color: var(--accent); }
.video-card-cover { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 7px; overflow: hidden; background: var(--surface); }
.video-card-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.video-card-cover span { position: absolute; right: 5px; bottom: 5px; padding: 2px 5px; border-radius: 4px; background: #181218e8; font-size: .72rem; }
.video-card strong { font-size: .87rem; line-height: 1.36; overflow-wrap: anywhere; }
.video-card small { color: var(--muted); overflow-wrap: anywhere; }
#video-percent { color: var(--accent); font-size: .83rem; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) {
  .video-forms { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .video-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .video-actions .button { flex: 1 1 100%; }
}
#fetch-percent:empty { display: none; }
@keyframes fetch-stripes { to { background-position: 48px 0; } }
@media (prefers-reduced-motion: reduce) {
  .fetch-meter progress:indeterminate { animation: none; }
}

@media (max-width: 850px) {
  .wrap { width: calc(100% - 40px); }
  .feature {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "screen" "copy";
    padding: 8px;
    border-radius: 17px;
  }
  .feature-copy { padding: 22px; }
  .screen { border-radius: 11px; }
  .actions { margin-top: 18px; }
  .library-section { gap: 14px; }
}

@media (max-width: 480px) {
  .wrap { width: calc(100% - 28px); }
  .bar { flex-wrap: wrap; min-height: 63px; gap: 0 8px; padding-top: 10px; }
  .brand { font-size: 1.56rem; gap: 7px; }
  .brand-mark { width: 35px; height: 35px; border-radius: 9px; }
  nav { width: 100%; gap: 0 14px; }
  nav a { font-size: .77rem; }
  .feature-copy, .collection, .fetch-panel { padding: 16px; }
  h1 { font-size: clamp(1.95rem, 8.75vw, 2.55rem); }
  #fetch-url { font-size: 1rem; }
}

@media (max-width: 330px) {
  .bar { flex-wrap: wrap; padding-block: 8px 0; }
}

