/* Wersja na telefon i drobne poprawki układu (2026-10-28).
   Ładowany jako ostatni arkusz na każdej stronie. */

/* ---- Hero: na telefonie i tablecie pionowym sam tekst + przyciski ----
   Zdjęcie i powiadomienia uzupełniają tekst tylko obok niego (laptop).
   Pod tekstem wydłużały stronę o ekran i nic nie dodawały. */
@media (max-width: 960px) {
  .hero--photo .hero-photo { display: none; }
}

/* ---- Mniejsze odstępy między sekcjami na telefonie ---- */
@media (max-width: 600px) {
  .section { padding: 64px 0; }
  .case-section { padding: 48px 0; }
}

/* ---- Bezpłatny audyt: długi przycisk nie wychodzi poza kartę ---- */
@media (max-width: 600px) {
  .audit__cta-btn {
    width: 100%;
    height: auto;
    min-height: 48px;
    padding: 12px 18px;
    white-space: normal;
    text-align: center;
    line-height: 1.3;
  }
}

/* ---- O mnie ----
   Laptop: zdjęcie po lewej, tekst i liczby po prawej (bez zmian).
   Telefon i tablet: tekst, a pod nim jedna karta "wizytówka":
   zdjęcie z imieniem na górze, liczby pod spodem. Zdjęcie jest częścią
   sekcji, a nie osobnym obrazkiem między sekcjami. */
.about { grid-template-areas: "photo content" "photo creds"; grid-template-rows: auto 1fr; row-gap: 0; }
.about > .about__photo { grid-area: photo; }
.about > .about__content { grid-area: content; }
.about > .about__creds { grid-area: creds; }
.about__me { display: none; }
@media (max-width: 900px) {
  .about { display: flex; flex-direction: column; gap: 0; }
  .about > .about__photo { display: none; }
  .about > .about__creds {
    margin-top: 28px;
    max-width: none;
    padding: 0 20px 20px;
    border: 1px solid var(--border);
    width: 100%;
    box-sizing: border-box;
    border-radius: 16px;
    background: var(--bg-1);
    overflow: hidden;
  }
  /* górna część karty: pionowe zdjęcie po lewej, imię obok */
  .about__me {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 20px 0 6px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
  }
  .about__me img {
    width: 116px;
    height: 145px;
    flex-shrink: 0;
    object-fit: cover;
    object-position: 50% 0;
    border-radius: 14px;
    background:
      radial-gradient(70% 60% at 50% 40%, rgba(210, 255, 69, 0.16), transparent 75%),
      var(--bg-2);
    border: 1px solid var(--border-strong);
  }
  .about__me span {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    font-size: 13.5px;
    color: var(--text-3);
    line-height: 1.4;
    white-space: normal;
  }
  .about__me strong { font-size: 19px; font-weight: 650; color: var(--text-1); }
}

/* ---- Paski statystyk w case: równe odstępy zamiast równych kolumn ----
   Przy krótkich wartościach równe kolumny zostawiały dziurę przed trzecią. */
.case-stats {
  display: flex;
  flex-wrap: nowrap;
  gap: 32px;
}
.case-stats > div { flex: 0 1 auto; min-width: min-content; max-width: 11em; }
.case-stats .case-stat__label { hyphens: manual; overflow-wrap: normal; }
.case-outcome > div { min-width: 0; }
@media (max-width: 360px) {
  .case-stats { flex-wrap: wrap; }
}
@media (max-width: 420px) {
  .case-stats { gap: 18px; }
  .case-stats > div { max-width: 7.5em; }
}

/* ---- Wideo poziome (case 1): wyraźny przycisk odtwarzania ---- */
.case-video-box { position: relative; }
.video-play {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  border: 0;
  background: linear-gradient(180deg, rgba(10, 10, 12, 0.15) 0%, rgba(10, 10, 12, 0.55) 100%);
  color: var(--text-1);
  font: inherit;
  cursor: pointer;
}
.video-play__icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--lime);
  color: var(--bg-0);
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 10px rgba(210, 255, 69, 0.18), 0 10px 30px rgba(0, 0, 0, 0.45);
  transition: transform 0.25s var(--ease-out);
}
.video-play__icon svg { width: 30px; height: 30px; margin-left: 4px; }
.video-play:hover .video-play__icon { transform: scale(1.06); }
.video-play__label {
  font-size: 14px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(10, 10, 12, 0.7);
}
.video-play__label small { font-weight: 400; color: var(--text-3); margin-left: 4px; }
.case-video-box.is-playing .video-play { display: none; }
@media (max-width: 600px) {
  /* film szerzej niż tekst, ale z małym marginesem od krawędzi ekranu */
  .case-video-box {
    margin-left: -12px;
    margin-right: -12px;
    border-radius: 12px;
  }
  .video-play__icon { width: 60px; height: 60px; }
  .video-play__icon svg { width: 26px; height: 26px; }
  .video-play__label { font-size: 13px; }
}

/* ---- Nagrania reaktywacji (case 2): 3 telefony obok siebie,
   na telefonie przewijane w bok (widać brzeg kolejnego nagrania) ---- */
.reakt-videos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 260px));
  justify-content: center;
  gap: 28px;
}
.reakt-video {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.reakt-video .phone-device { width: 260px; }
.reakt-video .phone-screen { height: 530px; }
.reakt-video .solution-caption { margin-top: 4px; }
.reakt-video__tag {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid currentColor;
}
.reakt-video__tag--hot { color: var(--lime); }
.reakt-video__tag--mid { color: #f5b544; }
.reakt-video__tag--cold { color: #7fb4ff; }
.reakt-videos__hint { display: none; }
.reakt-videos__note {
  margin: 20px auto 0;
  text-align: center;
  font-size: 12.5px;
  color: var(--text-3);
}
/* tablet: wszystkie trzy obok siebie, tylko mniejsze */
@media (max-width: 900px) {
  .reakt-videos { grid-template-columns: repeat(3, minmax(0, 220px)); gap: 18px; }
  .reakt-video .phone-device { width: 100%; }
  .reakt-video .phone-screen { height: auto; aspect-ratio: 9 / 18.4; }
}
/* telefon: przewijanie w bok, aktywne nagranie zawsze na środku,
   po bokach widać brzegi sąsiednich */
@media (max-width: 640px) {
  .reakt-videos {
    --card: min(260px, 70vw);
    display: flex;
    justify-content: flex-start;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin: 0 -24px;
    padding: 4px calc((100% + 48px - var(--card)) / 2) 8px;
    gap: 14px;
  }
  .reakt-videos::-webkit-scrollbar { display: none; }
  .reakt-video { flex: 0 0 var(--card); scroll-snap-align: center; scroll-snap-stop: always; }
  .reakt-videos__hint {
    display: block;
    margin: 12px 0 0;
    text-align: center;
    font-size: 12.5px;
    color: var(--text-3);
  }
  .reakt-videos__note { margin-top: 6px; }
}
.reakt-dots, .carousel-dots { display: none; }
@media (max-width: 640px) {
  .reakt-dots, .carousel-dots { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
  .reakt-dots button, .carousel-dots button {
    width: 28px; height: 28px; padding: 0; border: 0; background: none; cursor: pointer;
    display: grid; place-items: center;
  }
  .reakt-dots button::before, .carousel-dots button::before {
    content: ''; width: 8px; height: 8px; border-radius: 50%;
    background: var(--border-strong); transition: background 0.2s, transform 0.2s;
  }
  .reakt-dots button.is-active::before, .carousel-dots button.is-active::before { background: var(--lime); transform: scale(1.25); }
}

/* ---- Case 3: dwa telefony jeden pod drugim, ciaśniej ---- */
@media (max-width: 600px) {
  .case-solution-grid { gap: 18px; }
  .phone-screen--mail { height: 500px; }
  .phone-screen--video { height: 540px; }
  .solution-caption { margin-top: 12px; }
}

/* ---- Tablet pionowy: "Dla kogo" w trzech kolumnach zamiast jednej ---- */
@media (min-width: 700px) and (max-width: 900px) {
  #dla-kogo .bento { grid-template-columns: repeat(3, 1fr); }
}

/* ---- Przyciski w nagłówku case'a: odstęp zamiast sklejenia ---- */
.case-hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}
@media (max-width: 480px) {
  .case-hero__actions .btn { width: 100%; }
}

/* ---- Telefon: "Dla kogo" i "W czym pomagam" przewijane w bok,
   aktywna karta zawsze na środku, kropki pod spodem ---- */
@media (max-width: 640px) {
  #dla-kogo .bento,
  #pomagam .help-grid {
    --card: 84vw;
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    margin: 0 -24px;
    padding: 2px calc((100% + 48px - var(--card)) / 2) 6px;
    border-top: 0;
  }
  #dla-kogo .bento::-webkit-scrollbar,
  #pomagam .help-grid::-webkit-scrollbar { display: none; }
  #dla-kogo .bento-card,
  #pomagam .help-card {
    flex: 0 0 var(--card);
    scroll-snap-align: center;
    scroll-snap-stop: always;
  }
  #dla-kogo .bento-card--wide { padding: 24px; }
  #dla-kogo .bento-card--wide h3 { font-size: 24px; }
  #dla-kogo .bento-card--wide .bento-card__desc { font-size: 15px; }
  #pomagam .help-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 24px 22px;
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: 16px;
  }
  #pomagam .help-card h3 { margin: 0; font-size: 19px; }
  #pomagam .help-card p { margin: 0; font-size: 14.5px; }
}

/* ---- Współpraca na telefonie: kroki połączone pionową linią ---- */
@media (max-width: 640px) {
  .timeline { border-top: 0; }
  .timeline-step { position: relative; border-bottom: 0; padding: 18px 0; }
  .timeline-step::before {
    content: '';
    position: absolute;
    left: 17px;
    top: 58px;
    bottom: -18px;
    width: 2px;
    background: linear-gradient(var(--lime), rgba(210, 255, 69, 0.08));
    opacity: 0.5;
  }
  .timeline-step:last-child::before { display: none; }
  .timeline-step__num { background: var(--lime); color: var(--bg-0); border-color: var(--lime); font-weight: 700; }
}

/* klony kart z pętli karuzeli: tylko na telefonie */
@media (min-width: 641px) {
  #dla-kogo .is-clone, #pomagam .is-clone { display: none !important; }
}

/* ---- Filmy w makietach telefonów: własne sterowanie ---- */
.phone-screen--video { position: relative; }
.pv { position: absolute; inset: 0; z-index: 20; }
.pv__toggle {
  position: absolute; inset: 0 0 56px 0;
  width: 100%; border: 0; padding: 0; background: transparent; cursor: pointer;
  display: grid; place-items: center;
}
.pv__icon {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--lime); color: var(--bg-0);
  display: grid; place-items: center;
  box-shadow: 0 0 0 8px rgba(210, 255, 69, 0.18), 0 8px 24px rgba(0, 0, 0, 0.45);
  transition: opacity 0.2s, transform 0.2s;
}
.pv__icon svg { width: 28px; height: 28px; margin-left: 3px; }
.is-playing .pv__icon { opacity: 0; transform: scale(0.85); }
.pv__bar {
  position: absolute; left: 28px; right: 28px; bottom: 30px;
  height: 18px; cursor: pointer;
  display: flex; align-items: center;
}
.pv__bar::before {
  content: ''; position: absolute; left: 0; right: 0; height: 4px; border-radius: 4px;
  background: rgba(255, 255, 255, 0.28);
}
.pv__fill { position: relative; height: 4px; border-radius: 4px; background: var(--lime); width: 0; }
.pv__time {
  position: absolute; right: 30px; bottom: 50px;
  font-size: 11px; font-variant-numeric: tabular-nums; color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  pointer-events: none;
}

/* O mnie: dwie liczby w dwóch kolumnach (bez pustej trzeciej) */
@media (min-width: 601px) {
  .about__creds { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 480px; }
}
.about__cred-num { font-size: 22px; }

/* ---- Pasek Safari (iPhone) zawsze ciemny ----
   Safari barwi obszar wokół Dynamic Island i paska adresu kolorem stałego nagłówka,
   a gdy nagłówek jest przezroczysty, kolorem treści pod nim. Po odświeżeniu w połowie
   strony pod przezroczystym nagłówkiem bywa limonkowy element, więc nagłówek ma
   zawsze pełne ciemne tło (na górze strony wygląda tak samo, bo tło hero ma ten kolor). */
html { background-color: var(--bg-0); }
.nav,
.nav.is-scrolled { background: var(--bg-0); }
