/* ============================================
   PET CARE PLATFORM - BASE STYLES
   Warm, Earthy, Sophisticated Design System
   Language: Polish (PL) - UTF-8 Support
   ============================================ */

/* ------------------------------------------
   VARIABLES
   ------------------------------------------ */
:root {
  /* Colors - Warm Earth Palette */
  --color-bg-primary: #F9F7F2;      /* Warm Cream */
  --color-bg-secondary: #F5F1EB;    /* Soft Beige */
  --color-bg-tertiary: #EDE8E0;     /* Light Sand */
  
  --color-text-primary: #3D342B;    /* Deep Caramel Brown */
  --color-text-secondary: #6B5D4D;  /* Medium Brown */
  --color-text-muted: #9C8E7A;      /* Warm Gray-Brown */
  
  --color-primary: #7A8B6E;         /* Gentle Olive Green */
  --color-primary-hover: #6B7B58;   /* Darker Olive */
  --color-primary-light: #E8EDE4;   /* Pale Olive */
  
  --color-accent: #9BBFD4;          /* Soft Sky Blue */
  --color-accent-light: #D4E6F0;    /* Pale Sky */
  --color-accent-dark: #7A9CB0;     /* Muted Blue */
  
  --color-success: #8FA68E;         /* Sage Green */
  --color-warning: #D4A373;         /* Warm Amber/Caramel */
  --color-danger: #C17C74;          /* Muted Terracotta */
  
  /* Neutral Warm Grays */
  --color-neutral-100: #FFFFFF;
  --color-neutral-200: #F5F1EB;
  --color-neutral-300: #E5DDD3;
  --color-neutral-400: #C4B8A8;
  --color-neutral-500: #9C8E7A;
  --color-neutral-600: #7A6E5D;
  --color-neutral-700: #5C5348;
  --color-neutral-800: #3D342B;
  --color-neutral-900: #2A231E;

  /* Typography - Polish Character Support */
  --font-heading: 'Merriweather', 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', 'Source Sans Pro', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  
  /* Fluid Type Scale */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);   /* 12-14px */
  --text-sm: clamp(0.875rem, 0.8rem + 0.375vw, 1rem);     /* 14-16px */
  --text-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);     /* 16-18px */
  --text-lg: clamp(1.125rem, 1rem + 0.625vw, 1.375rem);   /* 18-22px */
  --text-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.75rem);    /* 20-28px */
  --text-2xl: clamp(1.5rem, 1.3rem + 1vw, 2.25rem);       /* 24-36px */
  --text-3xl: clamp(1.875rem, 1.6rem + 1.375vw, 3rem);    /* 30-48px */
  --text-4xl: clamp(2.25rem, 1.9rem + 1.75vw, 4rem);      /* 36-64px */
  
  --leading-tight: 1.2;
  --leading-normal: 1.6;
  --leading-relaxed: 1.8;

  /* Spacing Scale (4px base) */
  --space-0: 0;
  --space-1: 0.25rem;   /* 4px */
  --space-2: 0.5rem;    /* 8px */
  --space-3: 0.75rem;   /* 12px */
  --space-4: 1rem;      /* 16px */
  --space-5: 1.5rem;    /* 24px */
  --space-6: 2rem;      /* 32px */
  --space-8: 3rem;      /* 48px */
  --space-10: 4rem;     /* 64px */
  --space-12: 6rem;     /* 96px */

  /* Border Radius - Soft & Organic */
  --radius-sm: 0.375rem;  /* 6px */
  --radius-md: 0.5rem;    /* 8px */
  --radius-lg: 0.75rem;   /* 12px */
  --radius-xl: 1rem;      /* 16px */
  --radius-full: 9999px;

  /* Shadows - Soft & Warm */
  --shadow-sm: 0 1px 2px rgba(61, 52, 43, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(61, 52, 43, 0.08), 
               0 2px 4px -2px rgba(61, 52, 43, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(61, 52, 43, 0.08), 
               0 4px 6px -4px rgba(61, 52, 43, 0.06);
  --shadow-xl: 0 20px 25px -5px rgba(61, 52, 43, 0.1), 
               0 8px 10px -6px rgba(61, 52, 43, 0.04);

  /* Transitions - Gentle */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;
  --transition-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ------------------------------------------
   RESET & NORMALIZE
   ------------------------------------------ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  text-rendering: optimizeSpeed;
  line-height: var(--leading-normal);
}

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

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

button {
  cursor: pointer;
  background: none;
  border: none;
}

ul[role='list'],
ol[role='list'] {
  list-style: none;
}

/* ------------------------------------------
   BASE STYLES
   ------------------------------------------ */
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: var(--leading-tight);
  color: var(--color-text-primary);
  margin-bottom: var(--space-4);
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); text-transform: uppercase; letter-spacing: 0.05em; }

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

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

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

/* Focus Visible */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Selection */
::selection {
  background-color: var(--color-primary-light);
  color: var(--color-text-primary);
}

/* ------------------------------------------
   UTILITIES
   ------------------------------------------ */
.container {
  width: 100%;
  max-width: 75rem; /* 1200px */
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-5);
  padding-right: var(--space-5);
}

/* Flexbox Utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-5 { gap: var(--space-5); }
.gap-6 { gap: var(--space-6); }

/* Grid Utilities */
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); gap: var(--space-6); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); gap: var(--space-6); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); gap: var(--space-6); }

/* 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;
}

/* ------------------------------------------
   COMPONENTS
   ------------------------------------------ */

/* Button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 500;
  line-height: 1;
  color: var(--color-neutral-100)!important;
  background-color: var(--color-primary);
  border: 2px solid transparent;
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
  cursor: pointer;
  text-decoration: none;
}

.btn:hover {
  background-color: var(--color-primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

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

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn--secondary {
  background-color: transparent;
  color: var(--color-primary)!important;
  border-color: var(--color-primary);
}

.btn--secondary:hover {
  background-color: var(--color-primary-light);
  color: var(--color-primary-hover)!important;
}

.btn--accent {
  background-color: var(--color-accent);
  color: var(--color-neutral-800)!important;
}

.btn--accent:hover {
  background-color: var(--color-accent-dark);
  color: var(--color-neutral-900)!important;
}

/* Form Inputs */
.input,
.textarea,
.select {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text-primary);
  background-color: var(--color-neutral-100);
  border: 1px solid var(--color-neutral-300);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast), 
              box-shadow var(--transition-fast);
}

.input::placeholder,
.textarea::placeholder {
  color: var(--color-text-muted);
}

.input:hover,
.textarea:hover,
.select:hover {
  border-color: var(--color-neutral-400);
}

.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

.textarea {
  min-height: 120px;
  resize: vertical;
}

/* Card */
.card {
  background-color: var(--color-neutral-100);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-base), 
              box-shadow var(--transition-base);
  border: 1px solid var(--color-neutral-200);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card--soft {
  background-color: var(--color-bg-secondary);
  border-color: var(--color-neutral-300);
}

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

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  :root {
    --color-text-primary: #000000;
    --color-bg-primary: #FFFFFF;
    --color-primary: #000000;
  }
  
  .btn {
    border: 2px solid currentColor;
  }
  
  .card {
    border: 2px solid currentColor;
  }
}