/* HERO */
.hero{
  /* mniejszy dystans od sticky nav */
  padding: clamp(1.25rem, 2vw, 2rem) 0 clamp(2rem, 3vw, 3.25rem);
}

.hero__inner{
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad);

  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(1.25rem, 2.5vw, 3rem);
  align-items: center;
}

.hero__copy{ min-width: 0; }

.hero__eyebrow{
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-kicker);
  font-weight: var(--fw-semibold);
}

.hero__title{
  margin: 0 0 1rem;
  font-size: clamp(2.2rem, 4.2vw, 4.15rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: var(--fw-bold);
  color: var(--accent);

  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
}

.hero__smiley{
  white-space: nowrap; /* gwarantuje że ":)" nie rozpadnie się */
}

.hero__type{
  /* miejsce na typing (bez skakania layoutu) */
  display: inline-block;
  min-height: 1em;
}

/* caret jak w Apple typing */
.hero__caret{
  width: 0.12em;
  height: 0.9em;
  background: rgba(230,26,78,.75);
  border-radius: 0.125rem;
  display: inline-block;
  transform: translateY(0.05em);
  animation: caretBlink 900ms steps(1) infinite;
}
@keyframes caretBlink{
  50%{ opacity: 0; }
}

.hero__lead{
  margin: 0 0 1.25rem;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text-strong);
  max-width: 34rem;
}

.hero__actions{
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0 0 0.75rem;
}

.hero__note{
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text-soft);
}

/* media */
.hero__media{ min-width: 0; }
.hero__img{
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

/* ===== Apple-like reveal animations ===== */
.reveal,
.hero__media--rise{
  opacity: 0;
  transform: translateY(0.875rem);
  transition:
    opacity 700ms cubic-bezier(.2,.8,.2,1),
    transform 700ms cubic-bezier(.2,.8,.2,1);
  will-change: transform, opacity;
}

.hero__media--rise{
  transform: translateY(2.25rem); /* obrazek wjeżdża od dołu mocniej */
}

/* aktywacja (dodaje JS/IO) */
.hero.is-inview .reveal{ opacity: 1; transform: translateY(0); }
.hero.is-inview .hero__media--rise{ opacity: 1; transform: translateY(0); }

/* drobne opóźnienia jak w Apple */
.hero.is-inview .hero__eyebrow{ transition-delay: 80ms; }
.hero.is-inview .hero__lead{ transition-delay: 140ms; }
.hero.is-inview .hero__actions{ transition-delay: 200ms; }
.hero.is-inview .hero__note{ transition-delay: 260ms; }
.hero.is-inview .hero__media--rise{ transition-delay: 120ms; }

/* BUTTONS (jak wcześniej) */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;

  padding: 0.6875rem 1.1rem;
  border-radius: 0.875rem;
  text-decoration: none;
  font-size: 0.875rem;
  line-height: 1;
  font-weight: var(--fw-semibold);

  border: 0.0625rem solid transparent;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
  -webkit-tap-highlight-color: transparent;
}

.btn:focus-visible{
  outline: 0.1875rem solid rgba(22,64,255,.28);
  outline-offset: 0.125rem;
}

.btn--primary{
  color: #fff;
  background: var(--primary);
  box-shadow: 0 0.75rem 1.75rem rgba(22,64,255,.18);
}
.btn--primary:hover{ transform: translateY(-0.0625rem); }

.btn--ghost{
  color: var(--accent);
  background: rgba(230,26,78,.10);
  border-color: rgba(230,26,78,.18);
}
.btn--ghost:hover{ transform: translateY(-0.0625rem); }

/* RESPONSYWNOŚĆ */
@media (max-width: 53.75rem){
  .hero{ padding: 1.25rem 0 2.25rem; }

  .hero__inner{
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .hero__title{
    /* na mobile może się łamać naturalnie */
    font-size: clamp(2.05rem, 9vw, 3rem);
  }

  .hero__lead{ max-width: 42rem; }

  .hero__img{
    max-width: 34rem;
    margin: 0 auto;
  }
}

/* szanujemy prefers-reduced-motion */
@media (prefers-reduced-motion: reduce){
  .reveal, .hero__media--rise{
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .hero__caret{ animation: none !important; }
}

/* 1) Jeszcze bliżej nawigacji */
.hero{
  padding-top: clamp(0.75rem, 1.2vw, 1.25rem);
}

/* 2) Desktop: wymuś 1 linię H1 + pozwól tekstowi lekko wejść na obraz */
@media (min-width: 53.76rem){
  .hero__inner{
    /* dajemy więcej miejsca tekstowi */
    grid-template-columns: 1.2fr 0.8fr;
    column-gap: clamp(1rem, 2.2vw, 2.25rem);
  }

  .hero__title--nowrap{
    white-space: nowrap;          /* cały H1 w jednej linii */
    letter-spacing: -0.035em;
  }

  .hero__copy{
    position: relative;
    z-index: 2;                   /* tekst nad obrazem */
  }

  .hero__media{
    position: relative;
    z-index: 1;
  }

  /* delikatne “nachodzenie” kolumny tekstu na prawą (Apple-like) */
  .hero__copy{
    margin-right: -1.25rem;       /* jeśli nadal łamie, zwiększ do -2rem */
  }
}

/* 3) Przycisk "nasze inicjatywy" — biały tekst i kontrast */
.btn--ghost{
  color: #fff;
  background: var(--accent);
  border-color: rgba(230,26,78,.22);
  box-shadow: 0 0.75rem 1.75rem rgba(230,26,78,.14);
}
.btn--ghost:hover{
  transform: translateY(-0.0625rem);
}

/* MOBILE: hero bez obrazka + więcej oddechu od nawi + centrowanie */
@media (max-width: 53.75rem){
  .hero{
    padding-top: 2.25rem;   /* większa przerwa pod nav */
    padding-bottom: 2.5rem;
  }

  .hero__inner{
    grid-template-columns: 1fr;
    justify-items: center;  /* wszystko na środku */
    text-align: center;
  }

  .hero__copy{
    margin-right: 0;        /* wyłącz desktopowe nachodzenie */
  }

  .hero__eyebrow{
    margin-bottom: 0.85rem;
  }

  .hero__title{
    justify-content: center;  /* bo title jest flex */
  }

  .hero__lead{
    margin-left: auto;
    margin-right: auto;
  }

  .hero__actions{
    justify-content: center;
  }

  .hero__note{
    margin-left: auto;
    margin-right: auto;
  }

  /* ukryj obraz w mobile */
  .hero__media{
    display: none !important;
  }
}
