/**
 * HatchEDU Design System — Core Styles
 * Shared across Django marketing site and Flask SaaS app
 */

:root {
  /* Brand Colors */
  --color-primary: #2E7D32;
  --color-primary-light: #66BB6A;
  --color-primary-dark: #1B5E20;
  --color-cta: #FFCA28;

  /* Semantic Colors */
  --color-success: #4CAF50;
  --color-warning: #FF9800;
  --color-error: #F44336;
  --color-info: #2196F3;

  /* Neutral Palette */
  --color-bg: #F9F9F9;
  --color-text-primary: #333333;
  --color-text-secondary: #666666;
  --color-text-muted: #999999;
  --color-border: #DDDDDD;
  --color-white: #FFFFFF;

  /* Typography */
  --font-primary: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, sans-serif;
  --font-mono: "Courier New", monospace;

  --font-weight-light: 300;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /* Spacing Scale */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 5rem;
  --space-5xl: 6rem;

  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.15);

  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-base: 250ms ease-in-out;
  --transition-slow: 350ms ease-in-out;

  /* Layout */
  --container-max-width: 1200px;
  --grid-gap: 1rem;

  /* Z-index Scale */
  --z-hide: -1;
  --z-base: 0;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-modal: 400;
  --z-tooltip: 500;
}

/* Dark mode support disabled - force light mode for now */
/* @media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #1a1a1a;
    --color-text-primary: #f5f5f5;
    --color-text-secondary: #c0c0c0;
    --color-text-muted: #808080;
    --color-border: #404040;
  }
} */

/* ===== RESET & DEFAULTS ===== */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  font-size: 1rem;
  font-weight: var(--font-weight-normal);
  line-height: 1.6;
  color: var(--color-text-primary);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== TYPOGRAPHY ===== */

h1 {
  font-size: 2.25rem;
  font-weight: var(--font-weight-bold);
  line-height: 1.2;
  margin-bottom: var(--space-lg);
}

h2 {
  font-size: 1.75rem;
  font-weight: var(--font-weight-semibold);
  line-height: 1.3;
  margin-bottom: var(--space-lg);
}

h3 {
  font-size: 1.5rem;
  font-weight: var(--font-weight-semibold);
  line-height: 1.3;
  margin-bottom: var(--space-md);
}

h4 {
  font-size: 1.25rem;
  font-weight: var(--font-weight-semibold);
  line-height: 1.4;
  margin-bottom: var(--space-md);
}

h5 {
  font-size: 1.125rem;
  font-weight: var(--font-weight-semibold);
  line-height: 1.4;
  margin-bottom: var(--space-sm);
}

h6 {
  font-size: 1rem;
  font-weight: var(--font-weight-semibold);
  line-height: 1.4;
  margin-bottom: var(--space-sm);
}

p {
  margin-bottom: var(--space-md);
}

small,
.text-sm {
  font-size: 0.875rem;
}

.text-xs {
  font-size: 0.75rem;
}

.text-muted {
  color: var(--color-text-muted);
}

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

/* ===== LINKS ===== */

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

a:hover {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

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

/* ===== UTILITY CLASSES ===== */

.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-md);
  padding-right: var(--space-md);
}

.flex {
  display: flex;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

.grid {
  display: grid;
}

.gap-xs {
  gap: var(--space-xs);
}
.gap-sm {
  gap: var(--space-sm);
}
.gap-md {
  gap: var(--space-md);
}
.gap-lg {
  gap: var(--space-lg);
}
.gap-xl {
  gap: var(--space-xl);
}

.p-xs {
  padding: var(--space-xs);
}
.p-sm {
  padding: var(--space-sm);
}
.p-md {
  padding: var(--space-md);
}
.p-lg {
  padding: var(--space-lg);
}
.p-xl {
  padding: var(--space-xl);
}

.m-xs {
  margin: var(--space-xs);
}
.m-sm {
  margin: var(--space-sm);
}
.m-md {
  margin: var(--space-md);
}
.m-lg {
  margin: var(--space-lg);
}
.m-xl {
  margin: var(--space-xl);
}

.mt-md {
  margin-top: var(--space-md);
}
.mb-md {
  margin-bottom: var(--space-md);
}
.my-md {
  margin-top: var(--space-md);
  margin-bottom: var(--space-md);
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.justify-center {
  justify-content: center;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.w-full {
  width: 100%;
}

.h-full {
  height: 100%;
}

.hidden {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ===== FOCUS STATES ===== */

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

/* ===== PRINT STYLES ===== */

@media print {
  body {
    background-color: var(--color-white);
    color: var(--color-text-primary);
  }

  a {
    text-decoration: underline;
  }
}
