/* Hearthgill: a craft school's summer prospectus, as a Yeti theme. Two inks
   on blue-grey sugar paper: a navy key ink for every word, rule and halftone,
   and one second ink, coral unless the slip says otherwise, solid only on
   the action. In the dark it is the evening-class edition: pale ink and the
   same second ink on navy stock. Square printed boxes, round stickers. */

/* Repeats Yeti's layer order, so the element rules at the end land in the
   right place whichever file loads first. */
@layer yeti.reset, yeti.base, yeti.theme, yeti.layouts, yeti.components, yeti.utilities;

:root {
	/* A leaflet read at arm's length: a full base and a wide ratio, so the
	   cover's name can be very large over ordinary text. */
	--yeti-base-min: 1rem;
	--yeti-base-max: 1.125rem;
	--yeti-ratio-min: 1.2;
	--yeti-ratio-max: 1.32;

	/* A fat soft serif for display, the shape of glass on the end of an
	   iron; a plain grotesque for everything read. */
	--yeti-font-sans: "Karla", system-ui, sans-serif;
	--yeti-font-heading: "Caprasimo", Georgia, serif;
	--yeti-weight-heading: 400;
	--yeti-weight-normal: 400;
	--yeti-weight-strong: 600;
	--yeti-weight-bold: 700;
	--yeti-button-weight: 700;
	--yeti-tracking-heading: -0.01em;

	/* The inks. The second ink is one hue; the slip changes this one number
	   and every tone Yeti derives from it follows. */
	--yeti-hue-primary: 18;
	--yeti-hue-neutral: 262;
	--yeti-chroma: 0.19;

	/* The second ink at full strength, pinned a step lighter than Yeti would
	   derive it so the key ink reads on top of it. The hue stays a variable. */
	--yeti-color-primary: light-dark(oklch(0.69 0.2 var(--yeti-hue-primary)), oklch(0.74 0.17 var(--yeti-hue-primary)));
	--yeti-color-primary-strong: light-dark(oklch(0.62 0.2 var(--yeti-hue-primary)), oklch(0.81 0.14 var(--yeti-hue-primary)));
	--yeti-on-primary: light-dark(oklch(0.2 0.07 265), oklch(0.17 0.045 265));

	/* Sugar paper, the coated paper of the plates and the slip, and the
	   shade of a printed tint. Navy stock after dark. */
	--yeti-color-surface: light-dark(oklch(0.925 0.014 240), oklch(0.19 0.045 265));
	--yeti-color-surface-raised: light-dark(oklch(0.985 0.004 240), oklch(0.245 0.05 265));
	--yeti-color-surface-sunken: light-dark(oklch(0.885 0.02 240), oklch(0.15 0.04 265));

	/* The key ink. */
	--yeti-color-text: light-dark(oklch(0.25 0.085 265), oklch(0.93 0.02 240));
	--yeti-color-text-muted: light-dark(oklch(0.4 0.07 262), oklch(0.78 0.035 245));
	--yeti-color-border: light-dark(oklch(0.6 0.06 258), oklch(0.5 0.06 258));
	--yeti-color-border-strong: var(--yeti-color-text);
	--yeti-color-focus: var(--yeti-color-text);

	/* There is no third ink. A required mark and an error print in the key
	   ink; page.css carries the error by a heavier rule and by its words. */
	--yeti-color-alert: var(--yeti-color-text);
	--yeti-color-alert-text: var(--yeti-color-text);

	/* A link is key ink; page.css underlines it in the second ink. */
	--yeti-link-color: var(--yeti-color-text);
	--yeti-link-color-hover: var(--yeti-color-primary-text);

	/* Printed boxes are square and ruled twice as heavy as a hairline.
	   Stickers are round. Nothing floats. */
	--yeti-border-width: 2px;
	--yeti-radius-sm: 0;
	--yeti-radius-md: 0;
	--yeti-radius-lg: 0;
	--yeti-button-radius: var(--yeti-radius-full);
	--yeti-shadow-sm: none;
	--yeti-shadow-md: none;
	--yeti-lift-distance: 0;
	--yeti-lift-shadow: none;
	--yeti-control-border: var(--yeti-color-border-strong);
	--yeti-control-surface: var(--yeti-color-surface-raised);
	--yeti-card-border: var(--yeti-color-border-strong);
	--yeti-leaders-line: var(--yeti-border-width) dotted var(--yeti-color-border);
	/* A printed box has four equal rules, so the alert drops its heavy edge. */
	--yeti-alert-edge: var(--yeti-border-width);
}

/* Element rules, in the theme layer: below layouts and components, so they
   never reach a component's own parts. */
@layer yeti.theme {
	/* The parts of the browser nobody drew are printed in the same inks. */
	html {
		scrollbar-color: var(--yeti-color-text-muted) transparent;
		caret-color: var(--yeti-color-primary);
	}

	::selection {
		background-color: var(--yeti-color-primary);
		color: var(--yeti-on-primary);
	}

	a:not([class]) {
		text-decoration-color: var(--yeti-color-primary);
		text-decoration-thickness: 2px;
		text-underline-offset: 0.2em;
	}
}
