/* ============================================================
   GLOBAL.CSS — Design tokens, reset, typography
   danostrowski.com
   ============================================================ */

/* ── Design Tokens ─────────────────────────────────────────── */
:root {
  /* Colors */
  --bg:             #2C2C2C;
  --bg-raised:      #333333;
  --bg-overlay:     #3A3A3A;
  --bg-hover:       #404040;
  --border:         #444444;
  --border-subtle:  #383838;

  --text-primary:   #F0EDE8;
  --text-secondary: #B8B0A8;
  --text-tertiary:  #6E6860;

  /* Act accents */
  --act1:   #89B4FA;   /* Blue — Physical Systems */
  --act2:   #A8C8A0;   /* Sage — Knowledge Systems */
  --act3:   #C8A8E0;   /* Lavender — AI Systems */
  --bridge: #E8B89A;   /* Sand — Bridge projects */

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Type scale */
  --text-xs:   0.6875rem;  /* 11px */
  --text-sm:   0.8125rem;  /* 13px */
  --text-base: 1rem;       /* 16px */
  --text-lg:   1.125rem;   /* 18px */
  --text-xl:   1.375rem;   /* 22px */
  --text-2xl:  1.75rem;    /* 28px */
  --text-3xl:  2.5rem;     /* 40px */
  --text-hero: clamp(2.25rem, 5.5vw, 4.5rem);

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

  /* Layout */
  --max-width:     1200px;
  --content-width: 720px;
  --gutter:        clamp(1.25rem, 4vw, 3rem);
  --card-gap:      1.5rem;

  /* Radius */
  --radius-sm: 3px;
  --radius-md: 6px;
  --radius-lg: 12px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);

  /* Motion */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-inout:  cubic-bezier(0.87, 0, 0.13, 1);
  --dur-fast:    150ms;
  --dur-base:    250ms;
  --dur-slow:    500ms;
}

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

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

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

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

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

ul, ol {
  list-style: none;
}

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

input {
  font-family: inherit;
}

/* ── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }

p {
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Prose — used inside case study content */
.prose p { margin-bottom: var(--space-6); }
.prose h2 {
  font-size: var(--text-xl);
  margin-top: var(--space-12);
  margin-bottom: var(--space-4);
  color: var(--text-primary);
}
.prose h3 {
  font-size: var(--text-lg);
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
  color: var(--text-primary);
}
.prose ul {
  list-style: disc;
  padding-left: var(--space-6);
  margin-bottom: var(--space-6);
  color: var(--text-secondary);
}
.prose ul li { margin-bottom: var(--space-2); }
.prose blockquote {
  border-left: 2px solid var(--act3);
  padding-left: var(--space-6);
  margin: var(--space-8) 0;
  color: var(--text-secondary);
  font-size: var(--text-lg);
  font-style: italic;
  line-height: 1.6;
}
.prose strong { color: var(--text-primary); font-weight: 500; }
.prose a { color: var(--act3); border-bottom: 1px solid transparent; }
.prose a:hover { border-bottom-color: var(--act3); }

/* Label utility — used for act tags, role, year */
.label {
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--text-tertiary);
}

/* ── Utility Classes ────────────────────────────────────────── */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

.text-primary   { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-tertiary  { color: var(--text-tertiary); }

.act1-color { color: var(--act1); }
.act2-color { color: var(--act2); }
.act3-color { color: var(--act3); }
.bridge-color { color: var(--bridge); }

/* ── Focus styles ───────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--act3);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ── Selection ──────────────────────────────────────────────── */
::selection {
  background: rgba(200, 168, 224, 0.25);
  color: var(--text-primary);
}

/* ── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--text-tertiary); }
