/* Fiberlogy – Historie użytkowników. Duże boxy ze stron CMS (jak kafelki Filamentów) + formularz „Podziel się swoją historią”. */
.fcs {
  --fcs-blue: #0202cc;
  --fcs-cyan: #02bfff;
  --fcs-navy: #0f329b;
  --fcs-deep: #04195a;
  --fcs-dark: #11121f;
  --fcs-ease: cubic-bezier(.22, .61, .36, 1);
  --fcs-gap: 24px;
  box-sizing: border-box;
  margin: 3.5rem clamp(16px, 4vw, 72px);
  color: var(--fcs-dark);
}
.fcs *, .fcs *::before, .fcs *::after { box-sizing: border-box; }
:where(.fcs) button, :where(.fcs) input, :where(.fcs) textarea { font: inherit; }

.fcs__header { margin-bottom: 28px; }
.fcs__title { margin: 0; font-size: 40px; font-weight: 600; line-height: 1.1; letter-spacing: -1.8px; color: var(--fcs-dark); text-wrap: balance; }
.fcs__intro { max-width: 64ch; margin: 14px 0 0; font-size: 1.05rem; line-height: 1.55; color: #4a4d63; }

/* Scena: slider z przyciskami po bokach */
.fcs__stage { position: relative; }
.fcs__track {
  display: flex; align-items: stretch; gap: var(--fcs-gap); overflow-x: auto; padding: 4px 4px 28px; margin: -4px -4px 0;
  scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain;
}
.fcs__track::-webkit-scrollbar { display: none; }

/* Strzałki po bokach – ten sam kształt co w pozostałych sekcjach (40×40, promień 10), tu na białym tle */
.fcs__arrow {
  position: absolute; z-index: 5; top: calc(50% - 34px); display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; cursor: pointer;
  color: var(--fcs-dark); background: #fff; border: 1px solid var(--fcs-dark); border-radius: 10px; box-shadow: 0 6px 18px rgba(15, 23, 42, .18);
  transition: background .3s ease, color .3s ease, opacity .3s ease, transform .3s var(--fcs-ease);
}
.fcs__arrow--prev { left: 12px; }
.fcs__arrow--next { right: 12px; }
.fcs__arrow:hover:not(:disabled), .fcs__arrow:focus-visible { color: #fff; background: var(--fcs-dark); }
.fcs__arrow:disabled { opacity: 0; pointer-events: none; transform: scale(.85); }
.fcs__arrow--prev .fcs__arrow-inner { transform: rotate(180deg); }
.fcs__arrow-inner { display: inline-flex; align-items: center; justify-content: center; }
.fcs__arrow-inner svg { width: 16px; height: 16px; }
.fcs__arrow:focus-visible { outline: 3px solid var(--fcs-cyan); outline-offset: 2px; }
.fcs__arrow.is-gone { display: none; }

/* Box historii */
.fcs__card {
  position: relative; isolation: isolate; display: flex; flex: 0 0 min(600px, 86vw); align-items: flex-end; min-height: clamp(460px, 44vw, 600px); overflow: hidden;
  scroll-snap-align: start; color: #fff; background: linear-gradient(145deg, var(--fcs-navy), var(--fcs-deep)); border-radius: 32px; box-shadow: 0 10px 30px rgba(15, 23, 42, .14);
}
.fcs__bg { position: absolute; inset: 0; z-index: 0; transform: scale(1); transition: transform 1.1s var(--fcs-ease); }
.fcs__bg img { display: block; width: 100%; height: 100%; object-fit: cover; }
.fcs__card:hover .fcs__bg, .fcs__card:focus-within .fcs__bg { transform: scale(1.06); }
.fcs__card::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(to top, rgba(2, 6, 23, .92) 0%, rgba(2, 6, 23, .6) 34%, rgba(2, 6, 23, .08) 68%, rgba(2, 6, 23, 0) 100%);
}
.fcs__link { position: absolute; inset: 0; z-index: 2; border-radius: inherit; }
.fcs__link:focus-visible { outline: 3px solid var(--fcs-cyan); outline-offset: -3px; }
.fcs__content { position: relative; z-index: 3; display: flex; flex-direction: column; align-items: flex-start; width: 100%; padding: clamp(24px, 3vw, 40px); pointer-events: none; }
.fcs__badge {
  display: inline-block; margin-bottom: 14px; padding: 5px 13px; color: #04195a; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  background: var(--fcs-cyan); border-radius: 999px;
}
.fcs__name { margin: 0; color: #fff; font-size: clamp(1.6rem, 2.3vw, 2.15rem); font-weight: 700; line-height: 1.15; letter-spacing: -.5px; text-wrap: balance; }
.fcs__desc { display: -webkit-box; margin: 14px 0 0; max-width: 52ch; overflow: hidden; color: rgba(255, 255, 255, .92); font-size: 1rem; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.fcs__more { display: inline-flex; align-items: center; gap: 10px; margin-top: 20px; color: #fff; font-size: .9rem; font-weight: 600; letter-spacing: .8px; text-transform: uppercase; }
.fcs__more svg { transition: transform .4s var(--fcs-ease); }
.fcs__card:hover .fcs__more svg, .fcs__card:focus-within .fcs__more svg { transform: translateX(6px); }
.fcs__more span { background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 0% 1px; padding-bottom: 3px; transition: background-size .4s ease; }
.fcs__card:hover .fcs__more span, .fcs__card:focus-within .fcs__more span { background-size: 100% 1px; }

/* Ostatni box: formularz */
.fcs__card--form { flex-basis: min(680px, 92vw); align-items: stretch; background: linear-gradient(160deg, var(--fcs-navy) 0%, var(--fcs-deep) 100%); cursor: default; }
.fcs__card--form::before { display: none; }
.fcs__card--form::after {
  content: ""; position: absolute; z-index: 0; right: -120px; top: -120px; width: 380px; height: 380px; pointer-events: none;
  background: radial-gradient(circle, rgba(2, 191, 255, .35), rgba(2, 191, 255, 0) 70%);
}
.fcs__form-in { position: relative; z-index: 1; display: flex; flex-direction: column; width: 100%; padding: clamp(24px, 3vw, 40px); }
.fcs__form-title { margin: 0; color: #fff; font-size: clamp(1.6rem, 2.3vw, 2.15rem); font-weight: 700; line-height: 1.15; letter-spacing: -.5px; text-wrap: balance; }
.fcs__form-intro { margin: 10px 0 20px; color: rgba(255, 255, 255, .85); font-size: 1rem; line-height: 1.5; }
.fcs__form { display: flex; flex-direction: column; gap: 14px; }
.fcs__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fcs__f { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fcs__f-label { color: rgba(255, 255, 255, .88); font-size: .8rem; font-weight: 600; letter-spacing: .02em; }
.fcs__f input, .fcs__f textarea {
  width: 100%; padding: 11px 14px; color: #fff; font-size: .98rem; line-height: 1.4; background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .28); border-radius: 12px; transition: border-color .25s ease, background .25s ease, box-shadow .25s ease;
}
.fcs__f textarea { min-height: 96px; resize: vertical; }
.fcs__f input:focus, .fcs__f textarea:focus { outline: none; background: rgba(255, 255, 255, .16); border-color: var(--fcs-cyan); box-shadow: 0 0 0 3px rgba(2, 191, 255, .25); }
.fcs__f.is-invalid input, .fcs__f.is-invalid textarea { border-color: #ff8a80; box-shadow: 0 0 0 3px rgba(255, 138, 128, .25); }
.fcs__consent { display: flex; align-items: flex-start; gap: 10px; color: rgba(255, 255, 255, .85); font-size: .82rem; line-height: 1.45; cursor: pointer; }
.fcs__consent input { flex: 0 0 18px; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--fcs-cyan); }
.fcs__consent.is-invalid { color: #ffb4ac; }
.fcs__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.fcs__status { margin: 0; padding: 12px 14px; font-size: .92rem; line-height: 1.45; border-radius: 12px; }
.fcs__status[hidden] { display: none; }
.fcs__status.is-ok { color: #04195a; background: #b8ecff; }
.fcs__status.is-err { color: #5c0a00; background: #ffd9d4; }
.fcs__submit {
  align-self: flex-start; padding: 13px 34px; cursor: pointer; color: #fff; font-size: .95rem; font-weight: 500; letter-spacing: 1px; text-transform: uppercase;
  border: 1px solid #fff; border-radius: 20px; background: linear-gradient(#fff, #fff) no-repeat 0 0 / 0% 100% transparent;
  transition: color .4s ease, background-size .4s ease, opacity .3s ease;
}
.fcs__submit:hover:not(:disabled), .fcs__submit:focus-visible { color: var(--fcs-deep); background-size: 100% 100%; outline: none; }
.fcs__submit:disabled { opacity: .6; cursor: progress; }
.fcs__form.is-done .fcs__row, .fcs__form.is-done .fcs__f, .fcs__form.is-done .fcs__consent, .fcs__form.is-done .fcs__submit { display: none; }

/* Wejście boxów po wjechaniu sekcji w widok */
.fcs.is-ready:not(.is-in) .fcs__card { opacity: 0; transform: translate3d(0, 36px, 0); }
.fcs.is-ready.is-in .fcs__card { animation: fcs-rise .8s var(--fcs-ease) backwards; animation-delay: calc(var(--i, 0) * 80ms); }
@keyframes fcs-rise { from { opacity: 0; transform: translate3d(0, 36px, 0); } to { opacity: 1; transform: none; } }

@media (max-width: 1024px) {
  .fcs__title { font-size: 32px; letter-spacing: -1.3px; }
}
@media (max-width: 720px) {
  .fcs__title { font-size: 28px; }
  .fcs__arrow { display: none; }
  .fcs__row { grid-template-columns: 1fr; }
  .fcs__card { min-height: 440px; }
  .fcs__card--form { min-height: 0; }
  .fcs__submit { align-self: stretch; }
}
@media (prefers-reduced-motion: reduce) {
  .fcs *, .fcs::before { transition: none !important; animation: none !important; }
  .fcs.is-ready:not(.is-in) .fcs__card { opacity: 1; transform: none; }
}
