/* =====================================================================
   AUTOMAX — Polityka prywatności
   Arkusz stylów podstrony (system designu AUTOMAX + akcent "privacy indigo"
   + bespoke układ dokumentu prawnego: sticky spis treści + paragrafy §,
   siatka praw RODO oraz tabela plików cookie)
   ===================================================================== */

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

:root {
  --bg-base: #f8fafc;
  --card-bg: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --primary: #1e293b;
  --accent: #249AF3;
  --success: #10b981;
  --border-color: #e8ebf091;
  --input-bg: #f1f5f9;

  /* Akcent podstrony — ochrona danych (privacy indigo) */
  --brand: #4f46e5;
  --brand-deep: #4338ca;
  --brand-soft: rgba(79, 70, 229, 0.10);
  --brand-grad: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);

  --radius-sm: 5px;
  --radius-md: 5px;
  --radius-lg: 5px;

  --shadow-premium: 0 4px 20px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 12px 30px rgba(0, 0, 0, 0.08);
  --shadow-overlay: 0 20px 40px rgba(0, 0, 0, 0.12);
  --shadow-brand: 0 12px 34px rgba(67, 56, 202, 0.22);
}

body {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: var(--text-main);
  background-color: var(--bg-base);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; transition: color 0.2s ease; }
button { font-family: inherit; border: none; outline: none; background: none; cursor: pointer; }
ul { list-style: none; }

.container {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===================== HERO ===================== */
.subpage-hero {
  background-color: var(--primary);
  color: #ffffff;
  padding: 60px 0 80px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border-color);
}

.subpage-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 640px;
  height: 640px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.20) 0%, rgba(30, 41, 59, 0) 70%);
  pointer-events: none;
}

.subpage-hero::after {
  content: '';
  position: absolute;
  bottom: -40%;
  left: -8%;
  width: 460px;
  height: 460px;
  background: radial-gradient(circle, rgba(79, 70, 229, 0.12) 0%, rgba(30, 41, 59, 0) 70%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-title-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--brand-soft);
  border: 1px solid rgba(129, 140, 248, 0.34);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  color: #c7d2fe;
  letter-spacing: 0.06em;
  text-transform: none;
  margin-bottom: 16px;
}

.hero-title-badge i { color: #a5b4fc; }

.subpage-hero h1 {
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 20px;
}

.subpage-hero h1 span {
  background: linear-gradient(135deg, #c7d2fe 0%, #818cf8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #c7d2fe;
}

.subpage-hero .hero-lead {
  font-size: 15px;
  color: #cbd5e1;
  line-height: 1.6;
  margin-bottom: 28px;
  max-width: 580px;
}

/* ---- Metadane dokumentu ---- */
.doc-meta {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
}

.doc-meta-item { display: flex; align-items: center; gap: 12px; }
.doc-meta-item i {
  width: 36px; height: 36px;
  border-radius: var(--radius-md);
  background: var(--brand-soft);
  border: 1px solid rgba(129, 140, 248, 0.28);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; color: #c7d2fe; flex-shrink: 0;
}
.doc-meta-item strong { display: block; font-size: 12px; font-weight: 700; color: #ffffff; }
.doc-meta-item span { font-size: 11px; color: #94a3b8; }

/* ---- Karta hero ---- */
.spec-card {
  background: linear-gradient(160deg, #20293b 0%, #161d2c 100%);
  border-radius: var(--radius-lg);
  padding: 30px;
  color: #ffffff;
  box-shadow: var(--shadow-overlay);
  border: 1px solid rgba(129, 140, 248, 0.28);
  position: relative;
  overflow: hidden;
}

.spec-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--brand-grad);
}

.spec-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.spec-card-crest {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  background: var(--brand-grad);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  color: #ffffff;
  flex-shrink: 0;
  box-shadow: var(--shadow-brand);
}

.spec-card-head h2 { font-size: 16px; font-weight: 700; color: #ffffff; }
.spec-card-head p { font-size: 11px; color: #94a3b8; }

.spec-perks { display: flex; flex-direction: column; gap: 14px; }

.spec-perk {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13px;
  line-height: 1.45;
}

.spec-perk i { color: #a5b4fc; font-size: 14px; margin-top: 2px; flex-shrink: 0; }
.spec-perk strong { display: block; font-weight: 700; color: #ffffff; }
.spec-perk span { font-size: 11px; color: #94a3b8; }

/* ===================== UKŁAD DOKUMENTU ===================== */
.section-spacing { padding: 80px 0; }

.legal-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  align-items: start;
}

/* ---- Spis treści (sticky) ---- */
.legal-toc-wrap { position: relative; }

.legal-toc {
  position: sticky;
  top: 90px;
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-premium);
  display: flex;
  flex-direction: column;
}

.legal-toc-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0.08em;
  color: var(--brand-deep);
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.legal-toc-link {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border-left: 2px solid transparent;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.legal-toc-link:hover { background-color: var(--input-bg); color: var(--primary); }
.legal-toc-link.active {
  background-color: var(--brand-soft);
  color: var(--brand-deep);
  border-left-color: var(--brand);
  font-weight: 700;
}

/* ---- Artykuły / paragrafy ---- */
.legal-content { min-width: 0; }

.legal-article {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px 34px;
  box-shadow: var(--shadow-premium);
  margin-bottom: 20px;
  scroll-margin-top: 90px;
}

.legal-article-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.legal-num {
  flex-shrink: 0;
  min-width: 46px;
  height: 36px;
  padding: 0 12px;
  border-radius: var(--radius-md);
  background: var(--brand-grad);
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-brand);
}

.legal-article-head h2 {
  font-size: 19px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.01em;
}

.legal-intro {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 18px;
}

.legal-list {
  list-style: none;
  counter-reset: legal-counter;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.legal-list > li {
  counter-increment: legal-counter;
  position: relative;
  padding-left: 38px;
  font-size: 13.5px;
  line-height: 1.65;
  color: #334155;
}

.legal-list > li::before {
  content: counter(legal-counter) ".";
  position: absolute;
  left: 0;
  top: 0;
  min-width: 26px;
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-deep);
  background-color: var(--brand-soft);
  border-radius: var(--radius-sm);
  padding: 1px 6px;
  text-align: center;
}

.legal-list strong { color: var(--primary); font-weight: 700; }

.legal-note {
  margin-top: 18px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  background-color: var(--brand-soft);
  border: 1px solid rgba(129, 140, 248, 0.30);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius-md);
  font-size: 12.5px;
  color: #334155;
  line-height: 1.6;
}

.legal-note i { color: var(--brand-deep); font-size: 15px; margin-top: 1px; flex-shrink: 0; }

.legal-disclaimer {
  margin-top: 8px;
  padding: 18px 20px;
  background-color: var(--input-bg);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ---- Siatka praw RODO ---- */
.rights-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 22px;
}

.right-pill {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 16px;
  background-color: var(--bg-base);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.right-pill:hover { border-color: rgba(129, 140, 248, 0.5); transform: translateY(-2px); box-shadow: var(--shadow-premium); }

.right-pill i {
  width: 34px; height: 34px;
  border-radius: var(--radius-md);
  background: var(--brand-soft);
  color: var(--brand-deep);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
}
.right-pill strong { display: block; font-size: 13px; font-weight: 700; color: var(--primary); margin-bottom: 2px; }
.right-pill span { font-size: 11.5px; color: var(--text-muted); line-height: 1.5; }

/* ---- Tabela plików cookie ---- */
.cookie-table-wrap {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 20px;
}

.cookie-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.cookie-table thead th {
  background-color: var(--primary);
  color: #ffffff;
  text-align: left;
  font-weight: 700;
  padding: 14px 18px;
  font-size: 12px;
  letter-spacing: 0.02em;
}
.cookie-table tbody td { padding: 14px 18px; border-top: 1px solid var(--border-color); color: #334155; line-height: 1.55; vertical-align: top; }
.cookie-table tbody tr:nth-child(even) { background-color: var(--bg-base); }
.cookie-table td:first-child { white-space: nowrap; }
.cookie-table td strong { color: var(--brand-deep); }
.cookie-table td:last-child { font-weight: 600; color: var(--primary); }

/* ===================== CTA ===================== */
.cta-section {
  background-color: #f1f5f9;
  border-top: 1px solid var(--border-color);
}

.cta-band {
  background: linear-gradient(160deg, #20293b 0%, #141b29 100%);
  border-radius: var(--radius-lg);
  padding: 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(129, 140, 248, 0.24);
}

.cta-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.22) 0%, rgba(30, 41, 59, 0) 60%);
  pointer-events: none;
}

.cta-band h2 { font-size: 26px; font-weight: 700; color: #ffffff; margin-bottom: 12px; position: relative; letter-spacing: -0.02em; }
.cta-band h2 span {
  background: linear-gradient(135deg, #c7d2fe, #818cf8);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: #c7d2fe;
}
.cta-band p { font-size: 14px; color: #cbd5e1; max-width: 580px; margin: 0 auto 28px; position: relative; line-height: 1.6; }

.cta-buttons { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; position: relative; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  transition: background-color 0.2s ease, transform 0.2s ease, color 0.2s ease, filter 0.2s ease;
}

.btn-brand { background: var(--brand-grad); color: #ffffff; }
.btn-brand:hover { filter: brightness(1.08); transform: translateY(-2px); }
.btn-ghost { background-color: rgba(255, 255, 255, 0.08); color: #ffffff; border: 1px solid rgba(255, 255, 255, 0.16); }
.btn-ghost:hover { background-color: rgba(255, 255, 255, 0.14); }

/* ---- Animacja wejścia ---- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  will-change: opacity, transform;
}

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

/* ===================== RWD ===================== */
@media (max-width: 991px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .legal-layout { grid-template-columns: 1fr; gap: 24px; }
  .legal-toc { position: static; top: auto; }
  .legal-toc-wrap { order: -1; }
}

@media (max-width: 767px) {
  .container { padding: 0 16px; }

  .subpage-hero { padding: 36px 0 44px; }
  .subpage-hero h1 { font-size: 24px; margin-bottom: 14px; line-height: 1.2; }
  .subpage-hero .hero-lead { font-size: 13px; margin-bottom: 22px; }
  .hero-title-badge { font-size: 9px; padding: 4px 10px; margin-bottom: 12px; }

  .doc-meta { gap: 14px; }
  .doc-meta-item i { width: 32px; height: 32px; font-size: 13px; }
  .doc-meta-item strong { font-size: 11px; }
  .doc-meta-item span { font-size: 10px; }

  .spec-card { padding: 22px; }
  .spec-card-crest { width: 40px; height: 40px; font-size: 17px; }

  .section-spacing { padding: 40px 0; }

  .legal-toc { padding: 18px; }
  .legal-toc-link { font-size: 12px; padding: 7px 10px; }

  .legal-article { padding: 22px 20px; }
  .legal-article-head h2 { font-size: 16px; }
  .legal-num { min-width: 42px; height: 32px; font-size: 13px; }
  .legal-list > li { font-size: 12.5px; padding-left: 32px; }

  .rights-grid { grid-template-columns: 1fr; }

  .cookie-table { font-size: 11.5px; }
  .cookie-table thead th { padding: 11px 12px; }
  .cookie-table tbody td { padding: 11px 12px; }

  .cta-band { padding: 32px 20px; }
  .cta-band h2 { font-size: 20px; }
  .cta-band p { font-size: 12px; }
  .btn { width: 100%; justify-content: center; }
}
