/* ============================================================
Alchemy Design System — Colors & Type
Sunny-forest palette: warm cream parchment, muted moss green,
terracotta accents, walnut browns. Light mode, earthy, calm.
============================================================ */
@import "@fontsource-variable/inter";
@import "@fontsource-variable/source-serif-4/opsz.css";
@import "@fontsource-variable/source-serif-4/opsz-italic.css";
@import "@fontsource-variable/jetbrains-mono";
@import "@fontsource-variable/caveat";
/* iOS Safari enlarges text in blocks it judges too wide to read ("text
autosizing"). Code lines wider than their card got a bigger font than the
lines around them. Keep every font at its declared size. */
html {
-webkit-text-size-adjust: 100%;
text-size-adjust: 100%;
}
/* Thin hairline scrollbars everywhere. `scrollbar-width` doesn't inherit,
so it's set on every element; per-component `scrollbar-width: none`
still wins on specificity. */
* {
scrollbar-width: thin;
scrollbar-color: var(--alc-hairline-3) transparent;
}
:root {
/* ---------- Brand: muted forest greens ---------- */
--alc-accent: #5c7a3e; /* moss — primary brand */
--alc-accent-deep: #38511f; /* deep forest — pressed/emphasis (AAA ≥7:1 on parchment) */
--alc-accent-warm: #7a9a5e; /* sage — lighter, sunny */
--alc-accent-bright: #8fb15e; /* lit leaves — accents on cream */
/* Translucent so surfaces using `accent-soft` (hero CTA cards, asides,
selection) let the underlying texture show through — same approach
as the dark-mode token below. */
--alc-accent-soft: color-mix(in srgb, #5c7a3e 18%, transparent);
--alc-accent-60: color-mix(in srgb, #5c7a3e 60%, transparent);
--alc-accent-40: color-mix(in srgb, #5c7a3e 40%, transparent);
--alc-accent-12: color-mix(in srgb, #5c7a3e 12%, transparent);
/* Moss for small text and filled markers on the page: ≥7:1 (WCAG AAA). */
--alc-accent-text: #38511f;
/* Bindu (yantra centroid dot). Kept in sync with YANTRA_THEMES in
src/brand/yantra.ts, which paints the generated favicons and app icons. */
--alc-yantra-dot: #9a4f27;
/* ---------- Secondary: warm terracotta ---------- */
--alc-terracotta: #c56e3c;
--alc-terracotta-deep: #9a4f27;
--alc-terracotta-soft: color-mix(in srgb, #c56e3c 18%, transparent);
/* ---------- Surfaces (warm cream / parchment) ---------- */
--alc-bg: #f5efe3; /* page — parchment */
--alc-bg-nav: #efe7d6; /* nav, sidebar — a touch deeper */
--alc-bg-elev-1: #fbf6ea; /* cards, panels — lifted, paper */
--alc-bg-elev-2: #fffaf0; /* hover / nested */
--alc-bg-code: #2a2620; /* terminal / code blocks — walnut */
--alc-bg-sunk: #ebe3d0; /* insets */
/* ---------- Neutrals (warm walnut scale) ---------- */
--alc-walnut-50: #faf6ec;
--alc-walnut-100: #f1ead8;
--alc-walnut-200: #e2d7bc;
--alc-walnut-300: #c7b795;
--alc-walnut-400: #a89572;
--alc-walnut-500: #85714f;
--alc-walnut-600: #68573c;
--alc-walnut-700: #4e402c;
--alc-walnut-800: #363022;
--alc-walnut-900: #2a2620;
--alc-walnut-950: #1a1813;
/* ---------- Text ---------- */
--alc-fg-1: #2a2620; /* primary — walnut */
--alc-fg-2: #4e402c; /* body — deep tan */
--alc-fg-3: #52442e; /* muted — dark mushroom (AAA ≥7:1 incl. footer bg) */
--alc-fg-4: #564733; /* tertiary / captions (AAA ≥7:1 incl. footer bg) */
--alc-fg-invert: #fbf6ea; /* on dark (code/term) */
--alc-fg-on-accent: #fbf6ea; /* on moss */
/* ---------- Hairlines / borders ---------- */
--alc-hairline: rgba(42, 38, 32, 0.08);
--alc-hairline-2: rgba(42, 38, 32, 0.14);
--alc-hairline-3: rgba(42, 38, 32, 0.22);
/* ---------- Semantic (status) — earthy ---------- */
--alc-success: #5c7a3e; /* plan: create — moss */
--alc-warn: #d49a2a; /* plan: update — honey */
--alc-danger: #b3462e; /* plan: replace / destroy — brick */
--alc-info: #4a7a8a; /* info — slate teal */
--alc-muted: #a89572; /* dim text */
/* ---------- Syntax (on walnut bg, SUNRISE — bright & distinct) ---------- */
--alc-code-keyword: #d4f26a; /* electric spring green — keywords, export, const */
--alc-code-string: #ffe38a; /* bright honey — strings */
--alc-code-fn: #ffb968; /* sunrise amber — function calls */
--alc-code-type: #7ddfff; /* sky cyan — types */
--alc-code-comment: #b3a27a; /* bright readable tan */
--alc-code-var: #faf5e3; /* near-white parchment — identifiers */
--alc-code-literal: #ff9a6b; /* coral sunrise — numbers/literals */
/* RGB triples for hairlines (`edge`) and raised fills (`lift`) drawn on
the code surface, used as rgba(var(--alc-code-edge), alpha). Marketing
pages swap them in light mode, where the code surface is light. */
--alc-code-edge: 232, 220, 192;
--alc-code-lift: 255, 255, 255;
/* Window-chrome dots: decorative, the same in both themes. */
--alc-dot-red: #e0654f;
--alc-dot-yellow: #e8b04a;
--alc-dot-green: #8fb15e;
--alc-code-sink: 0, 0, 0; /* recessed fills: tab bars, inset logs */
--alc-code-shadow: rgba(0, 0, 0, 0.28);
/* ---------- Type ---------- */
--alc-font-sans:
"Inter Variable", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
--alc-font-serif:
"Source Serif 4 Variable", "Source Serif Pro", Georgia, "Times New Roman", serif;
--alc-font-mono: "JetBrains Mono Variable", ui-monospace, SFMono-Regular, Menlo, monospace;
--alc-font-hand: "Caveat Variable", "Comic Sans MS", cursive; /* hand-drawn diagram labels */
/* ---------- Radius ---------- */
--alc-radius-xs: 2px;
--alc-radius-sm: 4px;
--alc-radius: 8px;
--alc-radius-md: 10px;
--alc-radius-lg: 12px;
--alc-radius-xl: 16px;
/* ---------- Spacing (4px grid) ---------- */
--alc-space-1: 4px;
--alc-space-2: 8px;
--alc-space-3: 12px;
--alc-space-4: 16px;
--alc-space-5: 24px;
--alc-space-6: 32px;
--alc-space-7: 48px;
--alc-space-8: 64px;
--alc-space-9: 96px;
/* ---------- Shadows (warm, soft) ---------- */
--alc-shadow-sm: 0 1px 2px rgba(78, 64, 44, 0.08);
--alc-shadow: 0 4px 14px rgba(78, 64, 44, 0.1);
--alc-shadow-lg: 0 20px 40px rgba(78, 64, 44, 0.14);
--alc-glow: 0 0 0 1px var(--alc-accent-40), 0 0 24px -4px var(--alc-accent-40);
/* ---------- Motion ---------- */
--alc-ease: cubic-bezier(0.2, 0, 0, 1);
--alc-dur-fast: 120ms;
--alc-dur: 180ms;
--alc-dur-slow: 320ms;
}
/* ============================================================
Dark mode — "night forest, walnut interior".
Same warm/earthy logic as light, inverted around the walnut
scale. The page joins the dark code-block surface; cream
becomes the text scale; moss & terracotta lift one step so
they read on dark.
============================================================ */
[data-theme="dark"] {
/* Brand: lifted moss for emphasis on dark walnut */
--alc-accent: #7a9a5e;
--alc-accent-deep: #a3c473; /* emphasis / text-accent — lifted, not darkened */
--alc-accent-warm: #8fb15e;
--alc-accent-bright: #b3d188;
--alc-accent-soft: color-mix(in srgb, #7a9a5e 22%, transparent);
--alc-accent-60: color-mix(in srgb, #a3c473 60%, transparent);
--alc-accent-40: color-mix(in srgb, #a3c473 40%, transparent);
--alc-accent-12: color-mix(in srgb, #a3c473 18%, transparent);
/* Bindu, lifted for the dark page. */
--alc-yantra-dot: #d8835a;
--alc-accent-text: #b9d68d;
/* Secondary: warm terracotta — lifted */
--alc-terracotta: #d8835a;
--alc-terracotta-deep: #e89a72;
--alc-terracotta-soft: color-mix(in srgb, #d8835a 20%, transparent);
/* Surfaces — page joins the code-block aesthetic. In dark mode the
code surface LIFTS above the page (vs. light mode where it sinks),
so terminal/code chrome still reads as a distinct card on the page. */
--alc-bg: #14110d;
--alc-bg-nav: #1a1613;
--alc-bg-elev-1: #221e18;
--alc-bg-elev-2: #2a2620;
--alc-bg-code: #2a2620; /* same as light-mode code surface — chrome/syntax tuning carries over */
--alc-bg-sunk: #100c08;
/* Text — cream scale */
--alc-fg-1: #faf6ec; /* primary — parchment */
--alc-fg-2: #e2d7bc; /* body — washed parchment */
--alc-fg-3: #c0af89; /* muted — lifted walnut (AAA ≥7:1 on elevated cards) */
--alc-fg-4: #b9a881; /* tertiary / captions (AAA ≥7:1 on elevated cards) */
/* `--alc-fg-invert` is text on the dark code surface, which stays dark in
both modes — so this token is the same in light and dark. */
--alc-fg-invert: #fbf6ea;
--alc-fg-on-accent: #fbf6ea;
/* Hairlines — cream over walnut */
--alc-hairline: rgba(250, 246, 236, 0.08);
--alc-hairline-2: rgba(250, 246, 236, 0.14);
--alc-hairline-3: rgba(250, 246, 236, 0.22);
/* Semantic — lifted on dark for AA contrast */
--alc-success: #8fb15e;
--alc-warn: #e8b04a;
--alc-danger: #d76a4e;
--alc-info: #6da4b4;
--alc-muted: #85714f;
/* Shadows — heavier black, less warmth shows through */
--alc-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
--alc-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
--alc-shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.6);
--alc-glow: 0 0 0 1px var(--alc-accent-40), 0 0 24px -4px var(--alc-accent-40);
}
/* ============================================================
Semantic text styles
============================================================ */
.alc-display {
font-family: var(--alc-font-serif);
font-size: 76px;
line-height: 1.02;
letter-spacing: -0.02em;
font-weight: 500;
color: var(--alc-fg-1);
}
.alc-h1 {
font-family: var(--alc-font-serif);
font-size: 52px;
line-height: 1.06;
letter-spacing: -0.015em;
font-weight: 500;
color: var(--alc-fg-1);
}
.alc-h2 {
font-family: var(--alc-font-serif);
font-size: 34px;
line-height: 1.15;
letter-spacing: -0.01em;
font-weight: 500;
color: var(--alc-fg-1);
}
.alc-h3 {
font-family: var(--alc-font-sans);
font-size: 22px;
line-height: 1.25;
letter-spacing: -0.01em;
font-weight: 600;
color: var(--alc-fg-1);
}
.alc-h4 {
font-family: var(--alc-font-sans);
font-size: 17px;
line-height: 1.35;
font-weight: 600;
color: var(--alc-fg-1);
}
.alc-eyebrow {
font-family: var(--alc-font-mono);
font-size: 12px;
line-height: 1;
letter-spacing: 0.12em;
text-transform: uppercase;
font-weight: 500;
color: var(--alc-accent-deep);
}
.alc-body-lg {
font-family: var(--alc-font-sans);
font-size: 18px;
line-height: 1.6;
font-weight: 400;
color: var(--alc-fg-2);
}
.alc-body {
font-family: var(--alc-font-sans);
font-size: 15px;
line-height: 1.6;
font-weight: 400;
color: var(--alc-fg-2);
}
.alc-small {
font-family: var(--alc-font-sans);
font-size: 13px;
line-height: 1.5;
color: var(--alc-fg-3);
}
.alc-caption {
font-family: var(--alc-font-sans);
font-size: 12px;
line-height: 1.4;
color: var(--alc-fg-4);
}
.alc-code {
font-family: var(--alc-font-mono);
font-size: 14px;
line-height: 1.55;
font-variant-ligatures: none;
color: var(--alc-fg-invert);
}
.alc-code-inline {
font-family: var(--alc-font-mono);
font-size: 0.9em;
padding: 0.12em 0.38em;
border-radius: var(--alc-radius-sm);
background: var(--alc-bg-sunk);
border: 1px solid var(--alc-hairline);
color: var(--alc-fg-1);
white-space: nowrap;
vertical-align: baseline;
}
/* In large headings the inline-code pill's padding + border makes the box
taller than the heading's line-height, so it visually clips into adjacent
lines. Shrink it slightly and align to baseline so it sits cleanly. */
h1 .alc-code-inline,
h2 .alc-code-inline,
h3 .alc-code-inline {
font-size: 0.78em;
padding: 0.08em 0.34em;
vertical-align: 0.04em;
line-height: 1;
}
.alc-hand {
font-family: var(--alc-font-hand);
font-size: 40px;
line-height: 1;
font-weight: 600;
color: var(--alc-accent-deep);
}
.alc-text-accent {
color: var(--alc-accent-deep);
font-style: italic;
font-family: var(--alc-font-serif);
font-weight: 500;
}
/* ============================================================
Body defaults
============================================================ */
body.alc-root,
.alc-root {
background: var(--alc-bg);
color: var(--alc-fg-2);
font-family: var(--alc-font-sans);
font-size: 15px;
line-height: 1.6;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
::selection {
background: var(--alc-accent-soft);
color: var(--alc-fg-1);
}
/* Code surfaces stay dark walnut in BOTH themes, but the global selection
foreground follows the page (--alc-fg-1 is dark walnut in light mode) —
selecting code text would paint dark-on-dark. Pin selection inside code
surfaces to the dark-surface palette instead. */
.expressive-code ::selection,
.alc-term ::selection,
.alc-code::selection,
.alc-code ::selection {
background: #5c7a3e66; /* editor.selectionBackground from the walnut EC theme */
color: var(--alc-code-var);
}
/* ---------- Reduced motion (site-wide) ----------
Visitors who ask for less motion get every CSS animation and transition
jumped to its end state (entrance animations land on their final frame,
looping pulses and spinners stop) and instant scrolling. Canvas and
scripted demos check the same media query in JS. */
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
animation-duration: 0.01ms !important;
animation-delay: 0s !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
transition-delay: 0s !important;
}
html,
* {
scroll-behavior: auto !important;
}
}