@import url('/vendor/fonts/sans/wght.css');
@import url('/vendor/fonts/serif/wght.css');

:root {
  color-scheme: dark;
  --bg: #07070a;
  --bg-2: #0c0c11;
  --surface: #121219;
  --surface-2: #1a1a23;
  --surface-3: #23232e;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f3efe7;
  --text-2: #b9b5c0;
  --muted: #8b8795;
  --accent: #e50914;
  --accent-ink: #fff;
  --live: #ff3b3b;
  --ok: #2bd9a0;
  --warn: #f5b700;
  --danger: #ff5d5d;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  --font: 'Noto Sans Georgian Variable', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Noto Serif Georgian Variable', Georgia, serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
/* Georgian has no case; Mtavruli is only for all-caps and needs the `case` feature. */
:lang(ka) .caps { text-transform: none; font-feature-settings: 'case' on; letter-spacing: 0.02em; }
:lang(en) .caps { text-transform: uppercase; letter-spacing: 0.08em; }

a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---- Buttons & inputs ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 38px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--text);
  font-weight: 600; font-size: 14px; white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.btn:hover { background: var(--surface-3); border-color: rgba(255, 255, 255, 0.24); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--accent); border-color: transparent; color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent); filter: brightness(1.1); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.06); }
.btn-danger { color: var(--danger); }
.btn-sm { min-height: 30px; padding: 0 12px; font-size: 13px; }
.btn-icon { width: 38px; padding: 0; }
.btn-icon.btn-sm { width: 30px; }
.btn svg { width: 18px; height: 18px; flex: none; }

.input, .select, .textarea {
  width: 100%; min-height: 40px; padding: 8px 12px;
  background: var(--bg-2); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
.textarea { min-height: 84px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; color: var(--text-2); font-weight: 500; }
.hint { font-size: 12px; color: var(--muted); }
.error-text { color: var(--danger); font-size: 13px; min-height: 1.2em; }

/* ---- Brand ---- */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark {
  display: block; width: 44px; height: 44px; flex: none;
  filter: drop-shadow(0 4px 12px rgba(211, 47, 47, 0.35));
  transition: transform 0.25s var(--ease);
}
.brand:hover .brand-mark { transform: rotate(-6deg) scale(1.05); }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: 0.01em; }
.brand-name small { display: block; font-family: var(--font); font-size: 10px; font-weight: 600; color: var(--muted); letter-spacing: 0.18em; text-transform: uppercase; margin-top: -2px; }

.lang-switch { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px; }
.lang-switch button {
  border: 0; background: transparent; border-radius: 999px; min-width: 38px; min-height: 28px;
  font-size: 12px; font-weight: 700; color: var(--muted);
}
.lang-switch button[aria-pressed='true'] { background: var(--surface-3); color: var(--text); }

/* ---- Toast ---- */
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 8px; z-index: 100; pointer-events: none; }
.toast {
  background: var(--surface-3); border: 1px solid var(--line-strong); padding: 10px 16px; border-radius: 12px;
  box-shadow: var(--shadow); font-size: 14px; animation: toast-in 0.25s var(--ease);
}
.toast.error { border-color: color-mix(in srgb, var(--danger) 50%, transparent); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* ---- Dialog ---- */
dialog.modal {
  border: 1px solid var(--line-strong); border-radius: 20px; padding: 0; width: min(420px, calc(100vw - 32px));
  background: var(--surface); color: var(--text); box-shadow: var(--shadow);
}
dialog.modal::backdrop { background: rgba(0, 0, 0, 0.65); backdrop-filter: blur(4px); }
.modal-body { padding: 24px; display: grid; gap: 16px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; }
.modal-head h2 { margin: 0; font-family: var(--font-display); font-size: 22px; }
.tabs { display: flex; gap: 4px; background: var(--bg-2); padding: 4px; border-radius: 999px; }
.tabs button { flex: 1; border: 0; background: transparent; min-height: 34px; border-radius: 999px; color: var(--muted); font-weight: 600; }
.tabs button[aria-selected='true'] { background: var(--surface-3); color: var(--text); }

/* VideoDB player: the film's poster until the player has drawn (viewer + admin preview) */
.vdb-loading { display: none !important; pointer-events: none !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
