/* ============== CINEMATIC (scoped for embed in light page) ============== */
.cine-scoped {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 20px;
  background:
    radial-gradient(ellipse 82% 58% at 50% 52%, rgba(47, 62, 70, 0.78), transparent 72%),
    radial-gradient(circle at 50% 118%, rgba(132, 169, 140, 0.14), transparent 60%),
    radial-gradient(circle at 84% 16%, rgba(202, 210, 197, 0.06), transparent 26%),
    #05070a;
  color: #e9edf1;
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.cine-scoped::after {
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.5 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.35'/></svg>");
  mix-blend-mode: overlay;
  opacity: 0.14;
  pointer-events: none;
  z-index: 4;
}
.cine-scoped::before {
  content: "";
  position: absolute; inset: 0;
  box-shadow: inset 0 0 180px 50px rgba(0,0,0,0.6);
  pointer-events: none;
  z-index: 3;
  border-radius: inherit;
}

.cine-scoped canvas#cine-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block; z-index: 1;
}

.pf-shell-cinematic .cine-frame {
  position: relative;
}

/* Top bar */
.pf-shell-cinematic .cine-top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px 0; pointer-events: none;
}
.pf-shell-cinematic .cine-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(202, 210, 197, 0.52);
}
.pf-shell-cinematic .cine-dot { width: 6px; height: 6px; border-radius: 50%; background: #84A98C; box-shadow: 0 0 12px #84A98C; }
.pf-shell-cinematic .cine-brand-name { color: #eef2f6; font-weight: 700; }
.pf-shell-cinematic .cine-sep { color: rgba(255, 255, 255, 0.18); }
.pf-shell-cinematic .cine-scenarios {
  display: flex; gap: 4px; padding: 4px;
  background: rgba(12, 16, 20, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px; backdrop-filter: blur(14px); pointer-events: auto;
}
.pf-shell-cinematic .cine-scn {
  font-family: var(--font-mono);
  font-size: 9.5px; letter-spacing: 0.10em; text-transform: uppercase;
  color: rgba(202, 210, 197, 0.44); background: transparent; border: 0;
  padding: 7px 12px; border-radius: 999px; cursor: pointer;
  transition: color 240ms ease, background 240ms ease, box-shadow 240ms ease;
}
.pf-shell-cinematic .cine-scn:hover { color: rgba(255, 255, 255, 0.84); }
.pf-shell-cinematic .cine-scn.is-active {
  background: rgba(132, 169, 140, 0.18);
  color: #f2f5f9;
  box-shadow: inset 0 0 0 1px rgba(132, 169, 140, 0.16);
}

/* Caption */
.cine-scoped .cine-caption {
  position: absolute; left: 40px; bottom: 96px; z-index: 5;
  max-width: 540px; pointer-events: none;
}
.cine-scoped .cine-act {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.32em; color: rgba(202, 210, 197, 0.38); margin-bottom: 10px;
}
.cine-scoped .cine-act-title {
  font-family: var(--font-heading); font-weight: 700;
  font-size: 48px; line-height: 1.02; letter-spacing: -0.04em;
  color: #f4f6f8; margin-bottom: 10px; text-wrap: balance;
  text-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}
.cine-scoped .cine-act-copy {
  font-size: 14px; line-height: 1.55; color: rgba(202, 210, 197, 0.7); max-width: 440px; text-wrap: pretty;
}
.cine-scoped .cine-act,
.cine-scoped .cine-act-title,
.cine-scoped .cine-act-copy {
  transition: opacity 380ms ease, transform 480ms cubic-bezier(.2,.7,.2,1);
}
.cine-scoped .cine-caption.is-swapping .cine-act,
.cine-scoped .cine-caption.is-swapping .cine-act-title,
.cine-scoped .cine-caption.is-swapping .cine-act-copy {
  opacity: 0; transform: translateY(8px);
}

/* HUD */
.cine-scoped .cine-hud {
  position: absolute; top: 60px; right: 22px; z-index: 5;
  padding: 12px 14px;
  background: rgba(12, 16, 20, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px; backdrop-filter: blur(14px); min-width: 190px;
}
.cine-scoped .cine-hud-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 4px 0; border-bottom: 1px solid rgba(255,255,255,0.04);
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em;
}
.cine-scoped .cine-hud-row:last-child { border-bottom: 0; }
.cine-scoped .cine-hud-row span { color: rgba(202, 210, 197, 0.42); text-transform: uppercase; }
.cine-scoped .cine-hud-row strong { color: #d9dfe6; font-weight: 700; font-feature-settings: "tnum"; }

/* Scrubber */
.cine-scoped .cine-scrub {
  position: absolute; left: 50%; transform: translateX(-50%);
  bottom: 26px; z-index: 5;
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px;
  background: rgba(12, 16, 20, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px; backdrop-filter: blur(14px);
  width: min(720px, calc(100% - 60px));
}
.cine-scoped .cine-ctrl {
  width: 26px; height: 26px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,0.08); color: #e9edf1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 200ms ease;
}
.cine-scoped .cine-ctrl:hover { background: rgba(255,255,255,0.14); }
.cine-scoped .cine-scrub-track {
  position: relative; flex: 1; height: 3px;
  background: rgba(255,255,255,0.07); border-radius: 4px; cursor: pointer;
}
.cine-scoped .cine-scrub-fill {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0%;
  background: linear-gradient(90deg, var(--teal) 0%, var(--ash) 100%);
  border-radius: 4px; transition: width 60ms linear;
}
.cine-scoped .cine-scrub-ticks { position: absolute; inset: 0; pointer-events: none; }
.cine-scoped .cine-scrub-ticks span {
  position: absolute; top: -3px; width: 1px; height: 9px;
  background: rgba(255,255,255,0.20); transform: translateX(-0.5px);
}
.cine-scoped .cine-scrub-head {
  position: absolute; top: 50%; transform: translate(-50%, -50%);
  width: 10px; height: 10px; border-radius: 50%; background: #f4f6f8;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.08), 0 0 14px rgba(255,255,255,0.35);
  transition: left 60ms linear;
}
.cine-scoped .cine-time {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.08em; color: rgba(202, 210, 197, 0.48);
  min-width: 80px; text-align: center; font-feature-settings: "tnum";
}

.pf-shell-cinematic .pf-top {
  grid-template-columns: minmax(0, 1fr);
  margin-bottom: 18px;
}

.pf-shell-cinematic .pf-lead {
  max-width: 780px;
}

.pf-shell-cinematic .pf-kicker {
  color: rgba(202, 210, 197, 0.52);
}

.pf-shell-cinematic .pf-lead p {
  max-width: 720px;
}

@media (max-width: 860px) {
  .pf-shell-cinematic .cine-frame {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .pf-shell-cinematic .cine-top {
    position: static;
    display: block;
    padding: 0;
    pointer-events: auto;
  }
  .pf-shell-cinematic .cine-brand { display: none; }
  .pf-shell-cinematic .cine-scenarios {
    width: 100%;
    gap: 6px;
    padding: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    border-radius: 18px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .pf-shell-cinematic .cine-scenarios::-webkit-scrollbar { display: none; }
  .pf-shell-cinematic .cine-scn {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 8px 10px;
    font-size: 8.5px;
    letter-spacing: 0.08em;
  }
  .cine-scoped {
    aspect-ratio: 4 / 5;
    min-height: 440px;
  }
  .cine-scoped::before {
    box-shadow: inset 0 0 120px 28px rgba(0,0,0,0.42);
  }
  .cine-scoped .cine-caption {
    left: 18px;
    right: 18px;
    top: 22px;
    bottom: auto;
    max-width: none;
  }
  .cine-scoped .cine-act {
    font-size: 9px;
    letter-spacing: 0.24em;
    margin-bottom: 8px;
  }
  .cine-scoped .cine-act-title {
    font-size: 30px;
    line-height: 0.98;
    margin-bottom: 8px;
    max-width: 240px;
  }
  .cine-scoped .cine-act-copy {
    font-size: 12.5px;
    line-height: 1.45;
    max-width: 250px;
  }
  .cine-scoped .cine-hud { display: none; }
  .cine-scoped .cine-scrub {
    left: 18px;
    right: 18px;
    bottom: 18px;
    transform: none;
    width: auto;
    gap: 10px;
    padding: 10px 12px;
  }
  .cine-scoped .cine-time {
    min-width: 68px;
    font-size: 9px;
  }
}

@media (max-width: 560px) {
  .cine-scoped {
    min-height: 400px;
  }
  .pf-shell-cinematic .cine-scenarios {
    gap: 5px;
    padding: 5px;
  }
  .pf-shell-cinematic .cine-scn {
    padding: 7px 9px;
    font-size: 8px;
  }
  .cine-scoped .cine-caption {
    left: 16px;
    right: 16px;
    top: 18px;
  }
  .cine-scoped .cine-act-title {
    font-size: 27px;
    max-width: 210px;
  }
  .cine-scoped .cine-act-copy {
    font-size: 12px;
    max-width: 220px;
  }
  .cine-scoped .cine-scrub {
    left: 14px;
    right: 14px;
    bottom: 14px;
    gap: 8px;
    padding: 8px 10px;
  }
  .cine-scoped .cine-time {
    min-width: 60px;
  }
}
