/* ============================================================
   BASE — Reset + typografia + elementy globalne
   ============================================================ */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Skip link */
.ccp-skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-4);
  z-index: 10000;
  background: var(--violet);
  color: var(--white);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius);
  font-size: var(--text-sm);
  font-weight: 600;
  transition: top var(--duration-fast);
}
.ccp-skip-link:focus { top: var(--space-4); }

/* --- Headings --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--ink);
}

h1 { font-size: var(--text-hero); font-weight: 700; }
h2 { font-size: clamp(var(--text-3xl), 4vw, var(--text-5xl)); font-weight: 600; }
h3 { font-size: var(--text-2xl); font-weight: 600; }
h4 { font-size: var(--text-xl);  font-weight: 600; }

em { font-style: normal; color: var(--violet); }
.ccp-dark em, .ccp-terminal-cta em { color: var(--lime); }

/* --- Paragrafy --- */
p { line-height: var(--leading-relaxed); }

/* --- Linki --- */
a {
  color: var(--violet);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}
a:hover { color: var(--violet-dark); }
a:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 3px;
  border-radius: 2px;
}

/* --- Listy --- */
ul, ol { list-style: none; }

/* --- Obrazy --- */
img, video {
  display: block;
  max-width: 100%;
  height: auto;
}

/* --- Kod --- */
code, kbd, pre {
  font-family: var(--font-mono);
  font-size: 0.9em;
}
code {
  background: rgba(124,58,237,.08);
  color: var(--violet);
  padding: 0.1em 0.4em;
  border-radius: var(--radius-sm);
}

/* --- Tabele --- */
table { border-collapse: collapse; width: 100%; }

/* --- Sekcja wspólna --- */
.ccp-section__header {
  text-align: center;
  max-width: var(--max-w-text);
  margin: 0 auto var(--space-12);
}
.ccp-section__title {
  margin-bottom: var(--space-4);
}
.ccp-section__sub {
  font-size: var(--text-lg);
  color: var(--ink-muted);
  line-height: var(--leading-relaxed);
}
.ccp-section__title--sm {
  font-size: var(--text-2xl);
}

/* --- Max-width wrapper --- */
.ccp-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--page-px);
}

/* --- Separator --- */
.ccp-sep {
  width: 48px;
  height: 3px;
  background: var(--violet);
  border-radius: var(--radius-full);
  margin: var(--space-6) auto;
}
