/* Top bar for the scroll-film pages (index, masala).
 * Wordmark left, crown in the middle (owned by each page), links right. The
 * gold "Shop" pill doubles as the bypass link past the film (WCAG 2.4.1), so
 * nobody has to scroll ten screens to reach a price.
 */
.filmbar {
  position: fixed; z-index: 7; inset: 0 0 auto 0;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: clamp(0.9rem, 2.6vh, 1.9rem) var(--sc-gutter) 0;
  pointer-events: none;                 /* the crown underneath stays clickable */
}
/* A soft fade so cream text reads over the brightest frames (the dawn mist). */
.filmbar::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 150%; z-index: -1;
  background: linear-gradient(180deg, rgb(10 8 6 / 0.55), rgb(10 8 6 / 0));
}
.filmbar a { pointer-events: auto; }

.filmbar__mark {
  display: inline-flex; align-items: center; gap: 0.6rem; min-height: 44px;
  color: var(--sc-ink); text-decoration: none;
  font: 600 0.8rem/1 var(--sc-font-text); letter-spacing: 0.22em; text-transform: uppercase;
  text-shadow: 0 1px 4px rgb(0 0 0 / 0.8);
}
.filmbar__mark img { width: 32px; height: auto; filter: drop-shadow(0 1px 3px rgb(0 0 0 / 0.7)); }

.filmbar__links { display: flex; align-items: center; gap: clamp(1rem, 2vw, 1.8rem); }
.filmbar__links a:not(.filmbar__shop) {
  display: inline-flex; align-items: center; min-height: 44px;
  color: var(--sc-ink); opacity: 0.9; text-decoration: none;
  font: 500 0.85rem/1 var(--sc-font-text); text-shadow: 0 1px 4px rgb(0 0 0 / 0.85);
}
.filmbar__links a:not(.filmbar__shop):hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }

/* The one primary button style, shared with the store: gold pill, dark text. */
.filmbar__shop {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 1.3rem;
  border-radius: 980px; background: #C8912B; color: #0A0806; text-decoration: none;
  font: 600 0.85rem/1 var(--sc-font-text); box-shadow: 0 4px 14px rgb(0 0 0 / 0.35);
  transition: background 180ms ease, transform 180ms ease;
}
.filmbar__shop:hover { background: #DCA33A; transform: translateY(-1px); }

/* The crown sits centre-top; text links would collide with it on narrower
   screens, so below 1100px only the wordmark and the Shop pill stay. */
@media (max-width: 1100px) { .filmbar__links a:not(.filmbar__shop) { display: none; } }
@media (max-width: 420px) {
  .filmbar__mark b { display: none; }
  .filmbar__shop { padding: 0 1rem; font-size: 0.8rem; }
}

/* ---------- ambient layer (film-fx.js) ---------- */
.film-fx {
  position: fixed; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 2;
  mix-blend-mode: screen;
}

/* A gold rule draws in under each headline as the act enters, tied to the
   reader's scroll (scroll-driven animation). Browsers without it keep the
   rule fully drawn, so nothing is lost. */
.world-copy h1::after, .world-copy h2::after {
  content: ""; display: block; width: 88px; height: 2px; margin-top: 1.1rem;
  background: linear-gradient(90deg, #E8B860, rgb(232 184 96 / 0.15));
  transform-origin: left center;
}
@supports (animation-timeline: view()) {
  .world-copy h1::after, .world-copy h2::after {
    animation: ruleIn linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 35%;
  }
}
@keyframes ruleIn { from { transform: scaleX(0); opacity: 0; } to { transform: scaleX(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .world-copy h1::after, .world-copy h2::after { animation: none; }
}
