/* NEW ANGEL - the cinematic scroll layer (loaded after experience.css).
   Every rule here is either scoped to body.cine-on / body.cine-track (set by
   cinematic.js only when GSAP is present and motion is allowed) or is purely
   additive, so the page still works with scripts off or reduced motion on. */

/* ---- the world changes colour from chapter to chapter (edge glow, cheap) */
/* !important: site.css pins every direct child of body.public to
   `position: relative; z-index: 1`, which would collapse these two to nothing. */
.cine-tint {
  position: fixed !important; inset: 0; z-index: 4 !important; pointer-events: none;
  box-shadow: inset 0 0 20vmin 2vmin var(--tint, rgba(74, 140, 255, 0.2));
}
.na-gl {
  position: fixed !important; inset: 0; z-index: 3 !important; width: 100%; height: 100%;
  pointer-events: none; display: block;
}

/* ---- a light that follows the pointer across the hero */
.hero-light {
  position: absolute; left: 0; top: 0; z-index: -1; pointer-events: none;
  width: 80vmin; height: 80vmin; margin: -40vmin 0 0 -40vmin; opacity: 0;
  background: radial-gradient(circle, rgba(150, 218, 255, 0.26) 0%, rgba(110, 176, 255, 0.1) 38%, transparent 66%);
  mix-blend-mode: screen; will-change: transform, opacity;
}

/* ---- the winged crest in 3D behind the title (a transparent WebM; browsers that cannot show it keep the still picture) */
.hero-crest-3d {
  position: absolute; z-index: 0; left: 50%; top: calc(clamp(180px, 21vw, 280px) / 2 - 4px);
  width: clamp(709px, 87.3vw, 1173px); aspect-ratio: 1500 / 870; height: auto;
  transform: translate(-50%, -50%); opacity: 0; pointer-events: none; transition: opacity 1.2s ease;
}
.hero-crest.has-3d .hero-crest-3d { opacity: 0.92; }
.hero-crest.has-3d::before { opacity: 0; animation: none; transition: opacity 1.2s ease; }
@media (max-width: 640px) {
  .hero-crest-3d { width: 172vw; top: 99px; }
}

/* ---- numbers hold still while they count */
.hl b { font-variant-numeric: tabular-nums; }

/* ---- the film: push-in, softer chapter titles, and a chapter rail */
.cine-canvas { transform: scale(calc(1 + var(--cp, 0) * 0.12)); will-change: transform; }
.cine-line { filter: blur(calc((1 - var(--o, 1)) * 9px)); }
.cine-chapters {
  position: absolute; left: clamp(14px, 3vw, 44px); top: 50%; z-index: 3; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 18px; margin: 0; padding: 0; list-style: none; pointer-events: none;
}
.cine-chapters li { display: flex; align-items: center; gap: 12px; color: var(--label); opacity: 0.45; transition: opacity 0.4s, color 0.4s; }
.cine-chapters i {
  flex: none; width: 9px; height: 9px; border: 1px solid var(--ice-a); transform: rotate(45deg);
  transition: background 0.4s, box-shadow 0.4s, transform 0.4s;
}
.cine-chapters span {
  max-width: 0; overflow: hidden; white-space: nowrap; font: 700 10.5px/1 var(--f-ui);
  letter-spacing: 0.26em; text-transform: uppercase; transition: max-width 0.5s ease;
}
.cine-chapters li.on { opacity: 1; color: var(--ice); }
.cine-chapters li.on i { background: var(--ice); box-shadow: 0 0 12px var(--ice); transform: rotate(45deg) scale(1.35); }
.cine-chapters li.on span { max-width: 240px; }
.cine-count {
  position: absolute; right: clamp(14px, 3vw, 44px); bottom: 6%; z-index: 3; pointer-events: none;
  font: 900 clamp(34px, 5vw, 64px)/1 var(--f-title); letter-spacing: 0.04em; color: rgba(150, 218, 255, 0.22);
  font-variant-numeric: tabular-nums;
}
.cine-count small { font: 700 12px/1 var(--f-ui); letter-spacing: 0.3em; color: var(--label); margin-left: 8px; }

/* ---- four worlds on one pinned, sideways-scrolling track (desktop only) */
@media (min-width: 960px) and (min-height: 640px) and (prefers-reduced-motion: no-preference) {
  body.cine-track #dungeons { overflow: hidden; padding: 48px 0 40px; }
  body.cine-track #dungeons > .wrap { width: 100%; max-width: none; margin: 0; }
  body.cine-track #dungeons .emblem { transform: scale(0.7); transform-origin: 50% 100%; margin: -16px auto -24px; }
  body.cine-track #dungeons .section-head { margin-bottom: 22px; }
  body.cine-track .dungeons {
    display: flex; flex-wrap: nowrap; gap: 3vw; width: max-content; padding: 0 8vw; will-change: transform;
  }
  body.cine-track .dungeon { flex: none; width: clamp(420px, min(62vw, calc((100vh - 300px) * 1.96)), 1000px); }
  body.cine-track .dungeon .mkframe img { transition: filter 0.4s; width: 118%; max-width: none; }
  body.cine-track .dungeon:hover .mkframe img { filter: brightness(1.12) saturate(1.1); }
}

@media (max-width: 640px) {
  .cine-chapters { left: 10px; gap: 14px; }
  .cine-chapters li.on span { max-width: 0; }
  .cine-count { bottom: 11%; }
}
@media (prefers-reduced-motion: reduce) {
  .cine-canvas { transform: none; }
  .cine-line { filter: none; }
  .cine-tint, .hero-light, .na-gl { display: none; }
}

/* ---- the shorter page: a tighter film, one quiet line under the systems, a compact FAQ */
.feat-more {
  margin: 34px 0 0; text-align: center; color: var(--label);
  font: 700 11px/1.8 var(--f-ui); letter-spacing: 0.26em; text-transform: uppercase;
}
.faq-short { max-width: 860px; margin: 64px auto 0; }

/* ---- section dots: where you are, one click to anywhere */
.beats {
  position: fixed !important; right: clamp(10px, 1.6vw, 26px); top: 50%; z-index: 60 !important;
  transform: translateY(-50%); display: flex; flex-direction: column; gap: 14px;
}
.beats a {
  display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 4px 0;
  color: var(--label); text-decoration: none; font: 700 10px/1 var(--f-ui); letter-spacing: 0.24em; text-transform: uppercase;
}
.beats span { opacity: 0; transform: translateX(8px); transition: opacity 0.25s, transform 0.25s; text-shadow: 0 1px 8px #000; pointer-events: none; }
.beats a:hover span, .beats a.on span, .beats a:focus-visible span { opacity: 1; transform: none; }
.beats i {
  flex: none; width: 9px; height: 9px; border: 1px solid var(--ice-a); transform: rotate(45deg);
  transition: background 0.3s, box-shadow 0.3s, transform 0.3s, border-color 0.3s;
}
.beats a:hover i { border-color: var(--ice); }
.beats a.on { color: var(--ice); }
.beats a.on i { background: var(--ice); border-color: var(--ice); box-shadow: 0 0 12px var(--ice); transform: rotate(45deg) scale(1.35); }

/* ---- a licence button that follows you between the intro and the prices */
.cta-dock {
  position: fixed !important; left: 0; right: 0; bottom: 18px; z-index: 65 !important;
  display: flex; justify-content: center; pointer-events: none;
  transform: translateY(160%); opacity: 0; transition: transform 0.55s cubic-bezier(.2, .8, .2, 1), opacity 0.4s;
}
.cta-dock.on { transform: none; opacity: 1; }
.cta-short { display: none; }
.cta-dock .btn { pointer-events: auto; filter: drop-shadow(0 10px 26px rgba(0, 0, 0, 0.7)); }

@media (max-width: 960px) { .beats { display: none !important; } }
@media (max-width: 640px) {
  .cta-dock { justify-content: flex-end; padding-right: 10px; bottom: 12px; }
  .cta-dock .btn { --bh: 44px; font-size: 12px; }
  .cta-long { display: none; }
  .cta-short { display: inline; }
}
@media (prefers-reduced-motion: reduce) {
  .cta-dock { transition: none; }
}

/* ---- phones: the six systems are a swipe row instead of a long column */
@media (max-width: 640px) {
  .feat-grid {
    display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin: 0 -16px; padding: 4px 16px 18px; -webkit-overflow-scrolling: touch;
  }
  .feat-grid::-webkit-scrollbar { display: none; }
  .feat-grid .feat { flex: 0 0 80vw; scroll-snap-align: center; }
}

/* ---- the film plays by itself: a small pause / replay control */
.cine-toggle {
  position: absolute; z-index: 4; top: 96px; right: clamp(14px, 3vw, 44px); width: 42px; height: 42px; padding: 0;
  border: 1px solid var(--ice-a); border-radius: 50%; background: rgba(3, 9, 18, 0.55); color: var(--ice);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); opacity: 0.55; transition: opacity 0.3s, border-color 0.3s, transform 0.2s;
}
.cine-toggle:hover, .cine-stick:focus-visible .cine-toggle { opacity: 1; border-color: var(--ice); }
.cine-toggle:active { transform: scale(0.94); }
.cine-toggle::before { content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.cine-toggle[data-state="pause"]::before { width: 12px; height: 14px; border-left: 4px solid currentColor; border-right: 4px solid currentColor; }
.cine-toggle[data-state="play"]::before { border-style: solid; border-width: 8px 0 8px 13px; border-color: transparent transparent transparent currentColor; margin-left: 2px; }
.cine-toggle[data-state="replay"]::before { width: 16px; height: 16px; border: 3px solid currentColor; border-right-color: transparent; border-radius: 50%; }
@media (max-width: 640px) { .cine-toggle { top: 78px; width: 38px; height: 38px; } }

/* ---- when the film ends: the progress bar steps aside for a button to the prices */
.cine-bar { transition: opacity 0.5s; }
.cine.done .cine-bar { opacity: 0; }
.cine-cta {
  position: absolute !important; z-index: 4; left: 50%; bottom: 5%; transform: translate(-50%, 24px);
  opacity: 0; pointer-events: none; transition: opacity 0.7s 0.5s, transform 0.7s 0.5s;
}
.cine.done .cine-cta { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { .cine .cine-cta { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); transition: none; } }

/* ================================================================ pricing: what to do, what it costs, one button */
/* three steps */
.pflow {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; max-width: 1060px; margin: 30px auto 0; padding: 0; list-style: none;
}
.pflow li {
  display: flex; align-items: flex-start; gap: 14px; padding: 14px 18px; text-align: left;
  border: 1px solid var(--line); background: linear-gradient(180deg, rgba(14, 28, 50, 0.55), rgba(6, 12, 22, 0.55));
}
.pflow b {
  flex: none; display: grid; place-items: center; width: 34px; height: 34px; margin-top: 1px;
  font: 900 14px/1 var(--f-title); color: #03101e; background: linear-gradient(180deg, #d4f1ff, var(--blue));
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
.pflow span { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; line-height: 1.45; color: var(--label); }
.pflow strong { color: var(--title); font: 700 13px/1.3 var(--f-ui); letter-spacing: 0.07em; text-transform: uppercase; }

/* one slim sale line instead of a big window */
.salebar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 14px;
  max-width: 1060px; margin: 18px auto 0; padding: 9px 16px; color: var(--text); font-size: 13px;
  border: 1px solid rgba(96, 232, 136, 0.4);
  background: linear-gradient(90deg, rgba(96, 232, 136, 0.03), rgba(96, 232, 136, 0.13), rgba(96, 232, 136, 0.03));
}
.salebar-tag { padding: 4px 9px; font: 800 11px/1 var(--f-ui); letter-spacing: 0.2em; text-transform: uppercase; color: #04170b; background: var(--exc); }
.salebar > b { font: 900 19px/1 var(--f-title); color: var(--exc); text-shadow: 0 0 14px rgba(96, 232, 136, 0.45); }
.salebar-end { color: var(--label); }
.salebar-end b { color: #fff; font-variant-numeric: tabular-nums; }

/* the three plans */
.pcards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; max-width: 1060px; margin: 38px auto 0; align-items: stretch; }
.pcard {
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 30px 22px 22px;
  border: 1px solid var(--line-2); background: linear-gradient(180deg, rgba(16, 32, 58, 0.74), rgba(6, 12, 22, 0.86));
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(150, 218, 255, 0.12);
  transition: border-color 0.25s, box-shadow 0.25s, translate 0.25s;
}
.pcard:hover { translate: 0 -4px; border-color: var(--ice-a); }
.pcard-hot {
  top: -14px; padding-top: 40px; border-color: var(--ice-a);
  background: linear-gradient(180deg, rgba(26, 56, 98, 0.85), rgba(8, 16, 30, 0.92));
  box-shadow: 0 0 0 1px rgba(150, 218, 255, 0.22), 0 0 50px rgba(110, 176, 255, 0.26), 0 26px 54px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(190, 232, 255, 0.3);
}
.pcard-flag {
  position: absolute; top: 0; left: 50%; transform: translate(-50%, -50%); padding: 7px 20px; white-space: nowrap;
  font: 800 11px/1 var(--f-ui); letter-spacing: 0.22em; text-transform: uppercase; color: #03101e;
  background: linear-gradient(180deg, #d4f1ff, #6eb0ff);
  clip-path: polygon(9px 0, calc(100% - 9px) 0, 100% 50%, calc(100% - 9px) 100%, 9px 100%, 0 50%);
}
.pcard-name { margin: 0 0 4px; font: 800 21px/1.2 var(--f-title); letter-spacing: 0.08em; color: var(--title); }
.pcard-tag { margin: 0 0 14px; color: var(--label); font-size: 13px; }
.pcard-price {
  flex: 1; display: flex; flex-direction: column; justify-content: center; width: 100%; margin: 0 0 18px; padding: 16px 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.pcard-price p { margin: 0; }
.pcard-was { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 4px !important; color: var(--dim); font-size: 14px; }
.pcard-was span {
  padding: 2px 7px; font: 700 12px/1.3 var(--f-ui); color: var(--exc);
  background: rgba(96, 232, 136, 0.12); border: 1px solid rgba(96, 232, 136, 0.5);
}
.pcard-amount { font: 900 clamp(42px, 4.6vw, 56px)/1 var(--f-title); color: #fff; text-shadow: 0 0 24px rgba(110, 176, 255, 0.45); }
.pcard-per { margin-top: 8px !important; color: var(--label); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; }
.pcard-month { margin-top: 10px !important; color: var(--text); font-size: 13px; }
.pcard-month b { margin-left: 4px; color: var(--exc); }
.pcard .btn { margin-top: auto; }
.pcard-facts { margin: 14px 0 0; color: var(--dim); font-size: 11.5px; }

/* the same in every plan, said once */
.pall {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 30px; max-width: 1060px; margin: 30px auto 0; padding: 16px 24px;
  border: 1px solid var(--line); background: rgba(6, 12, 22, 0.55);
}
.pall-title { margin: 0; font: 800 11px/1 var(--f-ui); letter-spacing: 0.26em; text-transform: uppercase; color: var(--ice); }
.pall ul { display: flex; flex: 1; flex-wrap: wrap; gap: 8px 28px; margin: 0; padding: 0; list-style: none; }
.pall li { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--text); }
.pall li::before { content: ""; flex: none; width: 10px; height: 10px; background: url("../ui/pip-on.png") center / contain no-repeat; filter: drop-shadow(0 0 5px rgba(150, 218, 255, 0.8)); }

@media (max-width: 900px) {
  .pflow { grid-template-columns: 1fr; gap: 8px; margin-top: 22px; }
  .pflow li { padding: 11px 14px; }
  .pcards { grid-template-columns: 1fr; gap: 26px; max-width: 460px; margin-top: 34px; }
  .pcard-hot { order: -1; top: 0; }
  .pcard-price { flex: none; }
  .pall { flex-direction: column; align-items: flex-start; }
  .salebar { font-size: 12.5px; }
}
@media (max-width: 600px) {
  /* on a phone the three steps are three short chips: number and title */
  .pflow { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .pflow li { flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px 9px; text-align: center; }
  .pflow span { align-items: center; font-size: 0; }
  .pflow strong { font-size: 10.5px; letter-spacing: 0.05em; }
  .salebar { gap: 6px 10px; padding: 8px 10px; }
}
