/* ============================================================
   Autoportal.ua — Design Tokens
   Источник правды для дизайна — docs/style-guide.md.
   Любая правка токенов здесь обязана быть отражена в style-guide.md.
   ============================================================ */

:root {
  /* ─────  BRAND — Signal Red  ───── */
  --color-brand-50:  #FFF1F1;
  --color-brand-100: #FFDADA;
  --color-brand-200: #FEB8B8;
  --color-brand-300: #FC8F8F;
  --color-brand-400: #FA7272;
  --color-brand-500: #F85656;   /* primary */
  --color-brand-600: #E23838;
  --color-brand-700: #B71E1E;
  --color-brand-800: #8C1515;
  --color-brand-900: #5E0E0E;

  /* ─────  SECONDARY — Azure Blue (info, trust)  ───── */
  --color-secondary-50:  #E8F0FF;
  --color-secondary-100: #CCDCFF;
  --color-secondary-200: #99B8FF;
  --color-secondary-300: #6691FF;
  --color-secondary-400: #3A70FF;
  --color-secondary-500: #1A56F0;
  --color-secondary-600: #0F3FC2;
  --color-secondary-700: #0A2E8F;
  --color-secondary-800: #0A2368;
  --color-secondary-900: #0A1B45;

  /* ─────  ACCENT — Amber (Топ, UA, перевірено)  ───── */
  --color-accent-50:  #FFF8E6;
  --color-accent-100: #FFECB8;
  --color-accent-300: #FFD466;
  --color-accent-500: #FFB800;
  --color-accent-700: #B37F00;

  /* ─────  NEUTRALS — Ink  ───── */
  --color-ink-950: #0A0F1C;
  --color-ink-900: #111827;
  --color-ink-800: #1F2937;
  --color-ink-700: #374151;
  --color-ink-600: #4B5563;
  --color-ink-500: #6B7280;
  --color-ink-400: #9CA3AF;
  --color-ink-300: #D1D5DB;
  --color-ink-200: #E5E7EB;
  --color-ink-100: #F3F4F6;
  --color-ink-50:  #F9FAFB;
  --color-white:   #FFFFFF;

  /* ─────  SEMANTIC  ───── */
  --color-success-50:  #E8F8F0;
  --color-success-500: #00A36C;
  --color-success-600: #008F5E;
  --color-success-700: #006E49;

  --color-warning-50:  #FFF4E0;
  --color-warning-500: #F59E0B;
  --color-warning-700: #A66B00;

  --color-danger-50:   #FDECEC;
  --color-danger-500:  #D81E2C;
  --color-danger-600:  #B81A28;
  --color-danger-700:  #961220;

  --color-info-50:     #E8F0FF;
  --color-info-500:    #1A56F0;
  --color-info-700:    #0A2E8F;

  /* ─────  FUEL / BODY chips  ───── */
  --color-fuel-petrol:   #F59E0B;
  --color-fuel-diesel:   #6B7280;
  --color-fuel-hybrid:   #8B5CF6;
  --color-fuel-electric: #00A36C;
  --color-fuel-gas:      #1A56F0;

  /* ─────  SURFACE (UI)  ───── */
  --surface-base:    var(--color-white);
  --surface-subtle:  var(--color-ink-50);
  --surface-muted:   var(--color-ink-100);
  --surface-inverse: var(--color-ink-950);

  --border-subtle:  var(--color-ink-200);
  --border-default: var(--color-ink-300);
  --border-strong:  var(--color-ink-400);

  --text-primary:   var(--color-ink-900);
  --text-secondary: var(--color-ink-600);
  --text-muted:     var(--color-ink-500);
  --text-inverse:   var(--color-white);
  --text-brand:     var(--color-brand-500);
  --text-danger:    var(--color-danger-500);

  /* ─────  TYPOGRAPHY — Exo 2 only  ───── */
  --font-display: 'Exo 2', system-ui, sans-serif;
  --font-body:    'Exo 2', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;

  --text-xs:   12px;
  --text-sm:   14px;
  --text-base: 16px;
  --text-md:   18px;
  --text-lg:   20px;
  --text-xl:   24px;
  --text-2xl:  28px;
  --text-3xl:  34px;
  --text-4xl:  42px;
  --text-5xl:  56px;
  --text-6xl:  72px;

  --leading-tight:  1.1;
  --leading-snug:   1.25;
  --leading-normal: 1.5;
  --leading-loose:  1.7;

  --tracking-tight:  -0.02em;
  --tracking-normal: 0;
  --tracking-wide:   0.04em;
  --tracking-caps:   0.08em;

  /* ─────  SPACING (4pt scale)  ───── */
  --space-0:  0;
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;
  --space-32: 128px;

  /* ─────  RADII  ───── */
  --radius-xs:   4px;
  --radius-sm:   8px;
  --radius-md:  12px;
  --radius-lg:  16px;
  --radius-xl:  20px;
  --radius-2xl: 28px;
  --radius-pill: 999px;

  /* ─────  SHADOWS  ───── */
  --shadow-xs: 0 1px 2px rgba(10,15,28,0.06);
  --shadow-sm: 0 2px 6px rgba(10,15,28,0.06), 0 1px 2px rgba(10,15,28,0.04);
  --shadow-md: 0 6px 18px rgba(10,15,28,0.08), 0 2px 6px rgba(10,15,28,0.05);
  --shadow-lg: 0 16px 40px rgba(10,15,28,0.10), 0 4px 12px rgba(10,15,28,0.06);
  --shadow-xl: 0 28px 64px rgba(10,15,28,0.14), 0 8px 20px rgba(10,15,28,0.08);
  --shadow-focus: 0 0 0 3px rgba(248,86,86,0.28);

  /* ─────  LAYOUT — breakpoints + container  ───── */
  --container-sm:  640px;
  --container-md:  768px;
  --container-lg: 1024px;
  --container-xl: 1280px;
  --container-2xl:1440px;

  /* ─────  MOTION  ───── */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast: 120ms;
  --duration-base: 200ms;
  --duration-slow: 320ms;
}

/* ============================================================
   GLOBAL RESET + BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background: var(--surface-base);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }

/* ============================================================
   TYPOGRAPHY UTILITY CLASSES (reusable across pages)
   Use these instead of raw font-size in components.
   ============================================================ */
.display-hero { font-family: var(--font-display); font-weight: 700; font-size: var(--text-6xl); line-height: var(--leading-tight); letter-spacing: var(--tracking-tight); }
.display-1    { font-family: var(--font-display); font-weight: 700; font-size: var(--text-5xl); line-height: 1.1; letter-spacing: -0.02em; }
.display-2    { font-family: var(--font-display); font-weight: 700; font-size: var(--text-4xl); line-height: 1.15; letter-spacing: -0.02em; }
.heading-1    { font-weight: 700; font-size: var(--text-3xl); line-height: 1.2; letter-spacing: -0.01em; }
.heading-2    { font-weight: 700; font-size: var(--text-2xl); line-height: 1.25; }
.heading-3    { font-weight: 600; font-size: var(--text-xl); line-height: 1.3; }
.heading-4    { font-weight: 600; font-size: var(--text-lg); line-height: 1.35; }
.body-lg      { font-size: var(--text-md); line-height: 1.5; }
.body         { font-size: var(--text-base); line-height: 1.55; }
.body-sm      { font-size: var(--text-sm); line-height: 1.5; color: var(--text-secondary); }
.caption      { font-size: var(--text-xs); line-height: 1.4; color: var(--text-muted); letter-spacing: 0.01em; }
.overline     { font-size: var(--text-xs); font-weight: 600; text-transform: uppercase; letter-spacing: var(--tracking-caps); color: var(--text-secondary); }
.mono         { font-family: var(--font-mono); }

/* ============================================================
   LOGO MARK — reusable AP monogram
   ============================================================ */
.ap-mono {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
}
.logo-mark { font-size: 32px; line-height: 1; }
.logo-mark .ap-mono { font-size: 0.46em; }

/* ============================================================
   LAYOUT — base container (mobile-first)
   ============================================================ */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}
@media (min-width: 640px) {
  .container { padding: 0 var(--space-6); }
}

/* Responsive image helper — auto fits without overflow */
.img-fluid { width: 100%; height: auto; }
