/* Narrix.studio — shared design system */
* {
  box-sizing: border-box;
}

:root {
  --font-body: 'Manrope', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Sora', var(--font-body);
  --bg: #050505;
  --bg-black: #000;
  --bg-elevated: #090b0e;
  --text: #fff;
  --text-soft: #d2d8e0;
  --text-muted: #aab4c3;
  --text-faint: #7a8594;
  --brand: #3b8ceb;
  --brand-hover: #8bc3ff;
  --brand-soft: rgba(59, 140, 235, 0.14);
  --brand-line: rgba(59, 140, 235, 0.46);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.11);
  --panel: rgba(255, 255, 255, 0.028);
  --panel-strong: rgba(255, 255, 255, 0.045);
  --shadow-lg: 0 30px 110px rgba(0, 0, 0, 0.78);
  --radius-sm: 10px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --container-wide: 1180px;
  --container-text: 980px;
  --section-space: clamp(68px, 7.2vw, 104px);
  --section-space-compact: clamp(48px, 5vw, 76px);
  --type-label: 0.72rem;
  --type-body: clamp(0.98rem, 1.25vw, 1.08rem);
  --type-lead: clamp(1.08rem, 2vw, 1.42rem);
  --type-heading: clamp(1.9rem, 3.45vw, 3.35rem);
  --motion-fast: 180ms;
  --motion-standard: 220ms;
  --motion-modal: 280ms;
  --ease-standard: ease;
  --ease-cinematic: cubic-bezier(0.2, 0.8, 0.2, 1);
  --z-content: 3;
  --z-player-control: 7;
  --z-topbar: 120;
  --z-modal: 1000;
  color-scheme: dark;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.modal-open {
  overflow: hidden;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 4px;
}

[hidden] {
  display: none !important;
}

.text-highlight {
  color: var(--brand);
  font-weight: 700;
  text-shadow: 0 0 30px rgba(2, 76, 160, 0.4);
}

.modal-inline-link,
.patron-workflow-link {
  color: var(--brand);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(59, 140, 235, 0.48);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color 180ms ease, text-decoration-color 180ms ease, text-shadow 180ms ease;
}

.modal-inline-link:hover,
.modal-inline-link:focus-visible,
.patron-workflow-link:hover,
.patron-workflow-link:focus-visible {
  color: var(--brand-hover);
  text-decoration-color: currentColor;
  text-shadow: 0 0 18px rgba(59, 140, 235, 0.22);
  outline: none;
}


/* Narrix UI primitives — canonical interactive styles
   ui-* classes are the visual source of truth. Repeated class specificity
   safely overrides legacy page-level visual rules while their layout and JS
   hooks remain intact during the regression-tested rollout. */

.ui-inline-link.ui-inline-link.ui-inline-link {
  color: var(--brand);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(59, 140, 235, 0.48);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  border-bottom: 0;
  text-shadow: none;
  transition: color 180ms ease, text-decoration-color 180ms ease, text-shadow 180ms ease;
}

.ui-inline-link.ui-inline-link.ui-inline-link:hover,
.ui-inline-link.ui-inline-link.ui-inline-link:focus-visible {
  color: var(--brand-hover);
  text-decoration-color: currentColor;
  border-bottom-color: transparent;
  text-shadow: 0 0 18px rgba(59, 140, 235, 0.22);
  outline: none;
}

.ui-inline-link.ui-inline-link.ui-inline-link:active {
  color: #fff;
  text-shadow: none;
}

.ui-text-cta.ui-text-cta.ui-text-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 5px 0 7px;
  border: 0;
  border-bottom: 1px solid rgba(59, 140, 235, 0.48);
  border-radius: 0;
  background: transparent;
  color: var(--brand);
  font-family: var(--font-display);
  font-size: clamp(0.76rem, 1vw, 0.88rem);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.075em;
  text-transform: uppercase;
  box-shadow: none;
  transition: color 180ms ease, border-color 180ms ease, text-shadow 180ms ease, transform 180ms ease;
}

.ui-text-cta.ui-text-cta.ui-text-cta svg {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  color: currentColor;
  transition: transform 180ms ease;
}

.ui-text-cta.ui-text-cta.ui-text-cta:hover,
.ui-text-cta.ui-text-cta.ui-text-cta:focus-visible {
  border-bottom-color: currentColor;
  background: transparent;
  color: #9acbff;
  text-shadow: 0 0 18px rgba(59, 140, 235, 0.24);
  box-shadow: none;
  outline: none;
  transform: translateY(-1px);
}

.ui-text-cta.ui-text-cta.ui-text-cta:hover svg,
.ui-text-cta.ui-text-cta.ui-text-cta:focus-visible svg {
  color: currentColor;
  transform: translateX(4px);
}

.ui-text-cta.ui-text-cta.ui-text-cta:active {
  color: #fff;
  transform: translateY(0);
}

.ui-text-cta.ui-text-cta.ui-text-cta:active svg {
  transform: translateX(2px);
}

.ui-button.ui-button.ui-button {
  position: relative;
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  overflow: visible;
  border: 1px solid rgba(116, 182, 255, 0.82);
  border-radius: 999px;
  background: rgba(59, 140, 235, 0.26);
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(0.78rem, 1.15vw, 0.92rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.07em;
  text-align: center;
  text-transform: uppercase;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.4), 0 0 30px rgba(59, 140, 235, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: transform 220ms ease, background-color 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.ui-button.ui-button.ui-button::before {
  content: none;
}

.ui-button.ui-button.ui-button::after {
  content: '→';
  position: static;
  color: #fff;
  font-size: 1.18em;
  line-height: 1;
  opacity: 1;
  transform: none;
  transition: transform 220ms ease;
  pointer-events: none;
}

.ui-button.ui-button.ui-button[download]::after {
  content: '↓';
}

.ui-button.ui-button.ui-button > svg {
  display: none;
}

.ui-button.ui-button.ui-button:hover,
.ui-button.ui-button.ui-button:focus-visible {
  border-color: rgba(155, 204, 255, 0.98);
  background: rgba(59, 140, 235, 0.4);
  color: #fff;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.46), 0 0 38px rgba(59, 140, 235, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  transform: translateY(-2px);
}

.ui-button.ui-button.ui-button:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 4px;
}

.ui-button.ui-button.ui-button:hover::after,
.ui-button.ui-button.ui-button:focus-visible::after {
  transform: translateX(3px);
}

.ui-button.ui-button.ui-button[download]:hover::after,
.ui-button.ui-button.ui-button[download]:focus-visible::after {
  transform: translateY(3px);
}

.ui-button.ui-button.ui-button:active {
  background: rgba(59, 140, 235, 0.32);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.4), 0 0 24px rgba(59, 140, 235, 0.22);
  transform: translateY(0);
}

.ui-button.ui-button.ui-button:disabled,
.ui-button.ui-button.ui-button[aria-disabled='true'],
.ui-text-cta.ui-text-cta.ui-text-cta:disabled,
.ui-text-cta.ui-text-cta.ui-text-cta[aria-disabled='true'],
.ui-inline-link.ui-inline-link.ui-inline-link[aria-disabled='true'] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
  text-shadow: none;
  transform: none;
}

@media (max-width: 640px) {
  .ui-text-cta.ui-text-cta.ui-text-cta {
    font-size: 0.74rem;
  }
}

/* Stable early-page animation state */
.reveal-element,
.patron-reveal,
[data-reveal] {
  opacity: 1;
  transform: none;
}

.js .reveal-element,
.js .patron-reveal,
.js [data-reveal] {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 760ms cubic-bezier(0.2, 0.8, 0.2, 1), transform 760ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.js .reveal-element.is-visible,
.js .patron-reveal.is-visible,
.js [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* One cinematic-focus system; page CSS decides which text consumes --cinema-text. */
[data-cinematic-focus] {
  --cinema-focus: 1;
  --cinema-max-blur: 3.6px;
  --cinema-text: rgb(240 244 249);
  opacity: calc(0.76 + (var(--cinema-focus) * 0.24));
  filter: blur(calc((1 - var(--cinema-focus)) * var(--cinema-max-blur)));
  transform: translate3d(0, calc((1 - var(--cinema-focus)) * 8px), 0) scale(calc(0.992 + (var(--cinema-focus) * 0.008)));
  transform-origin: center;
  transition: opacity 150ms linear, filter 170ms linear, transform 170ms linear;
  will-change: opacity, filter, transform;
  backface-visibility: hidden;
}

/* Inline narrative fragments let adjacent utility links remain fully sharp. */
[data-cinematic-focus].cinematic-focus-inline {
  transform: none;
  transform-origin: initial;
  will-change: opacity, filter;
}

/* One first-paint hero-title entrance for every compatible data-hero-content. */
.js [data-hero-content] > h1 {
  animation: narrix-hero-title-entry 980ms var(--ease-cinematic) both;
}

@keyframes narrix-hero-title-entry {
  0% {
    opacity: 0.76;
    filter: blur(4.2px);
    letter-spacing: 0.008em;
    transform: translate3d(0, 9px, 0);
  }
  100% {
    opacity: 1;
    filter: none;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes narrix-hero-title-entry-mobile {
  0% {
    opacity: 0.86;
    filter: blur(2.2px);
    letter-spacing: -0.004em;
    transform: translate3d(0, 5px, 0);
  }
  100% {
    opacity: 1;
    filter: none;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes narrix-hero-title-entry-firefox {
  0% {
    opacity: 0.84;
    letter-spacing: -0.002em;
  }
  100% {
    opacity: 1;
  }
}

/* Shared, static hero-to-content dissolve. The -2px overlap prevents Safari seams. */
body .module-hero::after,
body .hub-hero::after,
body .patron-hero::after,
body .episode-hook::after {
  bottom: -2px;
  height: clamp(112px, 19vh, 228px);
  background: linear-gradient(180deg, rgba(5, 5, 5, 0) 0%, rgba(5, 5, 5, 0.38) 52%, var(--hero-transition-end, var(--bg)) 100%);
}

body .module-hero::after {
  --hero-transition-end: #000;
}

body .patron-hero::after {
  --hero-transition-end: var(--patron-bg, var(--bg));
}

/* Hub thumbnails: selection copy and layout never move; only the image breathes. */
body .hub-episode-row[href]:hover,
body .hub-episode-row[href]:focus-visible {
  transform: none;
}

body .hub-episode-row[href]:hover .hub-episode-arrow,
body .hub-episode-row[href]:focus-visible .hub-episode-arrow {
  transform: none;
}

body .hub-episode-poster img {
  transition: none;
}

body .hub-episode-poster::after {
  opacity: 0.36;
  transition: none;
}

@media (hover: none), (pointer: coarse) {
  body.page-hub .hub-episode-row[href] .hub-episode-poster img {
    opacity: 0.8;
    filter: saturate(0.84) contrast(1.06);
    transform: none;
  }
}

@media (hover: hover) and (pointer: fine) {
  body .hub-episode-poster img {
    transition: opacity 420ms ease, filter 420ms ease, transform 680ms var(--ease-cinematic);
  }

  body .hub-episode-poster::after {
    background: radial-gradient(circle at 72% 20%, rgba(59, 140, 235, 0.25), transparent 42%), linear-gradient(135deg, rgba(59, 140, 235, 0.1), transparent 58%);
    transition: opacity 420ms ease;
  }

  body .hub-episode-row[href]:hover .hub-episode-poster img,
  body .hub-episode-row[href]:focus-visible .hub-episode-poster img {
    opacity: 1;
    filter: saturate(0.9) contrast(1.12) brightness(1.025);
    transform: scale(1.032);
  }

  body .hub-episode-row[href]:hover .hub-episode-poster::after,
  body .hub-episode-row[href]:focus-visible .hub-episode-poster::after {
    opacity: 1;
  }
}

/* Shared utility topbars */
.hub-topbar,
.patron-topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: var(--z-topbar);
  display: flex;
  min-height: 92px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px max(22px, calc((100vw - var(--container-wide)) / 2));
  pointer-events: none;
}

.hub-topbar::after,
.patron-topbar::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-bottom: 1px solid transparent;
  background: linear-gradient(180deg, rgba(5, 5, 5, 0.66), rgba(5, 5, 5, 0));
  transition: background-color 220ms ease, border-color 220ms ease, backdrop-filter 220ms ease;
}

.hub-topbar.is-scrolled::after,
.patron-topbar.is-scrolled::after {
  border-bottom-color: rgba(255, 255, 255, 0.06);
  background: rgba(5, 5, 5, 0.82);
  -webkit-backdrop-filter: blur(18px) saturate(1.05);
  backdrop-filter: blur(18px) saturate(1.05);
}

.hub-brand,
.hub-language,
.patron-brand,
.patron-download {
  pointer-events: auto;
}

.hub-brand,
.patron-brand {
  position: relative;
  display: inline-flex;
  width: 132px;
  min-height: 52px;
  align-items: center;
}

.hub-brand img,
.patron-brand img {
  width: 132px;
  height: auto;
  filter: drop-shadow(0 0 20px rgba(59, 140, 235, 0.2));
}

.patron-brand-fallback {
  font-family: var(--font-display);
  font-size: 0.86rem;
  line-height: 0.86;
  letter-spacing: -0.04em;
}

.patron-brand-fallback strong,
.patron-brand-fallback span {
  display: block;
}

.hub-language {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(255, 255, 255, 0.58);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.hub-language a {
  transition: color 180ms ease;
}

.hub-language a:hover,
.hub-language .is-active {
  color: #fff;
}

/* Shared corner frame */
.hero-ui-frame,
.hub-frame,
.patron-frame {
  position: absolute;
  inset: 20px;
  z-index: 3;
  opacity: 0.68;
  pointer-events: none;
}

.corner,
.hub-corner,
.patron-corner {
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: rgba(255, 255, 255, 0.23);
  border-style: solid;
}

.tl,
.hub-corner--tl,
.patron-corner--tl { inset: 0 auto auto 0; border-width: 1px 0 0 1px; }
.tr,
.hub-corner--tr,
.patron-corner--tr { inset: 0 0 auto auto; border-width: 1px 1px 0 0; }
.bl,
.hub-corner--bl,
.patron-corner--bl { inset: auto auto 0 0; border-width: 0 0 1px 1px; }
.br,
.hub-corner--br,
.patron-corner--br { inset: auto 0 0 auto; border-width: 0 1px 1px 0; }

/* Shared scroll cue */
.hero-scroll-cue,
.hub-scroll-cue,
.patron-scroll-cue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.72;
  transition: opacity 180ms ease, transform 180ms ease;
}

.hero-scroll-cue:hover,
.hub-scroll-cue:hover,
.patron-scroll-cue:hover {
  opacity: 1;
  transform: translateY(3px);
}

.hero-scroll-cue.is-dismissed,
.hub-scroll-cue.is-dismissed,
.patron-scroll-cue.is-dismissed {
  opacity: 0;
  pointer-events: none;
}

.hero-scroll-cue__mouse,
.hub-scroll-mouse,
.patron-scroll-mouse {
  position: relative;
  width: 23px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 999px;
}

.hero-scroll-cue__wheel,
.hub-scroll-mouse span,
.patron-scroll-mouse span {
  position: absolute;
  top: 7px;
  left: 50%;
  width: 3px;
  height: 7px;
  border-radius: 99px;
  background: var(--brand);
  transform: translateX(-50%);
  animation: narrix-wheel 1.9s ease-in-out infinite;
}

@keyframes narrix-wheel {
  0% { opacity: 0; transform: translate(-50%, 0); }
  26%, 75% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, 13px); }
}

/* Shared centred section heading */
.main-section-header,
.hub-section-heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(calc(100% - 40px), var(--container-wide));
  margin: 0 auto clamp(34px, 5vw, 62px);
  text-align: center;
}

.main-section-header::before,
.hub-section-heading::before {
  content: '';
  display: block;
  width: 38px;
  height: 2px;
  margin: 0 auto 18px;
  border-radius: 999px;
  background: var(--brand);
  box-shadow: 0 0 18px rgba(59, 140, 235, 0.62);
}

.main-section-title,
.hub-section-heading h2 {
  margin: 0;
  color: #eff4fa;
  font-family: var(--font-display);
  font-size: var(--type-heading);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.04em;
  text-align: center;
  text-wrap: balance;
}

.hub-heading-line {
  display: none !important;
}

/* One accessible modal shell */
.modal-overlay[hidden],
.modal-content[hidden] {
  display: none;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: grid;
  place-items: center;
  padding: 24px;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.84);
  -webkit-backdrop-filter: blur(15px);
  backdrop-filter: blur(15px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--motion-modal) var(--ease-standard);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  position: relative;
  width: min(880px, 100%);
  max-height: calc(100svh - 48px);
  overflow-y: auto;
  padding: clamp(54px, 7vw, 76px) clamp(26px, 6vw, 64px) 38px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at 90% 0%, rgba(59, 140, 235, 0.13), transparent 34%), #090b0e;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  outline: none;
  text-align: center;
  transform: translateY(12px) scale(0.98);
  transition: opacity var(--motion-modal) var(--ease-standard), transform var(--motion-modal) var(--ease-cinematic);
}

.modal-overlay.open .modal-content.is-active {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.modal-close-x {
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  transition: color 180ms ease, transform 180ms ease;
}

.modal-close-x:hover,
.modal-close-x:focus-visible {
  color: #fff;
  outline: none;
  transform: rotate(3deg);
}

.modal-close-x svg {
  width: 22px;
  height: 22px;
}

.modal-eyebrow {
  margin: 0 0 14px;
  color: #91a0b3;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.modal-title {
  margin: 0 0 34px;
  color: #eff4fa;
  font-family: var(--font-display);
  font-size: var(--type-heading);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.modal-text {
  width: 100%;
  margin-inline: auto;
  color: var(--text-soft);
  font-size: var(--type-body);
  font-weight: 300;
  line-height: 1.72;
  text-align: left;
}

.modal-text p,
.modal-text ul,
.modal-text li {
  text-align: left;
}

.modal-text p {
  margin: 0 0 20px;
}

.modal-text strong {
  color: #fff;
  font-weight: 700;
}

.modal-fkf-nav-label {
  margin: 34px 0 18px;
  color: var(--text-faint);
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-align: center;
  text-transform: uppercase;
}

.modal-fkf-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  margin-inline: auto;
}

.modal-service-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(100%, 760px);
}

.modal-fkf-actions--single,
.modal-tutorial-actions {
  grid-template-columns: minmax(0, 340px);
  justify-content: center;
}

.modal-tutorial-actions {
  margin-top: 24px;
}

.modal-fkf-action {
  position: relative;
  display: flex;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 44px 15px 16px;
  border: 1px solid rgba(59, 140, 235, 0.58);
  border-radius: var(--radius-md);
  background: rgba(59, 140, 235, 0.1);
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.055em;
  text-align: center;
  text-transform: uppercase;
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.modal-fkf-action svg {
  position: absolute;
  top: 50%;
  right: 16px;
  width: 18px;
  height: 18px;
  color: var(--brand);
  transform: translateY(-50%);
  transition: color 180ms ease, transform 180ms ease;
}

.modal-fkf-action:hover,
.modal-fkf-action:focus-visible {
  border-color: var(--brand);
  background: rgba(59, 140, 235, 0.26);
  outline: none;
  transform: translateY(-2px);
}

.modal-fkf-action:hover svg,
.modal-fkf-action:focus-visible svg {
  color: #fff;
  transform: translate(3px, -50%);
}

.modal-video-embed {
  margin-top: 34px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  aspect-ratio: 16 / 9;
  background: #000;
}

.modal-video-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.close-btn {
  display: inline-block;
  width: auto;
  margin: 30px auto 0;
  padding: 0 0 3px;
  border: 0;
  border-bottom: 1px solid rgba(59, 140, 235, 0.3);
  background: transparent;
  color: var(--brand);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  transition: color 180ms ease, border-color 180ms ease;
}

.close-btn:hover,
.close-btn:focus-visible {
  border-color: var(--brand);
  color: #fff;
  outline: none;
}

/* Shared film outro/footer */
.showreel-heading {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  text-wrap: balance;
}

.footer-outro {
  position: relative;
  display: flex;
  min-height: clamp(620px, 82vh, 900px);
  align-items: center;
  justify-content: center;
  margin-top: 0;
  padding: clamp(90px, 10vh, 136px) 20px clamp(68px, 8vh, 104px);
  overflow: hidden;
  background: #000;
  text-align: center;
  isolation: isolate;
}

.outro-video-bg,
.outro-video-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.outro-video-bg {
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.74;
  filter: saturate(0.86) contrast(1.08) brightness(0.7);
}

.outro-video-overlay {
  z-index: 1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.2) 46%, rgba(0, 0, 0, 0.24)), linear-gradient(90deg, rgba(0, 0, 0, 0.46), rgba(0, 0, 0, 0.06) 50%, rgba(0, 0, 0, 0.46));
}

.footer-outro::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  z-index: 2;
  height: clamp(54px, 6vh, 96px);
  background: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.58) 44%, transparent 100%);
  pointer-events: none;
}

.footer-outro-content {
  position: relative;
  z-index: 3;
  width: min(920px, 100%);
  margin: 0 auto;
  text-shadow: 0 16px 42px rgba(0, 0, 0, 0.92);
}

.footer-outro-heading {
  margin: 0 0 30px;
  color: #f4f7fb;
  font-size: clamp(2rem, 5vw, 4.35rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
  text-transform: uppercase;
}

.footer-home-link {
  display: inline-block;
  color: inherit;
  transition: color 220ms ease, text-shadow 220ms ease, transform 180ms ease;
}

.footer-home-link:hover,
.footer-home-link:focus-visible {
  color: var(--brand);
  text-shadow: 0 0 24px rgba(59, 140, 235, 0.22), 0 16px 42px rgba(0, 0, 0, 0.92);
  outline: none;
  transform: translateY(-1px);
}

.footer-cta {
  margin-bottom: 16px;
  color: #d4deeb;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.footer-email {
  display: inline-block;
  margin-bottom: 38px;
  color: #fff;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  transition: color 220ms ease;
}

.footer-email:hover,
.footer-email:focus-visible {
  color: var(--brand);
  outline: none;
}

.footer-socials {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: -8px 0 34px;
}

.footer-social-link {
  display: inline-flex;
  width: 68px;
  height: 68px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.34);
  color: #fff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: transform 220ms ease, border-color 220ms ease, background-color 220ms ease, box-shadow 220ms ease;
}

.footer-social-link:hover,
.footer-social-link:focus-visible {
  border-color: rgba(59, 140, 235, 0.52);
  background: rgba(59, 140, 235, 0.12);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(59, 140, 235, 0.28), 0 0 24px rgba(59, 140, 235, 0.22);
  outline: none;
  transform: translateY(-2px);
}

.footer-social-link--wa:hover,
.footer-social-link--wa:focus-visible {
  border-color: rgba(37, 211, 102, 0.5);
  background: rgba(37, 211, 102, 0.12);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.3), 0 0 24px rgba(37, 211, 102, 0.18);
}

.footer-social-link svg {
  width: 34px;
  height: 34px;
  fill: currentColor;
}

.footer-copy {
  color: rgba(222, 230, 240, 0.78);
  font-size: 0.75rem;
  line-height: 1.65;
  letter-spacing: 0.06em;
}

.footer-policy-link {
  display: inline-block;
  margin-top: 10px;
  color: #8f98a5;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  transition: color 180ms ease;
}

.footer-policy-link:hover,
.footer-policy-link:focus-visible {
  color: var(--brand);
  outline: none;
}

@media (max-width: 768px) {
  :root {
    --section-space: 58px;
    --section-space-compact: 44px;
  }

  [data-cinematic-focus] {
    --cinema-max-blur: 2.2px;
    opacity: calc(0.84 + (var(--cinema-focus) * 0.16));
    transform: translate3d(0, calc((1 - var(--cinema-focus)) * 5px), 0) scale(calc(0.995 + (var(--cinema-focus) * 0.005)));
  }

  [data-cinematic-focus].cinematic-focus-inline {
    transform: none;
  }

  .js [data-hero-content] > h1 {
    animation-name: narrix-hero-title-entry-mobile;
  }

  body .module-hero::after,
  body .hub-hero::after,
  body .patron-hero::after,
  body .episode-hook::after {
    height: clamp(94px, 16svh, 156px);
  }

  .hub-topbar,
  .patron-topbar {
    min-height: 76px;
    padding: 12px 16px;
  }

  .hub-brand,
  .hub-brand img,
  .patron-brand,
  .patron-brand img {
    width: 108px;
  }

  .hub-language {
    min-height: 38px;
    padding: 7px 12px;
    font-size: 0.68rem;
  }

  .hero-ui-frame,
  .hub-frame,
  .patron-frame {
    inset: 14px;
  }

  .main-section-header,
  .hub-section-heading {
    width: min(calc(100% - 32px), var(--container-wide));
    margin-bottom: 34px;
  }

  .main-section-header::before,
  .hub-section-heading::before {
    width: 32px;
    margin-bottom: 15px;
  }

  .main-section-title,
  .hub-section-heading h2 {
    font-size: clamp(1.78rem, 8vw, 2.45rem);
    line-height: 1.06;
  }

  .modal-overlay {
    align-items: start;
    padding: calc(8px + env(safe-area-inset-top, 0px)) 8px calc(8px + env(safe-area-inset-bottom, 0px));
  }

  .modal-content {
    width: 100%;
    max-height: calc(100svh - 16px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    padding: 54px 20px 28px;
  }

  .modal-close-x {
    position: fixed;
    z-index: 1002;
    top: calc(10px + env(safe-area-inset-top, 0px));
    right: 12px;
    width: 38px;
    height: 38px;
  }

  .modal-fkf-actions,
  .modal-service-actions,
  .modal-fkf-actions--single,
  .modal-tutorial-actions {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .modal-fkf-action {
    min-height: 52px;
    padding: 13px 42px 13px 14px;
    font-size: 0.7rem;
  }

  .footer-outro {
    min-height: 100svh;
    padding: 106px 20px 74px;
  }

  .outro-video-bg {
    opacity: 0.68;
    filter: saturate(0.84) contrast(1.06) brightness(0.66);
  }

  .footer-outro::before {
    height: clamp(58px, 8vh, 90px);
  }

  .footer-outro-heading {
    margin-bottom: 24px;
    font-size: clamp(2.1rem, 11vw, 3.7rem);
  }

  .footer-email {
    font-size: 1.4rem;
  }

  .footer-socials {
    gap: 14px;
    margin: -10px 0 30px;
  }

  .footer-social-link {
    width: 62px;
    height: 62px;
  }

  .footer-social-link svg {
    width: 32px;
    height: 32px;
  }
}

@media (hover: none), (pointer: coarse) {
  .hub-topbar.is-scrolled::after,
  .patron-topbar.is-scrolled::after,
  .footer-social-link {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  [data-cinematic-focus],
  .js [data-hero-content] > h1,
  .js .reveal-element,
  .js .patron-reveal,
  .js [data-reveal] {
    --cinema-focus: 1 !important;
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
    animation: none !important;
  }
}

/* Custom-production modal video preview */
.modal-service-preview {
  width: min(100%, 760px);
  margin: 30px auto 4px;
}

.modal-content--fkf .modal-text--fkf-intro {
  color: #e4eaf2;
  font-weight: 600;
}

.modal-content--fkf .modal-text--fkf-intro p:last-child,
.modal-content--fkf .modal-text--fkf-details p:last-child {
  margin-bottom: 0;
}

.modal-content--fkf .modal-service-preview--fkf-story {
  margin-top: 28px;
  margin-bottom: 28px;
}

.modal-service-preview-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: calc(var(--radius-lg) - 4px);
  background:
    radial-gradient(circle at 50% 42%, rgba(59, 140, 235, 0.13), transparent 48%),
    #030405;
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.48), inset 0 0 0 1px rgba(255, 255, 255, 0.025);
  isolation: isolate;
}

.modal-service-preview-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.035), transparent 58%, rgba(0, 0, 0, 0.12));
  pointer-events: none;
}

.modal-service-preview-video {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #030405;
  opacity: 0;
  transform: scale(1.012);
  transition: opacity 420ms ease, transform 900ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.modal-service-preview.is-ready .modal-service-preview-video {
  opacity: 1;
  transform: scale(1);
}

.modal-service-preview-loader {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  background: rgba(3, 4, 5, 0.16);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.modal-service-preview.is-loading .modal-service-preview-loader {
  opacity: 1;
}

.modal-service-preview--spaced {
  margin-bottom: 28px;
}

.modal-service-preview-loader span {
  width: 42px;
  height: 42px;
  border: 2px solid rgba(255, 255, 255, 0.16);
  border-top-color: var(--brand);
  border-radius: 50%;
  box-shadow: 0 0 24px rgba(59, 140, 235, 0.24);
  animation: modalServicePreviewSpin 780ms linear infinite;
}

.modal-service-preview.is-error .modal-service-preview-loader {
  display: none;
}

@keyframes modalServicePreviewSpin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .modal-service-preview-video {
    transition: opacity 160ms linear;
  }

  .modal-service-preview-loader span {
    animation-duration: 1.4s;
  }
}

@media (max-width: 680px) {
  .modal-service-preview {
    margin-top: 24px;
  }

  .modal-service-preview-frame {
    border-radius: var(--radius-md);
  }

  .modal-service-preview-loader span {
    width: 36px;
    height: 36px;
  }
}


/* FKF modal: load the full YouTube trailer only after an explicit click. */
.modal-fkf-trailer-player,
.media-switcher__player {
  position: absolute;
  inset: 0;
  z-index: 4;
  background: #000;
}

.modal-fkf-trailer-player iframe,
.media-switcher__player iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Shared control for every dynamically mounted privacy-enhanced YouTube player. */
.narrix-youtube-sound-toggle {
  position: absolute;
  z-index: var(--z-player-control);
  bottom: 14px;
  left: 14px;
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  padding: 7px 10px 6px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(7, 10, 14, 0.76);
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  transition: border-color var(--motion-fast) var(--ease-standard), background-color var(--motion-fast) var(--ease-standard), transform var(--motion-fast) var(--ease-standard);
}

.narrix-youtube-sound-toggle:hover,
.narrix-youtube-sound-toggle:focus-visible {
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(7, 10, 14, 0.9);
  outline: none;
  transform: translateY(-1px);
}

.narrix-youtube-sound-toggle:active {
  transform: translateY(0);
}

.narrix-youtube-sound-toggle[hidden] {
  display: none !important;
}

.modal-service-preview--fkf-story.is-trailer .modal-service-preview-video,
.modal-service-preview--fkf-story.is-trailer .modal-service-preview-loader {
  visibility: hidden;
}


.modal-fkf-trailer-award {
  width: min(100%, 760px);
  margin: 20px auto 0;
  color: rgba(210, 216, 224, 0.84);
  font-size: 0.88rem;
  font-weight: 400;
  line-height: 1.65;
  text-align: left;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 220ms ease, transform 220ms ease;
}

.modal-fkf-trailer-award.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.modal-fkf-trailer-award:not([hidden]) + .modal-fkf-trailer-toggle {
  margin-top: 16px;
}

.modal-fkf-trailer-toggle,
.media-switcher__toggle {
  display: flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  justify-content: center;
  margin: 11px auto 26px;
  padding: 8px 4px 7px;
  border: 0;
  border-bottom: 1px solid rgba(59, 140, 235, 0.48);
  background: transparent;
  color: #f2f6fb;
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.065em;
  text-align: center;
  text-transform: uppercase;
  transition: color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.modal-fkf-trailer-toggle:hover,
.modal-fkf-trailer-toggle:focus-visible,
.media-switcher__toggle:hover,
.media-switcher__toggle:focus-visible {
  border-color: var(--brand);
  color: #fff;
  outline: none;
  transform: translateY(-1px);
}

.modal-fkf-trailer-toggle[aria-expanded='true'],
.media-switcher__toggle[aria-expanded='true'] {
  margin-bottom: 40px;
  color: var(--text-soft);
  font-size: 0.7rem;
}

.modal-fkf-actions--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(100%, 760px);
}

@media (max-width: 680px) {
  .narrix-youtube-sound-toggle {
    bottom: 10px;
    left: 10px;
    min-height: 32px;
    padding: 7px 9px 6px;
    font-size: 0.63rem;
  }

  .modal-fkf-trailer-award {
    margin-top: 17px;
    font-size: 0.82rem;
    line-height: 1.6;
  }

  .modal-fkf-trailer-award:not([hidden]) + .modal-fkf-trailer-toggle {
    margin-top: 13px;
  }

  .modal-fkf-trailer-toggle,
  .media-switcher__toggle {
    margin-bottom: 24px;
    font-size: 0.69rem;
  }

  .modal-fkf-trailer-toggle[aria-expanded='true'],
  .media-switcher__toggle[aria-expanded='true'] {
    margin-bottom: 34px;
  }

  .modal-fkf-actions--two {
    grid-template-columns: 1fr;
    width: 100%;
  }
}



/* Generic teaser -> YouTube switcher.
   It reuses the established FKF preview/player-control styling; only page layout/state lives here. */
.media-switcher {
  width: min(100%, 760px);
  margin: 24px auto 0;
}

.media-switcher.is-youtube .modal-service-preview-video,
.media-switcher.is-youtube .modal-service-preview-loader {
  visibility: hidden;
}

@media (max-width: 680px) {
  .media-switcher {
    margin-top: 22px;
  }
}

/* Hub and episode outros: legal/privacy links sit near the lower edge without shifting the CTA block. */
.page-hub .footer-outro > .footer-copy,
.page-episode .footer-outro > .footer-copy {
  position: absolute;
  z-index: 3;
  right: 20px;
  bottom: max(24px, calc(env(safe-area-inset-bottom, 0px) + 10px));
  left: 20px;
  margin: 0;
  text-align: center;
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.9);
}

@media (max-width: 768px) {
  .page-hub .footer-outro > .footer-copy,
  .page-episode .footer-outro > .footer-copy {
    right: 16px;
    bottom: max(18px, calc(env(safe-area-inset-bottom, 0px) + 8px));
    left: 16px;
  }
}

/* Firefox fallback: keep cinematic luminance without rasterising text through blur/scale. */
@supports (-moz-appearance: none) {
  .js [data-hero-content] > h1 {
    animation-name: narrix-hero-title-entry-firefox;
  }

  [data-cinematic-focus] {
    filter: none !important;
    transform: none !important;
    opacity: calc(0.86 + (var(--cinema-focus) * 0.14));
    transition: opacity 160ms linear, border-color 180ms ease, box-shadow 180ms ease;
    will-change: opacity;
    backface-visibility: visible;
  }

  .card-badge {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
