/* RR Movies V2 — base: fonts, design tokens, reset, typography, buttons, forms. */

@font-face {
  font-family: 'Bebas Neue';
  src: url('../assets/fonts/bebas-neue-latin.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('../assets/fonts/manrope-latin-var.woff2') format('woff2');
  font-weight: 400 800;
  font-display: swap;
}
@font-face {
  font-family: 'Cinzel';
  src: url('../assets/fonts/cinzel-latin-var.woff2') format('woff2');
  font-weight: 500 800;
  font-display: swap;
}

:root {
  color-scheme: dark;
  /* surfaces */
  --bg: #050506;
  --bg-raise: #0a0a0d;
  --surface: #111115;
  --surface-2: #17171c;
  --surface-3: #202027;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  /* text */
  --text: #f6f2ee;
  --text-2: #cbc4bf;
  --muted: #9d9691;
  /* brand */
  --red: #e5182b;
  --red-hi: #ff3a4c;
  --red-deep: #8f0a18;
  --red-ink: #2a0409;
  --red-glow: rgba(229, 24, 43, 0.45);
  --gold: #f5c451;
  --ok: #3ccf8e;
  --warn: #ffb547;
  /* shape */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 22px;
  --gutter: clamp(16px, 4vw, 64px);
  --nav-h: 76px;
  --maxw: 1600px;
  /* type */
  --font-ui: 'Manrope', 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
  --font-display: 'Bebas Neue', 'Bahnschrift', 'Arial Narrow', 'Segoe UI', sans-serif;
  --font-serif: 'Cinzel', Georgia, 'Times New Roman', serif;
  --font-deva: 'Nirmala UI', 'Noto Sans Devanagari', 'Mangal', 'Kohinoor Devanagari', sans-serif;
  /* motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-cine: cubic-bezier(0.77, 0, 0.18, 1);
  --shadow-lg: 0 34px 80px -24px rgba(0, 0, 0, 0.85);
  --shadow-red: 0 18px 50px -12px rgba(229, 24, 43, 0.55);
}

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--nav-h) + 12px);
  background: var(--bg);
}
html.is-locked { overflow: hidden; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
img { -webkit-user-drag: none; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
:where(button, a, input, select, textarea, [tabindex]):focus { outline: none; }
:where(button, a, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--red-hi);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}
/* Headings/containers focused by script (tabindex=-1) for screen readers don't need a ring. */
[tabindex='-1']:focus, [tabindex='-1']:focus-visible { outline: none; }
[hidden] { display: none !important; }
::selection { background: var(--red); color: #fff; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3 { line-height: 1.05; text-wrap: balance; }
p { text-wrap: pretty; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; z-index: 1000; left: 16px; top: -60px;
  padding: 10px 16px; border-radius: var(--radius-sm);
  background: var(--red); color: #fff; font-weight: 800;
  transition: top 0.2s var(--ease-out);
}
.skip-link:focus { top: 16px; }

/* icons (sprite in index.html) */
.i { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.i.fill { fill: currentColor; stroke: none; }

/* ---------- type helpers ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 800; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--text-2);
}
.eyebrow::before { content: ''; width: 26px; height: 2px; background: var(--red); border-radius: 2px; box-shadow: 0 0 12px var(--red-glow); }
.eyebrow.no-line::before { display: none; }
.display { font-family: var(--font-display); font-weight: 400; letter-spacing: 0.01em; line-height: 0.9; }
.deva { font-family: var(--font-deva); }
.muted { color: var(--muted); }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 8px; border-radius: 5px;
  font-size: 11px; font-weight: 800; letter-spacing: 0.06em; line-height: 1.4;
  border: 1px solid var(--line-strong); color: var(--text-2);
  white-space: nowrap;
}
.badge.red { background: var(--red); border-color: var(--red); color: #fff; }
.badge.gold { color: var(--gold); border-color: rgba(245, 196, 81, 0.4); }
.badge.ghost { background: rgba(255, 255, 255, 0.06); border-color: transparent; }
.badge.demo { color: #ffd1d6; border-color: rgba(255, 58, 76, 0.45); background: rgba(229, 24, 43, 0.12); }
.rating { display: inline-flex; align-items: center; gap: 5px; color: var(--gold); font-weight: 800; }
.rating .i { width: 14px; height: 14px; }

.meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 14px; color: var(--text-2); }
.meta-row > .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--muted); opacity: 0.7; }

/* ---------- buttons ---------- */
.btn {
  --btn-bg: rgba(30, 30, 36, 0.72);
  --btn-fg: var(--text);
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  border-radius: 12px; border: 1px solid var(--line-strong);
  background: var(--btn-bg); color: var(--btn-fg);
  font-weight: 800; font-size: 15px; letter-spacing: 0.01em; white-space: nowrap;
  transition: transform 0.35s var(--ease-out), background-color 0.25s, border-color 0.25s, box-shadow 0.35s var(--ease-out);
}
.btn .i { width: 20px; height: 20px; }
.btn:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.16); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn.primary {
  --btn-bg: linear-gradient(180deg, var(--red-hi), var(--red) 55%, #c10f22);
  border-color: rgba(255, 90, 100, 0.55);
  color: #fff;
  box-shadow: 0 10px 30px -10px var(--red-glow), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.btn.primary:hover { background: var(--btn-bg); box-shadow: var(--shadow-red), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.btn.primary::after,
.btn.light::after {
  /* light sweep on hover */
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.35) 50%, transparent 65%);
  transform: translateX(-120%);
  transition: transform 0.8s var(--ease-out);
}
.btn.primary:hover::after, .btn.light:hover::after { transform: translateX(120%); }
.btn.light { --btn-bg: #f6f2ee; --btn-fg: #0b0b0d; border-color: #fff; }
.btn.light:hover { background: #fff; }
.btn.ghost { --btn-bg: transparent; }
.btn.danger { --btn-bg: rgba(229, 24, 43, 0.14); border-color: rgba(229, 24, 43, 0.5); color: #ffc6cc; }
.btn.danger:hover { background: rgba(229, 24, 43, 0.28); }
.btn.sm { min-height: 38px; padding: 0 14px; font-size: 13px; border-radius: 10px; }
.btn.sm .i { width: 16px; height: 16px; }
.btn[disabled] { opacity: 0.45; pointer-events: none; }
.btn.block { width: 100%; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: rgba(14, 14, 18, 0.72);
  color: var(--text);
  transition: transform 0.3s var(--ease-out), background-color 0.2s, border-color 0.2s, box-shadow 0.3s;
}
.icon-btn .i { width: 20px; height: 20px; }
.icon-btn:hover { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.32); transform: scale(1.06); }
.icon-btn.on { background: var(--red); border-color: var(--red); box-shadow: 0 0 24px -4px var(--red-glow); }
.icon-btn.sm { width: 36px; height: 36px; }
.icon-btn.sm .i { width: 16px; height: 16px; }

.link-btn { color: var(--text-2); font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 2px; border-radius: 6px; }
.link-btn:hover { color: #fff; }
.link-btn .i { transition: transform 0.3s var(--ease-out); }
.link-btn:hover .i { transform: translateX(3px); }

/* ---------- chips / segmented ---------- */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 38px; padding: 0 15px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.04);
  color: var(--text-2); font-size: 13px; font-weight: 700; white-space: nowrap;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.25s var(--ease-out);
}
.chip:hover { color: #fff; border-color: rgba(255, 255, 255, 0.3); }
.chip[aria-pressed='true'] { background: var(--text); color: #0b0b0d; border-color: var(--text); }
.chip.red[aria-pressed='true'] { background: var(--red); color: #fff; border-color: var(--red); }
.chip .i { width: 15px; height: 15px; }

.seg { display: inline-flex; padding: 4px; gap: 2px; border-radius: 999px; border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.04); }
.seg button { min-height: 34px; padding: 0 14px; border-radius: 999px; color: var(--text-2); font-size: 13px; font-weight: 800; transition: background-color 0.2s, color 0.2s; }
.seg button:hover { color: #fff; }
.seg button[aria-pressed='true'] { background: var(--text); color: #0b0b0d; }

/* ---------- forms ---------- */
.field { display: grid; gap: 7px; }
.field > label, .field > .label { font-size: 13px; font-weight: 800; color: var(--text-2); letter-spacing: 0.01em; }
.field .hint { font-size: 12px; color: var(--muted); }
.field .error { font-size: 12px; color: #ff9aa4; font-weight: 700; }
.input, .select, .textarea {
  width: 100%; min-height: 46px; padding: 11px 14px;
  border-radius: 11px; border: 1px solid var(--line-strong);
  background: rgba(0, 0, 0, 0.35); color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}
.textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.input::placeholder, .textarea::placeholder { color: #75706c; }
.input:hover, .select:hover, .textarea:hover { border-color: rgba(255, 255, 255, 0.26); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--red-hi); box-shadow: 0 0 0 4px rgba(229, 24, 43, 0.18); background: rgba(0, 0, 0, 0.5); outline: none; }
.input[aria-invalid='true'], .textarea[aria-invalid='true'] { border-color: #ff6b78; }
.select {
  appearance: none; -webkit-appearance: none;
  padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23cbc4bf' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 15px center;
}
.select option { background: #141418; color: var(--text); }
.check { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; color: var(--text-2); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--red); }

.search-field { position: relative; display: flex; align-items: center; }
.search-field .i { position: absolute; left: 14px; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.search-field .input { padding-left: 42px; }
.search-field .clear { position: absolute; right: 8px; }
