/* ==========================================================================
   main.css — reset, custom properties, typografia
   ========================================================================== */

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

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

body {
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  font-weight: 400;
  overflow-x: hidden;
}

img, picture, video, canvas, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.2; }

/* ---------- Custom properties ---------- */
:root {
  /* Tła */
  --bg-primary: #050505;
  --bg-secondary: #0B0B0B;
  --bg-card: #121212;
  --bg-card-hover: #161616;

  /* Obramowania */
  --border-subtle: #242424;
  --border-strong: #2F2F2F;

  /* Akcenty */
  --accent-yellow: #F5B400;
  --accent-yellow-bright: #FFC400;
  --accent-yellow-dim: #B8860B;

  /* Tekst */
  --text-primary: #F7F7F7;
  --text-secondary: #A7A7A7;
  --text-muted: #6E6E6E;

  /* Stany */
  --state-success: #4ADE80;
  --state-error: #F87171;
  --state-disabled: #2A2A2A;

  /* Typografia */
  --font-base: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --fs-base: 16px;
  --fs-sm: 14px;
  --fs-lg: 18px;
  --fs-h3: 24px;
  --fs-h2: clamp(28px, 4vw, 44px);
  --fs-h1: clamp(40px, 6vw, 72px);

  /* Spacing */
  --container-max: 1180px;
  --container-pad: 24px;
  --section-pad-y: clamp(64px, 8vw, 112px);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  /* Transitions */
  --t-fast: 0.15s ease;
  --t-base: 0.25s ease;
  --t-slow: 0.45s ease;

  /* Shadows */
  --shadow-card: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 32px rgba(245, 180, 0, 0.25);
}

/* ---------- Akcent helpers ---------- */
.text-accent { color: var(--accent-yellow); }
.bg-accent { background: var(--accent-yellow); color: #000; }

/* ---------- Kontener ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}

/* ---------- Sekcje ---------- */
.section { padding: var(--section-pad-y) 0; position: relative; }

.section-header {
  text-align: center;
  margin-bottom: 56px;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.section-title {
  font-size: var(--fs-h2);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: var(--fs-lg);
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ---------- Nagłówek sekcji wyrównany do lewej (opcjonalnie) ---------- */
.section-header-left {
  text-align: left;
  margin-left: 0;
  margin-right: 0;
}

/* ---------- Tytuły kart ---------- */
.card-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
  color: var(--text-primary);
}

/* ---------- Selekcja tekstu ---------- */
::selection {
  background: var(--accent-yellow);
  color: #000;
}

/* ---------- Scrollbar (subtelny, opcjonalny) ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border-subtle); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

/* ---------- Focus visible global ---------- */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--accent-yellow-bright);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Screen-reader only ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
