/* Fiberlogy – sekcja wideo (video showcase). Pełna szerokość strony, gradient #0F329B → #04195A od górnej krawędzi wideo.
   Desktop: po lewej tekst i statystyki, po prawej (3/5 szerokości, przy krawędzi strony) wideo 16:9, pod nim pojedyncza karta funkcji z paginacją. */
.fvs {
  --fvs-c1: #0f329b;
  --fvs-c2: #04195a;
  --fvs-dark: #1d1d1f;
  --fvs-margin: max(clamp(24px, 5vw, 96px), calc((100vw - 1440px) / 2));
  --fvs-ease: cubic-bezier(.22, .61, .36, 1);
  box-sizing: border-box;
  position: relative;
  margin: 3.5rem calc(50% - 50vw);
  overflow: hidden;
  isolation: isolate;
  color: #fff;
}
.fvs *, .fvs *::before, .fvs *::after { box-sizing: border-box; }
.fvs button { font: inherit; }
html:has(.fvs) { overflow-x: clip; }

/* Miękka łuna: plamy koloru z gradientów radialnych (bez filtrów blur – tanie w renderowaniu) */
.fvs__glow { position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(48% 42% at 12% 10%, rgba(2, 191, 255, .26), rgba(2, 191, 255, 0) 70%),
    radial-gradient(52% 46% at 92% 68%, rgba(58, 74, 255, .34), rgba(58, 74, 255, 0) 70%),
    radial-gradient(40% 30% at 70% 4%, rgba(255, 255, 255, .08), rgba(255, 255, 255, 0) 70%); }

/* Gradient w dół zaczyna się od górnej krawędzi wideo (= góra sekcji) */
.fvs__body { position: relative; padding-bottom: clamp(40px, 5vw, 80px); background: linear-gradient(180deg, var(--fvs-c1) 0%, var(--fvs-c2) 100%); }
.fvs__grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); align-items: stretch; }
.fvs__head-in, .fvs__media, .fvs__stats, .fvs__cta-wrap { position: relative; z-index: 2; }

/* Lewa kolumna: tekst, statystyki, przycisk */
.fvs__copy { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; min-width: 0;
  padding: clamp(32px, 4vw, 64px) clamp(24px, 3vw, 56px) clamp(32px, 4vw, 64px) var(--fvs-margin); }
.fvs__head-in { width: 100%; max-width: 620px; }
.fvs__title { margin: 0; color: #fff; font-size: clamp(32px, 3.6vw, 56px); font-weight: 600; line-height: 1.1; letter-spacing: -.02em; text-wrap: balance; }
.fvs__intro { max-width: 560px; margin: 24px 0 0; color: rgba(255, 255, 255, .82); font-size: clamp(16px, 1.25vw, 18px); line-height: 1.65; text-wrap: pretty; }

.fvs__stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, max-content)); gap: 28px 0; width: 100%; max-width: 620px; margin: clamp(32px, 3.6vw, 56px) 0 0; padding: 0; list-style: none; text-align: left; }
.fvs__stat { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 4px clamp(14px, 1.5vw, 26px); }
.fvs__stat:first-child { padding-left: 0; }
.fvs__stat + .fvs__stat { border-left: 1px solid rgba(255, 255, 255, .18); }
.fvs__stat-value { color: #fff; font-size: clamp(26px, 2.2vw, 40px); font-weight: 600; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fvs__stat-label { max-width: 150px; color: rgba(255, 255, 255, .7); font-size: 14px; line-height: 1.4; }

/* Przycisk – jak w boksach Filamentów: kontur, wersaliki, białe wypełnienie wjeżdża od lewej */
.fvs__cta-wrap { display: flex; justify-content: flex-start; margin-top: clamp(28px, 3vw, 44px); }
.fvs__cta {
  display: inline-block; padding: 12px 35px; color: #fff; font-size: 1rem; font-weight: 500; letter-spacing: 1px; text-decoration: none; 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;
}
.fvs__cta:hover, .fvs__cta:focus-visible { color: #000; background-size: 100% 100%; }

/* Prawa kolumna: wideo przy krawędzi strony, pod nim karta funkcji i paginacja */
.fvs__media { min-width: 0; }
.fvs__frame { overflow: hidden; background: #0b2a85; isolation: isolate; }
.fvs__stage { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #0b2a85; }
.fvs__panel { position: absolute; inset: 0; opacity: 0; transition: opacity .5s ease-in-out; pointer-events: none; }
.fvs__panel.is-active { opacity: 1; z-index: 2; pointer-events: auto; }
.fvs__video { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }

/* Karta funkcji styka się z wideo, sięga krawędzi strony i ma zaokrąglony tylko lewy dolny róg; steruje się nią z jej wnętrza */
.fvs__dock { display: flex; flex-direction: column; gap: 20px; padding: 26px var(--fvs-margin) 24px 32px; color: var(--fvs-dark); background: rgba(255, 255, 255, .95); border-radius: 0 0 0 30px; box-shadow: 0 24px 60px rgba(0, 6, 50, .25); }
.fvs__info { order: 1; display: grid; }
.fvs__info-item { grid-area: 1 / 1; opacity: 0; transform: translate3d(0, 10px, 0); pointer-events: none; transition: opacity .35s ease, transform .5s var(--fvs-ease); }
.fvs__info-item.is-active { opacity: 1; transform: none; pointer-events: auto; transition-delay: .12s; }
.fvs__info-num { display: inline-block; margin-right: 12px; color: #0202cc; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .06em; vertical-align: middle; }
.fvs__info-tag { display: inline; color: var(--fvs-dark); font-size: clamp(18px, 1.6vw, 22px); font-weight: 700; line-height: 1.25; vertical-align: middle; }
.fvs__info-text { display: block; margin-top: 10px; color: rgba(0, 0, 0, .64); font-size: clamp(14px, 1.1vw, 16px); line-height: 1.55; }

/* Paginacja w karcie: strzałki, segmenty z paskiem postępu, licznik */
.fvs__sidebar { order: 2; display: flex; align-items: center; gap: 18px; }
.fvs__arrows { display: flex; flex-direction: row; gap: 8px; flex: 0 0 auto; }
.fvs__arrow {
  display: grid; place-items: center; width: 40px; height: 40px; padding: 0; color: var(--fvs-dark);
  background: #e9ecf6; border: 0; border-radius: 50%; cursor: pointer; transition: background .2s ease, color .2s ease, opacity .2s ease;
}
.fvs__arrow:hover:not(:disabled) { color: #fff; background: #0202cc; }
.fvs__arrow:disabled { opacity: .35; cursor: default; }
.fvs__arrow svg { width: 20px; height: 20px; }
.fvs__count { flex: 0 0 auto; color: rgba(0, 0, 0, .5); font-size: 14px; font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.fvs__count b { color: var(--fvs-dark); font-weight: 700; }

.fvs__buttons { display: flex; flex: 1; gap: 8px; min-width: 0; margin: 0; padding: 0; list-style: none; }
.fvs__buttons li { flex: 1; min-width: 0; }
.fvs__button { position: relative; display: block; width: 100%; height: 32px; padding: 0; overflow: hidden; background: transparent; border: 0; border-radius: 0; cursor: pointer; }
.fvs__button-head, .fvs__button-desc { display: none; }
.fvs__button:focus-visible, .fvs__arrow:focus-visible, .fvs__marrow:focus-visible { outline: 2px solid #02bfff; outline-offset: 2px; }
.fvs__progress { position: absolute; left: 0; right: 0; top: 50%; height: 4px; margin-top: -2px; background: rgba(15, 50, 155, .16); border-radius: 4px; overflow: hidden; transition: background .3s ease; }
.fvs__progress i { display: block; width: 100%; height: 100%; background: #0202cc; transform: scaleX(var(--p, 0)); transform-origin: 0 50%; }
.fvs__button:hover .fvs__progress { background: rgba(15, 50, 155, .3); }
.fvs__button.is-past .fvs__progress i { transform: none; opacity: .7; }
.fvs__button.is-active .fvs__progress { height: 6px; margin-top: -3px; }

.fvs__mnav { display: none; }

/* Wejście sekcji po wjechaniu w widok (klasy dodaje JS – bez JS wszystko jest widoczne) */
.fvs.is-ready:not(.is-in) .fvs__title, .fvs.is-ready:not(.is-in) .fvs__intro,
.fvs.is-ready:not(.is-in) .fvs__stat, .fvs.is-ready:not(.is-in) .fvs__cta-wrap { opacity: 0; transform: translate3d(0, 28px, 0); }
.fvs.is-ready:not(.is-in) .fvs__frame { opacity: 0; transform: translate3d(64px, 0, 0); }
.fvs.is-ready:not(.is-in) .fvs__dock { opacity: 0; transform: translate3d(0, 24px, 0); }
.fvs.is-ready.is-in .fvs__title, .fvs.is-ready.is-in .fvs__intro,
.fvs.is-ready.is-in .fvs__stat, .fvs.is-ready.is-in .fvs__cta-wrap { animation: fvs-rise .8s var(--fvs-ease) backwards; }
.fvs.is-ready.is-in .fvs__title { animation-delay: .08s; }
.fvs.is-ready.is-in .fvs__intro { animation-delay: .16s; }
.fvs.is-ready.is-in .fvs__frame { animation: fvs-frame 1s var(--fvs-ease) backwards; }
.fvs.is-ready.is-in .fvs__dock { animation: fvs-rise .8s .35s var(--fvs-ease) backwards; }
.fvs.is-ready.is-in .fvs__stat:nth-child(2) { animation-delay: .1s; }
.fvs.is-ready.is-in .fvs__stat:nth-child(3) { animation-delay: .2s; }
.fvs.is-ready.is-in .fvs__stat:nth-child(4) { animation-delay: .3s; }
@keyframes fvs-rise { from { opacity: 0; transform: translate3d(0, 28px, 0); } to { opacity: 1; transform: none; } }
@keyframes fvs-frame { from { opacity: 0; transform: translate3d(64px, 0, 0); } to { opacity: 1; transform: none; } }

/* Tablet i telefon: jedna kolumna – tytuł, wideo, kapsuły (przewijany pasek), strzałki, opis aktywnej funkcji, statystyki, przycisk */
@media (max-width: 1280px) {
  .fvs__body { padding-bottom: 48px; }
  .fvs__grid { display: flex; flex-direction: column; }
  .fvs__copy { display: contents; }
  .fvs__head-in { order: 1; max-width: none; padding: 32px 24px 28px; text-align: center; }
  .fvs__intro { max-width: 760px; margin: 18px auto 0; }
  .fvs__media { order: 2; }
  .fvs__frame { background: transparent; }
  .fvs.has-mobile .fvs__stage { aspect-ratio: 1 / 1; }
  .fvs__stats { order: 3; justify-content: center; max-width: 760px; margin: 40px auto 0; padding-inline: 16px; text-align: center; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
  .fvs__stat { align-items: center; }
  .fvs__stat:first-child { padding-left: clamp(16px, 2vw, 32px); }
  .fvs__cta-wrap { order: 4; justify-content: center; margin-top: 32px; }

  .fvs__dock { gap: 0; padding: 16px 0 0; color: #fff; background: transparent; border-radius: 0; box-shadow: none; }
  .fvs__sidebar { order: 1; display: block; }
  .fvs__mnav { order: 2; }
  .fvs__info { order: 3; padding: 12px 24px 0; }
  .fvs__arrows, .fvs__count { display: none; }

  .fvs__buttons { gap: 8px; padding: 4px 16px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; overscroll-behavior-x: contain; }
  .fvs__buttons::-webkit-scrollbar { display: none; }
  .fvs__buttons li { flex: 0 0 auto; scroll-snap-align: center; }
  .fvs__button {
    width: auto; height: auto; padding: 10px 16px; color: #fff; background: transparent; border: 1px solid rgba(255, 255, 255, .35); border-radius: 999px;
    transition: background .25s ease, color .25s ease, border-color .25s ease;
  }
  .fvs__button:hover { background: rgba(255, 255, 255, .12); }
  .fvs__button.is-active { color: var(--fvs-dark); background: #fff; border-color: #fff; }
  .fvs__button-head { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
  .fvs__num { display: none; }
  .fvs__button-label { font-size: 14px; font-weight: 700; line-height: 1.2; }
  .fvs__progress { top: auto; bottom: 0; height: 3px; margin-top: 0; background: rgba(2, 2, 204, .1); border-radius: 0; opacity: 0; }
  .fvs__progress i { background: #0202cc; }
  .fvs__button.is-active .fvs__progress { height: 3px; margin-top: 0; opacity: 1; }
  .fvs__button.is-past .fvs__progress i { transform: scaleX(var(--p, 0)); opacity: 1; }
  .fvs__button:hover .fvs__progress { background: rgba(2, 2, 204, .1); }

  .fvs__mnav { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 16px 0 4px; }
  .fvs__marrow {
    display: grid; place-items: center; width: 40px; height: 40px; padding: 0; color: #fff; background: transparent; border: 1px solid rgba(255, 255, 255, .45);
    border-radius: 50%; cursor: pointer; transition: background .2s ease, color .2s ease, opacity .2s ease;
  }
  .fvs__marrow:hover:not(:disabled) { color: var(--fvs-dark); background: #fff; }
  .fvs__marrow:disabled { opacity: .3; cursor: default; }

  .fvs__info-item { transform: none; transition: opacity .3s ease; }
  .fvs__info-item.is-active { transition-delay: 0s; }
  .fvs__info-num { display: none; }
  .fvs__info-tag { display: block; margin-bottom: 8px; color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .06em; line-height: 1.2; text-transform: uppercase; }
  .fvs__info-text { margin-top: 0; color: rgba(255, 255, 255, .82); font-size: 15px; }
  .fvs__info-item.is-active { padding-bottom: 0; }
}
@media (max-width: 640px) {
  .fvs { margin-block: 2.5rem; }
  .fvs__head-in { padding: 28px 20px 24px; }
  .fvs__stats { grid-template-columns: 1fr 1fr; row-gap: 24px; }
  .fvs__stat:nth-child(odd) { border-left: 0; padding-left: 16px; }
  .fvs__stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  .fvs *, .fvs *::before, .fvs *::after { transition: none !important; animation: none !important; }
  .fvs.is-ready:not(.is-in) * { opacity: 1 !important; transform: none !important; }
}
