/* -------------------------------------------------------------------------- */
/*  1. Variables & Design System                                              */
/* -------------------------------------------------------------------------- */
:root {
  /* Palette: Cool White, Steel Gray, Professional Aqua */
  --c-primary: #007ea7;       /* Industrial Aqua */
  --c-primary-hover: #005f7f;
  --c-success: #10b981;
  --c-warning: #f59e0b;
  --c-danger: #ef4444;

  /* Neutrals */
  --c-bg-body: #f8fafc;       /* Cool light gray */
  --c-bg-surface: #ffffff;    /* Pure white */
  --c-text-main: #1e293b;     /* Dark slate */
  --c-text-muted: #64748b;    /* Steel gray */
  --c-border: #cbd5e1;        /* Light steel */

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

  /* Spacing Scale */
  --space-1: 0.25rem;  /* 4px */
  --space-2: 0.5rem;   /* 8px */
  --space-3: 0.75rem;  /* 12px */
  --space-4: 1rem;     /* 16px */
  --space-6: 1.5rem;   /* 24px */
  --space-8: 2rem;     /* 32px */
  --space-12: 3rem;    /* 48px */

  /* Font Sizes */
  --ts-xs: 0.75rem;
  --ts-sm: 0.875rem;
  --ts-base: 1rem;
  --ts-lg: 1.125rem;
  --ts-xl: 1.25rem;
  --ts-2xl: 1.5rem;
  --ts-3xl: 1.875rem;
  --ts-4xl: 2.25rem;

  /* UI Properties */
  --radius: 2px; /* Structured, sharp corners for industrial feel */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --transition: 0.2s ease-in-out;
}

/* -------------------------------------------------------------------------- */
/*  2. Reset & Normalize                                                      */
/* -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
}

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

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

/* -------------------------------------------------------------------------- */
/*  3. Base Styles                                                            */
/* -------------------------------------------------------------------------- */
body {
  font-family: var(--font-sans);
  font-size: var(--ts-base);
  line-height: 1.6;
  color: var(--c-text-main);
  background-color: var(--c-bg-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-4);
  color: var(--c-text-main);
  letter-spacing: -0.025em;
}

h1 { font-size: var(--ts-4xl); }
h2 { font-size: var(--ts-3xl); }
h3 { font-size: var(--ts-2xl); }
h4 { font-size: var(--ts-xl); }

p {
  margin-bottom: var(--space-4);
  color: var(--c-text-muted);
}

a {
  color: var(--c-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition);
}

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

/* -------------------------------------------------------------------------- */
/*  4. Utilities                                                              */
/* -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: var(--space-4);
}

.grid {
  display: grid;
  gap: var(--space-4);
}

.flex {
  display: flex;
  gap: var(--space-4);
}

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

.text-center { text-align: center; }
.mt-4 { margin-top: var(--space-4); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* -------------------------------------------------------------------------- */
/*  5. Components                                                             */
/* -------------------------------------------------------------------------- */

/* Buttons: Technical, clean */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: var(--ts-sm);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition);
  text-decoration: none !important;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background-color: var(--c-primary);
  color: white!important;
}

.btn-primary:hover {
  background-color: var(--c-primary-hover);
}

.btn-secondary {
  background-color: var(--c-bg-surface);
  border-color: var(--c-border);
  color: var(--c-text-main);
}

.btn-secondary:hover {
  border-color: var(--c-text-muted);
  background-color: #f1f5f9;
}

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

/* Inputs: Structured, professional */
.input {
  width: 100%;
  padding: var(--space-2) var(--space-3);
  font-size: var(--ts-base);
  line-height: 1.5;
  color: var(--c-text-main);
  background-color: var(--c-bg-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.input:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(0, 126, 167, 0.15);
}

/* Cards: Minimalist container */
.card {
  background-color: var(--c-bg-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

/* -------------------------------------------------------------------------- */
/*  6. Accessibility                                                          */
/* -------------------------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--c-primary);
  outline-offset: 2px;
}

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