/* ==========================================================================
   GEOWASOL Proteins & Polymers - Design System & CSS Tokens
   Theme: Dominant White Background + Blue + Red + Green + Orange
   ========================================================================== */

:root {
  /* Brand Primary - BLUE */
  --color-blue-900: #082238;
  --color-blue-800: #0B3B60;
  --color-blue-700: #005691;
  --color-blue-600: #0284C7;
  --color-blue-500: #0EA5E9;
  --color-blue-100: #E0F2FE;
  --color-blue-50:  #F0F9FF;

  /* Accent - GREEN (Sustainability & Circular Economy) */
  --color-green-800: #14532D;
  --color-green-700: #15803D;
  --color-green-600: #16A34A;
  --color-green-500: #22C55E;
  --color-green-100: #DCFCE7;
  --color-green-50:  #F0FDF4;

  /* Accent - ORANGE (Machinery, Process, Engineering) */
  --color-orange-800: #9A3412;
  --color-orange-700: #C2410C;
  --color-orange-600: #EA580C;
  --color-orange-500: #F97316;
  --color-orange-100: #FFEDD5;
  --color-orange-50:  #FFF7ED;

  /* Accent - RED (Strategic Highlights & Strong Focus) */
  --color-red-800: #991B1B;
  --color-red-700: #B91C1C;
  --color-red-600: #DC2626;
  --color-red-500: #EF4444;
  --color-red-100: #FEE2E2;
  --color-red-50:  #FEF2F2;

  /* Neutrals & Dominant White */
  --color-white: #FFFFFF;
  --color-slate-50:  #F8FAFC;
  --color-slate-100: #F1F5F9;
  --color-slate-200: #E2E8F0;
  --color-slate-300: #CBD5E1;
  --color-slate-400: #94A3B8;
  --color-slate-500: #64748B;
  --color-slate-600: #475569;
  --color-slate-700: #334155;
  --color-slate-800: #1E293B;
  --color-slate-900: #0F172A;

  /* Semantic Roles */
  --bg-main: var(--color-white);
  --bg-subtle: var(--color-slate-50);
  --bg-muted: var(--color-slate-100);
  --text-primary: var(--color-slate-900);
  --text-secondary: var(--color-slate-600);
  --text-muted: var(--color-slate-400);
  --border-light: var(--color-slate-200);
  --border-focus: var(--color-blue-700);

  /* Typography Tokens */
  --font-family-display: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-family-base: 'Outfit', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-family-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --font-size-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.8125rem);
  --font-size-sm: clamp(0.875rem, 0.82rem + 0.28vw, 0.9375rem);
  --font-size-base: clamp(1rem, 0.95rem + 0.25vw, 1.0625rem);
  --font-size-md: clamp(1.125rem, 1.05rem + 0.38vw, 1.25rem);
  --font-size-lg: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
  --font-size-xl: clamp(1.5rem, 1.35rem + 0.75vw, 1.875rem);
  --font-size-2xl: clamp(1.875rem, 1.65rem + 1.1vw, 2.375rem);
  --font-size-3xl: clamp(2.25rem, 1.95rem + 1.5vw, 3.125rem);
  --font-size-4xl: clamp(2.75rem, 2.3rem + 2.25vw, 4.25rem);

  /* Shadows */
  --shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 2px 4px 0 rgba(15, 23, 42, 0.06);
  --shadow-md: 0 6px 16px -2px rgba(15, 23, 42, 0.08), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
  --shadow-lg: 0 14px 28px -4px rgba(15, 23, 42, 0.1), 0 4px 10px -2px rgba(15, 23, 42, 0.04);
  --shadow-xl: 0 24px 44px -8px rgba(15, 23, 42, 0.12), 0 8px 16px -4px rgba(15, 23, 42, 0.06);
  --shadow-accent-blue: 0 10px 24px -4px rgba(0, 86, 145, 0.25);
  --shadow-accent-orange: 0 10px 24px -4px rgba(234, 88, 12, 0.25);
  --shadow-accent-green: 0 10px 24px -4px rgba(22, 163, 74, 0.25);

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Border Radii */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Layout Container */
  --container-max-width: 1320px;
  --container-padding: clamp(1rem, 3.5vw, 2.5rem);
  --header-height-normal: 84px;
  --header-height-scrolled: 68px;

  /* Touch Targets (Mobile Accessibility) */
  --touch-target-min: 44px;
  --touch-target-preferred: 48px;

  /* Safe Area Insets (iOS/Android Notch & Gesture Bars) */
  --safe-area-top: env(safe-area-inset-top, 0px);
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);
  --safe-area-left: env(safe-area-inset-left, 0px);
  --safe-area-right: env(safe-area-inset-right, 0px);

  /* Transition Easing */
  --transition-fast: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 320ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 550ms cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
  font-size: 16px;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-main);
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  word-break: break-word;
  overflow-wrap: break-word;
  padding-left: var(--safe-area-left);
  padding-right: var(--safe-area-right);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-display);
  letter-spacing: -0.03em;
  font-weight: 800;
}

body.menu-open,
body.modal-open {
  overflow: hidden !important;
  touch-action: none;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
  min-height: var(--touch-target-min);
  display: inline-flex;
  align-items: center;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  min-height: var(--touch-target-min);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

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

ul, ol {
  list-style: none;
}

/* Reduced Motion Preference */
@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;
  }
}
