/* ============================================================
   AI Jungle OS — Design tokens (imported from the AIJ design
   system, Claude Design project 2026-07-16). One file, no @import.
   Palette « Jungle Precision (crème edition) » — crème paper,
   walnut ink, jungle-green accent, orange secondary.
   Fonts: Fraunces (display) · Instrument Sans (body) · JetBrains Mono.
   Green is an ACCENT only — never a surface/background fill.
   ============================================================ */

:root {
  /* ---- Surfaces · crème paper ---------------------------- */
  --color-bg: #F3EADA;
  --color-surface: #FCF8F0;
  --color-surface-hi: #FFFDF8;
  --color-surface-2: #F7F0E2;
  --color-card: #FFFDF8;
  --color-border: rgb(74 53 38 / 0.12);
  --color-border-hi: rgb(74 53 38 / 0.22);

  /* ---- Walnut · structure + ink -------------------------- */
  --color-walnut: #3C2A1C;
  --color-walnut-2: #2E2015;
  --color-text: #3A2A1E;
  --color-text-muted: #6A5443;
  --color-text-subtle: #9A8773;

  /* ---- Crème · text on walnut ---------------------------- */
  --color-creme: #F1E7D6;
  --color-creme-soft: #C6B49C;
  --color-creme-faint: #9A876F;

  /* ---- Jungle green · primary accent --------------------- */
  --color-accent: #456B49;
  --color-accent-hi: #5C8460;
  --color-accent-lo: #33522F;
  --color-accent-soft: #7A9B6E;

  /* ---- Orange · secondary / attention -------------------- */
  --color-secondary: #C46A2C;
  --color-secondary-hi: #D8823F;
  --color-secondary-lo: #A4561F;

  /* ---- Semantic ------------------------------------------ */
  --color-success: #456B49;
  --color-warning: #C46A2C;
  --color-danger: #C4452E;

  /* ---- Families ------------------------------------------ */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  /* ---- Type scale ---------------------------------------- */
  --text-display-xl: 68px;
  --text-display-lg: 48px;
  --text-display: 36px;
  --text-h2: 28px;
  --text-h3: 22px;
  --text-body-lg: 19px;
  --text-body-base: 15px;
  --text-body-sm: 14px;
  --text-caption: 12px;
  --text-eyebrow: 11px;
  --tracking-display: -0.02em;
  --tracking-eyebrow: 0.26em;
  --tracking-mono-label: 0.06em;
  --tracking-footer-label: 0.16em;

  /* ---- Layout / spacing ---------------------------------- */
  --container-max: 1200px;
  --gutter: 24px;
  --gutter-lg: 32px;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-6: 24px; --space-8: 32px; --space-12: 48px; --space-16: 64px;
  --space-24: 96px; --space-32: 128px;

  /* ---- Radius · soft, premium ---------------------------- */
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 18px;
  --radius-pill: 999px;

  /* ---- Shadows · warm ------------------------------------ */
  --shadow-1: 0 1px 2px rgb(60 42 28 / 0.08);
  --shadow-2: 0 18px 40px -18px rgb(60 42 28 / 0.28);
  --shadow-card: 0 1px 2px rgb(60 42 28 / 0.05), 0 10px 30px -18px rgb(60 42 28 / 0.18);
  --shadow-accent: 0 10px 24px -10px #456B49;

  /* ---- Motion -------------------------------------------- */
  --ease-out-expo: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-micro: 120ms;
  --dur-default: 240ms;
  --dur-page: 360ms;
}

html { background: var(--color-bg); color: var(--color-text); }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-body-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--color-accent); color: var(--color-creme); }
a { color: var(--color-accent); text-decoration: none; }
a:hover { color: var(--color-accent-hi); }

/* === Paper grain (subtle on crème) ======================== */
body.aij-grain::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.035;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.7'/></svg>");
}

@keyframes aij-fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes aij-fadeIn { to { opacity: 1; } }
@keyframes aij-pulseDot {
  0% { box-shadow: 0 0 0 0 rgb(69 107 73 / 0.45); }
  70% { box-shadow: 0 0 0 6px rgb(69 107 73 / 0); }
  100% { box-shadow: 0 0 0 0 rgb(69 107 73 / 0); }
}
@keyframes aij-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }

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