/* Suilama frontend CSS — only what theme.json cannot express. */

/* Dark mode: overrides the same CSS custom properties theme.json already
   generates on :root, so every block/component that reads
   var(--wp--preset--color--*) picks up the dark palette automatically —
   no per-component dark-mode rules needed. Not a simple inversion: this
   uses a deep indigo-black ink (matching the "vault ledger" concept)
   rather than pure black, and a soft off-white rather than pure white
   text. Every value below was checked against WCAG AA (4.5:1 text / 3:1
   non-text) before use — see 05-design-system.md §6. Responds to the
   system-level prefers-color-scheme; [data-theme="dark"] is also
   supported for a future manual toggle. Light values are NOT redeclared
   here — theme.json is the single source of truth for those; this file
   only ever overrides. */
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--wp--preset--color--background: #12142A;
		--wp--preset--color--surface: #1B1E3D;
		--wp--preset--color--text: #E9ECF6;
		--wp--preset--color--muted: #A9B0C9;
		--wp--preset--color--border: #E0956A;
		--wp--preset--color--accent: #7FA6D6;
		--wp--preset--color--accent-secondary: #E0956A;
	}
}
:root[data-theme="dark"] {
	--wp--preset--color--background: #12142A;
	--wp--preset--color--surface: #1B1E3D;
	--wp--preset--color--text: #E9ECF6;
	--wp--preset--color--muted: #A9B0C9;
	--wp--preset--color--border: #E0956A;
	--wp--preset--color--accent: #7FA6D6;
	--wp--preset--color--accent-secondary: #E0956A;
}

/* Visible focus ring everywhere (reference 02 §19 accessibility). */
:focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 2px;
}

/* Skip link */
.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--wp--preset--color--text);
	color: var(--wp--preset--color--background);
	padding: 12px 16px;
	z-index: 100;
}
.skip-link:focus {
	left: 16px;
	top: 16px;
}

/* Breadcrumbs */
.suilama-breadcrumbs {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
	margin-bottom: var(--wp--preset--spacing--20);
}
.suilama-breadcrumbs a {
	color: var(--wp--preset--color--muted);
	text-decoration: underline;
}
.suilama-breadcrumbs [aria-current="page"] {
	color: var(--wp--preset--color--text);
}

/* Last-updated freshness line. */
.suilama-last-updated {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
	margin-top: -8px;
	margin-bottom: var(--wp--preset--spacing--10);
}

/* "Checked against our editorial guidelines" line — this site's
   authorship treatment in place of a named byline (05-design-system.md §3). */
.suilama-checked-line {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
	margin-bottom: var(--wp--preset--spacing--30);
}
.suilama-checked-line a {
	color: var(--wp--preset--color--accent);
}

/* Article images: figure/figcaption rhythm inside post content. */
.entry-content figure.wp-block-image {
	margin: var(--wp--preset--spacing--40) 0;
}
.entry-content figure.wp-block-image img {
	width: 100%;
	height: auto;
	border-radius: 6px;
	border: 1px solid var(--wp--preset--color--border);
}
.entry-content figcaption {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
	margin-top: 8px;
}

/* Featured image (LCP) is not lazy-loaded; core only lazy-loads images
   inserted after the first ~3 content elements — the post-featured-image
   block is excluded by core. */
.wp-block-post-featured-image img {
	border-radius: 6px;
}

/* Comparison/data tables: clean bordered style with a tinted header row. */
.entry-content table {
	border-collapse: collapse;
	width: 100%;
	margin: var(--wp--preset--spacing--30) 0;
	border: 1px solid var(--wp--preset--color--border);
}
.entry-content th,
.entry-content td {
	border: 1px solid var(--wp--preset--color--border);
	padding: var(--wp--preset--spacing--10) var(--wp--preset--spacing--20);
	text-align: left;
	vertical-align: top;
}
.entry-content thead th {
	background: var(--wp--preset--color--surface);
	font-family: var(--wp--preset--font-family--heading);
}

/* Risk/disclaimer callout — left-border accent, not a filled colored box
   (05-design-system.md §3: signals "pay attention" without being
   alarmist). */
.suilama-callout {
	background: var(--wp--preset--color--surface);
	border-left: 3px solid var(--wp--preset--color--accent-secondary);
	padding: var(--wp--preset--spacing--20) var(--wp--preset--spacing--30);
	border-radius: 6px;
}

/* Guides-hub thumbnail cards. */
.guide-index {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: var(--wp--preset--spacing--30);
	margin: var(--wp--preset--spacing--30) 0;
}
.guide-card {
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 6px;
	padding: var(--wp--preset--spacing--20);
	background: var(--wp--preset--color--surface);
}
.guide-card img {
	width: 100%;
	height: auto;
	border-radius: 6px;
	margin-bottom: var(--wp--preset--spacing--10);
}
.guide-card h3 {
	margin-top: 0;
}

/* Mobile navigation is the core Navigation block's own overlay menu
   (overlayMenu:"mobile" in parts/header.html) — no custom toggle CSS/JS
   needed. Only re-skin its colors to match the palette. */
.wp-block-navigation__responsive-container.is-menu-open {
	background: var(--wp--preset--color--background);
}

/* Respect reduced motion. */
@media (prefers-reduced-motion: reduce) {
	* {
		animation-duration: 0.001ms !important;
		transition-duration: 0.001ms !important;
	}
}
