/* ============================================================
   BASE — Reset, Custom Properties, Typography, Utilities
   ============================================================ */

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

:root {
  /* Brand colors */
  --color-primary:        #0055A5;
  --color-primary-dark:   #003D7A;
  --color-primary-light:  #E8F2FF;
  --color-primary-mid:    #1A6BC4;
  --color-accent:         #00957C;
  --color-accent-dark:    #007A66;
  --color-accent-light:   #E6F7F4;
  --color-scapa:          #6D28D9;
  --color-scapa-dark:     #5B21B6;
  --color-scapa-light:    #EDE9FE;

  /* Neutral */
  --color-text:           #1A2332;
  --color-text-muted:     #5A6B7B;
  --color-text-light:     #8899AA;
  --color-surface:        #F7F9FC;
  --color-surface-2:      #EEF2F7;
  --color-border:         #E2E8F0;
  --color-border-light:   #F1F5F9;
  --color-white:          #FFFFFF;
  --color-danger:         #DC2626;
  --color-warning:        #D97706;
  --color-success:        #059669;

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

  /* Typography */
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-size-xs:   0.75rem;
  --font-size-sm:   0.875rem;
  --font-size-base: 1rem;
  --font-size-lg:   1.125rem;
  --font-size-xl:   1.25rem;
  --font-size-2xl:  1.5rem;
  --font-size-3xl:  1.875rem;
  --font-size-4xl:  2.25rem;
  --font-size-5xl:  3rem;
  --font-size-6xl:  3.75rem;

  /* Radius */
  --radius-sm:   0.25rem;
  --radius-md:   0.5rem;
  --radius-lg:   0.75rem;
  --radius-xl:   1rem;
  --radius-2xl:  1.5rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-xs:  0 1px 2px 0 rgb(0 0 0 / 0.04);
  --shadow-sm:  0 1px 3px 0 rgb(0 0 0 / 0.06), 0 1px 2px -1px rgb(0 0 0 / 0.04);
  --shadow-md:  0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.05);
  --shadow-lg:  0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.05);
  --shadow-xl:  0 20px 25px -5px rgb(0 0 0 / 0.08), 0 8px 10px -6px rgb(0 0 0 / 0.05);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.15);
  --shadow-primary: 0 8px 24px -4px rgb(0 85 165 / 0.3);
  --shadow-accent:  0 8px 24px -4px rgb(0 149 124 / 0.3);

  /* Transitions */
  --transition-fast:   150ms ease;
  --transition-base:   250ms ease;
  --transition-slow:   400ms ease;
  --transition-spring: 300ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Z-index layers */
  --z-base:    0;
  --z-raised:  10;
  --z-header:  100;
  --z-drawer:  200;
  --z-overlay: 300;
  --z-modal:   400;
  --z-chat:    500;
}

/* ---- Base reset ---- */

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

body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font: inherit;
}

input, textarea, select {
  font: inherit;
}

/* ---- Typography ---- */

h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 4vw + 0.5rem, var(--font-size-5xl)); }
h2 { font-size: clamp(1.5rem, 2.5vw + 0.5rem, var(--font-size-4xl)); }
h3 { font-size: clamp(1.2rem, 1.5vw + 0.4rem, var(--font-size-2xl)); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); }
h6 { font-size: var(--font-size-base); }

p {
  line-height: 1.75;
  color: var(--color-text-muted);
}

strong { font-weight: 600; color: var(--color-text); }

/* ---- Utilities ---- */

.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;
}

.text-center   { text-align: center; }
.text-left     { text-align: left; }
.text-right    { text-align: right; }
.text-muted    { color: var(--color-text-muted); }
.text-light    { color: var(--color-text-light); }
.text-primary  { color: var(--color-primary); }
.text-accent   { color: var(--color-accent); }
.text-scapa    { color: var(--color-scapa); }
.text-white    { color: var(--color-white); }

.font-normal   { font-weight: 400; }
.font-medium   { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold     { font-weight: 700; }
.font-extrabold{ font-weight: 800; }

.uppercase     { text-transform: uppercase; }
.tracking-wide { letter-spacing: 0.05em; }
.leading-tight { line-height: 1.2; }
.leading-snug  { line-height: 1.4; }

.mt-2  { margin-top: var(--space-2); }
.mt-4  { margin-top: var(--space-4); }
.mt-6  { margin-top: var(--space-6); }
.mt-8  { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }
.mb-2  { margin-bottom: var(--space-2); }
.mb-4  { margin-bottom: var(--space-4); }
.mb-6  { margin-bottom: var(--space-6); }
.mb-8  { margin-bottom: var(--space-8); }

.d-flex        { display: flex; }
.items-center  { align-items: center; }
.gap-2         { gap: var(--space-2); }
.gap-4         { gap: var(--space-4); }
.flex-wrap     { flex-wrap: wrap; }

/* Scroll-reveal animation base */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
