/* =========================================================
   Website Tester — Design tokens & base styles
   ========================================================= */

:root {
  /* Color — Pixel Lattice brand palette */
  --color-bg: #FAFAFA;
  --color-surface: #FFFFFF;
  --color-border: #E8E0EB;
  --color-border-light: #F2ECF4;
  --color-text: #0A0A0A;
  --color-text-secondary: #555555;
  --color-success: #16A34A;
  --color-success-bg: #F0FDF4;
  --color-warning: #F59E0B;
  --color-warning-bg: #FFFBEB;
  --color-error: #DC2626;
  --color-error-bg: #FEF2F2;

  /* Brand */
  --color-purple: #60046C;
  --color-purple-hover: #4D0358;
  --color-purple-light: #F5E6F7;
  --color-purple-mid: #D9A8E0;
  --color-orange: #F41149;
  --color-orange-hover: #D40040;
  --color-orange-light: #FDE6EC;

  --color-btn-primary: var(--color-purple);
  --color-btn-primary-text: #FFFFFF;
  --color-btn-hover: var(--color-purple-hover);

  /* Radius */
  --radius-button: 8px;
  --radius-card: 14px;
  --radius-input: 9px;
  --radius-badge: 999px;

  /* Shadow */
  --shadow-sm: 0 1px 2px rgba(10, 10, 10, 0.05);
  --shadow-md: 0 4px 16px rgba(96, 4, 108, 0.08);
  --shadow-lg: 0 8px 28px rgba(96, 4, 108, 0.14);

  /* Type */
  --font-sans: 'Plus Jakarta Sans', system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;

  /* Layout */
  --container-max: 1120px;
  --transition-fast: 120ms ease;
  --transition-base: 200ms ease;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

::selection { background: var(--color-purple); color: #fff; }

html, body {
  padding: 0;
  margin: 0;
}

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

button, input {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }

/* ---------- Focus states (accessibility) ---------- */
:focus-visible {
  outline: 2px solid var(--color-purple);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Typography scale ---------- */
h1, .h1 {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

h2, .h2 {
  font-size: 1.625rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

h3, .h3 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

h4, .h4 {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
}

.text-lg { font-size: 1.0625rem; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }

.text-secondary { color: var(--color-text-secondary); }
.text-success { color: var(--color-success); }
.text-warning { color: var(--color-warning); }
.text-error { color: var(--color-error); }
.text-purple { color: var(--color-purple); }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

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

.stack { display: flex; flex-direction: column; }
.row { display: flex; flex-direction: row; align-items: center; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-5 { gap: var(--space-5); }

section { padding: var(--space-8) 0; }

.section-heading {
  margin-bottom: var(--space-5);
}

.section-heading p {
  margin-top: var(--space-2);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(250, 250, 250, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
}

.brand-logo {
  height: 26px;
  width: auto;
  display: block;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}

.header-nav a {
  color: var(--color-text-secondary);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.header-nav a:hover { color: var(--color-purple); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: var(--space-7) 0;
  margin-top: var(--space-8);
}

.site-footer .container {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  color: var(--color-text-secondary);
  font-size: 0.875rem;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.footer-links {
  display: flex;
  gap: var(--space-5);
}

.footer-links a { transition: color var(--transition-fast); }
.footer-links a:hover { color: var(--color-purple); }

/* ---------- Utility ---------- */
.hidden { display: none !important; }
.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;
}

.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }