/* ==============================================
   PLATFORMA CSR - NORDIC AURORA DESIGN SYSTEM
   Skandynawska elegancja z cieplem humanitaryzmu
   ============================================== */

/* === GOOGLE FONTS === */
/* Plus Jakarta Sans with full Latin Extended support for Polish: ą, ę, ó, ś, ć, ń, ź, ż, ł */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');
/* Nunito for headings - zaokrąglony, przyjazny font */
@import url('https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap');

/* === CSS CUSTOM PROPERTIES (ZMIENNE) === */

:root {
  /* --- Kolory: Paleta Aurora --- */
  --color-primary: #059669;
  --color-primary-hover: #047857;
  --color-primary-light: #d1fae5;
  --color-primary-dark: #065f46;

  --color-accent: #f97316;
  --color-accent-hover: #ea580c;
  --color-accent-light: #ffedd5;

  --color-secondary: #64748b;
  --color-secondary-hover: #475569;

  /* --- Gradienty Aurora --- */
  --gradient-aurora: linear-gradient(135deg, #d1fae5 0%, #e0f2fe 50%, #fef3c7 100%);
  --gradient-aurora-dark: linear-gradient(135deg, #065f46 0%, #0c4a6e 50%, #78350f 100%);
  --gradient-primary: linear-gradient(135deg, #059669 0%, #10b981 100%);
  --gradient-accent: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
  --gradient-sidebar: linear-gradient(180deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  --gradient-card-border: linear-gradient(135deg, #059669 0%, #0ea5e9 50%, #f97316 100%);
  --gradient-glow: radial-gradient(ellipse at 50% 0%, rgba(5, 150, 105, 0.15) 0%, transparent 70%);

  /* --- Kolory: Tlo i powierzchnie --- */
  --color-background: #fafafa;
  --color-background-tinted: #f0fdf4;
  --color-surface: #ffffff;
  --color-surface-elevated: #ffffff;
  --color-surface-hover: #f8fafc;

  /* --- Kolory: Tekst --- */
  --color-text: #0f172a;
  --color-text-secondary: #475569;
  --color-text-muted: #94a3b8;
  --color-text-inverse: #ffffff;
  --color-text-on-dark: #e2e8f0;

  /* --- Kolory: Obramowania --- */
  --color-border: #e2e8f0;
  --color-border-light: #f1f5f9;
  --color-border-focus: #059669;
  --color-border-hover: #cbd5e1;

  /* --- Kolory: Statusy --- */
  --color-success: #16a34a;
  --color-success-light: #dcfce7;
  --color-success-dark: #166534;
  --color-error: #dc2626;
  --color-error-light: #fee2e2;
  --color-error-dark: #991b1b;
  --color-warning: #d97706;
  --color-warning-light: #fef3c7;
  --color-warning-dark: #92400e;
  --color-info: #0ea5e9;
  --color-info-light: #e0f2fe;
  --color-info-dark: #0c4a6e;

  /* --- Kolory: Sidebar (ciemny motyw) --- */
  --sidebar-bg: #0f172a;
  --sidebar-bg-hover: rgba(255, 255, 255, 0.05);
  --sidebar-bg-active: rgba(5, 150, 105, 0.15);
  --sidebar-text: #cbd5e1;
  --sidebar-text-muted: #64748b;
  --sidebar-border: rgba(255, 255, 255, 0.1);

  /* --- Spacing (skala 4px) --- */
  --spacing-2xs: 2px;
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-2xl: 48px;
  --spacing-3xl: 64px;
  --spacing-4xl: 96px;

  /* --- Typography: Fonty --- */
  --font-family-heading: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-family-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-family-base: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont,
                      'Segoe UI', sans-serif;
  --font-family-mono: 'JetBrains Mono', 'SF Mono', Monaco, 'Cascadia Code',
                      Consolas, monospace;

  /* --- Typography: Rozmiary --- */
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 2rem;
  --font-size-4xl: 2.5rem;
  --font-size-5xl: 3rem;

  /* --- Typography: Line height --- */
  --line-height-tight: 1.2;
  --line-height-snug: 1.35;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.65;

  /* --- Typography: Font weight --- */
  --font-weight-light: 300;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;

  /* --- Typography: Letter spacing --- */
  --tracking-tighter: -0.02em;
  --tracking-tight: -0.01em;
  --tracking-normal: 0;
  --tracking-wide: 0.025em;
  --tracking-wider: 0.05em;
  --tracking-widest: 0.1em;

  /* --- Layout --- */
  --sidebar-width: 280px;
  --navbar-height: 72px;
  --container-max-width: 1280px;
  --content-max-width: 800px;

  /* --- Border radius --- */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-2xl: 28px;
  --radius-full: 9999px;

  /* --- Shadows (cieplejsze) --- */
  --shadow-xs: 0 1px 2px rgb(0 0 0 / 0.04);
  --shadow-sm: 0 2px 4px rgb(0 0 0 / 0.04), 0 1px 2px rgb(0 0 0 / 0.06);
  --shadow-md: 0 4px 8px rgb(0 0 0 / 0.04), 0 2px 4px rgb(0 0 0 / 0.06);
  --shadow-lg: 0 8px 24px rgb(0 0 0 / 0.06), 0 4px 8px rgb(0 0 0 / 0.04);
  --shadow-xl: 0 16px 48px rgb(0 0 0 / 0.08), 0 8px 16px rgb(0 0 0 / 0.04);
  --shadow-2xl: 0 24px 64px rgb(0 0 0 / 0.12), 0 12px 24px rgb(0 0 0 / 0.06);
  --shadow-inner: inset 0 2px 4px rgb(0 0 0 / 0.04);
  --shadow-glow-primary: 0 0 20px rgba(5, 150, 105, 0.25);
  --shadow-glow-accent: 0 0 20px rgba(249, 115, 22, 0.25);

  /* --- Transitions --- */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slower: 500ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* --- Z-index layers --- */
  --z-base: 0;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-overlay: 250;
  --z-modal-backdrop: 300;
  --z-modal: 400;
  --z-toast: 500;
  --z-tooltip: 600;

  /* --- Overlay colors --- */
  --color-overlay: rgba(15, 23, 42, 0.7);
  --color-overlay-light: rgba(15, 23, 42, 0.5);
}


/* === CSS RESET & BASE STYLES === */

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

* {
  margin: 0;
  padding: 0;
}

html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background-color: var(--color-background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  font-feature-settings: 'cv11', 'ss01';
  font-variant-ligatures: common-ligatures;
}

ul, ol {
  list-style: none;
}

/* Naglowki z fontem heading (Nunito) */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-heading);
  text-wrap: balance;
  line-height: var(--line-height-tight);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  letter-spacing: var(--tracking-tight);
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
}

textarea {
  resize: vertical;
}

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

::selection {
  background-color: var(--color-primary-light);
  color: var(--color-primary-dark);
}


/* === TYPOGRAPHY BASE === */

h1 {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--spacing-lg);
  letter-spacing: var(--tracking-tighter);
}

h2 {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--spacing-md);
  letter-spacing: var(--tracking-tight);
}

h3 {
  font-size: var(--font-size-xl);
  margin-bottom: var(--spacing-sm);
}

h4 {
  font-size: var(--font-size-lg);
  margin-bottom: var(--spacing-sm);
}

p {
  margin-bottom: var(--spacing-md);
  line-height: var(--line-height-relaxed);
}

small {
  font-size: var(--font-size-sm);
}

strong {
  font-weight: var(--font-weight-semibold);
}

code {
  font-family: var(--font-family-mono);
  font-size: 0.875em;
  background-color: var(--color-border-light);
  padding: var(--spacing-2xs) var(--spacing-xs);
  border-radius: var(--radius-sm);
  color: var(--color-primary-dark);
}


/* === LINKS === */

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
  font-weight: var(--font-weight-medium);
}

a:hover {
  color: var(--color-primary-hover);
}

a:focus-visible {
  outline: 2px solid var(--color-border-focus);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}


/* === FOCUS STYLES === */

:focus-visible {
  outline: 2px solid var(--color-border-focus);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}


/* === SCROLLBAR STYLING === */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-border-light);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: var(--radius-full);
  transition: background var(--transition-fast);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-muted);
}


/* === UTILITY: 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-width: 0;
}


/* === UTILITY: TEXT === */

.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-aurora {
  background: var(--gradient-aurora-dark);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
