/* Social publication link: existing inline-link colors and hover treatment. */
.case-study-content .case-social-link,
.fkf-episode-page .case-social-link {
  text-align: center;
  margin-block: 1.5em 0;
}
.case-study-content .case-social-link__anchor,
.fkf-episode-page .case-social-link__anchor {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  max-width: 100%;
  min-height: 44px;
}
.case-study-content .case-social-link__icon,
.fkf-episode-page .case-social-link__icon {
  width: 1em;
  height: 1em;
  flex: 0 0 1em;
}
.case-study-content .case-social-link__anchor > span:first-of-type,
.fkf-episode-page .case-social-link__anchor > span:first-of-type {
  min-width: 0;
  text-wrap: pretty;
}

/* Full-width row aligned with the episode actions, outside the narrow description. */
.fkf-episode-page .episode-content > .case-social-link {
  font-size: clamp(0.98rem, 1.5vw, 1.08rem);
}
/* Narrix.studio — Case Studies / individual case page */
.page-case-study {
  --container-text: 820px;
  background: radial-gradient(circle at 50% 38%, rgba(59, 140, 235, 0.055), transparent 36rem), var(--bg);
}

.case-study-hook .episode-player {
  border: 0;
  background: #080808;
  /* Keep the cinematic outer shadow, but remove the inherited inset hairline
     that rendered as a thin strip directly under image-based case heroes. */
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.76), 0 0 56px rgba(59, 140, 235, 0.13);
}

.case-study-hero-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}

.case-study-content {
  padding-bottom: clamp(34px, 3.8vw, 52px);
}

.case-study-content .episode-logline {
  max-width: 820px;
}

.case-study-content .episode-description {
  max-width: 820px;
}

.case-film-cta-wrap {
  display: flex;
  justify-content: center;
  margin-top: clamp(34px, 4.5vw, 52px);
}

.case-study-content .episode-navigation {
  margin-top: clamp(66px, 7vw, 88px);
  padding-top: clamp(22px, 2.5vw, 30px);
}

.case-related {
  padding-top: clamp(24px, 2.6vw, 38px);
  padding-bottom: clamp(70px, 7vw, 104px);
}

.case-related-title {
  width: min(100%, 920px);
  margin: 0 auto 20px;
  color: var(--text-faint);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.18em;
  text-align: center;
  text-transform: uppercase;
}

.case-related .case-related-cards {
  max-width: 920px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 0;
}

@media (max-width: 980px) {
  .case-related .case-related-cards {
    max-width: 620px;
    grid-template-columns: 1fr;
  }
  .case-related-title {
    width: min(100%, 620px);
  }
}

@media (max-width: 768px) {
  .case-study-content {
    padding-bottom: 32px;
  }

  .case-study-content .episode-navigation {
    margin-top: 58px;
    padding-top: 22px;
  }

  .case-film-cta-wrap {
    margin-top: 32px;
  }
}

/* Case Studies hub — shared PL/EN composition. */
.case-hub-intro {
  width: 100%;
  max-width: none;
  margin: 0 0 clamp(28px, 3.4vw, 44px);
  padding: 0;
}

.case-hub-intro p {
  width: 100%;
  max-width: none;
  margin: 0;
  color: var(--text-soft);
  font-size: var(--type-body);
  font-weight: 300;
  line-height: 1.78;
  text-align: center;
}

.case-hub-intro + .case-related,
.case-hub-intro ~ .case-related {
  padding-top: clamp(42px, 4.5vw, 66px);
}

.page-hub .case-related {
  padding-top: clamp(42px, 4.5vw, 66px);
}

.page-hub .case-related-title {
  width: min(100%, var(--container-wide));
}

.page-hub .case-related .case-related-cards {
  max-width: var(--container-wide);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 980px) {
  .page-hub .case-related-title {
    width: min(100%, 620px);
  }

  .page-hub .case-related .case-related-cards {
    max-width: 620px;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .case-hub-intro {
    margin-bottom: 30px;
  }

  .case-hub-intro p {
    line-height: 1.7;
  }

  .page-hub .case-related {
    padding-top: 36px;
  }
}

@media (max-width: 640px) {
  .case-related {
    padding-top: 22px;
    padding-bottom: 72px;
  }

  .case-related-title {
    margin-bottom: 18px;
    font-size: 0.7rem;
  }
}


/* Lazy film player opened from the Case Study CTA. */
.case-video-panel {
  position: relative;
  width: min(100%, 960px);
  margin: clamp(22px, 3vw, 34px) auto 0;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius-md);
  background: #050505;
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.42);
  aspect-ratio: 16 / 9;
  isolation: isolate;
}

.case-video-panel[hidden] {
  display: none;
}

.case-video-panel iframe {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: inherit;
  background: #050505;
  color-scheme: normal;
  /* Clip the composited video layer as well as the iframe in mobile Safari.
     Keep the mask on the iframe so the panel's outer shadow is preserved. */
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  mask-image: linear-gradient(#fff, #fff);
}

.case-video-panel iframe:fullscreen {
  border-radius: 0;
}

.case-video-panel iframe:-webkit-full-screen {
  border-radius: 0;
}

.case-video-fallback {
  text-align: center;
  margin: 12px auto 0;
  font-size: 0.85rem;
}

.case-video-fallback[hidden] { display: none; }
.case-video-fallback a { color: inherit; text-underline-offset: 3px; }

.case-study-nav-section {
  padding: 0 var(--page-gutter, clamp(18px, 4vw, 56px)) clamp(62px, 7vw, 96px);
}

.case-study-navigation {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  width: min(100%, 920px);
  align-items: center;
  gap: clamp(18px, 3vw, 42px);
  margin: 0 auto;
}

/* Keep the related cards and page-to-page navigation in one visual cluster. */
.page-case-study .case-related {
  padding-bottom: clamp(34px, 3.6vw, 54px);
}

.page-case-study .case-study-navigation {
  margin: 0 auto;
}

@media (max-width: 768px) {
  .case-video-panel {
    margin-top: 20px;
    border-radius: 14px;
  }

  .case-study-nav-section {
    padding-bottom: 64px;
  }
}

.case-study-navigation .episode-nav-item--previous {
  justify-self: start;
  justify-content: flex-start;
  text-align: left;
}

.case-study-navigation .episode-nav-item--all {
  justify-self: center;
  justify-content: center;
}

.case-study-navigation .episode-nav-item--next {
  justify-self: end;
  justify-content: flex-end;
  text-align: right;
}

@media (max-width: 768px) {
  .case-study-navigation {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px 24px;
  }

  .case-study-navigation .episode-nav-item--all {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .case-study-navigation .episode-nav-item--previous {
    grid-column: 1;
    grid-row: 2;
  }

  .case-study-navigation .episode-nav-item--next {
    grid-column: 2;
    grid-row: 2;
  }
}


/* Numbered production steps inside case-study narratives. */
.case-process-list {
  margin: 1em 0 clamp(26px, 3vw, 38px);
  padding-left: 1.55em;
  color: var(--text-muted);
}

.case-process-list li {
  margin: 0;
  padding-left: 0.32em;
  color: var(--cinema-text, var(--text-muted));
  line-height: 1.72;
  text-wrap: pretty;
  transition: color 150ms linear, opacity 150ms linear, filter 170ms linear, transform 170ms linear;
}

.case-process-list li + li {
  margin-top: 0.68em;
}

.case-process-list li::marker {
  color: var(--brand);
  font-weight: 700;
}

.case-process-list li.is-cinema-focused {
  color: var(--text);
  opacity: 1;
  filter: none;
  transform: none;
}

@media (max-width: 768px) {
  .case-process-list {
    padding-left: 1.35em;
  }
}

/* Poster-first player: retain hero geometry and load provider only on demand. */
.case-video-poster {
  position: absolute;
  inset: 0;
  display: block;
  color: #fff;
  border-radius: inherit;
}
.case-video-poster[hidden], .case-video-tools[hidden] { display: none; }
.case-video-poster:focus-visible {
  outline: 3px solid var(--brand, #3b8ceb);
  outline-offset: -5px;
}
.case-video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: clamp(58px, 7vw, 86px);
  aspect-ratio: 1;
}
.case-video-play svg { width: 42%; height: 42%; margin-left: 4%; }
.case-video-hero > .case-video-panel {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  aspect-ratio: auto;
  border-radius: inherit;
  box-shadow: none;
}

.case-video-tools {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin: 16px 20px 0;
  color: var(--text-soft);
  font-size: .85rem;
}
.case-video-tools button, .case-video-tools a {
  font: inherit;
  color: inherit;
  background: transparent;
  border: 0;
  padding: 10px 4px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.case-film-cta-wrap--opinion { justify-content: center; }
/* Narrix.studio — one brand treatment for our play circles, including TV.
   Change the background-color below to recolor every site-owned play circle. */
.narrix-play-circle {
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 50%;
  background-color: #185aa5;
  color: #fff;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .4);
}
.case-video-poster:hover .narrix-play-circle,
.case-video-poster:focus-visible .narrix-play-circle,
.tv-open:hover .narrix-play-circle,
.tv-open:focus .narrix-play-circle,
button.narrix-play-circle:hover,
button.narrix-play-circle:focus-visible {
  border-color: #fff;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, .18), 0 10px 34px rgba(0, 0, 0, .55);
}
.narrix-consent-panel {
  position: fixed;
  z-index: 5000;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom, 0px));
  width: min(980px, calc(100% - 36px));
  max-height: calc(100svh - 36px);
  overflow: auto;
  padding: 20px 22px;
  color: #f1f5fb;
  background: rgba(5, 9, 14, 0.97);
  border: 1px solid rgba(53, 133, 224, 0.42);
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  opacity: 0;
  transform: translate3d(-50%, 16px, 0);
  transition: opacity 180ms ease, transform 220ms ease;
}

.narrix-consent-panel[hidden],
.narrix-consent-panel [hidden] {
  display: none;
}

/* The dialog makes background controls inert. Do not let its inactive banner
   obscure the dialog; restore it with the same consent state when it closes. */
body.modal-open .narrix-consent-panel {
  visibility: hidden;
}

.narrix-consent-panel.is-visible {
  opacity: 1;
  transform: translate3d(-50%, 0, 0);
}

.narrix-consent-copy {
  margin-bottom: 16px;
}

.narrix-consent-copy h2 {
  margin: 0 0 7px;
  color: #fff;
  font: 700 clamp(1rem, 1.7vw, 1.18rem)/1.2 "Sora", "Manrope", system-ui, sans-serif;
  letter-spacing: -0.02em;
}

.narrix-consent-copy p {
  margin: 0;
  max-width: 820px;
  color: rgba(233, 239, 247, 0.76);
  font: 400 0.82rem/1.55 "Manrope", system-ui, sans-serif;
}

.narrix-consent-copy a {
  color: #5ea5f5;
  text-decoration: none;
  white-space: nowrap;
}

.narrix-consent-copy a:hover,
.narrix-consent-copy a:focus-visible {
  text-decoration: underline;
}

.narrix-consent-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(132px, auto));
  justify-content: end;
  gap: 10px;
}

.narrix-consent-actions--details {
  grid-template-columns: repeat(2, minmax(138px, auto));
  margin-top: 16px;
}

.narrix-consent-button {
  min-height: 44px;
  padding: 10px 17px;
  border-radius: 999px;
  font: 700 0.7rem/1 "Manrope", system-ui, sans-serif;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.narrix-consent-button:hover {
  transform: translateY(-1px);
}

.narrix-consent-button:focus-visible,
.narrix-consent-settings-link:focus-visible,
.narrix-consent-category:focus-within {
  outline: 2px solid #6cb1ff;
  outline-offset: 3px;
}

.narrix-consent-button--primary {
  color: #fff;
  background: #2374cc;
  border: 1px solid #3389e8;
}

.narrix-consent-button--primary:hover {
  background: #2f83dc;
}

.narrix-consent-button--secondary {
  color: rgba(242, 247, 253, 0.86);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.narrix-consent-button--secondary:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.42);
}

.narrix-consent-details {
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  padding-top: 15px;
}

.narrix-consent-categories {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.narrix-consent-category {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 92px;
  padding: 14px 15px;
  color: #eef4fb;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
}

label.narrix-consent-category {
  cursor: pointer;
}

.narrix-consent-category strong,
.narrix-consent-category span {
  display: block;
}

.narrix-consent-category strong {
  margin-bottom: 4px;
  font: 700 0.78rem/1.2 "Manrope", system-ui, sans-serif;
}

.narrix-consent-category span {
  color: rgba(233, 239, 247, 0.64);
  font: 400 0.68rem/1.45 "Manrope", system-ui, sans-serif;
}

.narrix-consent-category input[type="checkbox"] {
  width: 42px;
  height: 23px;
  margin: 0;
  flex: 0 0 auto;
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}

.narrix-consent-category input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.84);
  transition: transform 160ms ease, background 160ms ease;
}

.narrix-consent-category input[type="checkbox"]:checked {
  background: #2374cc;
  border-color: #3389e8;
}

.narrix-consent-category input[type="checkbox"]:checked::after {
  transform: translateX(19px);
  background: #fff;
}

.narrix-consent-always {
  flex: 0 0 auto;
  color: rgba(106, 179, 255, 0.88) !important;
  font-weight: 700 !important;
  white-space: nowrap;
}

.narrix-consent-settings-link {
  display: inline;
  margin: 0;
  padding: 0;
  color: inherit;
  background: none;
  border: 0;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  opacity: 0.78;
  cursor: pointer;
}

.narrix-consent-settings-link:hover {
  opacity: 1;
}

.narrix-consent-settings-link--offer {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 48px;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.58);
  font: 600 0.62rem/1.4 "Manrope", system-ui, sans-serif;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.narrix-consent-settings-link--policy {
  display: block;
  margin: 14px auto 0;
  color: currentColor;
  font-size: 0.78rem;
  text-align: center;
}

.narrix-consent-settings-link--floating {
  position: fixed;
  z-index: 1300;
  left: 14px;
  bottom: max(12px, env(safe-area-inset-bottom, 0px));
  padding: 7px 10px;
  color: rgba(235, 242, 250, 0.7);
  background: rgba(5, 9, 14, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  font: 600 0.62rem/1 "Manrope", system-ui, sans-serif;
  text-decoration: none;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

@media (max-width: 820px) {
  .narrix-consent-categories {
    grid-template-columns: 1fr;
  }

  .narrix-consent-category {
    min-height: 0;
  }
}

@media (max-width: 760px) {
  .narrix-consent-panel {
    width: calc(100% - 20px);
    max-height: calc(100dvh - 20px);
    overflow: auto;
    padding: 18px;
    border-radius: 16px;
  }

  .narrix-consent-copy p {
    font-size: 0.78rem;
  }

  .narrix-consent-actions {
    grid-template-columns: 1fr 1fr;
  }

  .narrix-consent-actions > .narrix-consent-button--primary {
    grid-column: 1 / -1;
  }

  .narrix-consent-actions--details {
    grid-template-columns: 1fr 1fr;
  }

  .narrix-consent-actions--details > .narrix-consent-button--primary {
    grid-column: auto;
  }

  .narrix-consent-button {
    min-width: 0;
    padding-inline: 12px;
  }

  .narrix-consent-settings-link--offer {
    bottom: 42px;
  }
}

@media (max-width: 430px) {
  .narrix-consent-actions,
  .narrix-consent-actions--details {
    grid-template-columns: 1fr;
  }

  .narrix-consent-actions > .narrix-consent-button--primary,
  .narrix-consent-actions--details > .narrix-consent-button--primary {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .narrix-consent-panel,
  .narrix-consent-button,
  .narrix-consent-category input[type="checkbox"],
  .narrix-consent-category input[type="checkbox"]::after {
    transition: none;
  }
}
/* Narrix.studio global menu — shared floating topbar / Safari edge guard 2026-09-07 */
:root {
  --narrix-menu-bg: rgba(2, 2, 3, 0.965);
  --narrix-menu-line: rgba(255, 255, 255, 0.10);
  --narrix-menu-muted: rgba(255, 255, 255, 0.42);
  --narrix-menu-blue: var(--brand, #3b8ceb);
  --narrix-menu-edge: max(22px, calc((100vw - 1180px) / 2));
  --narrix-topbar-brand-width: 132px;
  --narrix-topbar-lens-blur: 14px;
  --narrix-topbar-lens-tail: 60px;
  --narrix-topbar-lens-guard: 32px;
}

html.narrix-menu-lock,
body.narrix-menu-open {
  overflow: hidden;
}

.narrix-menu-toggle {
  position: relative;
  z-index: 330;
  display: inline-flex;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
}

.narrix-menu-toggle::before {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: inherit;
  background: rgba(255,255,255,.025);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  opacity: .82;
  transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.narrix-menu-toggle:hover::before,
.narrix-menu-toggle:focus-visible::before,
.narrix-menu-toggle[aria-expanded='true']::before {
  border-color: rgba(59,140,235,.42);
  background: rgba(59,140,235,.07);
  box-shadow: 0 0 26px rgba(59,140,235,.10);
}

.narrix-menu-toggle:focus-visible {
  outline: 2px solid rgba(59,140,235,.72);
  outline-offset: 3px;
}

.narrix-menu-toggle__icon {
  position: relative;
  z-index: 1;
  display: block;
  width: 22px;
  height: 16px;
}

.narrix-menu-toggle__line {
  position: absolute;
  left: 0;
  width: 22px;
  height: 1px;
  background: currentColor;
  transform-origin: center;
  transition: top 220ms ease, transform 220ms ease, opacity 160ms ease, color 180ms ease;
}
.narrix-menu-toggle__line:nth-child(1) { top: 1px; }
.narrix-menu-toggle__line:nth-child(2) { top: 7px; }
.narrix-menu-toggle__line:nth-child(3) { top: 13px; }

.narrix-menu-toggle:hover .narrix-menu-toggle__line,
.narrix-menu-toggle:focus-visible .narrix-menu-toggle__line { color: #9acbff; }

.narrix-menu-toggle[aria-expanded='true'] .narrix-menu-toggle__line:nth-child(1) {
  top: 7px;
  transform: rotate(45deg);
}
.narrix-menu-toggle[aria-expanded='true'] .narrix-menu-toggle__line:nth-child(2) {
  opacity: 0;
}
.narrix-menu-toggle[aria-expanded='true'] .narrix-menu-toggle__line:nth-child(3) {
  top: 7px;
  transform: rotate(-45deg);
}

/* Compatibility for pages predating the shared topbar markup. */
.page-home > .lang-switch {
  position: fixed;
  top: 29px;
  right: calc(var(--narrix-menu-edge) + 62px);
  left: auto;
  z-index: 330;
}

.narrix-menu-toggle--standalone {
  position: fixed;
  top: 20px;
  right: var(--narrix-menu-edge);
}

/* One transparent topbar. Only its backdrop is blurred; controls stay sharp.
   The same lens is used before and after scrolling, without a rectangular fill. */
body .hub-topbar,
body .patron-topbar {
  min-height: 92px;
  padding: 18px var(--narrix-menu-edge);
  gap: 10px;
  line-height: 1.6;
  border: 0;
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  overflow: visible;
  pointer-events: none;
}

body .hub-topbar::after,
body .patron-topbar::after,
body .hub-topbar.is-scrolled::after,
body .patron-topbar.is-scrolled::after,
body.page-product-specification .hub-topbar::after {
  content: '';
  position: absolute;
  /* Extra offscreen coverage for Safari's scrolling backdrop. Keep this on
     the lens only: moving/transforming the header would affect its controls.
     For each old gradient stop p, add (1 - p) * guard so its visible position
     stays unchanged when the surface grows upwards. */
  inset: calc(-32px - var(--narrix-topbar-lens-guard)) 0 calc(-1 * var(--narrix-topbar-lens-tail));
  z-index: -1;
  border: 0;
  border-radius: 0;
  background: linear-gradient(180deg,
    rgba(5, 5, 5, .24) var(--narrix-topbar-lens-guard),
    rgba(5, 5, 5, .08) calc(65% + .35 * var(--narrix-topbar-lens-guard)),
    transparent);
  box-shadow: none;
  -webkit-backdrop-filter: blur(var(--narrix-topbar-lens-blur)) saturate(1.04);
  backdrop-filter: blur(var(--narrix-topbar-lens-blur)) saturate(1.04);
  -webkit-mask-image: linear-gradient(180deg,
    #000 0%, #000 calc(28% + .72 * var(--narrix-topbar-lens-guard)),
    rgba(0, 0, 0, .72) calc(52% + .48 * var(--narrix-topbar-lens-guard)),
    rgba(0, 0, 0, .22) calc(76% + .24 * var(--narrix-topbar-lens-guard)),
    transparent 100%);
  mask-image: linear-gradient(180deg,
    #000 0%, #000 calc(28% + .72 * var(--narrix-topbar-lens-guard)),
    rgba(0, 0, 0, .72) calc(52% + .48 * var(--narrix-topbar-lens-guard)),
    rgba(0, 0, 0, .22) calc(76% + .24 * var(--narrix-topbar-lens-guard)),
    transparent 100%);
  /* Keep the masked backdrop on a stable composited surface during scroll. */
  transform: translate3d(0, 0, 0);
  pointer-events: none;
  transition: none;
}

/* Reserve the same logo slot on home without displaying a second logo. */
.page-home > .home-topbar .home-topbar-spacer {
  visibility: hidden;
  pointer-events: none;
}

body .hub-topbar .hub-brand,
body .patron-topbar .patron-brand {
  width: var(--narrix-topbar-brand-width);
  min-height: 52px;
  flex: 0 0 var(--narrix-topbar-brand-width);
}

body .hub-topbar .hub-brand img,
body .patron-topbar .patron-brand img {
  width: var(--narrix-topbar-brand-width);
  height: auto;
}

body .hub-topbar .hub-language,
body .patron-topbar .hub-language {
  flex-shrink: 0;
}

.hub-language > [aria-hidden='true'] {
  color: rgba(255, 255, 255, .22);
  font-weight: 300;
}

.hub-language [aria-disabled='true'] {
  color: rgba(255, 255, 255, .28);
  cursor: default;
}

/* Subpages: brand left; language + menu on the right. */
.hub-topbar.has-global-menu,
.patron-topbar.has-global-menu {
  justify-content: flex-start;
  gap: 10px;
}

.hub-topbar.has-global-menu .hub-brand,
.patron-topbar.has-global-menu .patron-brand {
  order: 1;
  margin-right: 0;
}

.hub-topbar.has-global-menu .hub-language,
.patron-topbar.has-global-menu .hub-language {
  order: 2;
  margin-left: auto;
  margin-right: 0;
}

.patron-topbar.has-global-menu .patron-download {
  order: 2;
  margin-left: auto;
  margin-right: 0;
}

.hub-topbar.has-global-menu .narrix-menu-toggle,
.patron-topbar.has-global-menu .narrix-menu-toggle {
  order: 3;
}

/* Keep the original PDF link available without JS; with JS it moves into menu. */
.js .patron-topbar > .narrix-menu-download-source {
  display: none;
}

.narrix-menu-panel .narrix-menu-download {
  margin: 24px 0 0 50px;
}

body.narrix-menu-open .hub-topbar,
body.narrix-menu-open .patron-topbar,
body.narrix-menu-open > .lang-switch {
  z-index: 330;
}

.narrix-menu-panel {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  align-items: center;
  overflow-y: auto;
  overflow-x: hidden;
  padding: max(126px, 13vh) max(28px, calc((100vw - 1180px) / 2)) 72px;
  background: var(--narrix-menu-bg);
  color: #fff;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  -webkit-backdrop-filter: blur(18px) saturate(.92);
  backdrop-filter: blur(18px) saturate(.92);
  transition: opacity 240ms ease, visibility 0s linear 240ms;
}

.narrix-menu-panel::before {
  content: '';
  position: fixed;
  width: min(720px, 74vw);
  aspect-ratio: 1;
  top: -34vw;
  right: -24vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59,140,235,.14) 0%, rgba(59,140,235,.035) 38%, transparent 70%);
  pointer-events: none;
}

.narrix-menu-panel::after {
  content: '';
  position: fixed;
  inset: 20px;
  border: 1px solid rgba(255,255,255,.055);
  pointer-events: none;
}

body.narrix-menu-open .narrix-menu-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

.narrix-menu-panel__inner {
  position: relative;
  z-index: 1;
  width: min(100%, 1180px);
  margin: 0 auto;
  transform: translateY(14px);
  opacity: 0;
  transition: transform 260ms ease, opacity 220ms ease;
}

body.narrix-menu-open .narrix-menu-panel__inner {
  transform: translateY(0);
  opacity: 1;
}

.narrix-menu-panel__eyebrow {
  margin: 0 0 clamp(28px, 4vw, 48px);
  color: var(--narrix-menu-muted);
  font-family: var(--font-display, 'Sora', sans-serif);
  font-size: .70rem;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.narrix-menu-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--narrix-menu-line);
}

.narrix-menu-item {
  border-top: 1px solid var(--narrix-menu-line);
}

.narrix-menu-link {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 36px;
  gap: 18px;
  align-items: center;
  min-height: clamp(80px, 10.2vh, 116px);
  padding: 14px 0;
  color: rgba(255,255,255,.90);
  text-decoration: none;
  transition: color 180ms ease;
}

.narrix-menu-link__no {
  color: rgba(255,255,255,.28);
  font-family: var(--font-display, 'Sora', sans-serif);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  transition: color 180ms ease, transform 180ms ease;
}

.narrix-menu-link__label {
  font-family: var(--font-display, 'Sora', sans-serif);
  font-size: clamp(1.52rem, 3.15vw, 3.05rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -.035em;
  text-wrap: balance;
  transition: transform 200ms ease, color 180ms ease, text-shadow 180ms ease;
}

.narrix-menu-link__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  color: rgba(255,255,255,.34);
  transition: color 180ms ease, transform 200ms ease;
}

.narrix-menu-link__arrow svg {
  width: 26px;
  height: 26px;
}

.narrix-menu-link.is-current-section,
.narrix-menu-link:hover,
.narrix-menu-link:focus-visible {
  color: #fff;
  outline: none;
}

.narrix-menu-link.is-current-section .narrix-menu-link__no,
.narrix-menu-link:hover .narrix-menu-link__no,
.narrix-menu-link:focus-visible .narrix-menu-link__no {
  color: var(--narrix-menu-blue);
  transform: translateX(4px);
}

.narrix-menu-link.is-current-section .narrix-menu-link__label,
.narrix-menu-link:hover .narrix-menu-link__label,
.narrix-menu-link:focus-visible .narrix-menu-link__label {
  color: #f8fbff;
  transform: translateX(8px);
  text-shadow: 0 0 28px rgba(59,140,235,.13);
}

.narrix-menu-link.is-current-section .narrix-menu-link__arrow,
.narrix-menu-link:hover .narrix-menu-link__arrow,
.narrix-menu-link:focus-visible .narrix-menu-link__arrow {
  color: #9acbff;
  transform: translateX(5px);
}

/* Keep the current section identifiable even without hover. */
.narrix-menu-link.is-current-section .narrix-menu-link__label,
.narrix-menu-link.is-current-section .narrix-menu-link__arrow {
  color: var(--narrix-menu-blue);
}

.narrix-menu-panel__note {
  margin: 28px 0 0 76px;
  color: rgba(255,255,255,.28);
  font-size: .72rem;
  line-height: 1.5;
}

@media (max-width: 768px) {
  :root {
    --narrix-menu-edge: 16px;
    --narrix-topbar-brand-width: 108px;
    --narrix-topbar-lens-blur: 8px;
    --narrix-topbar-lens-tail: 42px;
  }

  body .hub-topbar,
  body .patron-topbar {
    min-height: 76px;
    padding: 12px var(--narrix-menu-edge);
    gap: 8px;
  }

  .page-home > .lang-switch {
    top: 20px;
    right: 72px;
    left: auto;
  }

  .narrix-menu-toggle--standalone {
    top: 14px;
    right: 14px;
  }

  .hub-topbar.has-global-menu,
  .patron-topbar.has-global-menu {
    gap: 8px;
  }

  .hub-topbar.has-global-menu .narrix-menu-toggle,
  .patron-topbar.has-global-menu .narrix-menu-toggle {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
  }

  .hub-topbar.has-global-menu .hub-language,
  .patron-topbar.has-global-menu .hub-language {
    margin-left: auto;
  }

  .narrix-menu-panel {
    align-items: start;
    padding: 112px 20px 42px;
  }

  .narrix-menu-panel::after {
    inset: 12px;
  }

  .narrix-menu-panel__eyebrow {
    margin-bottom: 24px;
    font-size: .66rem;
  }

  .narrix-menu-link {
    grid-template-columns: 34px minmax(0,1fr) 24px;
    gap: 10px;
    min-height: 78px;
    padding: 16px 0;
  }

  .narrix-menu-link__no {
    font-size: .62rem;
  }

  .narrix-menu-link__label {
    font-size: clamp(1.24rem, 6.4vw, 1.78rem);
    line-height: 1.08;
  }

  .narrix-menu-link__arrow svg {
    width: 21px;
    height: 21px;
  }

  .narrix-menu-panel__note {
    margin: 22px 0 0 44px;
    font-size: .68rem;
  }

  .narrix-menu-panel .narrix-menu-download {
    margin-left: 44px;
  }
}

@media (max-width: 430px) {
  :root {
    --narrix-topbar-brand-width: 94px;
  }

  .hub-topbar.has-global-menu .hub-brand,
  .hub-topbar.has-global-menu .hub-brand img,
  .patron-topbar.has-global-menu .patron-brand,
  .patron-topbar.has-global-menu .patron-brand img {
    width: 94px;
  }

  .hub-topbar.has-global-menu .hub-language,
  .patron-topbar.has-global-menu .hub-language {
    padding-inline: 10px;
    gap: 8px;
  }

  .narrix-menu-panel {
    padding-top: 98px;
  }
}

/* If masking is unavailable, keep only the soft tint rather than a hard blur edge. */
@supports not ((mask-image: linear-gradient(#000, transparent)) or (-webkit-mask-image: linear-gradient(#000, transparent))) {
  body .hub-topbar::after,
  body .patron-topbar::after,
  body .hub-topbar.is-scrolled::after,
  body .patron-topbar.is-scrolled::after,
  body.page-product-specification .hub-topbar::after {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

@media (prefers-reduced-transparency: reduce) {
  body .hub-topbar::after,
  body .patron-topbar::after,
  body .hub-topbar.is-scrolled::after,
  body .patron-topbar.is-scrolled::after,
  body.page-product-specification .hub-topbar::after {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .narrix-menu-panel,
  .narrix-menu-panel__inner,
  .narrix-menu-toggle__line,
  .narrix-menu-link__label,
  .narrix-menu-link__no,
  .narrix-menu-link__arrow {
    transition: none !important;
  }
}

/* Menu destinations — existing typography, two clear levels, no new assets. */
.narrix-menu-item--has-children .narrix-menu-link {
  min-height: 60px;
  padding-bottom: 0;
}
.narrix-menu-sublinks {
  display: flex;
  flex-wrap: wrap;
  column-gap: 32px;
  row-gap: 0;
  list-style: none;
  margin: 0 54px 24px 76px;
  padding: 0;
}
.narrix-menu-sublink {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 0;
  color: #d8dee7;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
}
.narrix-menu-sublink__language {
  margin-left: 7px;
  font-size: .65em;
  font-weight: 600;
  letter-spacing: .08em;
  color: #8ca3bf;
}
.narrix-menu-sublink:focus-visible,
.narrix-menu-link:focus-visible {
  outline: 2px solid var(--narrix-menu-blue);
  outline-offset: 4px;
}
.narrix-menu-sublink:focus-visible {
  color: #9acbff;
  text-decoration-color: currentColor;
}
@media (min-width: 769px) and (hover: hover) and (pointer: fine) {
  .narrix-menu-sublink { transition: color 180ms ease, text-decoration-color 180ms ease; }
  .narrix-menu-sublink:hover { color: #9acbff; text-decoration-color: currentColor; }
}
@media (max-width: 768px) {
  .narrix-menu-item--has-children { --narrix-menu-row-gap: 12px; }
  .narrix-menu-item--has-children .narrix-menu-link { min-height: 0; padding-top: 18px; padding-bottom: 0; }
  .narrix-menu-sublinks {
    margin: var(--narrix-menu-row-gap) 0 28px 44px;
    column-gap: 20px;
    row-gap: var(--narrix-menu-row-gap);
  }
  .narrix-menu-sublinks > li { display: flex; }
  .narrix-menu-sublink { min-height: 0; padding: 0; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .narrix-menu-sublink { transition: none; }
}
@media (forced-colors: active) {
  .narrix-menu-sublink { text-decoration-color: LinkText; }
  .narrix-menu-sublink:focus-visible, .narrix-menu-link:focus-visible { outline-color: Highlight; }
}

.narrix-menu-sublink[aria-current] { color: var(--narrix-menu-blue); text-decoration-color: currentColor; }

/* The menu panel receives initial pointer focus; links retain keyboard focus cues. */
.narrix-menu-panel:focus { outline: none; }
/* Footer WhatsApp icon is now a native button opening this contact chooser. */
.footer-social-link[data-modal-target="partner-contact"] {
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
  padding: 0;
  font: inherit;
  line-height: 1;
  cursor: pointer;
}

/* Contact only. Other dialogs retain their original overlay and appearance. */
.modal-overlay:has(.narrix-contact:not([hidden])) {
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  padding: max(20px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  align-items: center;
}
#modal-partner-contact.narrix-contact {
  color-scheme: light;
  max-height: calc(100svh - 40px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  background: #fafbfc;
  border: 1px solid #fff;
  border-radius: 24px;
  box-shadow: 0 24px 64px -20px rgba(0, 0, 0, .5), 0 0 0 1px rgba(23, 42, 64, .12);
  color: #142131;
  text-align: left;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #a8b3bf #fafbfc;
}
.narrix-contact .nc-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid #dce2e8;
  border-radius: 50%;
  color: #4c5b6d;
  background: #fff;
  transition: background 180ms ease, color 180ms ease;
}
.narrix-contact svg { width: 24px; height: 24px; }
.narrix-contact .nc-close svg { width: 19px; height: 19px; }
.narrix-contact .nc-eyebrow {
  margin: 0 40px 24px 0;
  color: #286aba;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  line-height: 1.6;
}
.narrix-contact .nc-title {
  margin: 0;
  color: #142131;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -.055em;
  line-height: 1.18;
}
.narrix-contact .nc-title span { color: #2874cf; }
.narrix-contact .nc-intro { margin: 20px 0 28px; color: #526173; font-size: 15px; line-height: 1.7; }
.narrix-contact .nc-actions { display: grid; gap: 10px; }
.narrix-contact .nc-action {
  display: flex;
  align-items: center;
  min-height: 84px;
  border: 1px solid #dce2e8;
  border-radius: 12px;
  background: #fff;
  color: #142131;
  text-decoration: none;
  transition: border-color 180ms ease, background 180ms ease;
}
.narrix-contact .nc-action--primary { background: #2269bd; color: #fff; border-color: #2269bd; }
.narrix-contact .nc-icon { flex: 0 0 24px; }
.narrix-contact .nc-action-copy { display: grid; min-width: 0; gap: 3px; }
.narrix-contact .nc-action strong { font-weight: 700; line-height: 1.4; }
.narrix-contact .nc-action small { color: #526173; font-size: 12px; line-height: 1.5; }
.narrix-contact .nc-action--primary small { color: #fff; }
.narrix-contact .nc-arrow { margin-left: auto; flex-shrink: 0; transition: transform 180ms ease; }
.narrix-contact .nc-arrow svg { width: 20px; height: 20px; }
.narrix-contact .nc-footer { margin-top: 32px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 20px; border-top: 1px solid #dce2e8; color: #526173; font-size: 11px; }
.narrix-contact :is(a, button):focus-visible { outline: 3px solid #125ab3; outline-offset: 4px; }
@media (hover: hover) and (pointer: fine) {
  .narrix-contact .nc-close:hover { background: #eaf1f9; color: #142131; }
  .narrix-contact .nc-action:hover { border-color: #2874cf; background: #f0f5fb; }
  .narrix-contact .nc-action--primary:hover { background: #1859a3; border-color: #1859a3; }
  .narrix-contact .nc-action:hover .nc-arrow { transform: translateX(3px); }
}
@media (max-width: 600px) {
  #modal-partner-contact.narrix-contact { border-radius: 20px; }
  .narrix-contact .nc-eyebrow { font-size: 9px; margin-bottom: 24px; }
  .narrix-contact .nc-intro { font-size: 13px; margin: 18px 0 24px; }
  .narrix-contact .nc-action { min-height: 80px; }
  .narrix-contact .nc-action small { font-size: 11px; }
  .narrix-contact .nc-footer { margin-top: 24px; font-size: 10px; gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  #modal-partner-contact.narrix-contact, .narrix-contact *, .modal-overlay:has(.narrix-contact:not([hidden])) { transition: none; transform: none; }
}
@media (forced-colors: active) {
  #modal-partner-contact.narrix-contact, .narrix-contact .nc-action, .narrix-contact .nc-close { border: 1px solid CanvasText; }
  .narrix-contact :is(a, button):focus-visible { outline-color: Highlight; }
}

/* FKF footer: shared contact link, original heading and social icons. */
.footer-outro--contact-link .footer-contact-action { margin: 0 0 36px; }
.footer-outro--contact-link .footer-socials { margin-top: 0; }
@media (max-width: 600px) {
  .footer-outro--contact-link .footer-contact-action { margin-bottom: 30px; }
}


/* One shared two-column contact modal, with quiet underline fields. */
#modal-partner-contact.narrix-contact { width: min(1040px, 100%); padding: 48px; overflow-y: auto; }
.narrix-contact .nc-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.narrix-contact .nc-contact-side { min-width: 0; }
.narrix-contact .nc-form-side { min-width: 0; padding-left: 40px; border-left: 1px solid #e2e6eb; display: flex; flex-direction: column; }
.narrix-contact .nc-title { font-size: clamp(30px, 3.5vw, 44px); }
.narrix-contact .nc-actions { margin-top: 28px; }
.narrix-contact .nc-action { padding: 16px; gap: 12px; }
.narrix-contact .nc-action strong { font-size: 14px; }
.narrix-contact .nc-note { color: #526173; font-size: 11px; margin: 28px 0 0; }
.narrix-contact .nc-form { display: grid; gap: 24px; margin: 0; }
.narrix-contact .nc-form[hidden], .narrix-contact .nc-thanks[hidden] { display: none; }
.narrix-contact .nc-form-title { margin: 0 0 8px; color: #142131; font-size: 22px; font-weight: 600; letter-spacing: -.04em; }
.narrix-contact .nc-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.narrix-contact .nc-field { position: relative; display: block; color: #344457; font-size: 13px; font-weight: 400; line-height: 1.5; }
.narrix-contact .nc-field-label { position: absolute; top: 18px; left: 0; max-width: 100%; color: #526173; font-size: 13px; line-height: 1.5; pointer-events: none; transform-origin: left top; transition: transform 160ms ease, color 160ms ease; }
.narrix-contact .nc-field-label small { color: #667587; font-size: 11px; margin-left: 6px; }
.narrix-contact .nc-field :is(input, textarea):focus + .nc-field-label,
.narrix-contact .nc-field :is(input, textarea):not(:placeholder-shown) + .nc-field-label { transform: translateY(-15px) scale(.85); color: #344457; }
.narrix-contact .nc-field input:autofill + .nc-field-label { transform: translateY(-15px) scale(.85); }
.narrix-contact .nc-field input:-webkit-autofill + .nc-field-label { transform: translateY(-15px) scale(.85); }
.narrix-contact .nc-field :is(input, textarea) { box-sizing: border-box; display: block; width: 100%; margin: 0; padding: 26px 0 9px; border: 0; border-bottom: 1px solid #b9c3cf; border-radius: 0; background: transparent; color: #142131; font: inherit; font-size: 16px; font-weight: 400; line-height: 1.5; box-shadow: none; }
.narrix-contact .nc-field textarea { min-height: 122px; resize: vertical; }
.narrix-contact .nc-field ::placeholder { color: #6b7887; opacity: 1; font-size: 13px; }
.narrix-contact .nc-field :is(input, textarea):focus-visible { outline: 2px solid #2269bd; outline-offset: 4px; }
.narrix-contact .nc-privacy { margin: 0; font-size: 10px; line-height: 1.7; color: #526173; }
.narrix-contact .nc-privacy a { color: inherit; text-underline-offset: 3px; }
.narrix-contact .nc-submit { justify-self: end; display: inline-flex; align-items: center; justify-content: center; gap: 18px; min-height: 46px; padding: 12px 18px; border: 0; border-radius: 8px; background: #142131; color: #fff; font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; }
.narrix-contact .nc-submit:hover { background: #2269bd; }
.narrix-contact .nc-submit:disabled { opacity: .65; cursor: wait; }
.narrix-contact .nc-status { margin: 0; color: #9b3232; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.narrix-contact .nc-status:empty { display: none; }
.narrix-contact .nc-trap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.narrix-contact .nc-thanks { margin: auto 0; padding: 30px 0; }
.narrix-contact .nc-thanks .nc-submit { display: flex; width: fit-content; max-width: 100%; margin: 28px auto 0; }
.narrix-contact .nc-thanks-mark { color: #2269bd; font-size: 32px; }
.narrix-contact .nc-thanks h3 { font-size: 28px; line-height: 1.2; letter-spacing: -.04em; font-weight: 500; }
.narrix-contact .nc-thanks p { font-size: 14px; color: #526173; line-height: 1.7; margin-bottom: 28px; }
@media (max-width: 760px) {
  #modal-partner-contact.narrix-contact { width: min(540px, 100%); padding: 36px 24px 24px; }
  .narrix-contact .nc-layout { grid-template-columns: 1fr; gap: 30px; }
  .narrix-contact .nc-fields { grid-template-columns: 1fr; gap: 24px; }
  .narrix-contact .nc-form-side { padding: 28px 0 0; border-left: 0; border-top: 1px solid #e2e6eb; }
  .narrix-contact .nc-title { font-size: 30px; }
  .narrix-contact .nc-thanks { padding: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .narrix-contact .nc-field-label { transition: none; }
}

.case-inline-film { margin:clamp(30px,5vw,54px) 0; }
.case-inline-film .episode-player { width:100%; }
.case-inline-film .case-video-tools { position:static; margin:12px 0 0; }
.case-inline-film figcaption { margin:12px 0 0; color:var(--text-soft); font-size:.8rem; text-align:center; }
.case-video-panel video { display:block; width:100%; height:100%; object-fit:contain; }
.case-feature-description {max-width:820px;margin:0 auto;color:var(--text-soft);}

/* Narrix — shared gallery: hub, home, and individual cases. */
.case-module {
  position: relative;
  padding: clamp(44px, 5vw, 72px) 0;
  background: var(--bg, #050505);
}

.case-module--showcase { padding-top: 0; background: #000; }

/* Only the case-study hub: make the existing dark layer a little lighter. */
/* Hub only: clearer footage, with a local shadow protecting contact text. */
.page-case-hub .footer-outro .outro-video-overlay { opacity: 0.6; }
.page-case-hub .footer-outro .outro-video-bg {
  opacity: 0.84;
  filter: saturate(0.86) contrast(1.08) brightness(0.82);
}
.page-case-hub .footer-outro .footer-outro-content {
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.95), 0 8px 28px rgba(0, 0, 0, 0.9);
}
.page-case-hub .footer-outro .footer-copy {
  text-shadow: 0 2px 5px #000, 0 4px 16px #000;
}

.case-module-container {
  width: min(calc(100% - 44px), var(--container-wide, 1180px));
  margin-inline: auto;
}

.case-module-heading {
  margin: 0 0 28px;
  color: var(--text-faint, #7a8594);
  font-family: var(--font-display);
  font-size: var(--type-label, 0.72rem);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.18em;
  text-align: center;
}

/* Match the existing offer-card title "Reklamy AI i wideo". */
.case-module-heading--showcase {
  margin-bottom: 28px;
  color: #fff;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: normal;
}

.case-module-all { margin: 12px 0 0; text-align: center; }

/* Match the existing "zobacz więcej" action: underline the label, not the arrow. */
.case-module-all .ui-text-cta.ui-text-cta.ui-text-cta {
  min-height: 44px;
  gap: 8px;
  padding: 0;
  border-bottom: 0;
  color: var(--brand);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 0.08em;
  text-transform: lowercase;
}

.case-module-all .ui-text-cta.ui-text-cta.ui-text-cta > span {
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(59, 140, 235, 0.3);
}

.case-module-all .ui-text-cta.ui-text-cta.ui-text-cta svg {
  width: 16px;
  height: 16px;
  flex-basis: 16px;
}

.case-module-all .ui-text-cta.ui-text-cta.ui-text-cta:hover,
.case-module-all .ui-text-cta.ui-text-cta.ui-text-cta:focus-visible {
  color: var(--brand-hover);
}

.case-module-all .ui-text-cta.ui-text-cta.ui-text-cta:hover > span,
.case-module-all .ui-text-cta.ui-text-cta.ui-text-cta:focus-visible > span {
  border-bottom-color: currentColor;
}

.case-gallery {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: clamp(250px, 25vw, 320px);
  gap: 8px;
  padding: 0;
}

.case-tile {
  position: relative;
  display: flex;
  grid-column: span 4;
  min-width: 0;
  align-items: flex-end;
  isolation: isolate;
  overflow: hidden;
  border-radius: var(--radius-md, 12px);
  background: #0c1016;
  color: #fff;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.case-tile:nth-child(9n + 1),
.case-tile:nth-child(9n + 7) { grid-column: span 7; }
.case-tile:nth-child(9n + 2),
.case-tile:nth-child(9n + 6) { grid-column: span 5; }
.case-tile:nth-child(9n + 8),
.case-tile:nth-child(9n + 9) { grid-column: span 6; }

/* The same six-card composition on the home page and every individual case. */
@media (min-width: 981px) {
  [data-case-context="showcase"] .case-tile:nth-child(6) { grid-column: 1 / -1; }
}

.case-tile::after {
  content: '';
  position: absolute;
  z-index: 3;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: inherit;
  pointer-events: none;
  transition: border-color 240ms ease;
}

.case-tile-visual {
  position: absolute;
  z-index: -2;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
}

.case-tile-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: translate3d(0, var(--case-drift, 0px), 0) scale(var(--case-zoom, 1.08));
}

.case-tile::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.025) 15%, rgba(0, 0, 0, 0.1) 38%, rgba(0, 0, 0, 0.69) 73%, rgba(0, 0, 0, 0.93) 100%);
  pointer-events: none;
}

/* Existing body typography: calm white labels across every gallery. */
.case-tile-title {
  min-width: 0;
  max-width: 32ch;
  margin: 0;
  padding: clamp(18px, 2vw, 26px);
  color: #fff;
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.3vw, 1.2rem);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: normal;
  text-wrap: pretty;
  overflow-wrap: break-word;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
  transition: transform 420ms var(--ease-cinematic, ease);
}

/* Opt in only after this gallery's observer has been installed. */
[data-case-gallery-motion] .case-tile {
  transition: opacity 760ms ease, transform 900ms cubic-bezier(0.16, 1, 0.3, 1), clip-path 1000ms cubic-bezier(0.16, 1, 0.3, 1);
}

[data-case-gallery-motion] .case-tile:not(.is-case-visible) {
  opacity: 0;
  transform: translate3d(0, 46px, 0);
  clip-path: inset(8% 0 0 round 12px);
}

[data-case-gallery-motion] .case-tile.is-case-visible {
  opacity: 1;
  transform: none;
  clip-path: inset(0 round 12px);
  transition-delay: var(--case-delay, 0ms);
}

.case-tile:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 5px;
}

.case-tile:focus-visible::after { border-color: var(--brand-hover); }

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .case-tile-image { transition: transform 900ms cubic-bezier(0.16, 1, 0.3, 1); }
  .case-tile:hover { --case-zoom: 1.13; }
  .case-tile:hover::after { border-color: rgba(139, 195, 255, 0.7); }
  .case-tile:hover .case-tile-title { transform: translate3d(0, -4px, 0); }
}

@media (max-width: 980px) {
  .case-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: clamp(260px, 34vw, 330px);
    gap: 8px;
  }
  .case-gallery .case-tile { grid-column: span 1; }
  .case-gallery .case-tile:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .case-gallery .case-tile-title { padding: 20px; font-size: 1.05rem; }
}

@media (max-width: 700px) {
  .case-module-container { width: calc(100% - 32px); }
}

@media (max-width: 768px) {
  .case-module-heading--showcase { font-size: 1.2rem; }
}

@media (max-width: 600px) {
  .case-gallery {
    grid-template-columns: minmax(0, 1fr);
    grid-auto-rows: auto;
    gap: 8px;
  }
  .case-gallery .case-tile {
    grid-column: 1;
    width: 100%;
    aspect-ratio: 1.3 / 1;
    min-height: 0;
  }
  .case-gallery .case-tile-title { padding: 20px; font-size: 1.05rem; }
}

@media (prefers-reduced-motion: reduce) {
  .case-gallery .case-tile,
  .case-gallery .case-tile-title,
  .case-gallery .case-tile-image {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
    transition: none !important;
  }
}

@media (forced-colors: active) {
  .case-tile { border: 1px solid CanvasText; }
  .case-tile-title { background: Canvas; color: CanvasText; text-shadow: none; }
}

/* Current case retains its position and image, with no link or preview. */
.case-tile--current { cursor: default; }
.case-tile--current:hover { --case-zoom: 1.08; }
.case-tile--current:hover::after { border-color: rgba(255,255,255,.11); }
.case-tile--current:hover .case-tile-title { transform: none; }
.case-tile-language { font-size: .7em; margin-inline-start: .5em; opacity: .8; }
/* One showcase geometry and motion on home, offer and case pages. */
.case-module--showcase .case-module-container { width: min(1180px, calc(100% - clamp(16px, 2.2vw, 28px) * 2)); }
html:not([data-home-page]) [data-case-context="showcase"] .case-tile-image { transition: transform 650ms cubic-bezier(.22,.7,.22,1); }
html:not([data-home-page]) [data-case-context="showcase"][data-case-gallery-motion] .case-tile { clip-path: none; transition: opacity 500ms ease, transform 650ms cubic-bezier(.22,.7,.22,1); }
html:not([data-home-page]) [data-case-context="showcase"][data-case-gallery-motion] .case-tile:not(.is-case-visible) { transform: translate3d(0,18px,0); }
@media (max-width: 900px) {
  html:not([data-home-page]) [data-case-context="showcase"][data-case-gallery-motion] .case-tile { transform: none; transition: opacity 240ms ease; }
  html:not([data-home-page]) [data-case-context="showcase"] .case-tile-image { transform: none; transition: none; }
}
@media (prefers-reduced-motion: reduce) {
  html:not([data-home-page]) [data-case-context="showcase"] .case-tile,
  html:not([data-home-page]) [data-case-context="showcase"] .case-tile-image { transition: none !important; }
}

/* Desktop labels use the available card width; compact layouts retain their existing limits. */
@media (min-width: 981px) {
  .case-gallery .case-tile-title { max-width: 100%; text-wrap: wrap; }
}
/* Subpages share the homepage's section rhythm; focus styling remains intact. */
:root:not([data-home-page]) {
  --subpage-section-gap: clamp(72px, 7.1vw, 104px);
  --subpage-heading-gap: clamp(32px, 3.6vw, 48px);
  --subpage-gutter: clamp(16px, 2.2vw, 28px);
}
html:not([data-home-page]) .page-premium-proof { --proof-section-gap: var(--subpage-section-gap); --proof-gutter: var(--subpage-gutter); }
html:not([data-home-page]) .page-premium-scaled-proof { --scaled-proof-gap: var(--subpage-section-gap); --scaled-proof-gutter: var(--subpage-gutter); }
html:not([data-home-page]) .case-module-heading--showcase { margin-bottom: var(--subpage-heading-gap); }
@media (max-width: 900px) {
  :root:not([data-home-page]) { --subpage-section-gap: 64px; --subpage-heading-gap: 32px; }
}
/* Shared mobile outros. Opt-in classes keep offer-specific endings and desktop intact.
   Maintain this source, then rebuild HOME with maintenance/build-home.py. */
.footer-mobile-break { display: none; }

@media (max-width: 768px) {
  /* No viewport-height sizing: short phones and tall phones use the same rhythm.
     min-height is only a floor; wrapping and enlarged text can grow the footer. */
  body footer.footer-mobile:is(.footer-outro, .patron-outro) {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: auto;
    min-height: 460px;
    max-height: none;
    margin: 0;
    padding: 72px 20px max(24px, env(safe-area-inset-bottom, 0px));
    text-align: center;
  }

  body footer.footer-mobile:is(.footer-outro, .patron-outro) > :is(.footer-outro-content, .patron-outro-inner) {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 28px;
    width: 100%;
    max-width: 560px;
    min-width: 0;
    margin: 0;
    padding: 0;
    text-align: center;
  }

  body footer.footer-mobile:is(.footer-outro, .patron-outro) :is(h2, .footer-outro-heading) {
    width: 100%;
    max-width: 100%;
    margin: 0;
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.055em;
    text-transform: uppercase;
    text-wrap: balance;
    overflow-wrap: anywhere;
  }

  body footer.footer-mobile.footer-mobile--conversation :is(h2, .footer-outro-heading) {
    font-size: clamp(1.375rem, 6.6vw, 2.5rem);
  }

  body footer.footer-mobile.footer-mobile--production :is(h2, .footer-outro-heading) {
    font-size: clamp(2rem, 9vw, 3rem);
  }

  .footer-mobile-break { display: initial; }

  body footer.footer-mobile:is(.footer-outro, .patron-outro) :is(.footer-contact-action, .premium-final-actions--footer) {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    width: 100%;
    margin: 0;
    padding: 0;
  }

  body footer.footer-mobile:is(.footer-outro, .patron-outro) :is(.ui-text-cta, .offer-contact-cta, .pearl-cta) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-width: 0;
    max-width: 100%;
    min-height: 44px;
    margin: 0;
    padding: 8px 0;
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0.055em;
    text-align: center;
    text-transform: uppercase;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  body footer.footer-mobile:is(.footer-outro, .patron-outro) :is(.ui-text-cta, .offer-contact-cta, .pearl-cta) svg {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
  }

  body footer.footer-mobile:is(.footer-outro, .patron-outro) .footer-socials {
    gap: 14px;
    margin: 0;
  }

  body footer.footer-mobile:is(.footer-outro, .patron-outro) .footer-social-link {
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
  }

  body footer.footer-mobile:is(.footer-outro, .patron-outro) .footer-social-link svg {
    width: 30px;
    height: 30px;
  }

  /* Keep legal/return links in flow so they cannot overlap enlarged content. */
  body footer.footer-mobile:is(.footer-outro, .patron-outro) > :is(.footer-copy, .patron-home-seo-link) {
    position: relative;
    inset: auto;
    z-index: 3;
    width: 100%;
    max-width: 560px;
    margin: 48px 0 0;
    transform: none;
    text-align: center;
  }
}
/* The existing still stays underneath throughout loading, playback and errors. */
[data-case-context="showcase"] .home-case-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  opacity: 0;
  transform: translate3d(0, var(--case-drift, 0px), 0) scale(var(--case-zoom, 1.08));
  transition: opacity 220ms ease, transform 900ms cubic-bezier(0.16, 1, 0.3, 1);
}
@media (min-width: 901px) and (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  [data-case-context="showcase"] .is-preview-playing .home-case-preview { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  [data-case-context="showcase"] .home-case-preview { transition: none; }
}

/* Two introductory reels, scoped to the curated homepage only. */
.case-gallery--reels .case-tile--portrait { cursor: default; }
.case-gallery--reels .case-tile--portrait .case-tile-title { width: 100%; max-width: 100%; }
@media (min-width: 981px) {
  .case-gallery--reels { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: auto; }
  .case-gallery--reels > .case-tile { grid-column: span 1; min-height: clamp(250px, 25vw, 320px); }
  .case-gallery--reels > .case-tile:last-child { grid-column: 1 / -1; }
}
@media (max-width: 980px) {
  .case-gallery--reels { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: auto; }
  .case-gallery--reels .case-tile { grid-column: 1 / -1; aspect-ratio: 1.3 / 1; min-height: 0; }
  .case-gallery--reels .case-tile--portrait { grid-column: span 1; aspect-ratio: 9 / 16; }
}

/* Independent first row; three cards below it, then one full-width card. */
.case-reels-row { display: contents; }
@media (min-width: 981px) {
  .case-gallery--reels .case-reels-row {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: 27fr 27fr 64fr;
    grid-template-rows: minmax(0, 1fr);
    aspect-ratio: 118 / 39;
    align-items: stretch;
    gap: 8px;
  }
  .case-gallery--reels .case-reels-row > .case-tile {
    grid-column: auto;
    min-height: 0;
    height: 100%;
    aspect-ratio: auto;
  }

}
/* Five related cases: exclude the current case before limiting the home selection. */
.case-related-row { display: contents; }
.case-gallery--related-reels .case-tile--portrait { cursor: default; }
.case-gallery--related-reels .case-tile--portrait .case-tile-title { width: 100%; max-width: 100%; }
@media (min-width: 981px) {
  .case-gallery--related-reels { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: auto; }
  .case-gallery--related-reels > .case-tile { grid-column: span 1; min-height: clamp(250px, 25vw, 320px); }
  .case-gallery--related-reels .case-related-row {
    display: grid; grid-column: 1 / -1;
    grid-template-columns: 27fr 27fr 64fr;
    grid-template-rows: minmax(0, 1fr);
    aspect-ratio: 118 / 39; gap: 8px;
  }
  .case-gallery--related-reels .case-related-row > .case-tile { grid-column: auto; min-height: 0; height: 100%; aspect-ratio: auto; }
}
@media (max-width: 980px) {
  .case-gallery--related-reels { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: auto; }
  .case-gallery--related-reels .case-tile { grid-column: 1 / -1; aspect-ratio: 1.3 / 1; min-height: 0; }
  .case-gallery--related-reels .case-tile--portrait { grid-column: span 1; aspect-ratio: 9 / 16; }
}

/* The Rogale case excludes its own portrait, leaving one portrait and four
   landscape selections. Keep the same five-card system without compressing
   a 16:9 film preview into the second portrait slot. */
@media (min-width: 981px) {
  .case-gallery--related-reels[data-case-current="fkf-rogale"] .case-related-row,
  .case-gallery--related-reels[data-case-current="fkf-lech"] .case-related-row {
    grid-template-columns: minmax(0, 30.5fr) minmax(0, 69.5fr);
    grid-template-rows: repeat(2, minmax(0, 1fr));
    aspect-ratio: 118 / 64;
  }
  .case-gallery--related-reels[data-case-current="fkf-rogale"] .case-related-row > .case-tile:first-child,
  .case-gallery--related-reels[data-case-current="fkf-lech"] .case-related-row > .case-tile:first-child {
    grid-column: 1; grid-row: 1 / 3;
  }
  .case-gallery--related-reels[data-case-current="fkf-rogale"] .case-related-row > .case-tile:nth-child(2),
  .case-gallery--related-reels[data-case-current="fkf-lech"] .case-related-row > .case-tile:nth-child(2) {
    grid-column: 2; grid-row: 1;
  }
  .case-gallery--related-reels[data-case-current="fkf-rogale"] .case-related-row > .case-tile:nth-child(3),
  .case-gallery--related-reels[data-case-current="fkf-lech"] .case-related-row > .case-tile:nth-child(3) {
    grid-column: 2; grid-row: 2;
  }
}
@media (max-width: 980px) {
  .case-gallery--related-reels[data-case-current="fkf-rogale"] .case-tile--portrait,
  .case-gallery--related-reels[data-case-current="fkf-lech"] .case-tile--portrait {
    grid-column: 1 / -1;
    width: min(320px, 100%);
    justify-self: center;
  }
}

/* Match the portrait hook on phones; keep tablet and desktop layouts. */
@media (max-width: 640px) {
  .case-gallery.case-gallery--related-reels .case-tile--portrait {
    grid-column: 1 / -1;
    width: 100%;
    aspect-ratio: 4 / 5;
  }
}
/* Portrait hooks: local 3:4 teaser with blurred sides; full film opens at 9:16.
   Home and gallery previews retain their own styles and playback behavior. */
.case-study-hook .case-portrait-hook {
  --portrait-poster: url('/assets/img/fkf-rogale-original-720.webp');
  display: grid;
  place-items: center;
  isolation: isolate;
  aspect-ratio: 16 / 9;
  background: #070707;
}

/* One static poster supplies the wide blurred sides: never a second video. */
.case-portrait-hook::before {
  content: '';
  position: absolute;
  z-index: 0;
  inset: -6%;
  background: #0a0a0a var(--portrait-poster) center / cover no-repeat;
  filter: blur(clamp(24px, 3.5vw, 52px)) brightness(.58) saturate(.86);
  transform: scale(1.035);
  pointer-events: none;
}

.case-portrait-hook::after {
  content: '';
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,.32), transparent 24%, transparent 76%, rgba(0,0,0,.32));
  pointer-events: none;
}

.case-portrait-hook .case-portrait-back[hidden],
.case-portrait-hook .case-portrait-final-player[hidden] { display: none !important; }

.case-portrait-stage,
.case-portrait-final-player {
  position: relative;
  z-index: 2;
  height: 100%;
  max-width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #080808;
  box-shadow: 0 0 32px rgba(0,0,0,.25);
}

.case-portrait-poster,
.case-portrait-front {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}

/* The poster stays visible until an actual video frame is available. */
.case-portrait-front {
  opacity: 0;
  pointer-events: none;
  transition: opacity .24s ease;
}
.case-portrait-hook.is-portrait-playing .case-portrait-front { opacity: 1; }

/* Future player: preserve the same 3:4 framing but do not crop its controls. */
.case-portrait-hook[data-portrait-mode='player'] .case-portrait-front {
  opacity: 1;
  pointer-events: auto;
  object-fit: contain;
}
.case-portrait-final-player .case-video-panel,
.case-portrait-final-player iframe {
  width: 100%;
  height: 100%;
}

@media (max-width: 640px) {
  .case-study-hook .case-portrait-hook { aspect-ratio: 4 / 5; }
  .case-portrait-hook::before { filter: blur(28px) brightness(.56) saturate(.86); }
  .case-portrait-stage, .case-portrait-final-player { height: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .case-portrait-front { transition: none; }
}

/* Play sits above the lightweight local teaser. */
.case-portrait-trigger .case-video-play { z-index: 3; }

/* The portrait film reuses the shared modal engine; other dialogs keep their styles. */
.modal-overlay:has(> .portrait-film-modal:not([hidden])) {
  --portrait-room: calc(100svh - 116px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  padding: calc(16px + env(safe-area-inset-top, 0px)) calc(16px + env(safe-area-inset-right, 0px)) calc(16px + env(safe-area-inset-bottom, 0px)) calc(16px + env(safe-area-inset-left, 0px));
  background: rgba(0, 0, 0, .95);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  overscroll-behavior: contain;
}
.modal-content.portrait-film-modal {
  display: grid;
  gap: 8px;
  width: min(520px, 100%, max(200px, calc(var(--portrait-room, 75svh) * 9 / 16)));
  max-height: none;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: center;
  transform: translateY(6px);
}
.portrait-film-modal[hidden] { display: none; }
.portrait-film-toolbar { display: flex; justify-content: flex-end; height: 40px; }
.portrait-film-close {
  display: grid; place-items: center;
  width: 40px; height: 40px; padding: 8px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 50%;
  background: rgba(255, 255, 255, .035);
  color: var(--text, #fff); cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease;
}
.portrait-film-close svg { width: 22px; height: 22px; }
.portrait-film-close:hover { color: var(--brand); border-color: var(--brand); }
.portrait-film-close:focus-visible, .portrait-film-external:focus-visible {
  outline: 2px solid var(--brand); outline-offset: 4px;
}
.portrait-film-frame {
  position: relative;
  width: 100%; aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: 0;
  background: #000;
  box-shadow: none;
}
.portrait-film-frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.portrait-film-external {
  justify-self: center;
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 28px;
  color: var(--text-muted, #b8c0cc);
  font-size: .75rem; line-height: 1.4;
  text-decoration: none;
}
.portrait-film-external:hover { color: var(--brand); }
.portrait-film-error { margin: 0; color: var(--text-muted); font-size: .8rem; }
/* Very short landscape windows may scroll the overlay while keeping controls usable. */
@media (max-height: 480px) {
  .modal-overlay:has(> .portrait-film-modal:not([hidden])) { align-items: start; }
}
@media (prefers-reduced-motion: reduce) {
  .modal-content.portrait-film-modal { transition: none; transform: none; }
}

/* Compact hook: fill the preview frame; crop only the local teaser, never embeds. */
@media (max-width: 640px) {
  .case-portrait-hook .case-portrait-stage {
    width: 100%; height: 100%; aspect-ratio: auto;
  }
  .case-portrait-hook .case-portrait-front,
  .case-portrait-hook .case-portrait-poster { object-fit: cover; }
}

/* Facebook SDK owns the embed height: video + actual post + counters. */
.modal-content.portrait-film-modal--social {
  width: min(400px, 100%, max(240px, calc((var(--portrait-room, 75svh) - 140px) * 9 / 16)));
}
.modal-overlay:has(> .portrait-film-modal--social:not([hidden])) {
  align-items: start;
  overflow-y: auto;
}
.portrait-film-modal--social .portrait-film-frame {
  aspect-ratio: auto;
  height: auto;
  min-height: 0;
  padding: 0;
  overflow: visible;
  background: transparent;
}
.portrait-film-modal--social .portrait-film-frame iframe {
  display: block;
  position: static;
  border: 0;
  /* Inline pixel dimensions supplied by Facebook take precedence. */
}

/* Instagram provides the post height via MEASURE; never crop the social UI. */
.modal-content.portrait-film-modal--instagram {
  width: min(400px, 100%);
}