:root {
  --bg: #121015;
  --bg-2: #1b1820;
  --surface: #231f29;
  --line: #342e3c;
  --text: #f3eee6;
  --muted: #a79fae;
  --accent: #f2b441;       /* marquee gold */
  --accent-2: #d8434b;     /* velvet red */
  --radius: 12px;
  --display: 'Fraunces', Georgia, serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--body);
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; margin: 0 0 .5em; }
h2 { font-size: clamp(1.3rem, 2.4vw, 1.7rem); }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 720px; padding-top: 48px; padding-bottom: 48px; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(18,16,21,.88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; flex-shrink: 0; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--accent-2); color: #fff; font-size: 14px; padding-left: 2px; }
.brand-name { font-family: var(--display); font-weight: 800; font-size: 1.2rem; letter-spacing: .01em; }
.search { margin-left: auto; flex: 1; max-width: 340px; }
.search input { width: 100%; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text); font: inherit; font-size: .95rem; }
.search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
@media (max-width: 520px) { .brand-name { display: none; } }

/* Banner */
.banner { background: #3a2a10; color: #ffdf9e; font-size: .9rem; padding: 8px 0; border-bottom: 1px solid #5a4118; }

/* Hero */
.hero { padding: 56px 0 40px; background:
  radial-gradient(900px 380px at 15% -10%, rgba(216,67,75,.28), transparent 60%),
  radial-gradient(700px 320px at 95% 0%, rgba(242,180,65,.16), transparent 60%); }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; color: var(--accent); font-weight: 600; margin: 0 0 8px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); max-width: 16ch; }
.lede { color: var(--muted); max-width: 52ch; font-size: 1.08rem; margin: 0 0 28px; }
.moods { display: flex; flex-wrap: wrap; gap: 10px; }
.mood { font: inherit; font-weight: 500; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 10px 16px; cursor: pointer; transition: border-color .15s, background .15s, transform .15s; }
.mood:hover { border-color: var(--accent); transform: translateY(-1px); }
.mood[aria-pressed="true"] { background: var(--accent); color: #1a1408; border-color: var(--accent); }
.picker-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 20px; }
.toggle { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); cursor: pointer; }
.toggle input { accent-color: var(--accent); width: 18px; height: 18px; }

/* Buttons */
.btn { font: inherit; font-weight: 600; border-radius: 999px; padding: 9px 16px; cursor: pointer; text-decoration: none; display: inline-block; }
.btn-ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.btn-ghost:hover { background: rgba(242,180,65,.1); }

/* Sections */
.block { padding: 28px 0 8px; }
.section-sub { color: var(--muted); margin: -6px 0 14px; font-size: .95rem; }
.row { display: grid; grid-auto-flow: column; grid-auto-columns: 160px; gap: 14px; overflow-x: auto; padding-bottom: 14px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.row > * { scroll-snap-align: start; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px 14px; }
@media (max-width: 520px) { .row { grid-auto-columns: 132px; } .grid { grid-template-columns: repeat(2, 1fr); } }

/* Cards */
.card { display: flex; flex-direction: column; gap: 4px; color: var(--text); text-decoration: none; min-width: 0; }
.card img, .card .poster-ph { aspect-ratio: 2 / 3; width: 100%; height: auto; border-radius: var(--radius); object-fit: cover; background: var(--surface); border: 1px solid var(--line); transition: transform .18s, border-color .18s; }
.card:hover img, .card:hover .poster-ph { transform: translateY(-3px); border-color: var(--accent); }
.card-title { font-weight: 600; font-size: .95rem; line-height: 1.3; margin-top: 6px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.card-sub { color: var(--muted); font-size: .85rem; }
.poster-ph { display: grid; place-items: center; padding: 12px; text-align: center; font-family: var(--display); font-weight: 600; color: var(--muted);
  background: linear-gradient(160deg, #2c2533, #1b1820 70%); }
.poster-ph.big { aspect-ratio: 2 / 3; border-radius: var(--radius); font-size: 1.4rem; border: 1px solid var(--line); }
.skeleton .poster-ph { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .5; } }

/* Film page */
.hero-film { position: relative; padding: 48px 0; isolation: isolate; }
.hero-film::before { content: ''; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(90deg, rgba(18,16,21,.96) 30%, rgba(18,16,21,.72)), linear-gradient(180deg, transparent 60%, var(--bg)), var(--backdrop, none); background-size: cover; background-position: center top; }
.film-grid { display: grid; grid-template-columns: 280px 1fr; gap: 40px; align-items: start; }
.film-poster img { border-radius: var(--radius); box-shadow: 0 20px 50px rgba(0,0,0,.5); width: 100%; height: auto; }
.film-info h1 { font-size: clamp(1.9rem, 4vw, 3rem); }
.year { color: var(--muted); font-weight: 600; }
.meta { color: var(--muted); margin: 0 0 12px; }
.cert { display: inline-block; border: 1px solid var(--muted); border-radius: 4px; padding: 0 6px; font-size: .85rem; font-weight: 600; color: var(--text); }
.score { display: flex; align-items: baseline; gap: 6px; margin: 0 0 12px; }
.score strong { font-family: var(--display); font-size: 1.8rem; color: var(--accent); }
.score span { color: var(--muted); font-size: .9rem; }
.tagline { font-style: italic; color: var(--muted); }
.overview { max-width: 62ch; font-size: 1.05rem; }
.where { margin-top: 24px; padding: 20px; background: rgba(35,31,41,.85); border: 1px solid var(--line); border-radius: var(--radius); max-width: 620px; }
.where h2 { font-size: 1.2rem; }
.prov-row { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; flex-wrap: wrap; }
.prov-row h3 { font-family: var(--body); font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); width: 56px; margin: 0; }
.prov-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.prov-list img { width: 46px; height: 46px; border-radius: 10px; }
.trailer { position: relative; display: block; width: 100%; max-width: 820px; aspect-ratio: 16 / 9; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; cursor: pointer; background: #000; }
.trailer img { width: 100%; height: 100%; object-fit: cover; opacity: .8; }
.trailer .play { position: absolute; inset: 0; margin: auto; width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-2); color: #fff; font-size: 26px; padding-left: 4px; }
.trailer:hover .play { transform: scale(1.06); }
iframe { width: 100%; max-width: 820px; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius); }
@media (max-width: 720px) {
  .film-grid { grid-template-columns: 1fr; gap: 24px; }
  .film-poster { max-width: 200px; }
}

/* Footer */
.site-footer { margin-top: 56px; border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: .9rem; }
.footer-inner p { margin: 0 0 8px; max-width: 70ch; }

/* Region switcher */
.region-switch select { font: inherit; font-size: .9rem; color: var(--text); background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px; padding: 8px 10px; cursor: pointer; }
.region-switch select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
