/* ===== Zmienne i reset ===== */

:root {
  --color-text: #16233f;
  --color-text-muted: #4a5568;
  --color-bg: #ffffff;
  --color-bg-alt: #f4f6fa;
  --color-accent: #1d4ed8;
  --color-accent-dark: #1e40af;
  --color-border: #dde3ec;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --container-width: 68rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  line-height: 1.2;
  letter-spacing: -0.01em;
}

ul, ol {
  list-style: none;
}

a {
  color: var(--color-accent);
}

/* ===== Układ ===== */

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container--narrow {
  max-width: 44rem;
}

.section {
  padding: 5rem 0;
}

.section--alt {
  background: var(--color-bg-alt);
}

.section h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.section__lead {
  max-width: 44rem;
  color: var(--color-text-muted);
  margin-bottom: 2.5rem;
}

/* ===== Nagłówek strony ===== */

.site-header {
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 0;
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
}

.logo {
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--color-text);
  text-decoration: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.site-nav a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-weight: 500;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--color-accent);
}

/* ===== Hero ===== */

.hero {
  padding: 6rem 0 5.5rem;
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
}

@media (max-width: 52rem) {
  .hero__inner {
    grid-template-columns: 1fr;
  }

  .hero__visual {
    display: none;
  }
}

.hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  margin-bottom: 1.25rem;
}

.hero__lead {
  max-width: 40rem;
  font-size: 1.1875rem;
  color: var(--color-text-muted);
  margin-bottom: 2.25rem;
}

.hero__pilot {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.75rem;
  max-width: 40rem;
  margin-top: 1.5rem;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
}

.hero__pilot a {
  color: var(--color-accent);
  font-weight: 600;
}

/* ===== Wizualizacja modułów w hero ===== */

.system-card {
  border: 1px solid var(--color-border);
  border-radius: 1rem;
  padding: 1.75rem;
  background: var(--color-bg);
  box-shadow: 0 20px 45px -20px rgba(22, 35, 63, 0.25);
}

.system-card__title {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: 1.25rem;
}

.system-card__modules {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
}

.module {
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  background: #eef3ff;
  color: var(--color-accent-dark);
  font-size: 0.875rem;
  font-weight: 600;
  opacity: 0;
  animation: module-in 0.5s ease forwards;
}

.module:nth-child(1) { animation-delay: 0.2s; }
.module:nth-child(2) { animation-delay: 0.5s; }
.module:nth-child(3) { animation-delay: 0.8s; }
.module:nth-child(4) { animation-delay: 1.1s; }
.module:nth-child(5) { animation-delay: 1.5s; }

.module--next {
  background: transparent;
  border: 1.5px dashed var(--color-accent);
  color: var(--color-accent);
  animation: module-in 0.5s ease forwards, module-pulse 2.5s ease-in-out 2s infinite;
}

@keyframes module-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes module-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(29, 78, 216, 0.25); }
  50% { box-shadow: 0 0 0 6px rgba(29, 78, 216, 0); }
}

/* ===== Przyciski ===== */

.button {
  display: inline-block;
  padding: 0.875rem 1.75rem;
  border-radius: 0.5rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.button--primary {
  background: var(--color-accent);
  color: #ffffff;
}

.button--primary:hover,
.button--primary:focus-visible {
  background: var(--color-accent-dark);
}

.button--secondary {
  border: 1.5px solid var(--color-accent);
  color: var(--color-accent);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.button--secondary:hover,
.button--secondary:focus-visible {
  background: var(--color-accent);
  color: #ffffff;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

/* ===== Porównanie modeli ===== */

.compare {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 1.5rem;
}

.compare__col {
  border: 1px solid var(--color-border);
  border-radius: 0.75rem;
  padding: 2rem;
}

.compare__col h3 {
  font-size: 1.125rem;
  margin-bottom: 1.25rem;
}

.compare__col li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.875rem;
  color: var(--color-text-muted);
}

.compare__col li::before {
  position: absolute;
  left: 0;
  font-weight: 700;
}

.compare__col--old li::before {
  content: "✕";
  color: #b45309;
}

.compare__col--new {
  border-color: var(--color-accent);
  background: #f5f8ff;
}

.compare__col--new li::before {
  content: "✓";
  color: var(--color-accent);
}

/* ===== Kroki ===== */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 2rem;
  counter-reset: step;
}

.steps__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--color-accent);
  color: #ffffff;
  font-weight: 700;
  margin-bottom: 1rem;
}

.steps__item h3 {
  font-size: 1.0625rem;
  margin-bottom: 0.5rem;
}

.steps__item p {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
}

/* ===== Przykłady pierwszej wersji ===== */

.examples {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

@media (max-width: 60rem) {
  .examples {
    grid-template-columns: 1fr;
    max-width: 36rem;
  }
}

.example {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--color-border);
  border-radius: 0.75rem;
  padding: 1.75rem;
  background: var(--color-bg);
}

.example__icon {
  display: block;
  color: var(--color-accent);
  margin-bottom: 1rem;
}

.example__tag {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}

.example h3 {
  font-size: 1.125rem;
  margin-bottom: 0.625rem;
}

.example__problem {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  margin-bottom: 1.25rem;
}

.example__label {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}

.example ul {
  margin-bottom: 1.25rem;
}

.example li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.375rem;
  font-size: 0.9375rem;
}

.example li::before {
  content: "✓";
  position: absolute;
  left: 0;
  font-weight: 700;
  color: var(--color-accent);
}

/* Etykieta modułów i chipy razem na dole karty, niezależnie od długości tekstu wyżej. */
.example ul + .example__label {
  margin-top: auto;
  padding-top: 1.25rem;
}

.example__modules {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Chipy jak w hero, ale bez animacji: cztery karty naraz by migały przy przewijaniu. */
.chip {
  padding: 0.35rem 0.75rem;
  border-radius: 0.5rem;
  background: #eef3ff;
  color: var(--color-accent-dark);
  font-size: 0.8125rem;
  font-weight: 600;
}

.chip--next {
  background: transparent;
  border: 1.5px dashed var(--color-accent);
  color: var(--color-accent);
}

.examples__note {
  max-width: 44rem;
  margin-top: 2rem;
  color: var(--color-text-muted);
  font-size: 0.9375rem;
}

/* ===== Realizacje: historia w grafice ===== */

.story {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem 1.5rem;
}

/* Przerywana ścieżka prowadząca przez kadry; rysowana za kadrami, tylko na szerokim ekranie. */
.story__path {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 12.5rem;
  z-index: 0;
  pointer-events: none;
}

.story__frame {
  position: relative;
  z-index: 1;
  margin: 0;
}

.story__art {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 1rem;
}

.story__frame figcaption {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 0.75rem;
  align-items: center;
}

.story__step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--color-accent);
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 700;
}

.story__frame strong {
  font-size: 1.0625rem;
}

.story__desc {
  grid-column: 2;
  color: var(--color-text-muted);
  font-size: 0.9375rem;
}

.story__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-top: 3rem;
  padding: 1.5rem 1.75rem;
  border: 1px solid var(--color-border);
  border-radius: 0.75rem;
  background: var(--color-bg);
}

.story__cta p {
  flex: 1 1 24rem;
  margin: 0;
  color: var(--color-text-muted);
}

.story__cta .button {
  flex: 0 0 auto;
}

@media (max-width: 60rem) {
  .story {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .story__path {
    display: none;
  }
}

@media (max-width: 36rem) {
  .story {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .story__art {
    max-width: 18rem;
    margin-left: auto;
    margin-right: auto;
  }
}

/* ===== O mnie ===== */

.about {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  padding: 2.5rem;
  border-radius: 1rem;
  background: var(--color-bg-alt);
}

.about__text > p {
  margin-bottom: 1.25rem;
}

.about__facts li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--color-text-muted);
  font-size: 0.9375rem;
}

.about__facts li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--color-accent);
}

.about__facts strong {
  color: var(--color-text);
}

.about__photo {
  flex-shrink: 0;
  width: 9.5rem;
  height: 9.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #16233f, #1d4ed8);
  color: #ffffff;
  font-size: 2.5rem;
  font-weight: 700;
  object-fit: cover;
}

@media (max-width: 40rem) {
  .about {
    flex-direction: column;
    padding: 2rem 1.5rem;
  }

  .about__text > p {
    text-align: center;
  }
}

/* ===== Wycena ===== */

.pricing {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.pricing__item {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 0.75rem;
  padding: 1.75rem;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.pricing__item:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px -18px rgba(22, 35, 63, 0.35);
}

.pricing__item--main {
  border-color: var(--color-accent);
  box-shadow: 0 10px 30px -18px rgba(29, 78, 216, 0.4);
}

.pricing__item h3 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.pricing__price {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
}

.pricing__price span {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

.pricing__item > p:last-child {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
}

.pilot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 2rem;
  margin-bottom: 1.5rem;
  padding: 1.75rem;
  border: 1px solid var(--color-accent);
  border-radius: 0.75rem;
  background: #eef3ff;
  box-shadow: 0 10px 30px -18px rgba(29, 78, 216, 0.4);
}

.pilot__text {
  flex: 1 1 24rem;
}

.pilot__text > p:last-child {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  margin-bottom: 0;
}

.pilot__eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}

.pilot__badge,
.hero__pilot-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--color-accent);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pilot__title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}

.pilot__button {
  flex: 0 0 auto;
}

.terms {
  max-width: 44rem;
}

.terms li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.75rem;
  color: var(--color-text-muted);
}

.terms li::before {
  content: "✓";
  position: absolute;
  left: 0;
  font-weight: 700;
  color: var(--color-accent);
}

/* ===== Kontakt ===== */

.section--contact {
  text-align: center;
  background: var(--color-bg-alt);
}

.section--contact p {
  color: var(--color-text-muted);
  margin-bottom: 2rem;
}

/* ===== Stopka ===== */

.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 2rem 0;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

/* ===== Animacje przy przewijaniu ===== */

.js .reveal {
  opacity: 0;
}

.js .reveal.is-visible {
  opacity: 1;
  animation: reveal-in 0.6s ease backwards;
}

.js .reveal.is-visible:nth-child(2) {
  animation-delay: 0.12s;
}

.js .reveal.is-visible:nth-child(3) {
  animation-delay: 0.24s;
}

.js .reveal.is-visible:nth-child(4) {
  animation-delay: 0.36s;
}

/* Historia czyta się jak sekwencja, więc kadry wchodzą wyraźnie jeden po drugim. */
.js .story .reveal.is-visible:nth-child(2) {
  animation-delay: 0.3s;
}

.js .story .reveal.is-visible:nth-child(3) {
  animation-delay: 0.6s;
}

.js .story .reveal.is-visible:nth-child(4) {
  animation-delay: 0.9s;
}

@keyframes reveal-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

.compare__col,
.example {
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.compare__col:hover,
.example:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px -18px rgba(22, 35, 63, 0.35);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .module,
  .module--next {
    animation: none;
    opacity: 1;
  }

  .js .reveal,
  .js .reveal.is-visible {
    opacity: 1;
    animation: none;
  }

  .compare__col:hover,
  .example:hover,
  .pricing__item:hover {
    transform: none;
  }
}

/* ===== Mobile ===== */

@media (max-width: 40rem) {
  .section {
    padding: 3.5rem 0;
  }

  .hero {
    padding: 4rem 0 3.5rem;
  }
}
