/*
Theme Name: Edge Foundation One
Theme URI: https://eduternative.org/themes/edge-foundation-one/
Author: The Edge of Eternity Networks
Author URI: https://eduternative.org/
Description: A lightweight, accessibility-first, plugin-driven WordPress foundation theme. Designed for longevity. Stable by intent.
Version: 0.2.2
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: edge-foundation-one
Tags: accessibility-ready, blog, custom-logo, custom-menu, featured-images, footer-widgets, full-width-template, translation-ready
*/

:root {
	--edge-content-width: 46rem;
	--edge-wide-width: 74rem;
	--edge-space-xs: 0.375rem;
	--edge-space-sm: 0.75rem;
	--edge-space-md: 1.25rem;
	--edge-space-lg: 2rem;
	--edge-space-xl: 3.5rem;
	--edge-radius: 0.25rem;
	--edge-border: #d8d8d2;
	--edge-text: #20211f;
	--edge-muted: #5f625d;
	--edge-background: #fffef9;
	--edge-surface: #f5f1e6;
	--edge-link: #174f6b;
	--edge-focus: #8a4b08;
	--edge-accent: #222222;
	--edge-hover: #0b3448;
	--edge-nav-bg: #ffffff;
	--edge-nav-text: #171817;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--edge-background);
	color: var(--edge-text);
	font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 1rem;
	line-height: 1.65;
	text-rendering: optimizeLegibility;
}
img, svg, video, iframe { max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; }
a { color: var(--edge-link); text-underline-offset: 0.16em; }
a:hover { color: var(--edge-hover); text-decoration-thickness: 0.14em; }
:focus-visible { outline: 3px solid var(--edge-focus); outline-offset: 3px; }

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
.screen-reader-text:focus {
	position: fixed;
	top: 0.75rem;
	left: 0.75rem;
	z-index: 100000;
	width: auto;
	height: auto;
	padding: 0.75rem 1rem;
	margin: 0;
	clip: auto;
	background: #fff;
	color: #000;
	font-weight: 700;
}

.site-shell { min-height: 100vh; display: flex; flex-direction: column; }
.site-header, .site-footer { border-color: var(--edge-border); }
.site-header { border-bottom: 1px solid var(--edge-border); }
.site-footer { margin-top: auto; border-top: 1px solid var(--edge-border); }
.site-header__inner, .site-footer__inner, .site-main {
	width: min(100% - 2rem, var(--edge-wide-width));
	margin-inline: auto;
}
.site-header__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; padding-block: 1rem; }
.site-branding { flex: 1 1 16rem; min-width: 0; }
.site-title { margin: 0; font-size: clamp(1.25rem, 1rem + 1vw, 2rem); line-height: 1.2; }
.site-description { margin: 0.25rem 0 0; color: var(--edge-muted); }
.custom-logo { display: block; max-height: 4rem; width: auto; }

.primary-navigation { margin-left: auto; }
.primary-navigation ul, .footer-navigation ul { margin: 0; padding: 0; list-style: none; }
.primary-navigation > ul, .footer-navigation ul { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; }
.primary-navigation li { position: relative; }
.primary-navigation a, .footer-navigation a { display: inline-block; padding: 0.35rem 0.15rem; overflow-wrap: anywhere; }
.primary-navigation .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 1000;
	display: none;
	min-width: 13rem;
	padding: 0.45rem;
	border: 1px solid var(--edge-border);
	border-radius: var(--edge-radius);
	background: var(--edge-nav-bg);
	box-shadow: 0 0.75rem 1.75rem rgb(0 0 0 / 0.14);
}
.primary-navigation .menu-item-has-children > .sub-menu::before {
	content: "";
	position: absolute;
	top: -0.5rem;
	left: 0;
	width: 100%;
	height: 0.5rem;
}
.primary-navigation .sub-menu li { width: 100%; }
.primary-navigation .sub-menu a { display: block; width: 100%; padding: 0.55rem 0.7rem; }
.primary-navigation .menu-item-has-children:hover > .sub-menu,
.primary-navigation .menu-item-has-children:focus-within > .sub-menu,
.primary-navigation .menu-item-has-children.is-submenu-open > .sub-menu { display: block; }
.submenu-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	margin-left: 0.15rem;
	padding: 0;
	border: 0;
	background: transparent;
	color: currentColor;
	font: inherit;
	line-height: 1;
}
.submenu-toggle::before { content: "\25BE"; font-size: 0.8em; }
.submenu-toggle[aria-expanded="true"]::before { content: "\25B4"; }
.menu-toggle { display: none; }

.site-main { padding-block: var(--edge-space-xl); }
.content-area { width: min(100%, var(--edge-content-width)); margin-inline: auto; }
.content-area--wide { width: min(100%, var(--edge-wide-width)); }
.entry-header, .entry-content, .entry-footer { margin-inline: auto; }
.entry-title { font-size: clamp(2rem, 1.5rem + 2vw, 3.5rem); line-height: 1.1; }
.entry-meta, .entry-footer, .archive-description { color: var(--edge-muted); }
.entry-content > * + * { margin-block-start: 1.25em; }
.entry-content .alignwide { width: min(var(--edge-wide-width), calc(100vw - 2rem)); max-width: none; margin-left: 50%; transform: translateX(-50%); }
.entry-content .alignfull { width: 100vw; max-width: none; margin-left: 50%; transform: translateX(-50%); }

.post-list { display: grid; gap: var(--edge-space-lg); }
.post-card { padding-block-end: var(--edge-space-lg); border-bottom: 1px solid var(--edge-border); }
.post-card__title { margin-bottom: 0.35rem; }
.post-thumbnail img { display: block; border-radius: var(--edge-radius); }

.widget-area { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: var(--edge-space-lg); padding-block: var(--edge-space-lg); }
.footer-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem 2rem; padding-block: 1rem 1.5rem; color: var(--edge-muted); font-size: 0.925rem; }
.footer-meta p { margin: 0; }
.theme-credit a { color: inherit; }

.navigation.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: var(--edge-space-lg); }
.page-numbers { padding: 0.4rem 0.7rem; border: 1px solid var(--edge-border); border-radius: var(--edge-radius); }
.page-numbers.current { font-weight: 700; background: var(--edge-surface); }

@media (max-width: 48rem) {
	.js .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
	.js .primary-navigation { display: none; width: 100%; margin-left: 0; }
	.js .primary-navigation.is-open { display: block; }
	.primary-navigation > ul, .footer-navigation ul { flex-direction: column; align-items: stretch; }
	.primary-navigation a { display: block; padding: 0.6rem 0; }
	.primary-navigation .menu-item-has-children > a { display: inline-block; width: calc(100% - 2.5rem); }
	.primary-navigation .sub-menu {
		position: static;
		display: block;
		min-width: 0;
		margin: 0 0 0.35rem 1rem;
		padding: 0 0 0 0.75rem;
		border: 0;
		border-left: 2px solid var(--edge-border);
		border-radius: 0;
		box-shadow: none;
	}
	.js .primary-navigation .sub-menu { display: none; }
	.js .primary-navigation .menu-item-has-children.is-submenu-open > .sub-menu { display: block; }
	.submenu-toggle { float: right; margin-top: 0.25rem; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}


/* Design language: structure before decoration. */
.edge-heading-accents .entry-title,
.edge-heading-accents .entry-content h2,
.edge-heading-accents .entry-content h3,
.edge-heading-accents .widget-title {
	position: relative;
	padding-bottom: 0.35em;
}
.edge-heading-accents .entry-title::after,
.edge-heading-accents .entry-content h2::after,
.edge-heading-accents .entry-content h3::after,
.edge-heading-accents .widget-title::after {
	content: "";
	display: block;
	width: min(5rem, 35%);
	height: 0.2rem;
	margin-top: 0.35em;
	background: var(--edge-accent);
}
.edge-heading-accents .entry-content h3::after,
.edge-heading-accents .widget-title::after { width: min(3.5rem, 28%); height: 0.15rem; }

.edge-nav-bar .site-header { background: var(--edge-nav-bg); color: var(--edge-nav-text); border-bottom-color: var(--edge-nav-bg); }
.edge-nav-bar .site-header a, .edge-nav-bar .site-description { color: var(--edge-nav-text); }
.edge-nav-bar .primary-navigation a { padding: 0.55rem 0.75rem; border-radius: var(--edge-radius); }
.edge-nav-bar .primary-navigation a:hover,
.edge-nav-bar .primary-navigation a:focus-visible { background: var(--edge-background); color: var(--edge-text); }
.edge-nav-underlined .primary-navigation a { text-decoration: none; border-bottom: 0.2rem solid transparent; }
.edge-nav-underlined .primary-navigation a:hover,
.edge-nav-underlined .primary-navigation a:focus-visible,
.edge-nav-underlined .primary-navigation .current-menu-item > a { border-bottom-color: var(--edge-accent); color: var(--edge-hover); }
button, input[type="button"], input[type="submit"], .wp-block-button__link {
	border: 2px solid var(--edge-accent);
	background: var(--edge-accent);
	color: #fff;
}
button:hover, input[type="button"]:hover, input[type="submit"]:hover, .wp-block-button__link:hover { filter: brightness(0.88); }
