/* ---------------------------------------------------------------------------
 * Codeminer42 visual identity — design tokens for the blog theme.
 *
 * Colours are the brand palette defined in OKLCH and gamut-mapped to sRGB by
 * `lib/brand/palette.rb` in the codeminer42.com repository (the single source
 * of truth). The hex values here are that generator's output; the OKLCH
 * coordinates are kept in comments so a step can be checked or regenerated.
 * See docs/BRAND.md for what each colour is allowed to do.
 * ------------------------------------------------------------------------- */

:root {
	/* Ruby, hue 29 — measured from the logo. Primary actions, links, one full-bleed section. */
	--color-ruby-50:  #FFF3F0; /* oklch(0.972 0.014 29) */
	--color-ruby-100: #FFE4E0; /* oklch(0.940 0.030 29) */
	--color-ruby-200: #FFCDC5; /* oklch(0.890 0.058 29) */
	--color-ruby-300: #FFA699; /* oklch(0.810 0.108 29) */
	--color-ruby-400: #FE6555; /* oklch(0.700 0.190 29) */
	--color-ruby-500: #E22018; /* oklch(0.584 0.225 29)  the logo red */
	--color-ruby-600: #C01711; /* oklch(0.515 0.200 29)  links on light grounds */
	--color-ruby-700: #8B1B14; /* oklch(0.416 0.148 29)  garnet ground */
	--color-ruby-800: #6C1610; /* oklch(0.350 0.120 29) */
	--color-ruby-900: #4E120D; /* oklch(0.285 0.090 29) */
	--color-ruby-950: #300C08; /* oklch(0.215 0.060 29) */

	/* Ink, hue 230 — every neutral. No grey, no pure black anywhere. */
	--color-ink-50:  #EFF7FB; /* oklch(0.972 0.010 230)  quartz ground (default page) */
	--color-ink-100: #E1EDF4; /* oklch(0.940 0.016 230)  slate ground */
	--color-ink-200: #C8DBE4; /* oklch(0.880 0.024 230)  hairlines */
	--color-ink-300: #A3BCC8; /* oklch(0.780 0.032 230)  secondary text on the mine */
	--color-ink-400: #7491A0; /* oklch(0.640 0.040 230) */
	--color-ink-500: #4D6E7F; /* oklch(0.520 0.046 230) */
	--color-ink-600: #2E5263; /* oklch(0.420 0.050 230)  secondary text on quartz */
	--color-ink-700: #163A4A; /* oklch(0.330 0.050 230) */
	--color-ink-800: #062836; /* oklch(0.262 0.046 230) */
	--color-ink-900: #001B27; /* oklch(0.208 0.042 230) */
	--color-ink-950: #001019; /* oklch(0.162 0.033 230)  mine ground, body text */

	/* Lamp, hue 82 — the headlamp. The single highlight. Never body text on light grounds. */
	--color-lamp-100: #FFF2DB; /* oklch(0.965 0.034 82) */
	--color-lamp-300: #FFDEA3; /* oklch(0.915 0.084 82) */
	--color-lamp-500: #FFC345; /* oklch(0.850 0.152 82) */
	--color-lamp-700: #AC7D00; /* oklch(0.620 0.128 82) */
	--color-lamp-900: #573D00; /* oklch(0.380 0.079 82) */

	/* Gems — colour as information only (a topic), never a background or a button. */
	--color-emerald-light:  #8DE8B8; /* oklch(0.860 0.110 160) */
	--color-emerald-mid:    #00AD72; /* oklch(0.660 0.149 160) */
	--color-emerald-deep:   #005C3B; /* oklch(0.420 0.095 160) */
	--color-sapphire-light: #AED5FF; /* oklch(0.860 0.072 250) */
	--color-sapphire-mid:   #2896F5; /* oklch(0.660 0.170 250) */
	--color-sapphire-deep:  #004F8B; /* oklch(0.420 0.119 250) */
	--color-amethyst-light: #E4C0FF; /* oklch(0.860 0.093 310) */
	--color-amethyst-mid:   #B270DF; /* oklch(0.660 0.170 310) */
	--color-amethyst-deep:  #633481; /* oklch(0.420 0.130 310) */

	/* Type. Geologica (faceted sans) for everything you scan or click; Source Serif 4
	 * for everything you read at length; JetBrains Mono only for code. */
	--font-sans:  "Geologica", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
	--font-serif: "Source Serif 4", ui-serif, Georgia, "Times New Roman", serif;
	--font-mono:  "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

	--font-weight-book:   330; /* running text in Geologica */
	--font-weight-medium: 520; /* labels, chips */
	--font-weight-button: 560;
	--font-weight-heading: 620;

	/* Scale: 3:4 (perfect fourth) from a 17px base, fluid at the top end. */
	--text-xs:   0.8125rem; /* 13px */
	--text-sm:   0.9375rem; /* 15px */
	--text-base: 1.0625rem; /* 17px */
	--text-lg:   1.25rem;   /* 20px */
	--text-xl:   1.5rem;    /* 24px */
	--text-2xl:  1.875rem;  /* 30px */
	--text-3xl:  clamp(2rem, 1.4rem + 2.2vw, 2.75rem);
	--text-4xl:  clamp(2.375rem, 1.5rem + 3.6vw, 3.875rem);
	--text-5xl:  clamp(2.75rem, 1.3rem + 6.2vw, 5.75rem);

	/* Long-form reading (single posts). Tuned for 2,000–4,000 word technical
	 * articles rather than the landing page's short copy: a larger serif with
	 * a taller line and a fixed measure. See docs/BRAND.md → Typography. */
	--prose-size:    clamp(1.125rem, 1.05rem + 0.3vw, 1.1875rem); /* 18–19px */
	--prose-leading: 1.7;
	--prose-measure: 68ch;
	--prose-gap:     1.35em;

	/* Shape: the logo's peaks. Two opposite corners bevelled. */
	--cut:    18px;
	--cut-sm: 10px;
	--cut-lg: 34px;

	--ease-lamp: cubic-bezier(0.2, 0.7, 0.1, 1);

	/* Layout */
	--container: 1280px;
	--gutter: 20px;
}

/* Self-hosted variable fonts (latin subset, covers pt-BR). All SIL OFL.
 * No request leaves the site for fonts. */
@font-face {
	font-family: "Geologica";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("../fonts/geologica-normal.woff2") format("woff2");
}
@font-face {
	font-family: "Source Serif 4";
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url("../fonts/source-serif-4-normal.woff2") format("woff2");
}
@font-face {
	font-family: "Source Serif 4";
	font-style: italic;
	font-weight: 400 700;
	font-display: swap;
	src: url("../fonts/source-serif-4-italic.woff2") format("woff2");
}
@font-face {
	font-family: "JetBrains Mono";
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url("../fonts/jetbrains-mono-normal.woff2") format("woff2");
}
