/* design.css — encodes DESIGN.md as a shareable design system.
   Every page links this + the web fonts; page <style> does layout only,
   referencing these tokens. That is the enforcement of the spec. */

:root {
  /* Colors — verbatim from DESIGN.md */
  --primary: #0C0C09;
  --secondary: #312C85;
  --success: #16A34A;
  --warning: #D97706;
  --danger: #DC2626;
  --surface: #F4F4F1;
  --text: #0C0C09;
  --neutral: #F4F4F1;
  --line: #E0E0DA;          /* ponytail: derived hairline, spec has no border token */
  --on-primary: #F4F4F1;    /* ponytail: surface-on-dark, pairs with --primary bg */

  /* Typography — Inter (display), Open Sans (body), Inconsolata (mono) */
  --font-display: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Inconsolata", ui-monospace, "SF Mono", Menlo, monospace;
  --weight-regular: 400;
  --weight-semibold: 600;
  --weight-bold: 800;       /* "bold" per style foundations */

  /* Rounded */
  --radius-sm: 4px;
  --radius-md: 8px;

  /* Spacing scale: 4/8/12/16/24/32 */
  --space-1: 4px;   /* sm */
  --space-2: 8px;   /* md */
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
}

/* --- Base reset ---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: var(--weight-regular);
  line-height: 1.6;
}

/* --- Base typography ----------------------------------------------------- */
h1 {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: var(--weight-bold);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-4);
}
h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: var(--weight-semibold);
  line-height: 1.2;
  margin: var(--space-6) 0 var(--space-3);
}
p { margin: 0 0 var(--space-4); }
a { color: var(--secondary); }

/* label-caps token: mono, 0.75rem, uppercase */
.label-caps {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* --- Base form elements -------------------------------------------------- */
input, button, select, textarea {
  font: inherit;
  color: inherit;
}
input[type="email"], input[type="text"], input[type="search"], textarea {
  padding: var(--space-3) var(--space-4);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--text);
}
input:focus, textarea:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 2px var(--secondary);
}
button {
  padding: var(--space-3) var(--space-5);
  font-weight: var(--weight-semibold);
  color: var(--on-primary);
  background: var(--primary);
  border: 0;
  border-radius: var(--radius-md);
  cursor: pointer;
}
button:disabled { opacity: 0.5; cursor: default; }
button.secondary {
  color: var(--text);
  background: var(--neutral);
  border: 1px solid var(--line);
}
