/* ==========================================================================
   KORTEND MONTAŽA KUHINJA — CORE DESIGN SYSTEM & STYLESHEET
   Refined Architectural Slate & Graphite Monochrome Theme
   Author: Senior Frontend Architect (10+ YOE)
   ========================================================================== */

/* --- CSS Variables / Design Tokens --- */
:root {
  /* Color Palette - Gray / Slate / Carbon */
  --color-bg-primary: #0e1114;
  --color-bg-secondary: #161a1f;
  --color-bg-tertiary: #1f252d;
  --color-bg-card: #181d24;
  --color-bg-card-hover: #222933;
  --color-bg-light: #f5f6f8;
  --color-bg-light-alt: #ebeef2;
  --color-bg-white: #ffffff;

  /* Surface & Border Grays */
  --color-border-subtle: rgba(255, 255, 255, 0.08);
  --color-border-medium: rgba(255, 255, 255, 0.16);
  --color-border-strong: rgba(255, 255, 255, 0.28);
  --color-border-light: #e2e5ea;

  /* Text Colors */
  --color-text-bright: #ffffff;
  --color-text-primary: #e5e7eb;
  --color-text-secondary: #94a3b8;
  --color-text-muted: #64748b;
  --color-text-dark: #0f172a;
  --color-text-dark-secondary: #475569;

  /* Accent & Accompanying Tones */
  --color-accent-slate: #3b82f6; /* Subtle technical blue for trust indicators */
  --color-accent-amber: #f59e0b; /* Star ratings */
  --color-accent-emerald: #10b981; /* Success / guarantee checkmarks */
  --color-steel: #cbd5e1;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Spacing Scale */
  --space-xs: 0.25rem;  /* 4px */
  --space-sm: 0.5rem;   /* 8px */
  --space-md: 1rem;     /* 16px */
  --space-lg: 1.5rem;   /* 24px */
  --space-xl: 2rem;     /* 32px */
  --space-2xl: 3rem;    /* 48px */
  --space-3xl: 4.5rem;  /* 72px */
  --space-4xl: 6rem;    /* 96px */

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 25px rgba(255, 255, 255, 0.05);

  /* Layout */
  --container-max-width: 1240px;
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  background-color: var(--color-bg-primary);
  color: var(--color-text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

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

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

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

ul, ol {
  list-style: none;
}

/* --- Container & Grid System --- */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-md);
  padding-right: var(--space-md);
}

@media (min-width: 768px) {
  .container {
    padding-left: var(--space-xl);
    padding-right: var(--space-xl);
  }
}

/* --- Typography Utilities --- */
h1, h2, h3, h4, h5, h6 {
  color: var(--color-text-bright);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.75rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.25rem; }

p {
  color: var(--color-text-secondary);
}

.text-muted { color: var(--color-text-muted); }
.text-steel { color: var(--color-steel); }
.text-bright { color: var(--color-text-bright); }
.text-gradient {
  background: linear-gradient(135deg, #ffffff 30%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* --- Badges & Tags --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.badge-gray {
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-steel);
  border: 1px solid var(--color-border-subtle);
}

.badge-emerald {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* --- Section Dividers & Background Variants --- */
.section {
  padding-top: var(--space-3xl);
  padding-bottom: var(--space-3xl);
  position: relative;
}

@media (min-width: 992px) {
  .section {
    padding-top: var(--space-4xl);
    padding-bottom: var(--space-4xl);
  }
}

.section-alt {
  background-color: var(--color-bg-secondary);
  border-top: 1px solid var(--color-border-subtle);
  border-bottom: 1px solid var(--color-border-subtle);
}

.section-darker {
  background-color: #090b0d;
}

/* --- Section Headers --- */
.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto var(--space-3xl) auto;
}

.section-header.text-left {
  text-align: left;
  margin-left: 0;
}

.section-header h2 {
  margin-top: var(--space-sm);
  margin-bottom: var(--space-md);
}

.section-header p {
  font-size: 1.125rem;
}

/* --- Grid Systems --- */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

@media (min-width: 768px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.grid-4 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

@media (min-width: 640px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* --- Visually Hidden for Screen Readers --- */
.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;
}

/* --- Micro Utilities --- */
.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
