html,
body {
  margin: 0;
  padding: 0;
}

/* Cienki pasek postępu przewijania (kolor CTA) */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 80;
  pointer-events: none;
  overflow: hidden;
}

.scroll-progress__bar {
  height: 100%;
  width: 100%;
  background-color: #0d82f2;
  transform: scaleX(0);
  transform-origin: left center;
  will-change: transform;
}

body {
  font-family: "Geist", sans-serif;
}

footer {
  position: relative;
  z-index: 40;
}

.font-serif {
  font-family: "Playfair Display", serif;
}

.card-nav-wrapper {
  position: fixed;
  top: 1rem;
  left: 0;
  right: 0;
  z-index: 70;
  display: flex;
  justify-content: center;
  padding: 0;
  box-sizing: border-box;
}

.card-nav-container {
  width: min(calc(100vw - 2rem), 72rem);
  box-sizing: border-box;
  transition: width 0.35s ease;
}

.card-nav {
  display: block;
  height: 60px;
  padding: 0;
  background-color: #09090b;
  border: 0.5px solid rgba(113, 113, 122, 0.45);
  border-radius: 0.75rem;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
  will-change: height;
}

.card-nav-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.45rem 0.55rem 1.1rem;
  z-index: 2;
}

.hamburger-menu {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  gap: 6px;
  border: 0;
  background: transparent;
  color: #fff;
}

.hamburger-line {
  width: 30px;
  height: 2px;
  background-color: currentColor;
  transition: transform 0.25s ease, opacity 0.2s ease;
  transform-origin: 50% 50%;
}

.hamburger-menu.open .hamburger-line:first-child {
  transform: translateY(4px) rotate(45deg);
}

.hamburger-menu.open .hamburger-line:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

.logo-container {
  display: flex;
  align-items: center;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  pointer-events: auto;
}

.logo {
  height: 1.2rem;
  width: auto;
  display: block;
}

.card-nav-cta-button {
  background-color: #0d82f2;
  background-image: none;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0 18px 0 18px;
  height: 100%;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s ease, box-shadow 0.3s ease, padding-left 0.28s ease, padding-right 0.28s ease;
  align-items: center;
  display: inline-flex;
  text-decoration: none;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.1);
}

.card-nav-cta-button:hover {
  background-color: #1d8ef7;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.14) inset;
  padding-left: 4px;
}

.card-nav-cta-label {
  white-space: nowrap;
}

.card-nav-cta-plop {
  flex-shrink: 0;
  width: 0;
  height: 34px;
  margin-right: 0;
  border-radius: 8px;
  background: rgb(9 9 11 / 0.88);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  opacity: 0;
  transform: scale(0.65);
  transform-origin: left center;
  transition:
    width 0.38s cubic-bezier(0.34, 1.56, 0.64, 1),
    margin-right 0.38s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.2s ease,
    transform 0.38s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.card-nav-cta-plop svg {
  width: 16px;
  height: 16px;
  fill: #fff;
}

.card-nav-cta-button:hover .card-nav-cta-plop,
.card-nav-cta-button:focus-visible .card-nav-cta-plop {
  width: 34px;
  margin-right: 0.5rem;
  opacity: 1;
  transform: scale(1);
}

.hero-primary-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 1rem;
  border-radius: 8px;
}

.hero-primary-cta.bg-primary {
  background-color: #0d82f2;
  background-image: none;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.1);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.hero-primary-cta.bg-primary:hover {
  background-color: #1d8ef7;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.14);
}

.hero-primary-cta.bg-primary:focus-visible {
  outline: 2px solid rgb(13 130 242 / 0.9);
  outline-offset: 2px;
}

.hero-primary-cta--fit {
  width: fit-content;
  max-width: 100%;
}

.hero-secondary-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 1rem;
  border: 1px solid rgb(63 63 70 / 0.8);
  border-radius: 8px;
  background-color: rgb(24 24 27 / 0.75);
}

.feature-item-title {
  font-size: 18px;
  font-weight: 600;
}

.feature-item-desc {
  font-size: 16px;
  font-weight: 400;
  color: #9ca3af;
}

.process-flow {
  position: relative;
  display: grid;
  grid-template-columns: minmax(210px, 1fr) minmax(250px, 500px) minmax(210px, 1fr);
  grid-template-rows: auto auto auto;
  align-items: center;
  column-gap: 0.25rem;
  row-gap: 0.35rem;
}

.process-step {
  max-width: 280px;
  opacity: 0;
  transform: translateY(22px) scale(0.98);
  transition:
    opacity 0.24s ease,
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.process-step-title {
  margin: 0 0 0.65rem;
  color: #fff;
  font-size: 1.85rem;
  line-height: 1.15;
  font-weight: 500;
}

.process-step-desc {
  margin: 0;
  color: rgb(161 161 170 / 1);
  font-size: 0.9rem;
  line-height: 1.45;
}

.process-step--one {
  grid-column: 3;
  grid-row: 1;
  justify-self: start;
  text-align: left;
  margin-top: -0.55rem;
}

.process-step--two {
  grid-column: 1;
  grid-row: 2;
  justify-self: end;
  text-align: right;
  margin-right: 0.3rem;
  margin-left: 0;
}

.process-step--three {
  grid-column: 3;
  grid-row: 3;
  justify-self: start;
  text-align: left;
  margin-top: -0.25rem;
}

.stack-loader-canvas {
  grid-column: 2;
  grid-row: 1 / 4;
  justify-self: center;
  position: relative;
  width: min(84vw, 500px);
  height: min(116vw, 700px);
  min-height: 420px;
  overflow: visible;
  --stack-corner-overlap: 6px;
}

.stack-square {
  position: absolute;
  width: 42%;
  height: auto;
  display: block;
  opacity: 0;
  transform: translateY(26px) scale(0.78);
  transition:
    opacity 0.24s ease,
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  filter: brightness(0) saturate(100%) invert(48%) sepia(89%) saturate(3421%) hue-rotate(194deg) brightness(95%) contrast(90%);
}

.stack-square--top {
  top: 1%;
  left: calc(46% - var(--stack-corner-overlap));
}

.stack-square--middle {
  top: 31%;
  left: 4%;
}

.stack-square--bottom {
  top: calc(61.2% - var(--stack-corner-overlap));
  left: calc(46% - var(--stack-corner-overlap));
}

.process-flow.is-visible .stack-square {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.process-flow.is-visible .stack-square--top {
  transition-delay: 0s;
}

.process-flow.is-visible .stack-square--middle {
  transition-delay: 0.2s;
}

.process-flow.is-visible .stack-square--bottom {
  transition-delay: 0.4s;
}

.process-flow.is-visible .process-step {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.process-flow.is-visible .process-step--one {
  transition-delay: 0s;
}

.process-flow.is-visible .process-step--two {
  transition-delay: 0.2s;
}

.process-flow.is-visible .process-step--three {
  transition-delay: 0.4s;
}

.star-border-container {
  display: inline-block;
  position: relative;
  border-radius: 20px;
  overflow: hidden;
}

.star-border-container .border-gradient-bottom {
  position: absolute;
  width: 300%;
  height: 50%;
  opacity: 0.7;
  bottom: -12px;
  right: -250%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--star-border-color, white), transparent 10%);
  animation: star-movement-bottom var(--star-border-speed, 6s) linear infinite alternate;
  z-index: 0;
}

.star-border-container .border-gradient-top {
  position: absolute;
  opacity: 0.7;
  width: 300%;
  height: 50%;
  top: -12px;
  left: -250%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--star-border-color, white), transparent 10%);
  animation: star-movement-top var(--star-border-speed, 6s) linear infinite alternate;
  z-index: 0;
}

.star-border-container .inner-content {
  position: relative;
  border: 1px solid #222;
  background: #000;
  color: #fff;
  font-size: 16px;
  text-align: center;
  padding: 16px 26px;
  border-radius: 20px;
  z-index: 1;
}

.availability-badge.star-border-container {
  border-radius: 9999px;
}

.availability-badge .inner-content {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid rgb(39 39 42 / 1);
  background: rgb(24 24 27 / 0.82);
  font-size: 0.75rem;
  color: rgb(212 212 216 / 1);
}

.gradual-blur {
  pointer-events: none;
  isolation: isolate;
}

.gradual-blur-inner {
  position: relative;
  width: 100%;
  height: 100%;
}

.gradual-blur-inner > div {
  -webkit-backdrop-filter: inherit;
  backdrop-filter: inherit;
}

.shiny-text {
  display: inline;
  line-height: inherit;
  vertical-align: baseline;
}

.gooey-container {
  isolation: isolate;
}

@supports not (backdrop-filter: blur(1px)) {
  .gradual-blur-inner > div {
    background: rgb(0 0 0 / 0.3);
    opacity: 0.5;
  }
}

@keyframes star-movement-bottom {
  0% {
    transform: translate(0%, 0%);
    opacity: 1;
  }
  100% {
    transform: translate(-100%, 0%);
    opacity: 0;
  }
}

@keyframes star-movement-top {
  0% {
    transform: translate(0%, 0%);
    opacity: 1;
  }
  100% {
    transform: translate(100%, 0%);
    opacity: 0;
  }
}

.card-nav-content {
  position: absolute;
  left: 0;
  right: 0;
  top: 60px;
  bottom: 0;
  padding: 0.5rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  grid-auto-flow: row;
  align-content: stretch;
  gap: 12px;
  visibility: hidden;
  pointer-events: none;
  z-index: 1;
}

.card-nav.open .card-nav-content {
  visibility: visible;
  pointer-events: auto;
}

.nav-card {
  height: auto;
  min-width: 0;
  min-height: 72px;
  border-radius: calc(0.75rem - 0.2rem);
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  user-select: none;
  text-decoration: none;
}

.nav-option {
  font-size: 20px;
  line-height: 1.15;
  transition: filter 0.2s ease, transform 0.2s ease;
}

.nav-option:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.nav-option-icon {
  font-size: 1.35rem;
  line-height: 1;
  opacity: 0.9;
}

html.lenis {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #000;
}

::-webkit-scrollbar-thumb {
  background: #27272a;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #3f3f46;
}

/* Otwarty modal (case study / Calendly) — strona w tle bez przewijania i bez widocznego paska (klasy z script.js). */
html.case-modal-document-open,
html.calendly-modal-document-open {
  overflow: hidden !important;
  scrollbar-width: none;
}

html.case-modal-document-open::-webkit-scrollbar,
html.calendly-modal-document-open::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

html.case-modal-document-open body,
html.calendly-modal-document-open body {
  overflow: hidden !important;
  scrollbar-width: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: 9999px;
  border: 1px solid rgb(39 39 42 / 1);
  background: rgb(24 24 27 / 0.3);
  color: rgb(212 212 216 / 1);
  font-size: 0.875rem;
}

.chip:hover {
  background: rgb(24 24 27 / 0.6);
  border-color: rgb(63 63 70 / 1);
}

@media (max-width: 768px) {
  .chip {
    padding: 0.45rem 0.75rem;
    font-size: 0.75rem;
  }
}

.switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 30px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #3f3f46;
  transition: 0.2s;
  border-radius: 999px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 4px;
  top: 4px;
  background-color: #fff;
  transition: 0.2s;
  border-radius: 50%;
}

.switch input:checked + .slider {
  background-color: #0d82f2;
}

.switch input:checked + .slider:before {
  transform: translateX(22px);
}

.faq-item.open {
  background: rgb(24 24 27 / 0.5);
}

.faq-content {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.3s ease;
}

.faq-item.open .faq-content {
  opacity: 1;
}

.faq-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  font-size: 1.25rem;
  line-height: 1;
  transition: color 0.25s ease, transform 0.25s ease;
}

.faq-item.open .faq-icon {
  color: rgb(212 212 216);
  transform: scale(1.06);
}

.ascii-orb-section {
  display: flex;
  justify-content: center;
}

.ascii-orb-shell {
  width: min(92vw, 920px);
  aspect-ratio: var(--ascii-ratio, 1 / 1);
  background: #000;
  overflow: visible;
}

#ascii-orb-canvas {
  display: block;
  width: 100%;
  height: 100%;
  color: #0d82f2;
  cursor: crosshair;
}

.ascii-orb-controls {
  margin: 1.5rem auto 0;
  max-width: 980px;
  border: 1px solid rgb(63 63 70 / 0.5);
  border-radius: 1rem;
  background: rgb(9 9 11 / 0.8);
  padding: 1rem;
}

.ascii-orb-controls-title {
  margin: 0 0 0.8rem;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: rgb(228 228 231 / 1);
}

.ascii-file-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
  font-size: 0.82rem;
  color: rgb(212 212 216 / 1);
}

.ascii-file-control input[type="file"] {
  width: min(100%, 280px);
  font-size: 0.75rem;
  color: rgb(161 161 170 / 1);
}

.ascii-orb-controls-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem 1rem;
}

.ascii-control {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.ascii-control span {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: rgb(212 212 216 / 1);
}

.ascii-control output {
  color: rgb(147 197 253 / 1);
}

.ascii-control input[type="range"] {
  width: 100%;
  accent-color: #0d82f2;
}

.benefit-item {
  position: relative;
}

.benefit-item::before {
  content: "";
  position: absolute;
  left: -2px;
  top: 0;
  width: 2px;
  height: var(--benefit-progress, 0%);
  background: #0d82f2;
  border-radius: 999px;
  transition: height 0.12s linear;
}

.benefit-content {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.25s ease;
}

.benefit-item.active .benefit-content {
  opacity: 1;
}

.cta-fade-top {
  background: linear-gradient(to bottom, rgb(0 0 0) 0%, transparent 100%);
}

.cta-fade-bottom {
  background: linear-gradient(to top, rgb(0 0 0) 0%, transparent 100%);
}

.opinion-marquee {
  display: grid;
  gap: 0.9rem;
}

.opinion-row {
  position: relative;
  overflow: hidden;
  cursor: grab;
  border-radius: 0;
  border: 0;
  background: transparent;
}

.opinion-row::before,
.opinion-row::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: clamp(36px, 7vw, 96px);
  pointer-events: none;
  z-index: 2;
}

.opinion-row::before {
  left: 0;
  background: linear-gradient(to right, rgb(0 0 0 / 1) 0%, rgb(0 0 0 / 0.85) 35%, rgb(0 0 0 / 0) 100%);
}

.opinion-row::after {
  right: 0;
  background: linear-gradient(to left, rgb(0 0 0 / 1) 0%, rgb(0 0 0 / 0.85) 35%, rgb(0 0 0 / 0) 100%);
}

.opinion-row:active {
  cursor: grabbing;
}

.opinion-row:focus-visible {
  outline: 2px solid rgb(13 130 242 / 0.9);
  outline-offset: 2px;
}

.opinion-track {
  display: flex;
  align-items: stretch;
  gap: 0.9rem;
  padding: 0.9rem;
  width: max-content;
  will-change: transform;
  user-select: none;
}

.opinion-card {
  width: min(calc(88vw * 1.21), calc(360px * 1.21));
  min-height: 176px;
  border-radius: 0.9rem;
  border: 1px solid rgb(63 63 70 / 0.75);
  background: rgb(24 24 27 / 0.62);
  padding: 1rem 1rem 0.95rem;
  display: flex;
  flex-direction: column;
}

.opinion-text {
  color: rgb(228 228 231 / 1);
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0 0 0.85rem;
  flex-grow: 1;
}

.opinion-author {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  margin: 0;
  font-size: 0.78rem;
}

.opinion-author__name {
  color: rgb(212 212 216 / 1);
  font-weight: 500;
}

.opinion-author__role {
  color: rgb(161 161 170 / 1);
  line-height: 1.35;
}

@media (max-width: 768px) {
  .opinion-row::before,
  .opinion-row::after {
    display: none;
  }

  .opinion-marquee {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
  }

  .opinion-track {
    padding-left: 0;
    padding-right: 0;
  }
}

.case-stack {
  position: relative;
  padding: 3vh 0 2.5rem;
}

.case-stack-card {
  position: sticky;
  top: 14vh;
  margin: 0 0 30px;
  padding: 2rem;
  border-radius: 1.25rem;
  border: 1px solid rgb(39 39 42 / 0.75);
  background: linear-gradient(180deg, rgb(18 18 22 / 0.95) 0%, rgb(10 10 12 / 0.95) 100%);
  box-shadow: 0 22px 48px rgb(0 0 0 / 0.35);
  transform-origin: top center;
  will-change: transform, filter;
  backface-visibility: hidden;
}

.case-stack-card--clickable {
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.case-stack-card--clickable:hover {
  border-color: rgb(63 63 70 / 0.95);
  box-shadow: 0 26px 56px rgb(0 0 0 / 0.45);
}

.case-stack-card--clickable:focus {
  outline: none;
}

.case-stack-card--clickable:focus-visible {
  outline: 2px solid rgb(13 130 242 / 0.95);
  outline-offset: 3px;
}

.case-stack-card__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1.35rem;
  padding: 0.55rem 1.35rem;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25;
  color: rgb(255 255 255 / 1);
  background: rgb(10 98 196 / 1);
  border-radius: 0.45rem;
  pointer-events: none;
  transition: transform 0.2s ease, background 0.2s ease;
}

.case-stack-card--clickable:hover .case-stack-card__cta {
  background: rgb(13 115 218 / 1);
}

.case-stack-card--clickable:active .case-stack-card__cta {
  transform: scale(0.98);
}

.case-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Ciaśniejszy ramek = większy panel względem ekranu */
  padding: clamp(0.35rem, 1.25vw, 1rem);
  box-sizing: border-box;
  overflow: hidden;
  overscroll-behavior: none;
}

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

.case-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / 0.72);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.3s ease-out;
}

.case-modal--open .case-modal__backdrop {
  opacity: 1;
}

.case-modal__panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(100%, 94vw, 112rem);
  max-height: min(97vh, 1320px);
  min-height: 0;
  overflow: hidden;
  overscroll-behavior: contain;
  border-radius: 1.35rem;
  border: 1px solid rgb(63 63 70 / 0.75);
  background: rgb(12 12 14 / 0.98);
  box-shadow: 0 28px 80px rgb(0 0 0 / 0.55);
  padding: clamp(1.35rem, 2.2vw, 2rem) clamp(1.1rem, 2.2vw, 2rem) clamp(1.1rem, 1.75vw, 1.75rem);
  opacity: 0;
  transform: translate3d(0, 14px, 0) scale(0.985);
  transition:
    opacity 0.34s cubic-bezier(0.32, 0.72, 0, 1),
    transform 0.34s cubic-bezier(0.32, 0.72, 0, 1);
  transform-origin: center center;
}

.case-modal--open .case-modal__panel {
  opacity: 1;
  transform: none;
}

.case-modal__split {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  gap: 1.25rem;
}

@media (min-width: 1024px) {
  .case-modal__split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
    column-gap: 1.75rem;
    row-gap: 0;
  }
}

.case-modal__col {
  min-width: 0;
  min-height: 0;
}

.case-modal__col--left {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex-shrink: 0;
}

@media (min-width: 1024px) {
  .case-modal__col--left {
    flex-shrink: 1;
    gap: 1.15rem;
  }
}

.case-modal__col--right {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

@media (min-width: 1024px) {
  .case-modal__col--right {
    flex: unset;
    overflow: hidden;
  }
}

.case-modal__media {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.case-modal__text {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-right: 0.15rem;
}

.case-modal__text::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

@media (min-width: 1024px) {
  .case-modal__text {
    max-height: 100%;
  }
}

@media (max-width: 1023px) {
  .case-modal__text {
    min-height: 11rem;
  }
}

.case-modal__close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  width: 1.875rem;
  height: 1.875rem;
  border-radius: 0.375rem;
  border: 1px solid rgb(63 63 70 / 0.8);
  background: rgb(24 24 27 / 0.9);
  color: rgb(228 228 231 / 1);
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.case-modal__close:hover {
  background: rgb(39 39 42 / 0.95);
  border-color: rgb(82 82 91 / 0.9);
}

.case-modal__close:focus-visible {
  outline: 2px solid rgb(13 130 242 / 0.95);
  outline-offset: 2px;
}

@media (max-width: 1023px) {
  .case-modal__close {
    width: 2.75rem;
    height: 2.75rem;
    font-size: 1.35rem;
    border-radius: 0.5rem;
  }

  .case-modal__head {
    margin-right: 2.85rem;
  }
}

.case-modal__head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0 2.35rem 0 0;
  flex-shrink: 0;
}

.case-modal__title {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.25;
  font-weight: 600;
  color: rgb(255 255 255 / 1);
}

@media (min-width: 640px) {
  .case-modal__title {
    font-size: clamp(1.5rem, 2.2vw, 1.85rem);
  }
}

.case-modal__kicker {
  margin: 0;
  font-size: 0.6875rem;
  line-height: 1.35;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgb(161 161 170 / 1);
}

.case-modal__tags,
.case-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.case-modal__tag,
.case-card-tag {
  display: inline-block;
  font-size: 0.75rem;
  line-height: 1.25;
  font-weight: 500;
  padding: 0.35rem 0.85rem;
  border-radius: 0.45rem;
  border: 1px solid rgb(63 63 70 / 0.85);
  background: rgb(24 24 27 / 0.65);
  color: rgb(228 228 231 / 1);
}

.case-modal__media,
.case-modal__text .case-modal__content {
  color: rgb(212 212 216 / 1);
}

.case-modal__gallery {
  display: flex;
  flex-direction: column;
  /* stretch — nie center: przy center szerokość dziecka schodzi do 0 i znika pole aspect-ratio */
  align-items: stretch;
  gap: 0.85rem;
  width: 100%;
}

/* Galeria case study — tylko zdjęcia (bez mocków MacBook / iPhone) */
.case-modal__gallery-viewport {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  width: 100%;
  min-width: 0;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

.case-modal__gallery-viewport.is-gallery-viewport-portrait {
  min-height: min(58vh, 640px);
}

.case-modal__gallery-stage {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-inline: auto;
}

.case-modal__gallery-layers {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #0a0a0c;
  border-radius: 0.5rem;
  overflow: hidden;
}

.case-modal__gallery-viewport.is-gallery-viewport-portrait .case-modal__gallery-layers {
  aspect-ratio: 9 / 16;
  max-height: min(72vh, 680px);
  max-width: min(100%, 420px);
  margin-inline: auto;
}

/* Dwie warstwy — crossfade */
.case-modal__gallery-layer {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  opacity: 0;
  border: 0;
  transition: opacity 0.36s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity;
  pointer-events: none;
  z-index: 1;
}

.case-modal__gallery-layer.is-gallery-visible {
  opacity: 1;
  z-index: 2;
}

/* Tailwind Preflight przy prefers-reduced-motion ustawia * { transition-duration: 0.01ms !important } —
   tutaj nadpisujemy, żeby galeria w modalu case study nadal miała pełne przejścia. */
@media (prefers-reduced-motion: reduce) {
  .case-modal .case-modal__gallery-layer {
    transition-duration: 0.36s !important;
    transition-property: opacity !important;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important;
  }

  .case-modal .case-modal__thumb {
    transition-duration: 0.2s !important;
    transition-property: border-color, opacity, transform !important;
  }

  .case-modal .case-modal__close,
  .calendly-modal .case-modal__close {
    transition-duration: 0.2s !important;
    transition-property: background, border-color !important;
  }

  .case-modal .case-modal__backdrop {
    transition-duration: 0.3s !important;
    transition-property: opacity !important;
    transition-timing-function: ease-out !important;
  }

  .case-modal .case-modal__panel {
    transition-duration: 0.34s !important;
    transition-property: opacity, transform !important;
    transition-timing-function: cubic-bezier(0.32, 0.72, 0, 1) !important;
  }

  .calendly-modal .calendly-modal__panel {
    transition-duration: 0.34s !important;
    transition-property: opacity !important;
    transition-timing-function: cubic-bezier(0.32, 0.72, 0, 1) !important;
  }
}

.case-modal__gallery-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  width: 100%;
}

@media (max-width: 1023px) {
  .case-modal__gallery-thumbs {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0.35rem 0.75rem;
    margin-left: -0.75rem;
    margin-right: -0.75rem;
    width: calc(100% + 1.5rem);
    max-width: none;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(
      to right,
      transparent 0%,
      rgb(0 0 0) 8%,
      rgb(0 0 0) 92%,
      transparent 100%
    );
    mask-image: linear-gradient(
      to right,
      transparent 0%,
      rgb(0 0 0) 8%,
      rgb(0 0 0) 92%,
      transparent 100%
    );
    mask-size: 100% 100%;
    mask-repeat: no-repeat;
  }

  .case-modal__gallery-thumbs::-webkit-scrollbar {
    display: none;
  }

  .case-modal__thumb {
    scroll-snap-align: center;
    flex-shrink: 0;
  }
}

.case-modal__thumb {
  flex: 0 0 auto;
  width: 4.25rem;
  height: 2.75rem;
  padding: 0;
  border-radius: 0.45rem;
  border: 2px solid transparent;
  overflow: hidden;
  cursor: pointer;
  background: rgb(24 24 27 / 1);
  transition: border-color 0.2s ease, opacity 0.2s ease, transform 0.15s ease;
}

.case-modal__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.case-modal__thumb:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.case-modal__thumb.is-active {
  border-color: rgb(13 130 242 / 0.95);
  opacity: 1;
}

.case-modal__thumb:focus-visible {
  outline: 2px solid rgb(13 130 242 / 0.95);
  outline-offset: 2px;
}

.case-modal__h3 {
  margin: 1.25rem 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgb(161 161 170 / 1);
}

/* Akapity sekcji (Wyzwanie / Wdrożenie / Efekt) — to samo wcięcie co lista w Podejście */
.case-modal__content .case-modal__h3 + p {
  padding-left: 1.15rem;
}

.case-modal__list {
  margin: 0 0 0.75rem;
  padding-left: 1.15rem;
  color: rgb(161 161 170 / 1);
  font-size: 0.95rem;
  line-height: 1.55;
}

.case-modal__list li {
  margin-bottom: 0.35rem;
}

/* Modal Calendly: desktop — wyśrodkowany panel; mobile — fullscreen; × w pasku nad iframe (bez nachodzenia na ribbon Calendly) */
.calendly-modal {
  position: fixed;
  inset: 0;
  z-index: 125;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(0.75rem, 3vw, 1.5rem);
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.calendly-modal[hidden] {
  display: none;
}

.calendly-modal:focus {
  outline: none;
}

.calendly-modal__backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  cursor: pointer;
  background: rgb(0 0 0 / 0.72);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.3s ease-out;
}

.calendly-modal--open .calendly-modal__backdrop {
  opacity: 1;
}

.calendly-modal__panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  width: min(100%, 1040px);
  height: min(92vh, 940px);
  min-height: min(88vh, 860px);
  max-height: min(94dvh, 980px);
  min-width: 0;
  overflow: hidden;
  overscroll-behavior: contain;
  border-radius: 1.35rem;
  border: 1px solid rgb(63 63 70 / 0.65);
  background: #000;
  box-shadow: 0 28px 80px rgb(0 0 0 / 0.5);
  padding: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.34s cubic-bezier(0.32, 0.72, 0, 1);
}

.calendly-modal--open .calendly-modal__panel {
  opacity: 1;
}

.calendly-modal__topbar {
  flex-shrink: 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-height: 2.5rem;
  padding-top: max(0.65rem, env(safe-area-inset-top, 0px));
  padding-right: max(0.65rem, env(safe-area-inset-right, 0px));
  padding-bottom: 0.35rem;
  padding-left: max(0.5rem, env(safe-area-inset-left, 0px));
  background: #000;
  pointer-events: auto;
  z-index: 11;
}

.calendly-modal .case-modal__close {
  position: relative;
  top: auto;
  right: auto;
  z-index: 1;
  pointer-events: auto;
  flex-shrink: 0;
}

@media (max-width: 1023px) {
  .calendly-modal {
    padding: 0;
    align-items: stretch;
    justify-content: stretch;
    overflow: hidden;
  }

  .calendly-modal__panel {
    position: absolute;
    inset: 0;
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    min-height: 0;
    border-radius: 0;
    border: none;
    box-shadow: none;
  }

  .calendly-modal__topbar {
    min-height: unset;
    align-items: center;
    padding-top: max(0.5rem, calc(env(safe-area-inset-top, 0px) + 0.35rem));
    padding-right: max(0.5rem, calc(env(safe-area-inset-right, 0px) + 0.35rem));
    padding-bottom: 0.5rem;
    padding-left: max(0.5rem, env(safe-area-inset-left, 0px));
  }
}

.calendly-modal__body {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  pointer-events: none;
}

.calendly-modal__embed {
  width: 100%;
  height: 100%;
  min-width: 320px;
  min-height: 0;
  pointer-events: auto;
}

.calendly-modal__embed .calendly-inline-widget {
  width: 100% !important;
  min-width: 320px !important;
  height: 100% !important;
  min-height: 100% !important;
}

.calendly-modal__embed iframe {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
}

.case-stack-end {
  height: 2px;
}

.gallery-carousel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.gallery-carousel-scene {
  position: relative;
  width: min(100%, 1000px);
  height: clamp(240px, 42vw, 420px);
  perspective: 1400px;
  perspective-origin: center;
}

.gallery-carousel-track {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}

.gallery-slide {
  position: absolute;
  inset: 0;
  width: min(100%, 760px);
  height: 100%;
  margin: 0 auto;
  border-radius: 0.9rem;
  overflow: hidden;
  transform-origin: center;
  transition: transform 0.6s ease, opacity 0.45s ease, filter 0.45s ease;
  will-change: transform, opacity, filter;
  border: 1px solid rgb(63 63 70 / 0.55);
  box-shadow: 0 12px 40px rgb(0 0 0 / 0.35);
}

.gallery-slide-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-slide.is-hidden {
  pointer-events: none;
}

.gallery-carousel-btn {
  display: none;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 9999px;
  border: 1px solid rgb(244 244 245 / 0.8);
  background: rgb(24 24 27 / 0.88);
  backdrop-filter: blur(8px);
  color: rgb(255 255 255 / 1);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 26px rgb(0 0 0 / 0.55);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.gallery-carousel-btn:hover {
  transform: translateY(-1px) scale(1.04);
  background: rgb(13 130 242 / 0.9);
  border-color: rgb(191 219 254 / 1);
  color: rgb(255 255 255 / 1);
  box-shadow: 0 10px 30px rgb(13 130 242 / 0.42);
}

.gallery-carousel-btn:focus-visible {
  outline: 2px solid rgb(13 130 242 / 1);
  outline-offset: 2px;
}

#hero-section {
  position: relative;
  isolation: isolate;
  height: 100vh;
  min-height: 100vh;
}

.dither-container {
  position: relative;
  width: 100%;
  height: 100%;
}

#hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  /* pan-y: przewijanie strony działa przy geście po canvasie; none blokowało scroll na mobile */
  touch-action: pan-y;
}

#hero-bg canvas {
  display: block;
  width: 100%;
  height: 100%;
}

#cta-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  touch-action: none;
}

#cta-bg canvas {
  display: block;
  width: 100%;
  height: 100%;
}

#hero-section .hero-content {
  position: absolute;
  inset: 0;
  z-index: 2147483647;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: auto;
  text-align: center;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

#hero-section .hero-content > * {
  pointer-events: auto;
}

/* Hero: canvas nie przejmuje dotyku (shader i tak wyłączony w JS na touch). */
@media (pointer: coarse), ((hover: none) and (max-width: 1366px)) {
  #hero-bg {
    pointer-events: none;
  }
}

@media (max-width: 768px) {
  #hero-section .hero-content {
    transform: translateY(-2.5vh);
  }
}

@media (max-width: 900px) {
  .gallery-carousel {
    gap: 0.5rem;
  }

  .gallery-slide {
    width: min(100%, 640px);
  }

  .opinion-card {
    width: min(calc(92vw * 1.21), calc(320px * 1.21));
  }

  .case-stack-card {
    top: 10vh;
    padding: 1.2rem;
    margin-bottom: 30px;
  }
}

@media (max-width: 640px) {
  .card-nav-wrapper {
    top: 0.75rem;
  }

  .card-nav-container {
    width: min(calc(100vw - 2rem), 72rem);
  }

  .card-nav-top {
    padding: 0.5rem 1rem;
  }

  .logo-container {
    position: static;
    transform: none;
  }

  .card-nav-cta-button {
    display: none;
  }

  .process-flow {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    row-gap: 1.5rem;
  }

  .stack-loader-canvas {
    grid-column: 1;
    grid-row: 1;
    width: min(86vw, 430px);
    aspect-ratio: 84 / 116;
    height: auto;
    min-height: 0;
  }

  .process-step {
    max-width: 100%;
    justify-self: stretch;
    text-align: center;
    margin-top: 0;
    margin-left: 0;
    margin-right: 0;
  }

  .process-step-title {
    font-size: 1.5rem;
  }

  .process-step-desc {
    font-size: 0.95rem;
  }

  .process-step--one,
  .process-step--two,
  .process-step--three {
    grid-column: 1;
  }

  .process-step--one {
    grid-row: 2;
  }

  .process-step--two {
    grid-row: 3;
  }

  .process-step--three {
    grid-row: 4;
  }

  .card-nav-content {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 0.5rem;
    bottom: 0;
  }

  .nav-card {
    min-height: 60px;
    padding: 12px 14px;
  }

  .ascii-orb-controls-grid {
    grid-template-columns: 1fr;
  }

  .gallery-carousel-btn {
    width: 46px;
    height: 46px;
    font-size: 1.2rem;
  }
}

@media (min-width: 640px) {
  .card-nav-container {
    width: min(calc(100vw - 3rem), 72rem);
  }
}

@media (min-width: 1024px) {
  .card-nav-container {
    width: min(calc(100vw - 4rem), 72rem);
  }

  .process-flow {
    display: block;
    max-width: 1120px;
    min-height: 700px;
    margin-left: auto;
    margin-right: auto;
  }

  .stack-loader-canvas {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    width: 500px;
    height: 700px;
  }

  .process-step {
    position: absolute;
    width: 280px;
    max-width: 280px;
    transform: translateY(-50%);
    transition: opacity 0.24s ease;
  }

  .process-step--one {
    top: 112px;
    left: calc(50% + 204px);
    text-align: left;
    margin: 0;
  }

  .process-step--two {
    top: 322px;
    left: calc(50% - 250px);
    transform: translate(-100%, -50%);
    text-align: right;
    margin: 0;
  }

  .process-step--three {
    top: 527px;
    left: calc(50% + 204px);
    text-align: left;
    margin: 0;
  }

  .process-flow.is-visible .process-step {
    opacity: 1;
    transform: translateY(-50%);
  }

  .process-flow.is-visible .process-step--two {
    transform: translate(-100%, -50%);
  }
}

.card-nav-wrapper.is-scrolled .card-nav-container {
  width: min(calc(100vw - 2rem), 56rem);
}

@media (min-width: 640px) {
  .card-nav-wrapper.is-scrolled .card-nav-container {
    width: min(calc(100vw - 3rem), 56rem);
  }
}

@media (min-width: 1024px) {
  .card-nav-wrapper.is-scrolled .card-nav-container {
    width: min(calc(100vw - 4rem), 56rem);
  }
}
