/*
Theme Name: OG Theme
Author: Elithair
Description: Minimal classic theme for the Elithair design system. Brand tokens live in theme.json; page sections come from the og-blocks-factory plugin. Deliberately not a block theme — there is no templates/ directory, so WordPress serves these PHP templates and the site editor stays out of the way.
Version: 0.1.0
Requires at least: 6.5
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: og-theme
Tags: classic, one-column
*/

/*
 * Colours, typography and the content widths are defined in theme.json and reach
 * the page as --wp--preset--* custom properties plus a global stylesheet. Only
 * what theme.json cannot express belongs here.
 *
 * The webfont itself is served by og-blocks-factory, which self-hosts Open Sans
 * and enqueues it on every page. theme.json names the family; the plugin loads it.
 */

:root {
	--og-content-width: 1160px;
	--og-wide-width: 1280px;
	--og-gutter: 20px;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

body {
	margin: 0;
	/* Belt and braces: theme.json sets this too, but a stray plugin stylesheet
	   should not be able to leave the page white. Gray, not off-white — off-white
	   is the `--light` section background, and a page that used both would make
	   those sections invisible. */
	background-color: var(--wp--preset--color--gray, #e3e4e6);
}

img {
	max-width: 100%;
	height: auto;
}

/* ---------------------------------------------------------------------------
   Alignment
   ---------------------------------------------------------------------------
   A classic theme gets no layout CSS from WordPress, so alignfull and alignwide
   have to be implemented here. The block library's sections rely on this: they
   default to align: full and centre their own container inside it.

   The content area is full width and each child is constrained instead, so a
   full-width child simply opts out rather than fighting a wrapper's max-width.
   -------------------------------------------------------------------------- */

.entry-content > * {
	max-width: var(--og-content-width);
	margin-inline: auto;
}

.entry-content > .alignwide {
	max-width: var(--og-wide-width);
}

.entry-content > .alignfull {
	max-width: none;
	margin-inline: 0;
}

.alignleft {
	float: left;
	margin: 0 var(--og-gutter) var(--og-gutter) 0;
}

.alignright {
	float: right;
	margin: 0 0 var(--og-gutter) var(--og-gutter);
}

.aligncenter {
	display: block;
	margin-inline: auto;
}

/* ---------------------------------------------------------------------------
   Site chrome
   -------------------------------------------------------------------------- */

.site-header {
	padding: var(--og-gutter);
	background-color: var(--wp--preset--color--white, #fff);
}

.site-header__inner,
.site-footer__inner,
.site-main > .entry-header {
	max-width: var(--og-content-width);
	margin-inline: auto;
	padding-inline: var(--og-gutter);
}

.site-title {
	margin: 0;
	color: var(--wp--preset--color--primary, #036);
	font-size: 22px;
	font-weight: 800;
}

.site-title a {
	color: inherit;
	text-decoration: none;
}

.site-footer {
	padding-block: 40px;
	background-color: var(--wp--preset--color--primary, #036);
	color: var(--wp--preset--color--white, #fff);
	font-size: 14px;
}

/* Accessibility: skip link, visible only on focus. */
.skip-link {
	position: absolute;
	left: -9999px;
}

.skip-link:focus {
	left: var(--og-gutter);
	top: var(--og-gutter);
	z-index: 100000;
	padding: 12px 20px;
	background-color: var(--wp--preset--color--white, #fff);
	color: var(--wp--preset--color--primary, #036);
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}
