/* base.css  - Design system: colors, typography, spacing, reset */

/* ============================================================
   CSS Custom Properties
   ============================================================ */

:root {
  /* Primary (from Logo Guide) */
  --green: #99C525;
  --green-dark: #7BA01E;
  --green-light: rgba(153, 197, 37, 0.08);

  /* Dark palette */
  --dark: #0C0C0C;
  --dark-card: #161616;
  --dark-border: rgba(255, 255, 255, 0.07);

  /* Light palette */
  --paper: #FAFAF8;
  --sand: #F5F3EE;
  --white: #FFFFFF;

  /* Ink */
  --ink: #1A1A1A;
  --ink-mid: #3D3D3D;
  --ink-light: #6B6B6B;
  --ink-subtle: #999999;

  /* Inverted ink (on dark backgrounds) */
  --ink-inv: #E8E8E8;
  --ink-inv-dim: rgba(255, 255, 255, 0.55);
  --ink-inv-muted: rgba(255, 255, 255, 0.35);

  /* Typography */
  --font-heading: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
  --font-body: 'Karla', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

  /* Spacing */
  --section-pad-v: clamp(5rem, 10vw, 8rem);
  --section-pad-h: 3rem;
  --content-max: 1100px;

  /* Borders */
  --radius: 6px;
  --radius-lg: 12px;

  /* Transitions */
  --ease: 0.25s ease;
}


/* ============================================================
   Reset
   ============================================================ */

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

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

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--green-dark);
  text-decoration: none;
  transition: color var(--ease);
}

a:hover {
  color: var(--green);
}

ul, ol {
  list-style: none;
}


/* ============================================================
   Typography
   ============================================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
}

h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  letter-spacing: -0.01em;
}

h3 {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
}

h4 {
  font-size: 1.125rem;
}

p {
  margin-bottom: 1rem;
  max-width: 65ch;
}

p:last-child {
  margin-bottom: 0;
}

strong {
  font-weight: 700;
}

em {
  font-style: italic;
}

small {
  font-size: 0.875rem;
}


/* ============================================================
   Layout
   ============================================================ */

.container {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding-left: var(--section-pad-h);
  padding-right: var(--section-pad-h);
}

.section {
  padding-top: var(--section-pad-v);
  padding-bottom: var(--section-pad-v);
}

.section--sand {
  background: var(--sand);
}

.section--dark {
  background: var(--dark);
  color: var(--ink-inv);
}

.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4 {
  color: var(--ink-inv);
}


/* ============================================================
   Utility Classes
   ============================================================ */

.text-center { text-align: center; }
.text-green { color: var(--green); }
.text-muted { color: var(--ink-light); }
.text-small { font-size: 0.875rem; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 900px) {
  :root {
    --section-pad-h: 2rem;
  }
}

@media (max-width: 640px) {
  :root {
    --section-pad-h: 1.5rem;
  }
}
