/* Narrix.studio homepage */
.lang-switch {
  position: absolute;
  top: 40px;
  right: 40px;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.lang-btn {
  color: #8d99aa;
  transition: color 180ms ease, text-shadow 180ms ease;
}

.lang-btn:hover { color: #fff; }
.lang-btn.active { color: var(--brand); text-shadow: 0 0 10px rgba(59, 140, 235, 0.4); }
.lang-sep { color: rgba(255, 255, 255, 0.22); font-weight: 300; }

.module-hero {
  position: relative;
  display: flex;
  min-height: 100vh;
  min-height: 100svh;
  align-items: center;
  justify-content: center;
  padding: clamp(108px, 14vh, 168px) 20px clamp(72px, 12vh, 118px);
  overflow: hidden;
  background: #000;
  text-align: center;
  isolation: isolate;
}

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

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

.hero-video-overlay {
  z-index: 1;
  background: radial-gradient(circle at 50% 36%, rgba(59, 140, 235, 0.1), transparent 46%), linear-gradient(180deg, rgba(5, 5, 5, 0.5), rgba(5, 5, 5, 0.22) 40%, rgba(5, 5, 5, 0.86)), linear-gradient(90deg, rgba(5, 5, 5, 0.44), rgba(5, 5, 5, 0.06) 50%, rgba(5, 5, 5, 0.44));
}

.module-hero::after {
  content: '';
  position: absolute;
  inset: auto 0 -1px;
  z-index: 2;
  height: clamp(68px, 7.5vh, 118px);
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.46) 48%, #000);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 4;
  left: 0;
  width: min(100%, 860px);
  margin-inline: auto;
  text-shadow: 0 16px 42px rgba(0, 0, 0, 0.92);
}

.hero-logo {
  width: 160px;
  height: auto;
  margin: 0 auto 40px;
  filter: drop-shadow(0 0 34px rgba(59, 140, 235, 0.3)) drop-shadow(0 12px 30px rgba(0, 0, 0, 0.72));
}

.hero-title {
  margin: 0 0 25px;
  color: #f2f6fb;
  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;
}

.hero-desc {
  max-width: 720px;
  margin: 0 auto;
  color: #d9e1ec;
  font-size: 1.1rem;
  font-weight: 300;
  line-height: 1.6;
}

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

.module-realizacje,
.module-workflow,
.module-credits,
.module-trusted {
  background: #000;
}

.module-realizacje {
  position: relative;
  z-index: 5;
  padding: clamp(26px, 3vw, 48px) clamp(16px, 2vw, 28px) clamp(72px, 7vw, 104px);
}

.realizacje-card {
  position: relative;
  display: flex;
  width: min(100%, 1360px);
  margin-inline: auto;
  padding: 0 clamp(22px, 3vw, 46px) clamp(38px, 4vw, 54px);
  overflow: hidden;
  align-items: center;
  flex-direction: column;
  isolation: isolate;
}

.section-filmstrip-bg {
  position: absolute;
  top: 0;
  left: -5%;
  z-index: 1;
  width: 110%;
  height: clamp(190px, 18vw, 248px);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='150' viewBox='0 0 200 150'%3E%3Crect width='200' height='25' fill='%23111722'/%3E%3Crect y='125' width='200' height='25' fill='%23111722'/%3E%3Cg fill='%233a414b'%3E%3Crect x='10' y='5' width='15' height='15' rx='3'/%3E%3Crect x='40' y='5' width='15' height='15' rx='3'/%3E%3Crect x='70' y='5' width='15' height='15' rx='3'/%3E%3Crect x='100' y='5' width='15' height='15' rx='3'/%3E%3Crect x='130' y='5' width='15' height='15' rx='3'/%3E%3Crect x='160' y='5' width='15' height='15' rx='3'/%3E%3Crect x='190' y='5' width='15' height='15' rx='3'/%3E%3Crect x='10' y='130' width='15' height='15' rx='3'/%3E%3Crect x='40' y='130' width='15' height='15' rx='3'/%3E%3Crect x='70' y='130' width='15' height='15' rx='3'/%3E%3Crect x='100' y='130' width='15' height='15' rx='3'/%3E%3Crect x='130' y='130' width='15' height='15' rx='3'/%3E%3Crect x='160' y='130' width='15' height='15' rx='3'/%3E%3Crect x='190' y='130' width='15' height='15' rx='3'/%3E%3C/g%3E%3Cline x1='0' y1='25' x2='200' y2='25' stroke='%23586a86' stroke-width='2.6'/%3E%3Cline x1='0' y1='125' x2='200' y2='125' stroke='%23586a86' stroke-width='2.6'/%3E%3Crect x='10' y='35' width='180' height='80' fill='%23060b14' fill-opacity='0.18' stroke='%234e5f78' stroke-width='1.4'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-size: auto 100%;
  filter: contrast(1.76) brightness(1.48) saturate(0.96) drop-shadow(0 18px 30px rgba(0, 0, 0, 0.28));
  transform: rotate(-1.15deg);
  pointer-events: none;
  animation: home-filmstrip 45s linear infinite;
  animation-delay: var(--loop-delay-45, -12000ms);
}

@keyframes home-filmstrip {
  to { background-position-x: -1200px; }
}

.offer-filmstrip-heading {
  position: relative;
  z-index: 12;
  display: flex;
  min-height: clamp(190px, 18vw, 248px);
  align-items: center;
  justify-content: center;
  padding: clamp(28px, 4vw, 52px) 20px;
  text-align: center;
}

.offer-filmstrip-heading .main-section-title {
  width: 100%;
  margin: 0;
  color: #f2f6fb;
  font-size: clamp(2.25rem, 4.2vw, 4.25rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
  text-shadow: 0 12px 38px rgba(0, 0, 0, 0.92), 0 0 22px rgba(59, 140, 235, 0.12);
}

.hub-cards-menu {
  position: relative;
  z-index: 14;
  display: grid;
  width: min(100%, var(--container-wide));
  margin: clamp(28px, 3.5vw, 48px) auto 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 1.7vw, 22px);
  align-items: stretch;
}

.video-card {
  position: relative;
  display: flex;
  min-height: clamp(220px, 20vw, 260px);
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at 84% 18%, rgba(59, 140, 235, 0.14), transparent 36%), linear-gradient(150deg, rgba(59, 140, 235, 0.11), rgba(255, 255, 255, 0.032) 44%, rgba(0, 0, 0, 0.2)), rgba(255, 255, 255, 0.022);
  text-align: left;
  transition: transform 350ms cubic-bezier(0.2, 0.8, 0.2, 1), border-color 350ms ease, box-shadow 350ms ease;
}

.video-card-content {
  position: relative;
  z-index: 2;
  display: flex;
  width: 100%;
  min-height: 100%;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 28px;
  flex-direction: column;
}

.card-badge {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 4px 10px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  color: #d8dde5;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}

.free-badge {
  border: 1px solid rgba(59, 140, 235, 0.3);
  background: rgba(59, 140, 235, 0.2);
  color: var(--brand);
}

.ghost-title {
  display: block;
  margin-bottom: 10px;
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.25;
}

.ghost-desc {
  display: block;
  max-width: 32ch;
  margin: 0 0 14px;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 300;
  line-height: 1.6;
}

.card-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
}

.ghost-sub {
  display: inline-block;
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(59, 140, 235, 0.3);
  color: var(--brand);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: lowercase;
}

.card-action svg {
  width: 16px;
  height: 16px;
  color: var(--brand);
  transition: transform 180ms ease;
}

.video-card:hover,
.video-card:focus-visible {
  border-color: rgba(59, 140, 235, 0.4);
  outline: none;
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(59, 140, 235, 0.15);
}

.video-card:hover .card-action svg,
.video-card:focus-visible .card-action svg {
  transform: translateX(3px);
}

.module-workflow {
  position: relative;
  z-index: 5;
  padding: clamp(18px, 2.2vw, 34px) 20px 18px;
}

/* Keep the full WORKFLOW heading visible after cross-page anchor navigation. */
#workflowTitle {
  scroll-margin-top: clamp(96px, 11vh, 136px);
}

.module-workflow > .main-section-header {
  margin-bottom: clamp(54px, 7vw, 82px);
}

.timeline-container {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.line-wrapper {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 1;
  width: 2px;
  transform: translateX(-50%);
}

.line-bg,
.line-progress {
  position: absolute;
  inset: 0;
}

.line-bg {
  background: var(--line);
}

.line-progress {
  background: #024ca0;
  box-shadow: 0 0 15px #024ca0, 0 0 30px #024ca0;
  transform: scaleY(0);
  transform-origin: top;
  will-change: transform;
}

.timeline-node {
  position: relative;
  z-index: 10;
  display: flex;
  width: 50%;
  padding-bottom: 102px;
}

.timeline-node:nth-of-type(odd) {
  left: 0;
  justify-content: flex-end;
  padding-right: 60px;
  text-align: right;
}

.timeline-node:nth-of-type(even) {
  left: 50%;
  justify-content: flex-start;
  padding-left: 60px;
  text-align: left;
}

.timeline-node:last-child {
  padding-bottom: 58px;
}

.node-icon {
  position: absolute;
  top: 0;
  z-index: 20;
  display: flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--brand);
  border-radius: 50%;
  background: #000;
  transition: transform 300ms ease, border-color 300ms ease, background-color 300ms ease, box-shadow 300ms ease;
}

.timeline-node:nth-of-type(odd) .node-icon { right: -22px; }
.timeline-node:nth-of-type(even) .node-icon { left: -22px; }

.node-icon svg {
  width: 20px;
  height: 20px;
  color: var(--brand);
  transition: color 300ms ease;
}

.node-content {
  position: relative;
  top: -5px;
  width: 100%;
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  opacity: 0.62;
  transform: translateY(8px);
  transition: opacity 420ms ease, transform 420ms ease, border-color 300ms ease, background-color 300ms ease, box-shadow 300ms ease;
}

.node-content h3 {
  margin: 0 0 15px;
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
}

.node-content p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.7;
}

.timeline-node.active .node-icon {
  border-color: #fff;
  background: var(--brand);
  box-shadow: 0 0 24px rgba(59, 140, 235, 0.5);
  transform: scale(1.08);
}

.timeline-node.active .node-icon svg { color: #fff; }
.timeline-node.active .node-content {
  border-color: rgba(59, 140, 235, 0.28);
  background: rgba(59, 140, 235, 0.07);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28), 0 0 24px rgba(59, 140, 235, 0.08);
  opacity: 1;
  transform: translateY(0);
}

.module-credits {
  position: relative;
  display: flex;
  min-height: 0;
  align-items: center;
  justify-content: center;
  padding: 32px 20px 14px;
}

#creditsFade {
  width: min(100%, 1180px);
  margin-inline: auto;
}

#creditsFade > .main-section-header {
  width: 100%;
  margin-bottom: clamp(28px, 4vw, 44px);
}

.credits-copy {
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
}

.credits-copy p {
  margin: 0;
  color: var(--cinema-text, #f0f4fa);
  font-family: var(--font-display);
  font-size: clamp(1.18rem, 2.2vw, 1.7rem);
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: -0.035em;
  text-align: center;
  text-wrap: balance;
  transition: color 160ms linear;
}

.module-trusted {
  position: relative;
  z-index: 9;
  padding: 52px 0 0;
  overflow: hidden;
}

.trusted-panel {
  width: min(100%, 1180px);
  margin: 0 auto;
}

.trusted-panel > .main-section-header {
  width: 100%;
  margin-bottom: clamp(24px, 3.5vw, 38px);
}

.trusted-slider {
  width: 100%;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
}

.trusted-track {
  display: flex;
  width: max-content;
  animation: trusted-marquee 35s linear infinite;
  animation-delay: var(--loop-delay-45, -12000ms);
  will-change: transform;
}

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

.trusted-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);
}

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

.trusted-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));
}

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

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

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

@media (max-width: 768px) {
  .lang-switch {
    top: 20px;
    right: 20px;
    gap: 10px;
    padding: 6px 12px;
    font-size: 0.75rem;
  }

  .module-hero {
    min-height: 100svh;
    padding: 106px 20px 64px;
  }

  .hero-video-bg {
    opacity: 0.76;
    filter: saturate(0.82) contrast(1.06) brightness(0.72);
  }

  .module-hero::after {
    height: clamp(58px, 7vh, 92px);
  }

  .hero-content {
    left: -2px;
    width: 100%;
  }

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

  .module-realizacje {
    padding: 20px 16px 70px;
  }

  .realizacje-card {
    padding: 0 18px 34px;
  }

  .section-filmstrip-bg {
    left: -8%;
    width: 116%;
    height: 154px;
    transform: rotate(-0.8deg);
  }

  .offer-filmstrip-heading {
    min-height: 154px;
    padding: 24px 12px;
  }

  .offer-filmstrip-heading .main-section-title {
    font-size: clamp(1.9rem, 9vw, 2.65rem);
    line-height: 1.04;
  }

  .hub-cards-menu {
    width: 100%;
    margin-top: 28px;
    gap: 16px;
  }

  .video-card {
    min-height: 198px;
  }

  .video-card-content {
    padding: 22px;
  }

  .ghost-title { font-size: 1.2rem; }
  .ghost-desc { margin-bottom: 12px; font-size: 0.88rem; }

  .module-workflow {
    padding: 14px 20px 24px;
  }

  .module-workflow > .main-section-header {
    margin-bottom: 52px;
  }

  .timeline-container {
    width: 100%;
  }

  .line-wrapper {
    left: 30px;
    transform: none;
  }

  .timeline-node,
  .timeline-node:nth-of-type(odd),
  .timeline-node:nth-of-type(even) {
    left: 0;
    width: 100%;
    justify-content: flex-start;
    padding: 0 0 80px 80px;
    text-align: left;
  }

  .timeline-node:last-child {
    padding-bottom: 64px;
  }

  .timeline-node:nth-of-type(odd) .node-icon,
  .timeline-node:nth-of-type(even) .node-icon {
    left: 8px;
    right: auto;
  }

  .node-content {
    width: 100%;
    padding: 24px;
  }

  .node-content h3 {
    font-size: 1.05rem;
  }

  .module-credits {
    padding: 22px 20px 8px;
  }

  .credits-copy p {
    font-size: 1.05rem;
    line-height: 1.56;
  }

  .module-trusted {
    padding: 30px 0 0;
  }

  .trusted-slider {
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  }

  .trusted-track {
    animation-duration: 24s;
  }

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

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

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


/* Home outro: legal/privacy links sit near the lower edge without shifting the CTA block. */
.page-home .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-home .footer-outro > .footer-copy {
    right: 16px;
    bottom: max(18px, calc(env(safe-area-inset-bottom, 0px) + 8px));
    left: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .section-filmstrip-bg,
  .trusted-track {
    animation: none !important;
  }

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

/* Shared HOME credit hand-off. The link itself uses the canonical ui-text-cta. */
.credits-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: clamp(22px, 2vw, 28px);
}

/* About pages reuse the HOME card system; keep their PL/EN related block here. */
.page-offer.page-home .tutorial-related {
  position: relative;
  z-index: 8;
  padding: clamp(42px, 4.5vw, 66px) clamp(16px, 2vw, 28px) clamp(70px, 7vw, 104px);
  background: #000;
}

.page-offer.page-home .tutorial-related-inner {
  width: min(100%, var(--container-wide));
  margin: 0 auto;
}

.page-offer.page-home .tutorial-related-title {
  margin: 0 0 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-offer.page-home .tutorial-related .tutorial-related-cards {
  width: 100%;
  max-width: var(--container-wide);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 0;
}

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

  .page-offer.page-home .tutorial-related .tutorial-related-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .page-offer.page-home .tutorial-related {
    padding-top: 36px;
    padding-bottom: 72px;
  }

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