/* Cinematyczny język wizualny (IU4): grain, display type (Anton), stats-truths,
   marquee, teaser tutoriali, store badges. Ładowany PO sections.css. */

/* ---------- Grain: statyczny film-noise nad całą stroną ---------- */

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

/* ---------- Kinetic display type (Anton — wyłącznie display) ---------- */

.h2-display,
.stat-value,
.cta-overline,
.marquee-seq {
  font-family: "Anton", var(--font-sans);
  font-weight: 400;
}

/* .section .h2-display (0,2,0) musi wygrać nad `.section h2` (0,1,1) z sections.css
   (rozmiar) i font-weight:700 z style.css (faux-bold na Antonie — wgrany tylko krój 400). */
.section .h2-display {
  text-transform: uppercase;
  letter-spacing: 0.035em;
  font-size: clamp(38px, 5vw, 62px);
  line-height: 1.06;
  font-weight: 400;
}

/* ---------- Stats-truths (3 prawdy produktowe) ---------- */

.stats-kicker {
  color: var(--color-text-secondary);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  margin-bottom: 56px;
}

.stats-strip {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  align-items: start;
}

.stat-value {
  display: block;
  font-size: clamp(56px, 7.5vw, 104px);
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.stat-label {
  display: block;
  color: var(--color-text-secondary);
  font-size: 15px;
  line-height: 1.5;
}

/* ---------- Marquee (2 pasy przeciwbieżne, czysty CSS) ---------- */

.marquee-band {
  overflow: hidden;
  padding: 110px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.marquee-row { overflow: hidden; }

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 60s linear infinite;
}

.marquee-row-reverse .marquee-track {
  animation-duration: 48s;
  animation-direction: reverse;
}

.marquee-seq {
  flex: none;
  white-space: nowrap;
  text-transform: uppercase;
  font-size: clamp(44px, 6.5vw, 92px);
  line-height: 1.12;
  letter-spacing: 0.04em;
  color: rgba(245, 245, 247, 0.88);
}

/* pas 2: tekst konturowy — głębia przez kontrast wypełnienia, nie przez cień */
.marquee-seq-outline {
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(160, 160, 171, 0.55);
}

@supports not (-webkit-text-stroke: 1px #fff) {
  .marquee-seq-outline { color: rgba(160, 160, 171, 0.4); }
}

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Tutorials teaser ---------- */

/* Chip „Coming" wyniesiony POZA <h2> (a11y: nazwa nagłówka bez „Coming");
   flex trzyma go wizualnie przy tytule. */
.title-with-chip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
}

.title-with-chip .h2-display { margin-bottom: 0; }

.chip-coming {
  display: inline-block;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transform: translateY(-4px);
}

.tutorials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

.tutorial-card {
  aspect-ratio: 3 / 4;
  border-radius: 24px;
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.tutorial-card:hover {
  transform: translateY(-4px);
  border-color: rgba(230, 59, 130, 0.4);
}

.tutorial-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.style-chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
}

.style-chips li {
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  font-size: 14px;
  font-weight: 500;
}

.tutorials-support { color: var(--color-text-secondary); font-size: 15px; }

/* ---------- Final CTA: kinetic overline + subline + store badges ---------- */

.cta-overline {
  font-size: clamp(20px, 2.6vw, 30px);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-accent-bright);
  text-shadow: 0 0 28px rgba(230, 59, 130, 0.35);
  margin-bottom: -16px;
}

.cta-subline {
  color: var(--color-text-secondary);
  font-size: 18px;
  margin-top: -16px;
}

.store-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px 12px 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.store-badge svg { width: 26px; height: 26px; color: var(--color-text-primary); }

.store-badge-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
  text-align: left;
}

.store-badge-text small {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

.store-badge-text strong { font-size: 17px; font-weight: 600; }

/* ---------- Footer micro-line ---------- */

.footer { flex-wrap: wrap; }

.footer-micro {
  width: 100%;
  margin-top: 20px;
  font-size: 12px;
  color: var(--color-text-secondary);
  opacity: 0.7;
}

/* ---------- Mobile ---------- */

@media (max-width: 900px) {
  .stats-strip { gap: 48px 20px; }
  .tutorials-grid { grid-template-columns: 1fr; max-width: 380px; margin-left: auto; margin-right: auto; }
}

@media (max-width: 640px) {
  .stats-strip { grid-template-columns: 1fr; }
  .title-with-chip { gap: 10px; }
  .chip-coming { padding: 4px 12px; font-size: 11px; }
}

/* ---------- Scrub captions (beaty V1–V3, widoczność sterowana postępem w scroll-scrub.js) ---------- */

.scrub-captions {
  position: absolute;
  inset: 0;
  z-index: 3; /* nad winietą (z-index 2) */
  pointer-events: none;
}

.scrub-caption {
  position: absolute;
  left: 50%;
  bottom: clamp(64px, 14vh, 160px);
  width: min(90%, 720px);
  margin: 0;
  transform: translate(-50%, 16px);
  text-align: center;
  font-weight: 700;
  font-size: clamp(22px, 3.4vw, 40px);
  line-height: 1.22;
  letter-spacing: -0.01em;
  color: var(--color-text-primary);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.85), 0 0 44px rgba(179, 0, 89, 0.35);
  opacity: 0;
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.scrub-caption.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- Reduced motion: marquee stoi (grain jest statyczny z natury) ---------- */

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
  .tutorial-card, .tutorial-card:hover { transform: none; }
  /* bez scrubu caption nie zmienia beatów — pokazujemy 1. statycznie (JS dodaje is-visible),
     bez animacji wjazdu */
  .scrub-caption { transition: opacity 0.2s ease; transform: translate(-50%, 0); }
}
