/* Ночной сеанс — shared noir design system (TV, phones, editor) */

@font-face { font-family: 'Cormorant Garamond'; font-style: italic; font-weight: 500; font-display: swap; src: url(/fonts/cormorant-garamond-cyrillic-500-italic.woff2) format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Cormorant Garamond'; font-style: italic; font-weight: 500; font-display: swap; src: url(/fonts/cormorant-garamond-latin-500-italic.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,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-garamond-cyrillic-600-normal.woff2) format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/cormorant-garamond-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,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: italic; font-weight: 600; font-display: swap; src: url(/fonts/cormorant-garamond-cyrillic-600-italic.woff2) format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Cormorant Garamond'; font-style: italic; font-weight: 600; font-display: swap; src: url(/fonts/cormorant-garamond-latin-600-italic.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,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: 700; font-display: swap; src: url(/fonts/cormorant-garamond-cyrillic-700-normal.woff2) format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/cormorant-garamond-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Jost'; font-style: normal; font-weight: 300; font-display: swap; src: url(/fonts/jost-cyrillic-300-normal.woff2) format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Jost'; font-style: normal; font-weight: 300; font-display: swap; src: url(/fonts/jost-latin-300-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Jost'; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/jost-cyrillic-400-normal.woff2) format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Jost'; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/jost-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Jost'; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/jost-cyrillic-500-normal.woff2) format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Jost'; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/jost-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Jost'; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/jost-cyrillic-600-normal.woff2) format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Jost'; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/jost-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

:root {
  /* palette: silver nitrate + one drop of blood + festival gold */
  --ink: #0a0a09;
  --char: #121110;
  --smoke: #1b1a18;
  --ash: #2a2825;
  --line: rgba(239, 233, 221, .14);
  --line-2: rgba(239, 233, 221, .28);
  --paper: #efe9dd;
  --dim: #a39d92;
  --mute: #6f6a62;
  --red: #e1262c;
  --red-d: #8e1519;
  --red-glow: rgba(225, 38, 44, .35);
  --gold: #d6b25e;
  --gold-d: #8c6d2b;

  /* type: Cormorant Garamond — festival-poster serif for titles; Jost (Futura-like) — credits, UI and every number */
  --f-display: 'Cormorant Garamond', Garamond, 'Times New Roman', serif;
  --f-cond: 'Jost', 'Futura', 'Century Gothic', sans-serif;
  --f-mono: 'Jost', 'Futura', 'Century Gothic', sans-serif;
  --f-num: 'Jost', 'Futura', sans-serif;

  --ease: cubic-bezier(.2, .7, .1, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--f-cond);
  font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
button { font: inherit; color: inherit; cursor: pointer; }
img, video { display: block; }
.hidden { display: none !important; }

/* ---------------------------------------------------------------- film fx */
/* grain: tiny animated noise tile over everything */
.grain::after {
  content: '';
  position: fixed; inset: -50%;
  z-index: 900;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: .075;
  animation: grain .9s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  17% { transform: translate(-6%, 4%); }
  33% { transform: translate(5%, -7%); }
  50% { transform: translate(-3%, 8%); }
  67% { transform: translate(7%, 2%); }
  83% { transform: translate(-8%, -4%); }
}
/* vignette: the projector's hot spot */
.vignette::before {
  content: '';
  position: fixed; inset: 0;
  z-index: 899;
  pointer-events: none;
  background: radial-gradient(ellipse 75% 70% at 50% 45%, transparent 55%, rgba(0, 0, 0, .55) 100%);
}
@media (prefers-reduced-motion: reduce) {
  .grain::after { animation: none; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ------------------------------------------------------------ typography */
.display { font-family: var(--f-display); font-weight: 600; font-style: italic; letter-spacing: -.005em; line-height: .95; }
/* roman capitals with air between letters — the festival-poster title */
.marquee { font-family: var(--f-display); font-weight: 600; font-style: normal; text-transform: uppercase; letter-spacing: .08em; line-height: .95; }
.num { font-family: var(--f-num); font-variant-numeric: lining-nums tabular-nums; font-style: normal; }
.kicker {
  font-family: var(--f-cond); font-weight: 500; text-transform: uppercase;
  letter-spacing: .3em; font-size: .78rem; color: var(--dim);
}
.mono { font-family: var(--f-mono); }
.red { color: var(--red); }
.gold { color: var(--gold); }

/* thin rule with a centred mark, like old title cards */
.rule { display: flex; align-items: center; gap: .8em; color: var(--dim); }
.rule::before, .rule::after { content: ''; flex: 1; height: 1px; background: var(--line-2); }

/* ---------------------------------------------------------------- avatar */
/* portraits; a red ring marks the ones who got it right, gold — the winners */
.ava {
  --s: 48px;
  width: var(--s); height: var(--s);
  flex: 0 0 var(--s);
  border-radius: 50%;
  background: var(--ash) center / cover no-repeat;
  border: max(1.5px, calc(var(--s) * .04)) solid var(--paper);
  display: grid; place-items: center;
  font-family: var(--f-num); font-weight: 400; font-style: normal;
  font-size: calc(var(--s) * .42); color: var(--paper);
  transition: border-color .4s, box-shadow .4s, opacity .4s, transform .4s var(--ease-out);
  position: relative;
}
.ava.lit { border-color: var(--red); box-shadow: 0 0 0 max(1px, calc(var(--s) * .03)) var(--red); }
.ava.gold { border-color: var(--gold); box-shadow: 0 0 calc(var(--s) * .25) rgba(214, 178, 94, .35); }
.ava.off { opacity: .35; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 52px; padding: 0 1.4em;
  border: 1px solid var(--paper);
  background: var(--paper); color: var(--ink);
  font-family: var(--f-cond); font-weight: 500; font-size: 1rem;
  text-transform: uppercase; letter-spacing: .18em;
  border-radius: 2px;
  transition: transform .15s var(--ease), background .2s, color .2s, box-shadow .2s;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.btn.red { background: var(--red); border-color: var(--red); color: #fff; box-shadow: 0 0 0 0 var(--red-glow); }
.btn.red:hover { box-shadow: 0 0 28px 0 var(--red-glow); }
.btn.ghost { background: transparent; color: var(--paper); border-color: var(--line-2); }
.btn.ghost:hover { border-color: var(--paper); }
.btn[disabled] { opacity: .4; pointer-events: none; }

.field {
  width: 100%;
  min-height: 56px;
  padding: 0 16px;
  background: var(--char);
  color: var(--paper);
  border: 1px solid var(--line-2);
  border-radius: 2px;
  font-family: var(--f-cond); font-size: 1.15rem;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.field:focus { border-color: var(--paper); box-shadow: 0 0 0 3px rgba(239, 233, 221, .08); }

/* option letters shared by TV and phones */
.letter {
  display: inline-grid; place-items: center;
  width: 1.9em; height: 1.9em; flex: 0 0 1.9em;
  border: 1px solid currentColor; border-radius: 50%;
  font-family: var(--f-num); font-weight: 500; font-style: normal;
  line-height: 1;
}

.dots::after { content: ''; animation: dots 1.4s steps(4) infinite; }
@keyframes dots { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } }

.offline {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%);
  z-index: 1000;
  background: var(--red); color: #fff;
  padding: 10px 18px;
  font-family: var(--f-cond); letter-spacing: .1em; text-transform: uppercase; font-size: .9rem;
}

@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }
@keyframes flicker {
  0%, 100% { opacity: 1; } 8% { opacity: .86; } 9% { opacity: 1; } 47% { opacity: .95; } 48% { opacity: .8; } 49% { opacity: 1; }
}
