/* Cookie banner and preference centre for the cinematic site. The markup is
   built by js/altai/consent.js (a verbatim copy of the current site's module);
   these styles are the current site's, re-skinned with this page's tokens. */
:root{--glass-strong:rgba(14,22,38,.92);--gold:#C9A46A;--gold-soft:#E7CFA2}
.consent,.consent-modal{--snow:#F5ECDD;--muted:rgba(245,236,221,.74);--line:rgba(245,236,221,.16);font-family:var(--body,system-ui)}
.consent__msg{font-size:15px}.consent__btn{font-family:var(--ui,var(--body,system-ui));font-size:13px}
.tale-modal { position: fixed; inset: 0; z-index: 420; display: grid; place-items: center; padding: clamp(14px, 3vw, 44px); }
.tale-modal[hidden] { display: none; }
.tale-modal__backdrop {
  position: absolute; inset: 0; background: rgba(4, 7, 12, 0.72);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  opacity: 0; transition: opacity 0.4s var(--ease);
}
.tale-modal__panel {
  position: relative; width: min(680px, 100%); max-height: min(86svh, 900px);
  overflow-y: auto; overscroll-behavior: contain;
  background: rgba(10, 15, 22, 0.92);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  border: 1px solid rgba(203, 152, 66, 0.35); border-radius: 22px;
  padding: clamp(28px, 5vw, 54px);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6);
  opacity: 0; transform: translateY(22px) scale(0.985);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}
.tale-modal.open .tale-modal__backdrop { opacity: 1; }
.tale-modal.open .tale-modal__panel { opacity: 1; transform: none; }
.tale-modal__kicker {
  font-family: var(--font-brand); font-size: 0.72rem; letter-spacing: 0.32em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 12px;
}
.tale-modal__title {
  font-family: var(--font-display); font-size: clamp(1.7rem, 4vw, 2.3rem);
  color: var(--snow); margin: 0 40px 18px 0; line-height: 1.15;
}
.tale-modal__panel > p { font-size: 0.95rem; line-height: 1.75; color: var(--muted); margin-bottom: 16px; }
.tale-modal__panel > p.tale-modal__kicker { margin-bottom: 12px; }
.tale-modal__soon { color: var(--gold-soft) !important; border-top: 1px solid var(--line); padding-top: 18px; margin-top: 22px; }
.tale-modal__cta { margin: 22px 0 0 !important; }
.tale-modal__close {
  position: sticky; top: 0; z-index: 2;
  margin: -8px -8px -34px auto; width: 38px; height: 38px;
  display: grid; place-items: center; border-radius: 50%; color: var(--muted);
  background: rgba(10, 15, 22, 0.7);
  transition: background 0.2s, color 0.2s;
}
.tale-modal__close:hover { background: rgba(238, 241, 240, 0.08); color: var(--snow); }
.tale-modal__close svg { width: 17px; height: 17px; }
/* ---------- Cookie consent (matches glass panels + gold buttons) ---------- */
.consent {
  position: fixed; left: 50%; bottom: 18px; transform: translate(-50%, 150%);
  z-index: 410; width: min(680px, calc(100vw - 32px));
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 16px 20px; border-radius: 16px;
  background: var(--glass-strong); border: 1px solid var(--line);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.45);
  opacity: 0; transition: transform 0.5s var(--ease), opacity 0.5s var(--ease);
}
.consent.is-in { transform: translate(-50%, 0); opacity: 1; }
.consent__msg { flex: 1 1 260px; margin: 0; font-size: 0.86rem; line-height: 1.5; color: var(--muted); }
.consent__link { color: var(--gold-soft); text-decoration: underline; text-underline-offset: 2px; }
.consent__link:hover { color: var(--gold); }
.consent__actions { display: flex; gap: 10px; flex: 0 0 auto; }
.consent__btn {
  font: inherit; font-size: 0.82rem; font-weight: 600; cursor: pointer;
  padding: 10px 20px; border-radius: 999px; border: 0;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold)); color: #1d1503;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.consent__btn:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(203, 152, 66,0.32); }
.consent__btn:active { transform: scale(0.97); }
.consent__btn--ghost { background: none; border: 1.5px solid rgba(238, 241, 240,0.35); color: var(--snow); }
.consent__btn--ghost:hover { border-color: var(--snow); background: rgba(238, 241, 240,0.06); box-shadow: none; }
@media (max-width: 520px) {
  .consent { flex-direction: column; align-items: stretch; text-align: center; padding: 14px 16px; gap: 12px; }
  /* In a column the flex-basis above would become a 260px HEIGHT; the text
     wants its natural height, and the buttons a row that wraps. */
  .consent__msg { flex: 0 0 auto; }
  .consent__actions { justify-content: center; flex-wrap: wrap; }
  .consent__btn { flex: 1 1 auto; white-space: nowrap; padding: 11px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .consent { transition: opacity 0.3s ease; transform: translate(-50%, 0); }
}

/* Cookie preference centre — rendered by consent.js inside the same glass
   panel as the Altai story modal (.tale-modal). Only the category rows and
   the switch are new; buttons and links reuse the banner's classes. */
.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; }
.consent-modal { z-index: 430; }
.consent-modal .tale-modal__panel { width: min(560px, 100%); }
.consent-cats { border-top: 1px solid var(--line); margin-top: 6px; }
.consent-cat { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.consent-cat__text { flex: 1 1 auto; min-width: 0; }
.consent-cat__name { display: block; font-size: 0.95rem; color: var(--snow); font-weight: 600; margin-bottom: 4px; }
.consent-cat__desc { margin: 0 !important; font-size: 0.86rem !important; line-height: 1.55 !important; color: var(--muted); }
.consent-switch { position: relative; flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; cursor: pointer; padding-top: 2px; }
.consent-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.consent-switch__track {
  position: relative; display: block; width: 44px; height: 24px; border-radius: 999px;
  background: rgba(238, 241, 240, 0.14); border: 1px solid rgba(238, 241, 240, 0.22);
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease);
}
.consent-switch__track::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--snow); transition: transform 0.25s var(--ease), background 0.25s var(--ease);
}
.consent-switch input:checked + .consent-switch__track { background: linear-gradient(135deg, var(--gold-soft), var(--gold)); border-color: transparent; }
.consent-switch input:checked + .consent-switch__track::after { transform: translateX(20px); background: #1d1503; }
.consent-switch input:focus-visible + .consent-switch__track { outline: 2px solid var(--gold-soft); outline-offset: 3px; }
.consent-switch input:disabled + .consent-switch__track { opacity: 0.6; cursor: default; }
.consent-modal .consent-modal__list { margin: 16px 0 22px !important; font-size: 0.82rem !important; line-height: 1.6 !important; color: var(--muted); }
.consent-modal__list b { color: var(--snow); font-weight: 600; }
.consent-switch__always { font-size: 0.72rem; letter-spacing: 0.04em; color: var(--muted); }
