/* ============================================================
   LoomCycle — design tokens
   Source: 02-VISUAL-DESIGN-SYSTEM.md
   ============================================================ */

:root {
  /* —— Primary palette —— */
  --lc-background: #FAF8F3;        /* cream paper */
  --lc-text: #1A1A2E;              /* near-black ink */
  --lc-loom-wood: #56C596;         /* brand anchor / craft accent */
  --lc-thread-purple: #7B4B94;     /* featured accent, links, CTAs */

  /* —— Agent palette (the five characters) —— */
  --lc-agent-blue: #3D8EE8;
  --lc-agent-orange: #F5A623;
  --lc-agent-yellow: #F4C430;
  --lc-agent-green: #6FCF45;
  --lc-agent-teal: #5BC0EB;

  /* —— Supporting / neutral —— */
  --lc-subtle-bg: #E3F2FD;          /* schematic blueprint tint */
  --lc-border-soft: #B0D8F0;
  --lc-text-muted: #52525B;
  --lc-rule: #E8E2D4;               /* hairline rule on cream */
  --lc-card-bg: #FFFEFB;            /* very subtly elevated card */
  --lc-code-bg: #1A1A2E;
  --lc-code-text: #FAF8F3;

  /* —— Typography —— */
  --lc-font-display: "Outfit", "Cabinet Grotesk", system-ui, sans-serif;
  --lc-font-body: "Inter", system-ui, -apple-system, sans-serif;
  --lc-font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Type scale (1.25 modular) */
  --lc-text-xs: 12px;
  --lc-text-sm: 14px;
  --lc-text-base: 16px;
  --lc-text-lg: 20px;
  --lc-text-xl: 25px;
  --lc-text-2xl: 32px;
  --lc-text-3xl: 40px;
  --lc-text-4xl: 56px;
  --lc-text-5xl: 72px;

  /* —— Spacing (8px base) —— */
  --lc-space-1: 8px;
  --lc-space-2: 16px;
  --lc-space-3: 24px;
  --lc-space-4: 32px;
  --lc-space-6: 48px;
  --lc-space-8: 64px;
  --lc-space-12: 96px;

  /* —— Layout —— */
  --lc-page-width: 1080px;
  --lc-radius-sm: 6px;
  --lc-radius: 10px;
  --lc-radius-lg: 16px;

  /* —— Elevation —— */
  --lc-shadow-sm: 0 1px 2px rgba(26, 26, 46, 0.04);
  --lc-shadow: 0 2px 8px rgba(26, 26, 46, 0.08);
  --lc-shadow-lg: 0 8px 24px rgba(26, 26, 46, 0.10);
}

/* ============================================================
   Reset + base
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body {
  margin: 0;
  background: var(--lc-background);
  color: var(--lc-text);
  font-family: var(--lc-font-body);
  font-size: var(--lc-text-base);
  line-height: 1.6;
  font-feature-settings: "cv11", "ss01";
}
img, svg { display: block; max-width: 100%; }

h1, h2, h3, h4 {
  font-family: var(--lc-font-display);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0;
  text-wrap: balance;
}
p { margin: 0; text-wrap: pretty; }
a {
  color: var(--lc-thread-purple);
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
}
a:hover { color: var(--lc-text); }

code, pre {
  font-family: var(--lc-font-mono);
  font-size: 0.92em;
}

button, .cta {
  font-family: var(--lc-font-body);
  cursor: pointer;
}

::selection {
  background: color-mix(in oklab, var(--lc-thread-purple) 30%, transparent);
  color: var(--lc-text);
}

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

/* Skip link */
.skip-to-main {
  position: absolute;
  left: -9999px;
  background: var(--lc-text);
  color: var(--lc-background);
  padding: 8px 14px;
  border-radius: 6px;
  z-index: 100;
}
.skip-to-main:focus { left: 12px; top: 12px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
