/**
 * Base Styles & Design Tokens
 * Following .prompt.md guidelines for pixel-perfect design
 */

:root {
  /* Colors */
  --color-text: #000;
  --color-text-light: #fff;
  --color-background: #fff;
  --color-border: #e5e5e5;
  --color-primary: #000;
  --color-primary-hover: #333;
  
  /* Spacing Scale */
  --space-4: 0.25rem;
  --space-8: 0.5rem;
  --space-12: 0.75rem;
  --space-16: 1rem;
  --space-24: 1.5rem;
  --space-32: 2rem;
  --space-40: 2.5rem;
  --space-48: 3rem;
  --space-64: 4rem;
  --space-80: 5rem;
  --space-96: 6rem;
  
  /* Typography */
  --font-body: 'Raleway', system-ui, -apple-system, 'Segoe UI', Roboto, Inter, Arial, sans-serif;
  --font-display: 'Raleway', system-ui, -apple-system, 'Segoe UI', Roboto, Inter, Arial, sans-serif;
  
  /* Font Sizes */
  --fs-100: 0.75em;
  --fs-200: 0.875em;
  --fs-300: 1em;
  --fs-400: 1.125em;
  --fs-500: 1.25em;
  --fs-600: 1.5em;
  --fs-700: 2em;
  --fs-800: 2.5em;
  --fs-900: 3em;
  --fs-1000: 4em;
  
  /* Line Heights */
  --lh-tight: 1.2;
  --lh-normal: 1.5;
  --lh-relaxed: 1.75;
  
  /* Radii */
  --radius-4: 4px;
  --radius-8: 8px;
  --radius-12: 12px;
  
  /* Shadows */
  --shadow-100: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-200: 0 2px 4px rgba(0, 0, 0, 0.08);
  --shadow-300: 0 4px 8px rgba(0, 0, 0, 0.1);
  
  /* Container */
  --container-max: 1280px;
  --container-padding: var(--space-24);
}

@media (min-width: 768px) {
  :root {
    --container-padding: var(--space-48);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  -moz-tab-size: 4;
  tab-size: 4;
}

body {
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--fs-300);
  line-height: var(--lh-normal);
  background: var(--color-background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

button,
input,
optgroup,
select,
textarea {
  font-family: inherit;
  font-size: 100%;
  line-height: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: transparent;
  border: none;
}

/* Container Utility */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
  overflow-x: hidden;
}

/* Screen Reader Text */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

.screen-reader-text:focus {
  background-color: #f1f1f1;
  border-radius: 3px;
  box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
  clip: auto !important;
  clip-path: none;
  color: #21759b;
  display: block;
  font-size: 0.875em;
  font-weight: 700;
  height: auto;
  left: 5px;
  line-height: normal;
  padding: 15px 23px 14px;
  text-decoration: none;
  top: 5px;
  width: auto;
  z-index: 100000;
}

/* Skip Link */
.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: 0;
  top: 0;
  z-index: 999999;
}

/* Site Structure */
.site {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1;
}

/* Focus States */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

