:root {
  --dark: #121419;
  --gold: #a68352;
  --gold-hover: #8c6e44;
  --gold-button: #8f7046;
  --paper: #f2efeb;
  --body: #444444;
  --muted: #707070;
  --line: #d8cfc4;
  --white: #fff;
  --light-text: #d8d3cc;
  --dark-line: #a6835259;
  --serif: Georgia, "Songti SC", "Noto Serif CJK SC", "Times New Roman", serif;
  --sans: "Inter", system-ui, "PingFang SC", "Noto Sans CJK SC", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--body); font-family: var(--sans); }
body:has(dialog[open]) { overflow: hidden; }
img { display: block; max-inline-size: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
button, a { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold-hover); outline-offset: 4px; }
:is(.masthead, .hero-inner, .films, .contact, footer, .viewer) :focus-visible { outline-color: var(--line); }
h1, h2, h3, p, dl, dd { margin: 0; }
.wrap { width: min(100% - 112px, 1320px); margin-inline: auto; }
.masthead { position: sticky; top: 0; z-index: 4; background: var(--dark); color: var(--white); border-bottom: 1px solid var(--dark-line); }
.header-row { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 24px; position: relative; }
.brand { display: inline-flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.brand img { inline-size: 44px; block-size: 42px; object-fit: contain; }
.brand span { font-weight: 760; font-size: 20px; line-height: 1.05; letter-spacing: .05em; }
.brand small { display: block; margin-top: 6px; color: var(--line); font: 620 8px/1 var(--sans); letter-spacing: .16em; white-space: nowrap; }
.main-nav, .header-actions { display: flex; align-items: center; gap: clamp(16px, 2.7vw, 38px); }
.main-nav a { font-size: 14px; white-space: nowrap; }
.main-nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.main-nav .mobile-contact { display: none; }
.header-actions { gap: 16px; }
.header-contact { display: inline-flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; font-size: 13px; white-space: nowrap; }
.languages { position: relative; font-size: 13px; flex-shrink: 0; }
.languages summary { display: flex; gap: 8px; align-items: center; list-style: none; cursor: pointer; padding: 9px 3px; }
.languages summary::-webkit-details-marker { display: none; }
.language-options { position: absolute; inset-inline-end: 0; top: calc(100% + 9px); min-width: 148px; background: var(--dark); border: 1px solid var(--dark-line); padding: 5px; }
.language-options a { display: block; padding: 10px; white-space: nowrap; }
.language-options a:hover, .language-options a[aria-current] { background: #a6835229; }
.menu-button { display: none; }
.arrow { display: inline-block; font-family: system-ui, sans-serif; font-weight: 500; line-height: 1; }
[dir="rtl"] .arrow { transform: scaleX(-1); }
.hero { padding-block-start: clamp(18px, 2.3vw, 36px); color: var(--white); }
.hero-inner { display: grid; grid-template-columns: minmax(0, 42fr) minmax(0, 58fr); min-height: clamp(360px, 50svh, 480px); background: var(--dark); }
.hero-copy { align-content: center; padding: clamp(26px, 3.4vw, 52px); background: linear-gradient(#121419bf, #121419bf), linear-gradient(145deg, #383026, var(--dark)); }
.hero-visual { position: relative; min-block-size: 100%; background: var(--dark); }
.hero-image { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; object-fit: cover; object-position: 69% center; filter: brightness(.92); }
.overline { display: flex; align-items: center; gap: 12px; color: var(--gold); font-size: 12px; font-weight: 690; letter-spacing: .16em; line-height: 1.5; }
.overline::before { content: ""; inline-size: 26px; block-size: 1px; background: currentColor; flex-shrink: 0; }
.hero .hero-slogan { color: var(--white); font-size: clamp(13px, 1.07vw, 15px); letter-spacing: .01em; align-items: baseline; }
.hero-slogan::before { align-self: center; background: var(--gold); }
h1, h2 { font-family: var(--serif); font-weight: 500; }
h1 { font-size: clamp(34px, 3.55vw, 58px); line-height: 1.1; letter-spacing: -.035em; margin-block: 17px 0; color: var(--gold); }
h1 span { display: block; font: 550 clamp(16px, 1.55vw, 22px)/1.4 var(--sans); letter-spacing: 0; margin-top: 8px; color: var(--white); }
:lang(zh) h1 { font-size: clamp(42px, 4.65vw, 70px); line-height: 1.12; letter-spacing: -.025em; }
:lang(ar) h1 { letter-spacing: 0; line-height: 1.2; }
:lang(ar) h1 span { letter-spacing: 0; }
:lang(ar) .overline { letter-spacing: 0; font-size: 14px; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 13px 19px; margin-top: 26px; }
.button { display: inline-flex; min-height: 48px; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 18px; font-size: 14px; font-weight: 680; text-align: start; }
.gold, .header-contact { background: var(--gold-button); color: var(--white); border: 1px solid var(--gold); border-radius: 3px; }
.gold:hover, .header-contact:hover { background: var(--gold-hover); border-color: var(--gold-hover); }
.hero-secondary { display: inline-flex; gap: 10px; align-items: center; min-height: 48px; padding: 6px 12px; font-size: 14px; border: 1px solid var(--gold); border-radius: 3px; }
.hero-secondary:hover { background: var(--gold); color: var(--dark); }
.play-icon { display: inline-grid; place-items: center; inline-size: 30px; block-size: 30px; border-radius: 50%; border: 1px solid currentColor; flex: 0 0 auto; }
.play-icon::after { content: ""; inline-size: 0; block-size: 0; border-block: 5px solid transparent; border-inline-start: 8px solid currentColor; margin-inline-start: 2px; }
.hero-caption { position: absolute; inset-inline-end: 20px; inset-block-end: 18px; display: flex; align-items: center; gap: 11px; padding: 6px 9px; background: #121419df; font-size: 12px; color: var(--white); }
.hero-caption span { inline-size: 34px; block-size: 1px; background: var(--gold); }
.section { padding-block: clamp(60px, 8vw, 112px); scroll-margin-top: 80px; }
.products { padding-block-start: clamp(32px, 3.6vw, 52px); }
.section h2 { font-size: clamp(26px, 2.5vw, 36px); color: var(--dark); }
.products .section-heading { flex-direction: column; align-items: start; gap: 8px; margin-bottom: 24px; }
.products .section-heading p { max-width: 58ch; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px 32px; margin-bottom: 34px; }
h2 { letter-spacing: -.043em; line-height: 1.06; }
:lang(zh) h2, :lang(ar) h2 { letter-spacing: -.012em; line-height: 1.18; }
.section-heading p { max-width: 350px; color: color-mix(in srgb, var(--muted) 90%, var(--body)); font-size: 15px; line-height: 1.65; }
.series-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px 22px; }
.series-card { min-width: 0; background: var(--paper); border: 1px solid var(--line); box-shadow: 0 4px 16px #1214190d; transition: border-color .2s ease, transform .2s ease; }
.series-card:focus-within { border-color: var(--gold); }
@media (hover: hover) {
  .series-card:hover { border-color: var(--gold); transform: translateY(-3px); }
}
.series-image { position: relative; display: block; inline-size: 100%; aspect-ratio: 1; overflow: hidden; border: 0; padding: 0; background: var(--line); text-align: start; }
.series-image img { width: 100%; height: 100%; object-fit: cover; object-position: center 55%; filter: brightness(.95); }
.film-picture img { width: 100%; height: 100%; object-fit: contain; }
.series-image:hover .picture-action { background: var(--white); }
.picture-action { position: absolute; inset-inline-end: 12px; inset-block-end: 12px; display: flex; align-items: center; gap: 12px; background: var(--paper); padding: 8px 10px; font-size: 12px; font-weight: 660; }
.series-copy { padding: 15px 16px 18px; }
.series-copy h3 { font-size: 19px; font-weight: 680; color: var(--dark); }
.series-copy h3::before { content: ""; display: block; inline-size: 30px; block-size: 2px; margin-block-end: 10px; background: var(--gold); }
.series-copy p { font-size: 14px; line-height: 1.64; margin-top: 7px; max-width: 530px; }
.films, .contact { background: var(--dark); color: var(--white); }
:is(.films, .contact) h2 { color: var(--white); }
.films .section-heading p, .contact p { color: var(--light-text); }
.film-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.film-filters button { background: transparent; border: 1px solid var(--gold); padding: 8px 12px; font-size: 13px; text-align: start; }
.film-filters button:hover { background: #a6835229; }
.film-filters button[aria-pressed="true"] { background: var(--gold); color: var(--dark); }
.film-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 24px 16px; }
.film-card { min-width: 0; padding: 0; border: 0; background: none; text-align: start; }
.film-picture { position: relative; display: block; aspect-ratio: 1.68; overflow: hidden; background: #25272b; }
.film-picture .play-icon { position: absolute; inset-inline-start: 10px; inset-block-end: 10px; color: white; background: #121511c8; inline-size: 33px; block-size: 33px; }
.duration { position: absolute; inset-inline-end: 8px; inset-block-end: 9px; background: #121511dc; padding: 4px 6px; color: white; font-size: 11px; }
.film-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0 0; font-size: 13px; font-weight: 650; }
.film-title .arrow { color: var(--gold); }
.about-layout { display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); align-items: center; gap: clamp(28px, 5vw, 72px); max-width: 1100px; }
.about-image img { width: auto; height: auto; max-block-size: 360px; margin-inline: auto; }
.about h2 { margin-block: 12px 14px; }
.about-copy > p, .contact p { line-height: 1.7; }
.about-copy > p + p { margin-top: 12px; }
.contact-layout { display: grid; grid-template-columns: 1.25fr .75fr; align-items: center; gap: 36px; }
.contact h2 { max-width: 730px; }
.contact p { margin-top: 12px; max-width: 560px; }
.contact-actions { display: flex; gap: 9px; flex-wrap: wrap; justify-self: end; }
.contact-actions p { width: 100%; margin-top: 5px; font-size: 13px; }
.contact-actions p a { text-decoration: underline; text-underline-offset: 3px; }
.outline { border: 1px solid var(--gold); color: var(--white); border-radius: 3px; }
.outline:hover { background: var(--gold); color: var(--dark); }
footer { background: var(--dark); color: var(--light-text); font-size: 13px; border-top: 1px solid var(--dark-line); }
.footer-row { display: flex; justify-content: space-between; align-items: center; gap: 12px 24px; padding-block: 24px; }
.footer-row span { color: var(--gold); }
.viewer { width: min(880px,100% - 28px); max-height: 94dvh; background: var(--dark); color: var(--white); border: 1px solid var(--gold); padding: 0; }
.viewer::backdrop { background: #0a0c0bdf; }
.viewer-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 16px; }
.viewer-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 12px; min-inline-size: 0; }
.viewer-scale { color: var(--light-text); font-size: 13px; line-height: 1.35; white-space: nowrap; }
.viewer-scale bdi { color: var(--gold); font-weight: 650; font-variant-numeric: tabular-nums; }
.viewer h2 { font: 660 17px/1.35 var(--sans); letter-spacing: 0; }
.viewer-close, .gallery-controls button { min-width: 40px; min-height: 40px; border: 1px solid #77715e; background: #262a25; color: white; font-size: 23px; }
.viewer-media { display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; background: #0d100e; }
.viewer[open]:has(.viewer-media > img) {
  --frame-ratio: 6 / 7;
  --gallery-inset: clamp(12px, 2vmin, 18px);
  --gallery-photo-width: calc(max(1px, min(560px, 72dvh, 94dvh - 152px)) * var(--frame-ratio));
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  width: min(100% - 28px, max(250px, var(--gallery-photo-width) + 2 * var(--gallery-inset) + 2px));
  padding: var(--gallery-inset);
  border-color: #a6835266;
  border-radius: 12px;
  background: #17191e;
  box-shadow: 0 20px 80px #0009;
}
.viewer-media:has(> img) {
  position: relative;
  inline-size: min(100%, var(--gallery-photo-width));
  aspect-ratio: var(--frame-ratio);
  justify-self: center;
  overflow: hidden;
  border-radius: 5px;
  background: #20232a;
}
.viewer-media > img {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  object-position: var(--photo-position, center);
}
.viewer-media video { display: block; max-width: 100%; max-height: 72dvh; height: auto; width: auto; object-fit: contain; }
.viewer:has(.viewer-media > img) .viewer-top {
  padding: 0;
}
.viewer:has(.viewer-media > img) h2 { font: 500 clamp(18px, 2.25vw, 24px)/1.2 var(--serif); overflow-wrap: anywhere; }
.gallery-controls {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: center;
}
.gallery-controls output { min-inline-size: 44px; text-align: center; color: var(--light-text); font-size: 13px; font-variant-numeric: tabular-nums; }
.gallery-controls button, .viewer:has(.viewer-media > img) .viewer-close {
  display: grid;
  place-items: center;
  flex: none;
  inline-size: 44px;
  block-size: 44px;
  padding: 0;
  border-radius: 50%;
  border-color: var(--dark-line);
  background: transparent;
  line-height: 1;
}
.gallery-controls button:hover, .viewer:has(.viewer-media > img) .viewer-close:hover { background: var(--gold); border-color: var(--gold); color: var(--dark); }

/* Translated labels and headings need more room at the same viewport width. */
html:is(:lang(en), :lang(ar), :lang(ru)) {
  .hero-copy { padding: clamp(20px, 3.2vw, 44px); }
  .hero-copy h1, .section h2 { text-wrap: balance; }
  .hero-copy h1 span { text-wrap: pretty; }
  .hero-actions { gap: 10px; }
  .hero-actions .gold { gap: 9px; padding-inline: 12px; }
  .hero-secondary { gap: 7px; padding-inline: 10px; }
  .hero-secondary .play-icon { inline-size: 24px; block-size: 24px; }
  .series-copy h3, .film-title > span:first-child, .contact-actions a { overflow-wrap: anywhere; }
  .film-title { align-items: start; gap: 6px; }
  .film-title .arrow { flex: none; margin-block-start: 2px; }
  .contact-actions .button { gap: 10px; padding-inline: 12px; }
  .footer-row > a { flex: none; }
}

html:lang(ru) :is(.series-copy h3, .film-title > span:first-child) { hyphens: auto; }
html:lang(ar) h2 { letter-spacing: 0; }
html:lang(ar) .play-icon { direction: ltr; }

@media (min-width: 791px) and (max-width: 1120px) {
  html:is(:lang(en), :lang(ar), :lang(ru)) .hero-inner {
    grid-template-columns: minmax(0, 47fr) minmax(0, 53fr);
  }
  html:lang(ru) .series-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 930px) {
  html:is(:lang(en), :lang(ar), :lang(ru)) {
    .contact-layout { grid-template-columns: minmax(0, 1fr); gap: 22px; }
    .contact-actions { justify-self: start; }
  }
}
@media (min-width: 511px) and (max-width: 790px) {
  html:is(:lang(en), :lang(ar), :lang(ru)) .hero-visual {
    min-block-size: 0;
    max-block-size: 330px;
  }
}
@media (max-width: 510px) {
  html:is(:lang(en), :lang(ar), :lang(ru)) {
    .hero-actions a { flex: 1 1 auto; justify-content: center; }
    .hero-caption { max-inline-size: calc(100% - 20px); }
    .hero-caption span { flex: none; inline-size: 18px; }
  }
}

@media (max-width: 1050px) {
  .wrap { width: min(100% - 72px,1320px); }
  .header-row { gap: 14px; }
  .header-actions { gap: 10px; }
  .main-nav { gap: 16px; }
  .film-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 790px) {
  .wrap { width: calc(100% - 44px); }
  .header-row { min-height: 66px; gap: 12px; }
  .brand img { inline-size: 36px; block-size: 36px; }
  .brand { gap: 7px; }
  .brand span { font-size: 17px; }
  .brand small { font-size: 6.5px; }
  .header-contact { display: none; }
  .header-actions { margin-inline-start: auto; }
  .menu-button { order: 1; display: grid; place-content: center; gap: 5px; width: 37px; height: 37px; background: transparent; border: 1px solid var(--gold); padding: 7px; }
  .menu-button i { width: 17px; height: 1px; background: currentColor; }
  .main-nav { display: none; position: absolute; top: 100%; inset-inline: 0; padding: 10px; background: var(--dark); border: 1px solid var(--dark-line); }
  .main-nav.open { display: grid; gap: 0; }
  .main-nav a { padding: 11px; }
  .main-nav a:hover { background: #a6835229; }
  .main-nav .mobile-contact { display: block; font-weight: 680; }
  .hero-inner { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .hero-visual { aspect-ratio: 16 / 9; }
  .hero-image { object-position: center; }
  .section { scroll-margin-top: 66px; }
  .section-heading { display: grid; gap: 10px; margin-bottom: 23px; }
  .series-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px 14px; }
  .about-layout, .contact-layout { grid-template-columns: 1fr; }
  .about-copy { grid-row: 1; }
  .about-image img { max-block-size: 280px; }
  .contact-actions { justify-self: start; }
}
@media (max-width: 510px) {
  .wrap { width: calc(100% - 36px); }
  h1 { font-size: clamp(31px,8vw,43px); }
  :lang(zh) h1 { font-size: clamp(38px,10vw,50px); }
  :lang(ar) h1 { font-size: clamp(36px,9vw,48px); }
  .hero-actions { gap: 16px; margin-top: 24px; }
  .hero-secondary { font-size: 13px; }
  .hero-caption { inset-block-end: 10px; inset-inline-end: 10px; }
  .series-grid { grid-template-columns: 1fr; }
  .film-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px 11px; }
  .film-title { font-size: 12px; }
  .footer-row { align-items: start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
