/* Filmowa Kronika Fyrtli — episode hub */
.page-hub {
  background: radial-gradient(circle at 50% 34%, rgba(59, 140, 235, 0.045), transparent 35rem), var(--bg);
}

.hub-hero {
  position: relative;
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  place-items: center;
  overflow: hidden;
  background: #000;
  text-align: center;
  isolation: isolate;
}

.hub-hero-video,
.hub-hero-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hub-hero-video {
  z-index: -4;
  object-fit: cover;
  object-position: center;
  opacity: 0.78;
  filter: saturate(0.84) contrast(1.08) brightness(0.74);
}

.hub-hero-overlay {
  z-index: -3;
  background: radial-gradient(circle at 50% 38%, rgba(59, 140, 235, 0.14), transparent 46%), linear-gradient(180deg, rgba(0, 0, 0, 0.46), rgba(0, 0, 0, 0.16) 44%, rgba(5, 5, 5, 0.42) 78%, var(--bg)), linear-gradient(90deg, rgba(0, 0, 0, 0.34), rgba(0, 0, 0, 0.03) 50%, rgba(0, 0, 0, 0.34));
}

.hub-hero::after {
  content: '';
  position: absolute;
  inset: auto 0 -1px;
  z-index: 1;
  height: min(34vh, 320px);
  background: linear-gradient(180deg, transparent, rgba(5, 5, 5, 0.36) 48%, var(--bg));
  pointer-events: none;
}

.hub-hero-content {
  position: relative;
  z-index: 5;
  width: min(calc(100% - 40px), 1020px);
  margin-inline: auto;
  padding: 142px 0 112px;
  text-shadow: 0 18px 48px rgba(0, 0, 0, 0.92);
  transition: opacity 160ms linear, filter 180ms linear, transform 180ms linear;
}

.hub-hero-title {
  display: grid;
  gap: clamp(22px, 3vw, 32px);
  margin: 0;
}

.hub-hero-word {
  color: #f4f7fb;
  font-family: var(--font-display);
  font-size: clamp(3rem, 6.4vw, 5.9rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.055em;
  text-transform: uppercase;
  text-wrap: balance;
}

.hub-hero-subtitle {
  max-width: 860px;
  margin: 0 auto;
  color: #dce5ef;
  font-size: clamp(1rem, 1.55vw, 1.22rem);
  font-weight: 300;
  line-height: 1.68;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.hub-scroll-cue {
  margin-top: clamp(38px, 6vh, 68px);
}

.hub-section {
  position: relative;
  z-index: 4;
  padding: clamp(66px, 6.5vw, 98px) 0;
  background: var(--bg);
}

.hub-section + .hub-section {
  border-top: 1px solid rgba(255, 255, 255, 0.035);
}

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

/* Partner strip */
.hub-partners {
  padding-bottom: clamp(24px, 2.2vw, 34px);
  overflow: hidden;
}

.hub-partner-panel,
.hub-logo-slider {
  width: 100%;
  overflow: hidden;
}

.hub-logo-slider {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
}

.hub-logo-track {
  display: flex;
  width: max-content;
  animation: hub-logo-marquee 34s linear infinite;
  animation-delay: var(--loop-delay-34, -9000ms);
  will-change: transform;
}

.hub-logo-group {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: clamp(18px, 2.4vw, 32px);
  padding: 12px 0;
  padding-right: clamp(18px, 2.4vw, 32px);
}

.hub-logo {
  position: relative;
  display: flex;
  width: clamp(158px, 17vw, 210px);
  height: clamp(76px, 8.8vw, 102px);
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.012);
  pointer-events: none;
  user-select: none;
}


a.hub-logo {
  color: inherit;
  text-decoration: none;
  pointer-events: auto;
  cursor: pointer;
  transition: border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

a.hub-logo:hover,
a.hub-logo:focus-visible {
  border-color: rgba(59, 140, 235, 0.46);
  background: rgba(59, 140, 235, 0.055);
  transform: translateY(-2px);
}

a.hub-logo:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

.hub-logo-track:hover,
.hub-logo-track:focus-within {
  animation-play-state: paused;
}

.hub-logo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.07), transparent 64%);
  opacity: 0.22;
  pointer-events: none;
}

.hub-logo img {
  position: relative;
  z-index: 1;
  width: 94%;
  height: 86%;
  object-fit: contain;
  opacity: 0.94;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.38)) drop-shadow(0 0 14px rgba(255, 255, 255, 0.06));
  -webkit-user-drag: none;
}

.hub-logo--motionvfx img {
  width: 88%;
  height: 78%;
  opacity: 0.92;
  filter: invert(1) drop-shadow(0 10px 24px rgba(0, 0, 0, 0.38));
}

.hub-logo--muller img,
.hub-logo--lewiatan img,
.hub-logo--izol img,
.hub-logo--jpc img {
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.38));
}

@keyframes hub-logo-marquee {
  to { transform: translate3d(-50%, 0, 0); }
}

/* Episodes */
.hub-episodes {
  padding-top: clamp(12px, 1.2vw, 18px);
  border-top: 0;
  background: radial-gradient(circle at 18% 28%, rgba(59, 140, 235, 0.055), transparent 30rem), var(--bg);
}

.hub-episode-list {
  position: relative;
  max-width: 1080px;
  margin-inline: auto;
  padding-top: clamp(28px, 3vw, 42px);
}

.hub-episode-list::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 38px;
  height: 2px;
  border-radius: 999px;
  background: var(--brand);
  box-shadow: 0 0 18px rgba(59, 140, 235, 0.62);
  transform: translateX(-50%);
}

.hub-episode-row {
  position: relative;
  display: grid;
  grid-template-columns: clamp(70px, 8vw, 104px) minmax(170px, 300px) minmax(0, 1fr) 34px;
  gap: clamp(22px, 4vw, 54px);
  min-height: 214px;
  align-items: center;
  padding: clamp(30px, 4vw, 46px) clamp(4px, 1vw, 12px);
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: border-color 220ms ease, transform 220ms ease;
}

.hub-episode-row::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(90deg, rgba(59, 140, 235, 0.09), rgba(59, 140, 235, 0.025) 42%, transparent 78%);
  opacity: 0;
  transition: opacity 220ms ease;
  pointer-events: none;
}

.hub-episode-row[href]:hover,
.hub-episode-row[href]:focus-visible {
  border-color: rgba(59, 140, 235, 0.28);
  outline: none;
  transform: translateX(4px);
}

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

.hub-episode-index,
.hub-episode-poster,
.hub-episode-copy,
.hub-episode-arrow {
  position: relative;
  z-index: 2;
}

.hub-episode-index {
  align-self: start;
  padding-top: 2px;
  color: var(--brand);
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.2vw, 2.7rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.055em;
  text-shadow: 0 0 24px rgba(59, 140, 235, 0.18);
}

.hub-episode-poster {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-md);
  background: #000;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
}

.hub-episode-poster::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(59, 140, 235, 0.09), transparent 55%);
  pointer-events: none;
}

.hub-episode-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.8;
  filter: saturate(0.84) contrast(1.06);
  transition: opacity 360ms ease, transform 360ms ease;
}

.hub-episode-row[href]:hover .hub-episode-poster img,
.hub-episode-row[href]:focus-visible .hub-episode-poster img {
  opacity: 0.98;
  transform: scale(1.025);
}

.hub-episode-copy {
  display: grid;
  gap: 11px;
  min-width: 0;
}

.hub-episode-meta {
  color: var(--brand);
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hub-episode-title {
  margin: 0;
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.7vw, 2.45rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hub-episode-logline {
  max-width: 62ch;
  color: var(--cinema-text, var(--text-soft));
  font-size: clamp(0.96rem, 1.16vw, 1.06rem);
  font-weight: 300;
  line-height: 1.72;
  transition: color 160ms linear;
}

.hub-episode-arrow {
  justify-self: end;
  color: var(--brand);
  font-family: var(--font-display);
  font-size: 1.75rem;
  transition: transform 220ms ease;
}

.hub-episode-row[href]:hover .hub-episode-arrow,
.hub-episode-row[href]:focus-visible .hub-episode-arrow {
  transform: translateX(4px);
}

.hub-episode-row--demo,
.hub-episode-row--placeholder {
  cursor: default;
}

.hub-episode-row--placeholder .hub-episode-copy {
  opacity: 0.76;
}

.hub-episode-row--placeholder .hub-episode-index {
  color: rgba(59, 140, 235, 0.7);
}

.hub-episode-poster--placeholder {
  display: grid;
  place-items: center;
  color: rgba(244, 247, 251, 0.88);
  background: linear-gradient(135deg, rgba(59, 140, 235, 0.12), transparent 52%), repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.028) 0 1px, transparent 1px 22px), repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 22px), #07090c;
}

.hub-episode-poster--placeholder::after {
  background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.42)), radial-gradient(circle at 50% 48%, rgba(59, 140, 235, 0.13), transparent 56%);
}

.hub-placeholder-clapper {
  position: relative;
  z-index: 2;
  width: clamp(92px, 42%, 142px);
  height: auto;
  overflow: visible;
  color: rgba(244, 247, 251, 0.82);
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.52)) drop-shadow(0 0 18px rgba(59, 140, 235, 0.12));
  transform: rotate(-1.5deg);
}

.hub-placeholder-clapper__body,
.hub-placeholder-clapper__hinge,
.hub-placeholder-clapper__top {
  fill: rgba(4, 6, 9, 0.62);
  stroke: currentColor;
  stroke-width: 7;
  stroke-linejoin: round;
}

.hub-placeholder-clapper__stripe {
  fill: var(--brand);
  opacity: 0.88;
}

.hub-placeholder-clapper__line {
  fill: none;
  stroke: rgba(244, 247, 251, 0.72);
  stroke-width: 6;
  stroke-linecap: round;
}

.hub-episode-arrow--muted {
  color: rgba(116, 182, 255, 0.46);
  transform: none !important;
}

/* Final actions */
.hub-final {
  padding-top: clamp(28px, 3.5vw, 48px);
  padding-bottom: clamp(66px, 7vw, 98px);
}

.hub-final-panel {
  min-height: 0;
}

.hub-actions-label {
  margin: 0 0 12px;
  color: var(--text-faint);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hub-final-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.hub-action {
  position: relative;
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: center;
  padding: 16px 48px 16px 20px;
  overflow: hidden;
  border: 1px solid rgba(59, 140, 235, 0.46);
  border-radius: var(--radius-md);
  background: radial-gradient(circle at 88% 14%, rgba(59, 140, 235, 0.16), transparent 42%), rgba(255, 255, 255, 0.035);
  color: #edf5ff;
  font-family: var(--font-display);
  font-size: clamp(0.72rem, 1.2vw, 0.84rem);
  font-weight: 700;
  line-height: 1.38;
  letter-spacing: 0.055em;
  text-align: center;
  text-transform: uppercase;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.055);
  transition: transform 220ms ease, border-color 220ms ease, background-color 220ms ease, box-shadow 220ms ease;
}

.hub-action::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 18%, rgba(255, 255, 255, 0.075) 50%, transparent 82%);
  opacity: 0;
  transform: translateX(-70%);
  transition: opacity 220ms ease, transform 520ms ease;
  pointer-events: none;
}

.hub-action span,
.hub-action svg {
  position: relative;
  z-index: 1;
}

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

.hub-action:hover,
.hub-action:focus-visible {
  border-color: rgba(116, 182, 255, 0.88);
  background-color: rgba(59, 140, 235, 0.11);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.38), 0 0 28px rgba(59, 140, 235, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.09);
  outline: none;
  transform: translateY(-2px);
}

.hub-action:hover::before,
.hub-action:focus-visible::before {
  opacity: 1;
  transform: translateX(70%);
}

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

@media (max-width: 900px) {
  .hub-episode-row {
    grid-template-columns: 66px minmax(150px, 230px) minmax(0, 1fr) 28px;
    gap: 22px;
  }
}

@media (max-width: 700px) {
  .hub-hero-video {
    opacity: 0.76;
    filter: saturate(0.82) contrast(1.06) brightness(0.72);
  }

  .hub-hero-content {
    left: -2px;
    width: min(calc(100% - 32px), 1020px);
    padding: 126px 0 82px;
  }

  .hub-hero-word {
    font-size: clamp(2.65rem, 11.5vw, 4.25rem);
    line-height: 1;
  }

  .hub-hero-subtitle {
    font-size: 1rem;
    line-height: 1.68;
  }

  .hub-container {
    width: min(calc(100% - 32px), var(--container-wide));
  }

  .hub-section {
    padding: 58px 0;
  }

  .hub-partners {
    padding-bottom: 24px;
  }

  .hub-episodes {
    padding-top: 10px;
  }

  .hub-logo-group {
    gap: 18px;
    padding-right: 18px;
  }

  .hub-logo {
    width: 156px;
    height: 78px;
  }

  .hub-logo--motionvfx img {
    width: 86%;
    height: 76%;
  }

  .hub-episode-list {
    padding-top: 30px;
  }

  .hub-episode-list::before {
    width: 32px;
  }

  .hub-episode-row {
    grid-template-columns: 48px minmax(0, 1fr) 26px;
    gap: 18px 14px;
    min-height: 0;
    padding: 26px 4px;
  }

  .hub-episode-index {
    grid-column: 1;
    grid-row: 1 / span 2;
  }

  .hub-episode-poster {
    grid-column: 2 / 4;
    grid-row: 1;
  }

  .hub-episode-copy {
    grid-column: 2;
    grid-row: 2;
  }

  .hub-episode-arrow {
    grid-column: 3;
    grid-row: 2;
    align-self: end;
  }

  .hub-episode-meta {
    font-size: 0.64rem;
    letter-spacing: 0.13em;
  }

  .hub-episode-title {
    font-size: clamp(1.4rem, 7vw, 2rem);
  }

  .hub-episode-logline {
    font-size: 0.94rem;
    line-height: 1.66;
  }

  .hub-placeholder-clapper {
    width: clamp(96px, 38vw, 138px);
  }

  .hub-final {
    padding-top: 24px;
    padding-bottom: 64px;
  }

  .hub-final-actions {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .hub-action {
    min-height: 58px;
    padding: 13px 42px 13px 16px;
    font-size: 0.69rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hub-logo-track {
    animation: none !important;
  }

  .hub-logo-slider {
    overflow-x: auto;
    -webkit-mask-image: none;
    mask-image: none;
  }
}


/* 2026-08-04 hotfix: placeholder clapper from Narrix logo + hub-specific social image */
.hub-placeholder-logo-clapper {
  position: relative;
  z-index: 2;
  width: clamp(96px, 46%, 188px);
  height: auto;
  max-height: 76%;
  opacity: 0.52;
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.42));
  transform: rotate(-1.5deg);
  pointer-events: none;
  user-select: none;
}

@media (max-width: 680px) {
  .hub-placeholder-logo-clapper {
    width: clamp(90px, 48%, 164px);
  }
}

/* === 2026-08-04: human-facing placeholder — map of Poland === */
.hub-episode-poster--placeholder {
  display: block;
  background:
    linear-gradient(180deg, rgba(2, 5, 10, 0.08) 0%, rgba(2, 5, 10, 0.18) 58%, rgba(0, 0, 0, 0.38) 100%),
    url('/assets/img/fkf-placeholder-map.jpg?v=20260804map1') center center / 110% auto no-repeat,
    #05080d;
  border-color: rgba(116, 255, 195, 0.2);
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.38),
    inset 0 0 34px rgba(74, 219, 166, 0.08);
}

.hub-episode-poster--placeholder::after {
  background:
    linear-gradient(180deg, rgba(3, 7, 13, 0.02) 42%, rgba(0, 0, 0, 0.32) 100%),
    radial-gradient(circle at 50% 48%, transparent 42%, rgba(1, 5, 10, 0.2) 100%);
}

/* Supports both the current inline SVG and the earlier IMG placeholder markup. */
.hub-episode-poster--placeholder .hub-placeholder-logo-clapper {
  display: none !important;
}

.hub-series-intro {
  margin: clamp(28px, 3vw, 42px) auto 0;
  text-align: center;
}

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

.tutorial-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;
}

.page-hub .tutorial-related {
  padding-top: clamp(42px, 4.5vw, 66px);
  padding-bottom: clamp(70px, 7vw, 104px);
}

.page-hub .tutorial-related-title {
  width: min(100%, var(--container-wide));
  margin: 0 auto 20px;
  color: var(--text-faint);
  font-family: var(--font-display);
  font-size: var(--type-label);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.18em;
  text-align: center;
  text-transform: uppercase;
}

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

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

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

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

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

  .page-hub .tutorial-related {
    padding-top: 36px;
    padding-bottom: 72px;
  }

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