/* base.css
   Reset, typografia bazowa, globalne utility klasy.
   Importuje variables.css — musi być ładowany jako pierwszy.
*/

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Inter:wght@300;400;500;600&display=swap');

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

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

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover { color: var(--color-accent-dark); }

/* ── Typografia ─────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-text-light);
  line-height: 1.2;
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }

p { margin-bottom: var(--space-4); }
p:last-child { margin-bottom: 0; }

/* ── Container ──────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

/* ── Utility ────────────────────────────────────────────────────── */
.text-muted    { color: var(--color-text-muted); }
.text-accent   { color: var(--color-accent); }
.text-center   { text-align: center; }
.text-sm       { font-size: var(--text-sm); }
.text-lg       { font-size: var(--text-lg); }

.mt-4  { margin-top: var(--space-4); }
.mt-8  { margin-top: var(--space-8); }
.mb-4  { margin-bottom: var(--space-4); }
.mb-8  { margin-bottom: var(--space-8); }

.hidden { display: none !important; }

/* ── Divider ────────────────────────────────────────────────────── */
.divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--space-8) 0;
}

/* ── Gwiazdki / dekoracja tła ───────────────────────────────────── */
.stars-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(124,58,237,0.05) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(201,169,110,0.05) 0%, transparent 50%);
}

/* ── Separator ozdobny ──────────────────────────────────────────── */
.ornament {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  color: var(--color-accent);
  font-size: var(--text-lg);
  margin: var(--space-8) 0;
}
.ornament::before,
.ornament::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
}

/* ── Toast notifications ────────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.toast {
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  font-size: var(--text-sm);
  min-width: 260px;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease;
}
.toast--success { border-color: var(--color-success); }
.toast--error   { border-color: var(--color-error); }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Loader spinner ─────────────────────────────────────────────── */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: var(--space-8) auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Responsive breakpoints ─────────────────────────────────────── */
@media (max-width: 768px) {
  h1 { font-size: var(--text-3xl); }
  h2 { font-size: var(--text-2xl); }
  .container { padding-inline: var(--space-4); }
}
