/* HyperQuant, prezentacja produktu. Film i ilustracje mają własne światło,
   a treść terminala korzysta z motywów Zorza i Opal. */
.cinema {
  --cinema-bg: #0d0c13;
  --cinema-text: #f6f3ff;
  --cinema-muted: #bcb7cc;
  --cinema-line: #383348;
  --cinema-lime: #deff71;
  --cinema-gutter: clamp(20px, 5.9vw, 112px);
  --cinema-width: 1660px;
  --cinema-header: 70px;
}
.cinema .topbar { min-height: var(--cinema-header); }
.cinema .topbar .in { max-width: var(--cinema-width); padding-inline: var(--cinema-gutter); }
.cinema .topbar .right { min-width: 0; }
.cinema .topbar .btn, .cinema .topbar .seg button { min-height: 44px; }
.cinema .topnav a { letter-spacing: 0; }
.cinema :is(.cinema-hero, .cinema-tour, .cinema-live, .event-tour, .cinema-chapter) { scroll-margin-top: calc(var(--cinema-header) + 12px); }

.cinema-hero {
  isolation: isolate;
  position: relative;
  display: grid;
  min-height: clamp(630px, calc(100svh - var(--cinema-header)), 1050px);
  overflow: clip;
  background: #09080e;
  color: var(--cinema-text);
}
.cinema-hero a:focus-visible, .cinema-hero button:focus-visible { outline-color: var(--cinema-lime); }
.cinema-media, .cinema-hero-shade { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.cinema-media { inset-inline-start: 15%; background: radial-gradient(ellipse at 75% 51%, #594668 0, #21192c 45%, #0b0911 73%); }
.cinema-media img, .cinema-media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 66% center;
}
.cinema-media video { opacity: 0; transition: opacity .35s var(--ease-out); }
.cinema-hero[data-frame="video"] video { opacity: 1; }
.cinema-hero-shade {
  background:
    linear-gradient(90deg, #09080e 1%, rgba(9, 8, 14, .97) 20%, rgba(9, 8, 14, .7) 42%, rgba(9, 8, 14, .16) 66%, transparent 80%),
    linear-gradient(0deg, #0d0c13 1%, transparent 23%, transparent 92%, rgba(9, 8, 14, .34));
}
.cinema-hero-in {
  width: min(100%, var(--cinema-width));
  margin-inline: auto;
  padding: clamp(75px, 11vh, 155px) var(--cinema-gutter) clamp(14px, 3vh, 40px);
  display: grid;
  grid-template-rows: 1fr auto;
  gap: max(48px, 8vh);
}
.cinema-hero-copy { align-self: center; min-width: 0; }
.cinema-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 24px;
  font: 500 .74rem/1.5 var(--f-mono);
  text-transform: uppercase;
  letter-spacing: .13em;
}
.cinema-kicker > span { display: block; flex: 0 0 24px; height: 2px; background: currentColor; }
.cinema-hero .cinema-kicker { color: var(--cinema-lime); }
.cinema-hero h1, .cinema-tour h2 {
  margin: 0;
  font: 700 clamp(4.25rem, 9.7vw, 10.5rem)/.87 var(--f-display);
  letter-spacing: -.08em;
}
.cinema-hero h1 span, .cinema-hero h1 em, .cinema-tour h2 span, .cinema-tour h2 em { display: block; }
.cinema-hero h1 em, .cinema-tour h2 em { color: var(--cinema-lime); font-style: normal; }
.cinema-lead {
  max-width: 36ch;
  margin: 30px 0 32px;
  color: var(--cinema-muted);
  font-size: 1.035rem;
  line-height: 1.7;
}
.cinema-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cinema-button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: 54px;
  padding: 9px 17px;
  border-radius: 6px;
  border: 1px solid transparent;
  font-size: .875rem;
  font-weight: 750;
  text-decoration: none;
}
.cinema-button-main { background: var(--cinema-lime); color: #171c09; }
.cinema-button-main:hover { background: #f1ffba; }
.cinema-button-alt { background: #17131e; border-color: #575064; color: var(--cinema-text); }
.cinema-button-alt:hover { background: #30273a; }
.cinema-hero-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 4px 12px;
  border-top: 1px solid #454054;
  color: var(--cinema-muted);
}
.cinema-hero-meta a, .cinema-film-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  text-decoration: none;
  font: 400 .75rem/1.4 var(--f-mono);
}
.cinema-film-control {
  background: transparent;
  border: 0;
  padding: 0 0 0 12px;
  cursor: pointer;
}
.cinema-hero-meta a:hover, .cinema-film-control:hover { color: var(--cinema-lime); }
.cinema-film-control[hidden] { display: none; }

.cinema-tour {
  padding: clamp(52px, 9vw, 135px) var(--cinema-gutter) clamp(50px, 8vw, 110px);
  background: var(--cinema-bg);
  color: var(--cinema-text);
}
.cinema-tour :focus-visible { outline-color: var(--cinema-lime); }
.cinema-tour-intro, .cinema-index, .cinema-story { max-width: var(--cinema-width); margin-inline: auto; }
.cinema-tour-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, .65fr);
  align-items: end;
  gap: 1em;
  margin-bottom: clamp(30px, 5vw, 68px);
}
.cinema-tour h2 { font-size: clamp(3.3rem, 6.8vw, 7.3rem); }
.cinema-tour-intro p {
  max-width: 28ch;
  margin: 0 0 .12em;
  color: var(--cinema-muted);
  font-size: 1rem;
  line-height: 1.65;
}
.cinema-index ol {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  border: 1px solid var(--cinema-line);
  border-radius: 8px;
}
.cinema-index li { min-width: 0; }
.cinema-index li + li { border-inline-start: 1px solid var(--cinema-line); }
.cinema-index a {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  min-height: 62px;
  height: 100%;
  padding: 9px clamp(6px, 1vw, 16px);
  color: var(--cinema-muted);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.cinema-index a span { font: 400 .625rem/1.2 var(--f-mono); }
.cinema-index a b { font-size: .76rem; font-weight: 700; }
.cinema-index a[aria-current], .cinema-index a:hover { background: #262033; color: var(--cinema-text); }
.cinema-index a[aria-current] span { color: var(--cinema-lime); }

.cinema-story {
  display: grid;
  grid-template-columns: minmax(16rem, .68fr) minmax(0, 1.55fr);
  gap: clamp(20px, 5vw, 100px);
  align-items: start;
}
.cinema-stage {
  position: sticky;
  top: calc(var(--cinema-header) + 24px);
  grid-area: 1 / 2;
  min-width: 0;
  height: clamp(295px, 65svh, 740px);
  height: min(65svh, 54vw, 740px);
  border: 1px solid #4c405b;
  border-radius: 14px;
  overflow: clip;
  background: radial-gradient(ellipse at 60% 55%, #30233e, #110e19 65%);
}
.cinema-stage canvas { width: 100%; height: 100%; }
.cinema-stage-label {
  display: grid;
  gap: 4px;
  position: absolute;
  inset: clamp(10px, 2.25vw, 38px) auto auto clamp(11px, 2.25vw, 38px);
}
.cinema-stage-label strong { font-size: clamp(.76rem, 1.7vw, 1.32rem); font-weight: 650; }
.cinema-stage-code, .cinema-stage-caption { color: var(--cinema-muted); font: 400 .68rem/1.3 var(--f-mono); }
.cinema-stage-caption { position: absolute; right: 15px; bottom: 14px; }
.cinema-stage-progress {
  position: absolute;
  height: 2px;
  inset: auto 0 0;
  background: var(--cinema-lime);
  transform: scaleX(var(--cinema-progress, 0));
  transform-origin: left;
}
.cinema-chapters { grid-area: 1 / 1; min-width: 0; }
.cinema-chapter {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: min(65svh, 54vw, 740px);
  padding: clamp(22px, 4.5vh, 52px) 0;
  border-top: 1px solid var(--cinema-line);
}
.cinema-chapter h3 {
  margin: 0;
  font: 650 clamp(2.5rem, 4.8vw, 5.2rem)/.95 var(--f-display);
  letter-spacing: -.056em;
  text-wrap: balance;
}
.cinema-chapter .cinema-kicker { color: var(--cinema-lime); }
.cinema-chapter p:not(.cinema-kicker) {
  max-width: 30ch;
  margin: 21px 0 16px;
  font-size: 1rem;
  color: var(--cinema-muted);
  line-height: 1.7;
}
.cinema-chapter-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: 10px;
  font-size: .9rem;
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.cinema-chapter-link:hover { color: var(--cinema-lime); }
.cinema-live { padding-block: clamp(40px, 7.5vw, 108px); border-bottom: 1px solid var(--line); }
.cinema-live .grid { gap: clamp(26px, 5vw, 76px); }
.cinema .event-tour { padding-block: clamp(45px, 7vw, 110px); }

@media (max-width: 1060px) {
  .cinema-hero h1 { font-size: clamp(4rem, 10vw, 7.4rem); }
  .cinema-stage-caption { font-size: .62rem; }
}
@media (max-width: 820px) {
  .cinema { --cinema-gutter: 24px; }
  .cinema-index ol { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cinema-index li:nth-child(n+5) { border-top: 1px solid var(--cinema-line); }
  .cinema-index li:nth-child(5) { border-inline-start: 0; }
  .cinema-index a { min-height: 52px; }
  .cinema-story { gap: 24px; }
}
@media (max-width: 640px) {
  .cinema { --cinema-header: 64px; --cinema-gutter: 18px; }
  .cinema .topbar .in { padding-inline: 12px; }
  .cinema .topbar .right > .btn { display: none; }
  .cinema-hero { min-height: 0; }
  .cinema-hero-in { align-content: end; gap: 32px; padding-top: clamp(190px, 38svh, 340px); }
  .cinema-media { inset: 0 0 auto; height: min(64svh, 510px); }
  .cinema-media img, .cinema-media video { object-position: 78% center; }
  .cinema-hero-shade {
    background: linear-gradient(0deg, #0d0c13 0, #09080e 19%, rgba(9, 8, 14, .95) 36%, rgba(9, 8, 14, .14) 68%, transparent 88%);
  }
  .cinema-hero h1 { font-size: clamp(3.2rem, 13vw, 6.4rem); }
  .cinema-lead { margin-block: 20px 22px; font-size: .94rem; }
  .cinema-hero .cinema-kicker { margin-bottom: 12px; }
  .cinema-button { min-height: 48px; gap: 12px; padding-inline: 13px; }
  .cinema-tour-intro, .cinema-story { display: block; }
  .cinema-tour-intro p { margin-top: 17px; }
  .cinema-stage {
    z-index: 2;
    top: calc(var(--cinema-header) + 6px);
    height: min(42svh, 62vw, 365px);
    border-radius: 10px;
  }
  .cinema-stage-label { gap: 2px; }
  .cinema-stage-code, .cinema-stage-caption { font-size: .6rem; }
  .cinema-chapter {
    min-height: 38svh;
    padding-block: 26px 30px;
  }
  .cinema-chapter .cinema-kicker { margin-bottom: 15px; }
  .cinema-chapter h3 { font-size: clamp(2.35rem, 9.9vw, 4rem); }
  .cinema-chapter p:not(.cinema-kicker) { margin-block: 14px 10px; }
}
@media (max-width: 360px) {
  .cinema-button { font-size: .8rem; }
  .cinema-hero-meta { gap: 0 4px; }
  .cinema-film-control { padding-left: 0; }
}
@media (max-height: 540px) { .cinema-stage { top: 0; } }
@media (prefers-reduced-motion: reduce) { .cinema-media video { transition: none; } }
html[data-motion="reduced"] .cinema-media video { transition: none; }

.cinema :is(.cinema-tour, .cinema-live, .event-tour, .cinema-chapter) { scroll-margin-top: 10px; }
.cinema-stage-previous { position: absolute; inset: 0; pointer-events: none; }
.cinema-stage-previous[hidden] { display: none; }

@media (max-width: 640px) {
  .cinema .cinema-chapter { scroll-margin-top: calc(min(42svh, 62vw, 365px) + 10px); }
  .cinema-hero-actions { gap: 8px; }
  .cinema-button { padding-inline: 12px; gap: 10px; }
}
@media (prefers-reduced-motion: no-preference) {
  html.js-motion .cinema-hero-copy { animation: cinema-enter 680ms var(--ease-out) both; }
  @keyframes cinema-enter {
    from { transform: translateY(15px); opacity: .35; }
    to { transform: none; opacity: 1; }
  }
}
