/* === AGATIO CONSULTING — BASE CSS === */
/* Reset + Design Tokens */

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

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

body {
  min-height: 100vh;
  line-height: 1.6;
}

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

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

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

/* === DESIGN TOKENS === */
:root {
  /* Typography Scale (fluid) */
  --text-xs: clamp(0.75rem, 0.7rem + 0.2vw, 0.8125rem);
  --text-sm: clamp(0.8125rem, 0.78rem + 0.15vw, 0.875rem);
  --text-base: clamp(0.9375rem, 0.9rem + 0.18vw, 1rem);
  --text-lg: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  --text-xl: clamp(1.25rem, 1.1rem + 0.65vw, 1.625rem);
  --text-2xl: clamp(1.625rem, 1.3rem + 1.4vw, 2.25rem);
  --text-3xl: clamp(2rem, 1.5rem + 2.2vw, 3rem);
  --text-hero: clamp(2.5rem, 1.8rem + 3vw, 4rem);

  /* Spacing (4px base) */
  --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;

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;
  --content-full: 100%;

  /* Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  /* Shadows - Light Mode */
  --shadow-sm: 0 1px 2px rgba(27,42,74,0.05), 0 1px 3px rgba(27,42,74,0.04);
  --shadow-md: 0 2px 4px rgba(27,42,74,0.06), 0 4px 16px rgba(27,42,74,0.04);
  --shadow-lg: 0 4px 8px rgba(27,42,74,0.07), 0 12px 32px rgba(27,42,74,0.05);
  --shadow-xl: 0 8px 16px rgba(27,42,74,0.08), 0 24px 48px rgba(27,42,74,0.06);

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;

  /* Light Mode Colors */
  --color-bg: #FFFFFF;
  --color-surface: #FFFFFF;
  --color-surface-alt: #F1F3F8;
  --color-text: #1B2A4A;
  --color-text-muted: #6B7A94;
  --color-text-faint: #99A5B8;
  --color-primary: #1B2A4A;
  --color-accent: #E8461C;
  --color-accent-hover: #D03A15;
  --color-accent-light: rgba(232,70,28,0.08);
  --color-success: #2D8A56;
  --color-border: #E2E6EF;
  --color-navy-dark: #111B30;
  --color-navy: #1B2A4A;

  /* Header */
  --header-height: 72px;
}

/* Dark Mode */
[data-theme="dark"] {
  --color-bg: #0F1520;
  --color-surface: #1A2236;
  --color-surface-alt: #212B42;
  --color-text: #D4DAE6;
  --color-text-muted: #8B96AB;
  --color-text-faint: #5B6577;
  --color-primary: #3A6FF5;
  --color-accent: #F06830;
  --color-accent-hover: #E55A22;
  --color-accent-light: rgba(240,104,48,0.12);
  --color-success: #3DA868;
  --color-border: #2A3550;
  --color-navy-dark: #0A0F1A;
  --color-navy: #1A2236;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.2), 0 1px 3px rgba(0,0,0,0.15);
  --shadow-md: 0 2px 4px rgba(0,0,0,0.25), 0 4px 16px rgba(0,0,0,0.15);
  --shadow-lg: 0 4px 8px rgba(0,0,0,0.3), 0 12px 32px rgba(0,0,0,0.2);
  --shadow-xl: 0 8px 16px rgba(0,0,0,0.35), 0 24px 48px rgba(0,0,0,0.25);
}

/* Base typography */
body {
  font-family: 'General Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: var(--text-base);
  color: var(--color-text);
  background-color: var(--color-bg);
  transition: background-color var(--duration-slow) var(--ease-out),
              color var(--duration-slow) var(--ease-out);
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Cabinet Grotesk', 'General Sans', sans-serif;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

/* Scroll animations */
.animate-on-scroll {
  opacity: 0;
  transition: opacity 0.8s var(--ease-out);
}

.animate-on-scroll.visible {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .animate-on-scroll {
    opacity: 1;
    transition: none;
  }
}

/* Focus styles */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Selection */
::selection {
  background-color: rgba(232,70,28,0.15);
  color: var(--color-text);
}

[data-theme="dark"] ::selection {
  background-color: rgba(240,104,48,0.2);
}
