/* Variables, reset, typography, layout. Mobile-first: breakpoints at 640 / 768 / 1024px. */
:root {
  /* Brand */
  --color-primary: #6b46c1;
  --color-primary-dark: #553c9a;
  --color-primary-light: #9f7aea;
  --color-secondary: #d69e2e;
  --color-secondary-dark: #b7791f;

  /* Neutral */
  --color-text: #1a202c;
  --color-text-muted: #4a5568;
  --color-text-subtle: #718096; /* ~4:1 on white: large or non-essential text only */
  --color-bg: #ffffff;
  --color-bg-alt: #f7fafc;
  --color-bg-dark: #1a202c;
  --color-border: #e2e8f0;

  /* Status */
  --color-success: #38a169;
  --color-warning: #d69e2e;
  --color-error: #e53e3e;
  --color-info: #3182ce;

  /* Spacing */
  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem;
  --space-4: 1rem; --space-6: 1.5rem; --space-8: 2rem;
  --space-12: 3rem; --space-16: 4rem;

  /* Typography */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;
  --text-xs: 0.75rem; --text-sm: 0.875rem; --text-base: 1rem;
  --text-lg: 1.125rem; --text-xl: 1.25rem; --text-2xl: 1.5rem;
  --text-3xl: 1.875rem; --text-4xl: 2.25rem; --text-5xl: 3rem;
  --leading-tight: 1.25; --leading-normal: 1.5; --leading-relaxed: 1.75;

  /* Radius & shadow */
  --radius-sm: 0.25rem; --radius: 0.5rem; --radius-lg: 1rem;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);

  /* Container */
  --container-sm: 640px; --container-md: 768px;
  --container-lg: 1024px; --container-xl: 1280px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
img, picture, video, svg { display: block; max-width: 100%; height: auto; }
button, input, textarea, select { font: inherit; color: inherit; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Typography */
body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }
h1, h2, h3, h4, h5, h6 { line-height: var(--leading-tight); font-weight: 700; color: var(--color-text); }
h1 { font-size: var(--text-3xl); margin-bottom: var(--space-4); }
h2 { font-size: var(--text-2xl); margin: var(--space-8) 0 var(--space-4); }
h3 { font-size: var(--text-xl); margin: var(--space-6) 0 var(--space-3); }
h4, h5, h6 { font-size: var(--text-lg); margin: var(--space-4) 0 var(--space-2); }
p, ul, ol, dl, table, form { margin-bottom: var(--space-4); }
ul, ol { padding-left: var(--space-6); }
p, li { line-height: var(--leading-relaxed); }
small { font-size: var(--text-sm); }
a { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--color-primary-dark); text-decoration: underline; }
:focus-visible { outline: 3px solid var(--color-primary-light); outline-offset: 2px; border-radius: var(--radius-sm); }

/* Layout */
.container { width: 100%; max-width: var(--container-lg); margin-inline: auto; padding-inline: var(--space-4); }

/* Page content: every direct child of <main> (except the full-bleed hero) is a centred column,
   so pages need no wrapper markup. */
main > :not(.hero) {
  width: 100%;
  max-width: var(--container-lg);
  margin-inline: auto;
  padding: var(--space-8) var(--space-4);
}

@media (min-width: 640px) {
  .container, main > :not(.hero) { padding-inline: var(--space-6); }
}
/* Desktop scale: h1 4xl, h2 3xl, h3 2xl (mobile: 3xl / 2xl / xl). The home hero has its own
   larger .hero-title. */
@media (min-width: 768px) {
  h1 { font-size: var(--text-4xl); }
  h2 { font-size: var(--text-3xl); }
  h3 { font-size: var(--text-2xl); }
}
@media (min-width: 1024px) {
  .container { max-width: var(--container-xl); }
}
