/* ============================================================
   BOSFOR PICTURES — design system
   Pure black & white interface. Colour lives only in the films.
   Type: Playfair Display (display serif) · Archivo (grotesque) · Space Mono (archive)
   ============================================================ */

@font-face {
  font-family: "Playfair Display";
  src: url("../fonts/PlayfairDisplay-400900-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
}
@font-face {
  font-family: "Playfair Display";
  src: url("../fonts/PlayfairDisplay-400900-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 400 900;
  font-display: swap;
}
@font-face { font-family: "Archivo"; src: url("../fonts/Archivo-400-normal.woff2") format("woff2"); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("../fonts/Archivo-500-normal.woff2") format("woff2"); font-style: normal; font-weight: 500; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("../fonts/Archivo-600-normal.woff2") format("woff2"); font-style: normal; font-weight: 600; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("../fonts/Archivo-700-normal.woff2") format("woff2"); font-style: normal; font-weight: 700; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("../fonts/Archivo-800-normal.woff2") format("woff2"); font-style: normal; font-weight: 800; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("../fonts/Archivo-900-normal.woff2") format("woff2"); font-style: normal; font-weight: 900; font-display: swap; }
@font-face { font-family: "Space Mono"; src: url("../fonts/SpaceMono-400-normal.woff2") format("woff2"); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: "Space Mono"; src: url("../fonts/SpaceMono-700-normal.woff2") format("woff2"); font-style: normal; font-weight: 700; font-display: swap; }

:root {
  --black: #000000;
  --white: #ffffff;
  --paper: #f4f1ea;      /* warm off-white for editorial inversions */
  --ink-90: rgba(255, 255, 255, 0.9);
  --ink-60: rgba(255, 255, 255, 0.6);
  --ink-40: rgba(255, 255, 255, 0.4);
  --ink-25: rgba(255, 255, 255, 0.25);
  --ink-12: rgba(255, 255, 255, 0.12);
  --ink-07: rgba(255, 255, 255, 0.07);
  --line: rgba(255, 255, 255, 0.14);

  --serif: "Playfair Display", Georgia, serif;
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "Space Mono", "SFMono-Regular", monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);

  --pad: clamp(20px, 4.4vw, 64px);
  --nav-h: 76px;
}

/* EN: Space Mono без кириллицы не нужен — Helvetica ближе к русскому рендеру подписей */
html[data-lang="en"] {
  --mono: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--black);
  color: var(--white);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.4;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1;
}

.film-noscript {
  max-width: 720px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 96px var(--pad) 64px;
  color: var(--white);
  font-family: var(--sans);
  line-height: 1.55;
}
.film-noscript h1 { font-family: var(--serif); font-size: clamp(40px, 7vw, 72px); line-height: 1; }
.film-noscript img { display: block; width: 100%; max-height: 68vh; object-fit: cover; margin: 28px 0; }
.film-noscript a { color: inherit; text-underline-offset: .2em; }

::selection { background: var(--white); color: var(--black); }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; color: inherit; background: none; border: none; cursor: pointer; }

/* ---- film-grain & vignette overlays applied site-wide ---- */
.grain {
  position: fixed; inset: 0; z-index: 9000; pointer-events: none;
  opacity: 0.05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============================================================
   TYPE PRIMITIVES
   ============================================================ */
.u-mono {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 400;
}
.u-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-40);
}
.u-serif { font-family: var(--serif); }
.display {
  font-family: var(--sans);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 0.9;
  text-transform: uppercase;
}
.serif-display {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: -0.01em;
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 800;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--pad);
  color: #fff;
}
.nav__brand, .nav__links > a { mix-blend-mode: difference; }
.nav__brand {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: 0.02em;
  line-height: 1;
  display: inline-flex; align-items: center;
}
.nav__brand bosfor-mark { display: block; height: 40px; width: 53px; color: #fff; cursor: pointer; }

/* language toggle — pill tumbler. Renders literally (NOT under the nav's
   difference blend) so the darkened track actually reads over dark imagery.
   Solid white knob + white outline keep it legible on any photo. */
.langtog {
  position: relative; display: inline-flex; align-items: center;
  -webkit-appearance: none; appearance: none;
  padding: 3px; border: 1px solid #fff; border-radius: 100px;
  background: rgba(6,6,9,0.55);
  -webkit-backdrop-filter: blur(9px); backdrop-filter: blur(9px);
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; line-height: 1;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.langtog:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.langtog__opt {
  position: relative; z-index: 1;
  width: 30px; height: 21px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;                          /* inactive language: pure white */
  transition: color .38s var(--ease);
  pointer-events: none;                 /* the whole toggle is the hit area */
}
.langtog__opt.is-active { color: #0b0b0b; }                                          /* active sits on the backing */
.langtog:hover:not(.is-switching) .langtog__opt.is-active { color: #fff; }           /* hover: backing leaves active */
.langtog:hover:not(.is-switching) .langtog__opt:not(.is-active) { color: #0b0b0b; }  /* hover: backing arrives on inactive */

/* liquid backing — two white blobs merged by an SVG goo filter, so the backing
   flows like a droplet as it slides toward the inactive option on hover */
.langtog__fluid { position: absolute; top: 3px; left: 3px; right: 3px; bottom: 3px; z-index: 0; filter: url(#langGoo); pointer-events: none; }
.langtog__blob {
  position: absolute; top: 0; left: 0; width: 30px; height: 21px;
  border-radius: 100px; background: #fff;
  --tx: 0px; transform: translateX(var(--tx));
  transition: transform .44s var(--ease);
}
.langtog__blob.b2 { transition-delay: .05s; }                                        /* trails the lead blob → liquid bridge */
.langtog[data-active="en"] .langtog__blob { --tx: 30px; }
.langtog[data-active="ru"]:hover:not(.is-switching) .langtog__blob { --tx: 30px; }   /* slide toward inactive EN */
.langtog[data-active="en"]:hover:not(.is-switching) .langtog__blob { --tx: 0px; }    /* slide toward inactive RU */
.nav__brand sup { font-family: var(--mono); font-size: 9px; letter-spacing: 0.1em; vertical-align: super; opacity: 0.7; }
.nav__links { display: flex; gap: clamp(18px, 2.4vw, 40px); align-items: center; }
.nav__links a {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  position: relative; padding: 4px 0;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease);
}
.nav__links a:hover::after, .nav__links a.is-active::after { transform: scaleX(1); }
.nav__links a.is-active { opacity: 1; }

@media (max-width: 720px) {
  .nav__links a:not(.nav__cta) { display: none; }
  :root { --nav-h: 62px; }
}

/* ============================================================
   MARQUEE (festival ticker)
   ============================================================ */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden; white-space: nowrap;
  padding: 18px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track { display: inline-flex; gap: 0; will-change: transform; }
.marquee__item {
  font-family: var(--serif); font-weight: 500; font-style: italic;
  font-size: clamp(20px, 3vw, 40px);
  padding: 0 clamp(20px, 4vw, 60px);
  color: var(--ink-60);
  display: inline-flex; align-items: center; gap: clamp(20px, 4vw, 60px);
}
.marquee__item::after { content: "✦"; font-style: normal; font-size: 0.4em; color: var(--ink-25); }

/* ============================================================
   FLAT COLOUR PLACEHOLDERS (the only colour) — solid fill only
   ============================================================ */
.art {
  position: relative; overflow: hidden;
  background: #111;
}
.art--photo { background-size: cover; background-position: center; background-repeat: no-repeat; }
/* Poster keeps its full aspect ratio — contained, never cropped (its motion cover matches). */
.art--poster.art--photo { background-size: contain; }
.art--poster .art__video { object-fit: contain; }

/* Motion cover — sits exactly over the still, matched framing (cover/center),
   hidden until the clip is buffered, then cross-fades in. No interaction. */
.art__video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  opacity: 0; transition: opacity .7s ease;
  pointer-events: none; z-index: 1;
  background: transparent;
}
.art.has-video .art__video { opacity: 1; }

/* ============================================================
   STATUS TAG
   ============================================================ */
.status {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  color: #fff;
}
.status::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; box-shadow: 0 0 0 0 currentColor;
}
.status[data-status="in-production"] { color: #fff; }
.status[data-status="in-production"]::before { animation: none; }
.status[data-status="now-showing"] { color: #fff; }
.status[data-status="coming-soon"] { color: #fff; }
.status[data-status="streaming"] { color: #fff; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255,255,255,0.6); }
  70% { box-shadow: 0 0 0 7px rgba(255,255,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  padding: 14px 26px; border: 1px solid var(--ink-25); border-radius: 100px;
  transition: background .5s var(--ease), color .5s var(--ease), border-color .5s var(--ease);
}
.btn:hover { background: var(--white); color: var(--black); border-color: var(--white); }
.btn--solid { background: var(--white); color: var(--black); border-color: var(--white); }
.btn--solid:hover { background: transparent; color: var(--white); border-color: var(--ink-25); }
.btn__arrow { transition: transform .5s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(4px); }

/* generic section frame */
.section { padding: clamp(80px, 12vh, 160px) var(--pad); position: relative; }
.section__head {
  display: flex; justify-content: space-between; align-items: baseline;
  border-bottom: 1px solid var(--line); padding-bottom: 22px; margin-bottom: clamp(40px, 6vw, 80px);
  gap: 24px; flex-wrap: wrap;
}
.section__title { font-family: var(--sans); font-weight: 800; text-transform: uppercase;
  letter-spacing: -0.02em; font-size: clamp(30px, 5vw, 64px); line-height: 0.92; }

/* reveal animation utility — hidden state ONLY applies once the
   animation timeline is confirmed live (.anim-ready on <html>).
   Default = fully visible, so frozen/reduced/no-JS show content. */
.anim-ready [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.anim-ready [data-reveal].is-in { opacity: 1; transform: none; }
.anim-ready [data-reveal-delay="1"] { transition-delay: .08s; }
.anim-ready [data-reveal-delay="2"] { transition-delay: .16s; }
.anim-ready [data-reveal-delay="3"] { transition-delay: .24s; }
.anim-ready [data-reveal-delay="4"] { transition-delay: .32s; }

/* clip-reveal for big lines */
.clip { display: block; overflow: hidden; }
.clip > * { display: block; }
.anim-ready .clip > * { transform: translateY(105%); transition: transform 1.1s var(--ease); }
.anim-ready .is-in .clip > *, .anim-ready .clip.is-in > * { transform: none; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { border-top: 1px solid var(--line); padding: clamp(60px, 9vw, 120px) var(--pad) 40px; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 48px; }
.footer__statement { font-family: var(--serif); font-size: clamp(20px, 2.4vw, 30px); line-height: 1.3; font-weight: 500; max-width: 22ch; }
.footer__col h4 { font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-40); margin-bottom: 18px; }
.footer__col a, .footer__col p { display: block; font-size: 15px; color: var(--ink-90); margin-bottom: 10px; transition: opacity .3s; }
.footer__col a:hover { opacity: 0.55; }
.footer__news { display: flex; gap: 10px; margin-top: 14px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.footer__news input { flex: 1; background: none; border: none; color: #fff; font-family: var(--mono); font-size: 12px; letter-spacing: 0.05em; outline: none; }
.footer__news input::placeholder { color: var(--ink-40); }
.footer__news button { font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-60); }
.footer__news button:hover { color: #fff; }
.footer__base {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 24px;
  margin-top: clamp(50px, 8vw, 110px); flex-wrap: wrap;
}
.footer__wordmark { font-family: var(--serif); font-weight: 600; font-size: clamp(64px, 18vw, 280px); line-height: 0.8; letter-spacing: -0.01em; }
.footer__meta { font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-40); text-align: right; }

@media (max-width: 860px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__statement { grid-column: 1 / -1; }
}
@media (max-width: 540px) {
  .footer__grid { grid-template-columns: 1fr; }
}

/* shared cursor-follow cover (hover index); --sw — маятниковое покачивание от скорости курсора (core.js) */
.float-poster {
  position: fixed; top: 0; left: 0; z-index: 600; width: 280px; height: 158px;
  border-radius: 4px; overflow: hidden; pointer-events: none;
  opacity: 0; transform: translate(-50%, -50%) rotate(var(--sw, 0deg)) scale(0.86); transform-origin: 50% 30%;
  transition: opacity .5s var(--ease), transform .6s var(--ease), width .45s var(--ease), height .45s var(--ease);
  box-shadow: 0 40px 120px rgba(0,0,0,0.7);
}
.float-poster.is-on { opacity: 1; transform: translate(-50%, -50%) rotate(var(--sw, 0deg)) scale(1); transition: opacity .5s var(--ease), width .45s var(--ease), height .45s var(--ease); }
/* фрейм совпадает с пропорцией кадра → заполняем без полей */
.float-poster .art--photo { background-size: cover; }
.float-poster .art { position: absolute; inset: 0; }
@media (max-width: 900px) { .float-poster { display: none; } }
