/*
 * Azulejo Moderno — design tokens.
 *
 * The single source of truth for every colour, type and spacing value in the
 * theme. Loaded on the front end AND in the block editor, so editor styles
 * can never drift from what visitors see. Nothing else in the theme may
 * hard-code a hex value: a child theme re-skins the whole site by overriding
 * :root here.
 */

:root {
	/*
	 * Brand.
	 *
	 * Three values sit a shade off the design comp, and only these three:
	 * --lt-terracotta, --lt-cobalt-soft and --lt-meta. The comp's versions
	 * failed WCAG AA (4.5:1) at the 10-12px sizes the theme actually sets
	 * them in — terracotta measured 4.01:1 on chalk, the meta grey 3.28:1.
	 * Each has been moved the minimum distance that clears the threshold on
	 * every surface it lands on — including --lt-chalk-dim, which is the
	 * hover fill under the list rows and category strip, and so the darkest
	 * background these two ever have to hold. Hue is held, so the palette
	 * reads as drawn while the small type stays legible. Everything else is
	 * the comp value unchanged.
	 */
	--lt-cobalt: #1D4E9E;
	--lt-cobalt-deep: #163C7A;
	--lt-cobalt-line: #4A72B8;
	--lt-cobalt-soft: #A6C5F3; /* comp #9FC0F2 — was 4.29:1 on cobalt */
	--lt-terracotta: #AC4B28;  /* comp #C4562E — was 4.01:1 on chalk */

	/* Ink & text */
	--lt-ink: #22201B;
	--lt-body: #3A372F;
	--lt-text-muted: #55524A;
	--lt-meta: #6B6860;          /* comp #8A867B — was 3.28:1 on chalk */
	--lt-meta-reversed: #9A968B; /* the same role, on the ink footer */

	/* Surfaces */
	--lt-chalk: #F6F3EA;
	--lt-chalk-dim: #EDE8DB;
	--lt-line: #D8D3C6;
	--lt-white: #FFFFFF;
	--lt-footer-text: #B8B4A8;

	/* Placeholder hatching, used where a featured image is missing */
	--lt-hatch-a: #DCD6C6;
	--lt-hatch-b: #E9E4D5;

	/* Focus ring — deliberately terracotta so it is never mistaken for a
	   cobalt UI border. */
	--lt-focus: var(--lt-terracotta);

	/* Type */
	--lt-font-display: Marcellus, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
	--lt-font-body: Archivo, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--lt-font-mono: "Space Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

	--lt-size-display: 64px;
	--lt-size-h1: 48px;
	--lt-size-h2: 30px;
	--lt-size-arch: 52px;    /* archive titles */
	--lt-size-section: 34px; /* front-page band heads */
	--lt-size-minor: 28px;   /* related, comments */
	--lt-size-quote: 26px;   /* pull quotes, newsletter title */
	--lt-size-h3: 22px;
	--lt-size-body: 17px;
	--lt-size-dek: 19px;
	--lt-size-small: 14px;
	--lt-size-mono: 11px;

	--lt-leading-display: 1.06;
	--lt-leading-h1: 1.12;
	--lt-leading-body: 1.75;

	--lt-track-mono: 0.18em;
	--lt-track-mono-wide: 0.22em;
	--lt-track-wordmark: 0.08em;

	/* Spacing scale */
	--lt-s1: 4px;
	--lt-s2: 8px;
	--lt-s3: 12px;
	--lt-s4: 16px;
	--lt-s5: 24px;
	--lt-s6: 32px;
	--lt-s7: 40px;
	--lt-s8: 48px;
	--lt-s9: 56px;

	/* Layout */
	--lt-wide: 1200px;
	--lt-body-wide: 1120px;
	--lt-measure: 760px;
	--lt-gutter: 40px;
	--lt-gap-card: 24px;

	/* Chrome. Radius is 0 everywhere by design; the two exceptions
	   (search circle, avatars) set 50% locally. */
	--lt-radius: 0;
	--lt-shadow-card: 0 12px 32px rgba(29, 78, 158, 0.16);
	--lt-border: 1px solid var(--lt-line);
	--lt-border-heavy: 1px solid var(--lt-ink);
	--lt-rule-top: 6px;

	--lt-transition: background 120ms ease, box-shadow 160ms ease, color 120ms ease, border-color 120ms ease;
}

@media (max-width: 1024px) {
	:root {
		--lt-size-display: 46px;
		--lt-size-h1: 38px;
		--lt-size-h2: 27px;
		--lt-size-arch: 40px;
		--lt-size-section: 30px;
		--lt-size-minor: 25px;
		--lt-size-quote: 24px;
		--lt-gutter: 28px;
	}
}

@media (max-width: 768px) {
	:root {
		--lt-size-display: 38px;
		--lt-size-h1: 31px;
		--lt-size-h2: 24px;
		--lt-size-arch: 32px;
		--lt-size-section: 26px;
		--lt-size-minor: 23px;
		--lt-size-quote: 21px;
		--lt-size-dek: 17px;
		--lt-gutter: 20px;
	}
}

@media (prefers-reduced-motion: reduce) {
	:root {
		--lt-transition: none;
	}
}
