/* ===================================================
   index-revamp.css – typografia, animacje, energia
   Nakładka na style.css – załadowana po nim w index.html
   =================================================== */

/* --- SCROLL PROGRESS BAR --- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: #00b32c;
  box-shadow: 0 0 10px rgba(0, 179, 44, 0.7);
  z-index: 9999;
  pointer-events: none;
}

/* --- ANIMOWANA SIATKA W TLE --- */
.idx-grid-bg {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 179, 44, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 179, 44, 0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  animation: idx-grid-in 2s ease-out 0.2s forwards;
}

@keyframes idx-grid-in {
  to { opacity: 1; }
}

/* ============================================
   HERO – sekwencja wejścia na stronę
   ============================================ */

.hero-tag-row {
  opacity: 0;
  animation: fade-up 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.15s forwards;
}

/* H1 line-by-line reveal */
.line-wrap {
  display: block;
  overflow: hidden;
  padding-bottom: 0.06em;
}

.line-inner {
  display: block;
  opacity: 0;
  transform: translateY(110%);
  animation: line-up 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.35s forwards;
}

.line-inner--d2 {
  animation-delay: 0.52s;
}

@keyframes line-up {
  to { opacity: 1; transform: translateY(0); }
}

.hero-subtitle {
  opacity: 0;
  animation: fade-up 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.72s forwards;
}

.hero-meta {
  opacity: 0;
  animation: fade-up 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.86s forwards;
}

.hero-ctas {
  opacity: 0;
  animation: fade-up 0.7s cubic-bezier(0.22, 1, 0.36, 1) 1.0s forwards;
}

.hero-loading {
  opacity: 0;
  animation: fade-up 0.6s ease 1.14s forwards;
}

.hero-photo-frame {
  opacity: 0;
  transform: translateY(28px) scale(0.96);
  animation: photo-in 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.4s forwards;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes photo-in {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ============================================
   SCROLL REVEAL – prosty fade-up
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition:
    opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   SCROLL REVEAL – heading (eyebrow → h2 → p)
   ============================================ */
.reveal-heading .system-eyebrow,
.reveal-heading h2,
.reveal-heading p {
  opacity: 0;
}

.reveal-heading.is-visible .system-eyebrow {
  animation: eyebrow-in 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) 0.05s forwards;
}

.reveal-heading.is-visible h2 {
  animation: fade-up 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.2s forwards;
}

.reveal-heading.is-visible p {
  animation: fade-up 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.35s forwards;
}

@keyframes eyebrow-in {
  from { opacity: 0; transform: translateY(14px) scale(0.88); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ============================================
   SCROLL REVEAL – stagger kart (jedna po drugiej)
   ============================================ */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(32px);
}

.reveal-stagger.is-visible > *:nth-child(1) {
  animation: card-in 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.05s forwards;
}
.reveal-stagger.is-visible > *:nth-child(2) {
  animation: card-in 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.17s forwards;
}
.reveal-stagger.is-visible > *:nth-child(3) {
  animation: card-in 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.29s forwards;
}
.reveal-stagger.is-visible > *:nth-child(4) {
  animation: card-in 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.41s forwards;
}
.reveal-stagger.is-visible > *:nth-child(5) {
  animation: card-in 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.53s forwards;
}
.reveal-stagger.is-visible > *:nth-child(6) {
  animation: card-in 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.65s forwards;
}

@keyframes card-in {
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   TYPOGRAFIA
   ============================================ */
.hero-title {
  font-size: clamp(3rem, 6.5vw, 5.2rem);
  letter-spacing: -0.045em;
  line-height: 1.0;
}

.system-heading h2 {
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  letter-spacing: -0.04em;
  line-height: 1.08;
  margin-bottom: 0.6rem;
}

.system-heading p {
  font-size: 1.05rem;
  max-width: 58ch;
  line-height: 1.7;
}

.hero-subtitle {
  font-size: 1.08rem;
  line-height: 1.72;
  max-width: 54ch;
  color: #4b5563;
  margin-top: 1rem;
  margin-bottom: 1.4rem;
}

/* ============================================
   EYEBROW TAGS – pill z pulsującą kropką
   ============================================ */
.system-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #00b32c;
  background: rgba(0, 179, 44, 0.08);
  border: 1px solid rgba(0, 179, 44, 0.22);
  padding: 0.4rem 1.1rem;
  border-radius: 999px;
  margin-bottom: 1.75rem;
}

.system-eyebrow::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #00b32c;
  border-radius: 50%;
  animation: eyebrow-pulse 2.2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes eyebrow-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.3; transform: scale(0.5); }
}

#wybierz-sciezke .system-eyebrow {
  background: rgba(0, 179, 44, 0.12);
  border-color: rgba(0, 179, 44, 0.32);
}

/* ============================================
   SEKCJE – więcej oddechu
   ============================================ */
.section {
  margin: 5rem 0;
}

/* ============================================
   KARTY – hover z zielonym akcentem
   ============================================ */
.win-box {
  box-shadow:
    0 36px 80px rgba(15, 23, 42, 0.18),
    0 1px 0 rgba(255, 255, 255, 0.7);
}

.module-card:hover {
  transform: translateY(-6px);
  box-shadow:
    0 24px 50px rgba(15, 23, 42, 0.13),
    0 0 0 1px rgba(0, 179, 44, 0.2);
  border-color: rgba(0, 179, 44, 0.28);
}

.testimonial-card:hover {
  border-color: rgba(0, 179, 44, 0.24);
}

#wybierz-sciezke .sciezka-card {
  transition:
    transform 0.35s cubic-bezier(0.34, 1.2, 0.64, 1),
    box-shadow 0.35s ease;
}

#wybierz-sciezke .sciezka-card:hover {
  transform: translateY(-10px);
}

/* ============================================
   GRIDY KART - jeden pod drugim na telefonie
   ============================================ */
@media (max-width: 640px) {
  .benefits-grid,
  .benefits-grid--problem,
  .testimonials-grid,
  .case-study-grid,
  .sciezki-grid,
  .bento-grid,
  .packages-grid,
  .features-grid,
  .steps-grid {
    grid-template-columns: 1fr;
  }

  .bento-large {
    grid-column: span 1;
  }
}

/* ============================================
   MOBILE
   ============================================ */
@media (max-width: 768px) {
  .hero-title {
    font-size: clamp(2.4rem, 8vw, 3.6rem);
    letter-spacing: -0.035em;
  }

  .system-heading h2 {
    font-size: clamp(2rem, 6.5vw, 2.8rem);
  }

  .section {
    margin: 3.5rem 0;
  }

  /* Elementy dekoracyjne zbędne na mobile */
  .hero-loading {
    display: none;
  }

  /* Tekst z bulletami - mniej agresywny spacing */
  .hero-meta {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    line-height: 1.7;
  }
}

@media (max-width: 560px) {
  /* Przyciski CTA - stack na małym ekranie */
  .hero-ctas {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-ctas .btn {
    width: 100%;
    justify-content: center;
  }

  /* Contact section */
  .contact-section {
    padding: 4rem 1.2rem 5rem;
  }

  .action-title {
    font-size: clamp(2rem, 8vw, 2.8rem);
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: clamp(1.9rem, 9vw, 2.6rem);
    letter-spacing: -0.03em;
  }

  /* Na bardzo małych ekranach ukryj meta całkowicie */
  .hero-meta {
    display: none;
  }

  .contact-section {
    padding: 3.5rem 1rem 4.5rem;
  }

  .action-title {
    font-size: clamp(1.75rem, 8vw, 2.4rem);
  }

  .action-sub {
    font-size: 0.95rem;
  }
}

/* ============================================
   KONTAKT – hub dark style (jak oferta.html)
   ============================================ */

/* Full-bleed z kontenera main */
.contact-section {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  position: relative;
  background: #111827;
  border-top: none;
  box-shadow: none;
  padding: 7rem 1.5rem 8rem;
  margin-top: 5rem;
  overflow: hidden;
  color: #ffffff;
}

/* Animowana siatka w tle sekcji */
.contact-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 179, 44, 0.038) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 179, 44, 0.038) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  animation: idx-grid-in 2s ease-out 0.1s forwards;
}

/* Usuń stary card-box */
.contact-inner {
  position: relative;
  z-index: 1;
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
  max-width: 720px;
  margin: 0 auto;
}

/* Eyebrow pill */
.contact-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #00b32c;
  background: rgba(0, 179, 44, 0.09);
  border: 1px solid rgba(0, 179, 44, 0.24);
  padding: 0.45rem 1.25rem;
  border-radius: 999px;
  margin-bottom: 2rem;
}

.contact-dot {
  width: 6px;
  height: 6px;
  background: #00b32c;
  border-radius: 50%;
  animation: eyebrow-pulse 2.2s ease-in-out infinite;
  flex-shrink: 0;
}

/* Tytuł - boldny, biały, duży */
.action-title {
  font-size: clamp(2.8rem, 5vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.04;
  color: #ffffff;
  text-transform: none;
  margin-bottom: 1.2rem;
}

/* Podtytuł */
.action-sub {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.42);
  line-height: 1.75;
  max-width: 52ch;
  margin-top: 0;
}

/* Labele */
.field label {
  color: rgba(255, 255, 255, 0.58);
}

/* Inputy - hub style */
.input-retro,
.textarea-retro,
.select-retro {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(0, 179, 44, 0.2);
  color: rgba(255, 255, 255, 0.88);
  box-shadow: none;
}

.input-retro::placeholder,
.textarea-retro::placeholder {
  color: rgba(255, 255, 255, 0.2);
}

.input-retro:focus,
.textarea-retro:focus,
.select-retro:focus {
  border-color: rgba(0, 179, 44, 0.55);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 1), 0 0 20px rgba(0, 179, 44, 0.18);
}

/* Przycisk submit - hub CTA */
.btn-primary--full {
  background: rgba(0, 179, 44, 0.1);
  color: #00b32c;
  border: 1px solid rgba(0, 179, 44, 0.32);
  box-shadow: none;
  letter-spacing: 0.18em;
  transition: background 0.3s, border-color 0.3s, color 0.3s, transform 0.3s;
}

.btn-primary--full:hover {
  background: rgba(0, 179, 44, 0.18);
  border-color: rgba(0, 179, 44, 0.6);
  color: #00d435;
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 179, 44, 0.2);
}

.btn-primary--full::after {
  display: none;
}

/* Drobny tekst zgody */
.consent-text {
  color: rgba(255, 255, 255, 0.22);
}

/* Mobile */
@media (max-width: 768px) {
  .action-title {
    font-size: clamp(2.2rem, 8vw, 3rem);
  }

  .contact-section {
    padding: 5rem 1.2rem 6rem;
  }
}
