/* ============================================
   BASE — Reset, variables, typography
   ============================================ */

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

html, body {
  overflow-x: hidden;
  max-width: 100%;
}

:root {
  /* Colors */
  --color-text: #171717;
  --color-text-muted: #666;
  --color-text-light: #999;
  --color-bg: #ffffff;
  --color-bg-subtle: #fafafa;
  --color-accent: #e32415;
  --color-border: rgba(0, 0, 0, 0.08);

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing scale */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 48px;
  --space-6: 64px;
  --space-7: 96px;
  --space-8: 128px;

  /* Layout */
  --nav-h: 55px;
  --max-w: 1500px;
  --content-w: 650px;

  /* Glass nav background */
  --glass-bg: rgba(255, 255, 255, 0.30);
  --glass-border: rgba(255, 255, 255, 0.45);

  /* Motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 200ms;
  --duration-base: 400ms;
  --duration-slow: 600ms;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Typography scale */
h1, h2, h3, h4, h5, h6 {
  font-weight: 500;
  line-height: 1.2;
  color: var(--color-text);
}

h1 { font-size: 38px; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
h4 { font-size: 16px; }

p {
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease);
}

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

/* Accessibility */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Visually hidden — for screen readers and SEO H1s that shouldn't disrupt design */
.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;
}

/* Mobile typography adjustments */
@media (max-width: 768px) {
  body { font-size: 14px; }
  h1 { font-size: 26px; }
  h2 { font-size: 20px; }
  h3 { font-size: 16px; }
}