/* ==========================================================================
   tr-landing.css - narracja „od niewolnika do przedsiębiorcy” (2026-09-07)
   Warstwa na styles.css: nowe sekcje (hero/chaos/transformacja/who/klub),
   animowane ilustracje SVG line-art, scroll-reveal, motyw jasny/ciemny.
   ========================================================================== */

.tr-section { padding: clamp(64px, 9vw, 120px) 0; position: relative; }
.tr-section--chaos { background: var(--bg-accent); }
.tr-section--transform { background: var(--bg); }
.tr-section--who { background: var(--bg); }
.tr-section--club { background: linear-gradient(180deg, var(--bg-accent) 0%, var(--bg) 100%); overflow: hidden; }

/* ---------- Nagłówki sekcji ---------- */
.tr-head { display: grid; gap: 14px; max-width: 860px; margin: 0 0 clamp(40px, 6vw, 64px); }
.tr-head--center { justify-items: center; text-align: center; margin-inline: auto; }
.tr-kicker {
  display: inline-flex; align-items: center; gap: 8px; justify-self: start;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--aqua); padding: 6px 14px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--aqua) 35%, transparent);
  background: color-mix(in srgb, var(--aqua) 8%, transparent);
}
.tr-kicker--gold { color: #b45309; border-color: rgba(217, 119, 6, 0.4); background: rgba(217, 119, 6, 0.08); }
[data-theme="dark"] .tr-kicker--gold { color: #fbbf24; }
.tr-title { font-size: clamp(1.7rem, 3.6vw, 2.6rem); line-height: 1.15; margin: 0; letter-spacing: -0.02em; }
.tr-title em { font-style: normal; color: var(--aqua); }
.tr-lead { font-size: clamp(1rem, 1.4vw, 1.15rem); color: var(--muted); margin: 0; max-width: 720px; }

/* ---------- HERO ---------- */
.tr-hero { position: relative; overflow: hidden; padding: clamp(72px, 10vw, 130px) 0 clamp(56px, 8vw, 96px); }
.tr-hero-bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(52% 60% at 82% 18%, color-mix(in srgb, var(--aqua) 14%, transparent), transparent 70%),
    radial-gradient(38% 46% at 12% 82%, color-mix(in srgb, #d97706 10%, transparent), transparent 70%);
}
[data-theme="dark"] .tr-hero-bg {
  background:
    radial-gradient(52% 60% at 82% 18%, color-mix(in srgb, var(--aqua) 22%, transparent), transparent 70%),
    radial-gradient(38% 46% at 12% 82%, color-mix(in srgb, #d97706 14%, transparent), transparent 70%);
}
.tr-hero-inner {
  position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(28px, 5vw, 64px); align-items: center;
}
@media (max-width: 960px) { .tr-hero-inner { grid-template-columns: 1fr; } }
.tr-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.82rem; font-weight: 600; color: var(--muted);
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface);
}
.tr-pulse-dot {
  width: 10px; height: 10px; border-radius: 50%; background: #16a34a; display: inline-block;
  animation: trPulseDot 1.6s ease-in-out infinite;
}
@keyframes trPulseDot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.5); }
  50% { box-shadow: 0 0 0 8px rgba(22, 163, 74, 0); }
}
.tr-hero-title { font-size: clamp(2rem, 4.6vw, 3.4rem); line-height: 1.08; margin: 18px 0 0; letter-spacing: -0.03em; }
.tr-hero-title em {
  font-style: normal;
  background: linear-gradient(120deg, #dc2626 0%, #d97706 55%, var(--aqua) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tr-hero-lead { font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: var(--muted); margin: 20px 0 0; max-width: 560px; }
.tr-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; align-items: center; }
.tr-cta { font-size: 1.02rem; padding: 14px 26px; }
.tr-trust {
  display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 26px;
  font-size: 0.85rem; color: var(--muted);
}
.tr-trust span { display: inline-flex; align-items: center; gap: 6px; }
.tr-trust .material-symbols-outlined { font-size: 18px; color: var(--aqua); }

.tr-hero-visual { min-width: 0; }
.tr-ekg { width: 100%; height: auto; color: var(--ink); }

/* Rysowanie linii (stroke-dash) po wejściu w viewport */
.tr-draw path, .tr-draw rect, .tr-draw circle, path.tr-draw, rect.tr-draw, circle.tr-draw {
  stroke-dasharray: 640; stroke-dashoffset: 640;
}
.reveal.is-visible .tr-draw path, .reveal.is-visible .tr-draw rect, .reveal.is-visible .tr-draw circle,
.reveal.is-visible path.tr-draw, .reveal.is-visible rect.tr-draw, .reveal.is-visible circle.tr-draw {
  animation: trDraw 1.4s ease forwards;
}
.reveal.is-visible .tr-draw--delay path, .reveal.is-visible path.tr-draw--delay { animation-delay: 0.35s; }
.reveal.is-visible .tr-draw--delay2 path, .reveal.is-visible path.tr-draw--delay2 { animation-delay: 0.7s; }
@keyframes trDraw { to { stroke-dashoffset: 0; } }

/* EKG: rysowanie + trwałe, subtelne migotanie */
.tr-ekg-line { stroke-dasharray: 2600; stroke-dashoffset: 2600; }
.reveal.is-visible .tr-ekg-line { animation: trEkg 2.6s ease forwards, trEkgGlow 3.2s ease-in-out 2.8s infinite; }
@keyframes trEkg { to { stroke-dashoffset: 0; } }
@keyframes trEkgGlow {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(37, 99, 235, 0)); }
  50% { filter: drop-shadow(0 0 10px rgba(37, 99, 235, 0.45)); }
}

/* Chaos: latające karteczki */
.tr-chaos-float rect, .tr-chaos-float circle, .tr-chaos-float path { transform-box: fill-box; transform-origin: center; }
.reveal.is-visible .tr-f1 { animation: trFloat1 5s ease-in-out 1.4s infinite; }
.reveal.is-visible .tr-f2 { animation: trFloat2 6s ease-in-out 1.8s infinite; }
.reveal.is-visible .tr-f3 { animation: trFloat3 4.6s ease-in-out 2.2s infinite; }
.reveal.is-visible .tr-f4 { animation: trFloat2 5.4s ease-in-out 2.6s infinite; }
@keyframes trFloat1 { 0%, 100% { transform: translate(0, 0) rotate(0deg); } 50% { transform: translate(6px, -10px) rotate(4deg); } }
@keyframes trFloat2 { 0%, 100% { transform: translate(0, 0) rotate(0deg); } 50% { transform: translate(-8px, 6px) rotate(-5deg); } }
@keyframes trFloat3 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(5px, 8px); } }

/* Pasek pamięci rośnie po wejściu */
.tr-memory-bar { transform-origin: left center; transform: scaleX(0.12); transition: transform 1.6s cubic-bezier(0.22, 1, 0.36, 1) 1s; }
.reveal.is-visible .tr-memory-bar { transform: scaleX(1); }

/* ---------- CHAOS: karty-patki ---------- */
.tr-chaos-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 22px);
}
@media (max-width: 960px) { .tr-chaos-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .tr-chaos-grid { grid-template-columns: 1fr; } }
.tr-chaos-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  padding: 24px; box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.tr-chaos-card:hover { transform: translateY(-4px) rotate(-0.4deg); box-shadow: 0 14px 34px rgba(15, 23, 41, 0.12); }
.tr-chaos-card svg { width: 44px; height: 44px; }
.tr-chaos-card--amber svg { color: #d97706; }
.tr-chaos-card--blue svg { color: var(--aqua); }
.tr-chaos-card h3 { margin: 14px 0 6px; font-size: 1.05rem; }
.tr-chaos-card p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.tr-chaos-punch {
  margin: clamp(28px, 4vw, 44px) auto 0; max-width: 720px; text-align: center;
  font-size: clamp(1.1rem, 2vw, 1.4rem); line-height: 1.4;
}

/* ---------- TRANSFORMACJA: karty z ilustracjami ---------- */
.tr-trans-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2vw, 22px); }
@media (max-width: 960px) { .tr-trans-grid { grid-template-columns: 1fr; } }
.tr-trans-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
  padding: 24px; display: flex; flex-direction: column; gap: 10px;
  box-shadow: var(--shadow-sm); transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.tr-trans-card:hover { transform: translateY(-5px); box-shadow: 0 18px 44px rgba(15, 23, 41, 0.14); }
.tr-trans-visual { background: var(--bg-accent); border-radius: 14px; padding: 12px; }
.tr-trans-visual svg { width: 100%; height: auto; color: var(--ink); }
.tr-trans-card h3 { margin: 6px 0 0; font-size: 1.15rem; }
.tr-trans-card p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.tr-trans-gain {
  margin-top: auto; display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; color: #16a34a; font-size: 0.92rem;
  padding-top: 8px; border-top: 1px dashed var(--border);
}
.tr-trans-gain .material-symbols-outlined { font-size: 20px; }
.tr-arrow { stroke-dasharray: 80; stroke-dashoffset: 80; }
.reveal.is-visible .tr-arrow { animation: trDraw 0.9s ease 1.05s forwards; }
.tr-trans-statement {
  margin: clamp(32px, 5vw, 56px) auto 0; max-width: 860px; text-align: center;
  font-size: clamp(1.2rem, 2.4vw, 1.7rem); line-height: 1.35; font-weight: 600;
}
.tr-trans-statement em { font-style: normal; color: var(--aqua); }

/* ---------- POZYCJONOWANIE ---------- */
.tr-who-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px); }
@media (max-width: 860px) { .tr-who-grid { grid-template-columns: 1fr; } }
.tr-who-card { border-radius: 20px; padding: clamp(22px, 3vw, 34px); border: 1px solid var(--border); background: var(--surface); }
.tr-who-card--yes { border-top: 4px solid #16a34a; }
.tr-who-card--no { border-top: 4px solid #dc2626; }
.tr-who-card h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 16px; font-size: 1.15rem; }
.tr-who-card--yes h3 .material-symbols-outlined { color: #16a34a; }
.tr-who-card--no h3 .material-symbols-outlined { color: #dc2626; }
.tr-who-card ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.tr-who-card li { position: relative; padding-left: 22px; color: var(--muted); line-height: 1.5; }
.tr-who-card li::before { content: ''; position: absolute; left: 4px; top: 0.62em; width: 7px; height: 7px; border-radius: 50%; background: var(--border-strong); }
.tr-who-card--yes li::before { background: #16a34a; }
.tr-who-card--no li::before { background: #dc2626; }

/* ---------- KLUB 100 ---------- */
.tr-club-glow {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(46% 60% at 50% 32%, rgba(217, 119, 6, 0.14), transparent 70%);
}
.tr-club-inner { position: relative; }
.tr-club-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); gap: clamp(20px, 4vw, 48px); align-items: start; }
@media (max-width: 960px) { .tr-club-grid { grid-template-columns: 1fr; } }
.tr-club-perks { display: grid; gap: 14px; }
.tr-club-perk {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}
.tr-club-perk .material-symbols-outlined { color: #b45309; font-size: 26px; flex-shrink: 0; margin-top: 2px; }
[data-theme="dark"] .tr-club-perk .material-symbols-outlined { color: #fbbf24; }
.tr-club-perk div { display: grid; gap: 4px; }
.tr-club-perk strong { font-size: 1rem; }
.tr-club-perk span { color: var(--muted); font-size: 0.92rem; }
.tr-club-form-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 22px;
  padding: clamp(22px, 3vw, 34px); box-shadow: 0 22px 60px rgba(15, 23, 41, 0.16);
}
.tr-club-form-card h3 { margin: 0 0 8px; font-size: 1.3rem; }
.tr-club-form-sub { color: var(--muted); font-size: 0.95rem; margin: 0 0 18px; }
.tr-club-form-card .form-field { display: grid; gap: 6px; margin-bottom: 14px; }
.tr-club-form-card label { font-size: 0.85rem; font-weight: 600; }
.tr-club-form-card input, .tr-club-form-card textarea {
  width: 100%; border: 1px solid var(--border-strong); border-radius: 10px;
  padding: 10px 12px; font: inherit; background: var(--bg); color: var(--ink);
}
.tr-club-form-card input:focus, .tr-club-form-card textarea:focus {
  outline: 2px solid var(--aqua); outline-offset: 1px; border-color: var(--aqua);
}
.tr-club-note { min-height: 20px; font-size: 0.9rem; margin: 10px 0 0; color: #16a34a; }
.tr-club-note.is-error { color: var(--danger); }
.tr-club-fineprint { font-size: 0.83rem; color: var(--muted); margin: 12px 0 0; }
.tr-club-fineprint a { color: var(--aqua); }

/* Solo-only (soloPlanOnly=true): sekcja Klubu 100 i jego linki ukryte. */
body.solo-plan-only .tr-section--club { display: none; }
body.solo-plan-only [data-club100-cta] { display: none; }
/* Cennik solo-only: pokazujemy SOLO i TEAM (reszta planów nie jest publiczna). */
body.solo-plan-only [data-plan-card]:not([data-plan-card="solo"]):not([data-plan-card="team"]) { display: none; }
body.solo-plan-only .pricing-grid { grid-template-columns: repeat(2, minmax(0, 480px)); justify-content: center; }
@media (max-width: 1080px) {
  body.solo-plan-only .pricing-grid { grid-template-columns: minmax(0, 480px); }
}
/* Bez flagi health-check elementy z data-health-check-fallback stają się zwykłym CTA -
   zachowujemy dotychczasowy mechanizm styles.css (body.health-check-hidden). */

/* ---------- Sekcja bezpieczeństwa skrócona ---------- */
.tr-sec-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: center; }
@media (max-width: 860px) { .tr-sec-grid { grid-template-columns: 1fr; } }

/* ---------- Reveal (spójne z site.js data-animate) ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .tr-draw path, .tr-draw rect, .tr-draw circle, path.tr-draw, rect.tr-draw, circle.tr-draw,
  .tr-ekg-line, .tr-arrow { stroke-dashoffset: 0; animation: none !important; }
  .tr-f1, .tr-f2, .tr-f3, .tr-f4, .tr-pulse-dot { animation: none !important; }
  .tr-memory-bar { transform: scaleX(1); transition: none; }
}

/* Podpisy pod ilustracjami transformacji (HTML zamiast tekstu w SVG) */
.tr-trans-caption {
  margin: 4px 0 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Akcenty em na landingach - jak na cenniku: serif-italic (Fraunces) + kolor
   akcentu (styles.css .section-title em). Hero ma własny gradient - bez zmian. */
.tr-title em,
.tr-lead em,
.tr-trans-statement em,
.section-title em {
  font-family: var(--serif-italic-font);
  font-style: italic;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: -0.015em;
}
[data-theme="dark"] .tr-title em,
[data-theme="dark"] .tr-lead em,
[data-theme="dark"] .tr-trans-statement em,
[data-theme="dark"] .section-title em {
  color: var(--dark-accent);
}

/* Solo-only: porównanie planów ukryte (karty gatingiem wyżej - SOLO + Team). */
body.solo-plan-only #porownanie,
body.solo-plan-only #comparison { display: none; }

/* ===================== EPIC-101 UX 2026-09: kalendarz demo + dialogi ======== */

.demo-cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.demo-cal-head strong { font-size: 1.05rem; }
.demo-cal-nav { padding: 4px 12px; font-size: 1.1rem; line-height: 1.2; }
.demo-cal-nav[disabled] { opacity: 0.35; cursor: default; }

.demo-cal-dow {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 4px;
}
.demo-cal-dow span {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.6;
}

.demo-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.demo-cal-pad { display: block; }
.demo-cal-day {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 52px;
  padding: 6px 2px;
  border: 1px solid color-mix(in srgb, currentColor 14%, transparent);
  border-radius: 10px;
  background: transparent;
  cursor: default;
  font: inherit;
  color: inherit;
}
.demo-cal-day.has-slots {
  cursor: pointer;
  border-color: var(--accent, #2563eb);
}
.demo-cal-day.has-slots:hover,
.demo-cal-day.selected {
  background: color-mix(in srgb, var(--accent, #2563eb) 12%, transparent);
}
.demo-cal-day.past { opacity: 0.35; }
.demo-cal-day[disabled] { cursor: default; }
.demo-cal-num { font-size: 0.9rem; font-weight: 600; line-height: 1; }
.demo-cal-badge {
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--accent, #2563eb);
  color: #fff;
}

.demo-day-slots { margin-top: 14px; }
.demo-day-slots-title { margin: 0 0 8px; font-size: 0.92rem; }
.demo-day-slots-list { display: flex; flex-wrap: wrap; gap: 8px; }
.demo-slot-chip { font-size: 0.9rem; }
.demo-slot-chip.selected {
  border-color: var(--accent, #2563eb);
  background: color-mix(in srgb, var(--accent, #2563eb) 14%, transparent);
  font-weight: 700;
}

/* Dialogi rezerwacji / prośby awaryjnej */
.demo-dialog {
  border: none;
  border-radius: 16px;
  padding: 0;
  max-width: 560px;
  width: min(560px, calc(100vw - 32px));
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25);
}
.demo-dialog::backdrop {
  background: rgba(2, 6, 23, 0.55);
  backdrop-filter: blur(2px);
}
.demo-dialog-inner {
  position: relative;
  padding: 24px;
  max-height: calc(100vh - 64px);
  overflow-y: auto;
}
.demo-dialog-close {
  position: absolute;
  top: 10px;
  right: 10px;
  border: none;
  background: transparent;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.6;
  padding: 4px 8px;
}
.demo-dialog-close:hover { opacity: 1; }
.demo-dialog-slot {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent, #2563eb) 10%, transparent);
  font-size: 0.95rem;
}
.demo-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

/* Zgody (RODO/nowości): checkbox W TEJ SAMEJ LINII co tekst zgody */
.consent-line {
  display: flex !important;
  align-items: flex-start;
  gap: 10px;
  margin: 10px 0 0;
  font-size: 0.88rem;
  line-height: 1.45;
  cursor: pointer;
}
.consent-line input[type="checkbox"] {
  width: 16px !important;
  height: 16px;
  margin: 2px 0 0 !important;
  flex: 0 0 auto;
  accent-color: var(--accent, #2563eb);
}
