/* ============================================
   Krysos Trust — McKinsey White-Paper Design
   CSS Variables, Reset, Base
   ============================================ */

:root {
  /* Light palette */
  --color-white: #FFFFFF;
  --color-snow: #FAFAFA;
  --color-paper: #F5F5F3;
  --color-cloud: #EDEDEB;
  --color-mist: #D4D4D0;
  --color-slate: #94938E;
  --color-graphite: #5C5B57;
  --color-charcoal: #3A3935;
  --color-ink: #1D1D1B;

  /* Accent — Dark Teal */
  --color-teal: #1A4D5C;
  --color-teal-light: #237080;
  --color-teal-pale: #E8F2F5;
  --color-teal-dark: #133A47;

  /* Semantic */
  --color-success: #1A6B4A;
  --color-success-pale: #EBF5F0;
  --color-warning: #9A5B13;
  --color-warning-pale: #FFF5E6;
  --color-danger: #B8352E;
  --color-danger-pale: #FDEEED;
  --color-info: #1A4D5C;

  /* Typography */
  --font-display: 'Cormorant Garamond', 'Georgia', serif;
  --font-body: 'DM Sans', 'Helvetica Neue', sans-serif;
  --font-mono: 'JetBrains Mono', 'Menlo', monospace;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;

  /* Borders */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 600ms ease;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.1);
}

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

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

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-graphite);
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a {
  color: var(--color-teal);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-teal-light);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--color-teal);
  outline-offset: 2px;
}

ul, ol {
  list-style: none;
}

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

input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--color-ink);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.75rem); }
h4 { font-size: clamp(1.1rem, 2vw, 1.35rem); }

::selection {
  background-color: var(--color-teal-pale);
  color: var(--color-teal-dark);
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--color-snow);
}
::-webkit-scrollbar-thumb {
  background: var(--color-mist);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-slate);
}

/* Horizontal rule */
hr, .divider {
  border: none;
  border-top: 1px solid var(--color-cloud);
  margin: var(--space-lg) 0;
}

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