/* Everleans — Design System Foundation */

:root {
  /* Palette */
  --navy-950: #080f1a;
  --navy-900: #0f1729;
  --navy-800: #1a2744;
  --navy-700: #243352;
  --navy-600: #334766;

  --sage-700: #2d5f54;
  --sage-600: #3d7a6b;
  --sage-500: #4d9483;
  --sage-400: #6db09f;
  --sage-100: #e8f3f0;
  --sage-50: #f3faf8;

  --gold-500: #b8956a;
  --gold-400: #c4a87d;
  --gold-100: #f5efe6;

  --cream: #f7f6f3;
  --cream-dark: #eeede8;
  --white: #ffffff;

  --gray-900: #111827;
  --gray-700: #374151;
  --gray-500: #6b7280;
  --gray-400: #9ca3af;
  --gray-300: #d1d5db;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;

  --success: #059669;
  --error: #dc2626;

  /* Typography */
  --font-display: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-body: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;
  --space-5xl: 128px;

  /* Layout */
  --container: 1200px;
  --container-narrow: 760px;
  --header-height: 76px;
  --announcement-height: 40px;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-2xl: 32px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(15, 23, 41, 0.04);
  --shadow-sm: 0 2px 8px rgba(15, 23, 41, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 23, 41, 0.08);
  --shadow-lg: 0 16px 48px rgba(15, 23, 41, 0.12);
  --shadow-xl: 0 24px 64px rgba(15, 23, 41, 0.16);

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + var(--space-lg));
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--gray-700);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.has-announcement {
  scroll-padding-top: calc(var(--header-height) + var(--announcement-height) + var(--space-lg));
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  color: var(--navy-900);
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 5.5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.375rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.125rem; font-family: var(--font-body); font-weight: 600; }

p { max-width: 65ch; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container--narrow {
  max-width: var(--container-narrow);
}

.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;
}

/* Typography utilities */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sage-600);
}

.eyebrow::before {
  content: '';
  width: 24px;
  height: 1px;
  background: currentColor;
}

.lead {
  font-size: 1.1875rem;
  line-height: 1.7;
  color: var(--gray-500);
}

.text-muted { color: var(--gray-500); }
.text-center { text-align: center; }

.section {
  padding: var(--space-4xl) 0;
}

.section--lg {
  padding: var(--space-5xl) 0;
}

.section--dark {
  background: var(--navy-900);
  color: rgba(255, 255, 255, 0.75);
}

.section--dark h2,
.section--dark h3 {
  color: var(--white);
}

.section--alt {
  background: var(--white);
}

.section-header {
  margin-bottom: var(--space-3xl);
}

.section-header--center {
  text-align: center;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.section-header .eyebrow {
  margin-bottom: var(--space-md);
}

.section-header h2 {
  margin-bottom: var(--space-md);
}

.section-header .lead {
  margin: 0 auto;
}

/* Grid utilities */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }

  .section, .section--lg {
    padding: var(--space-3xl) 0;
  }
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--duration-slow) var(--ease-out),
              transform var(--duration-slow) var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 100ms; }
.reveal-delay-2 { transition-delay: 200ms; }
.reveal-delay-3 { transition-delay: 300ms; }
.reveal-delay-4 { transition-delay: 400ms; }
