/*
Theme Name: Ewe Lexicon
Theme URI: https://example.invalid/ewe-lexicon
Author: Ewe Lexicon Project
Author URI: https://example.invalid/ewe-lexicon
Description: Minimal hybrid classic theme scaffold for the Ewe Lexicon dictionary site. Presentation only; all lexicographic data and behavior live in the ewe-lexicon plugin. Design tokens are declared in theme.json.
Version: 0.1.0
Requires at least: 6.6
Tested up to: 6.6
Requires PHP: 8.2
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ewe-lexicon
Tags: accessibility-ready, custom-colors, custom-menu, editor-style, translation-ready, wide-blocks
*/

/*
 * G0 minimal scaffold styles.
 * Layout and tokens come from theme.json; this sheet only covers what
 * theme.json cannot express (skip link, focus, basic scaffolding).
 * Keep this file small; the design system lands in Phase G5.
 */

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

body {
	margin: 0;
	background-color: var(--wp--preset--color--base, #faf9f7);
	color: var(--wp--preset--color--ink, #2b2f33);
	font-family: var(--wp--preset--font-family--lexicon, system-ui, sans-serif);
	line-height: 1.6;
	word-wrap: break-word;
}

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

/* Screen-reader-only text (skip link, form labels). */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal;
}

/* Skip link: visually hidden until focused. */
.skip-link {
	background-color: var(--wp--preset--color--ink, #2b2f33);
	color: var(--wp--preset--color--base, #faf9f7);
	left: 0.5rem;
	padding: 0.75rem 1rem;
	position: absolute;
	text-decoration: none;
	top: 0.5rem;
	z-index: 100000;
}

.skip-link:focus {
	clip: auto;
	clip-path: none;
	height: auto;
	width: auto;
}

/* Visible focus indicator for keyboard users. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
	outline: 3px solid var(--wp--preset--color--primary, #3f6f5f);
	outline-offset: 2px;
}

.site {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.site-main {
	flex: 1 0 auto;
	margin-left: auto;
	margin-right: auto;
	max-width: var(--wp--custom--layout--content-size, 45rem);
	padding: 1.5rem 1rem 3rem;
	width: 100%;
}

.site-header,
.site-footer {
	background-color: var(--wp--preset--color--surface, #ffffff);
	border-bottom: 1px solid var(--wp--preset--color--border, #d9d7d2);
	padding: 1rem;
}

.site-footer {
	border-bottom: 0;
	border-top: 1px solid var(--wp--preset--color--border, #d9d7d2);
	color: var(--wp--preset--color--muted, #5d646b);
	font-size: 0.875rem;
}

.site-header__inner,
.site-footer__inner {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	justify-content: space-between;
	margin-left: auto;
	margin-right: auto;
	max-width: var(--wp--custom--layout--wide-size, 67.5rem);
}

.site-title {
	font-size: 1.25rem;
	font-weight: 700;
	margin: 0;
}

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

.primary-navigation ul,
.footer-navigation ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.25rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

/* Hero / search form on the front page. */
.hero {
	padding: 2rem 0;
	text-align: center;
}

.hero__tagline {
	color: var(--wp--preset--color--muted, #5d646b);
}

.lexicon-search {
	display: flex;
	gap: 0.5rem;
	justify-content: center;
	margin: 1.5rem auto 0;
	max-width: 34rem;
}

.lexicon-search__input {
	border: 1px solid var(--wp--preset--color--border, #d9d7d2);
	border-radius: 4px;
	flex: 1 1 auto;
	font: inherit;
	min-height: 44px;
	min-width: 0;
	padding: 0.5rem 0.75rem;
}

.lexicon-search__submit {
	background-color: var(--wp--preset--color--primary, #3f6f5f);
	border: 0;
	border-radius: 4px;
	color: var(--wp--preset--color--base, #faf9f7);
	cursor: pointer;
	font: inherit;
	min-height: 44px;
	min-width: 44px;
	padding: 0.5rem 1.25rem;
}

.lexicon-search__submit:hover {
	background-color: var(--wp--preset--color--primary-dark, #35584c);
}

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

/*
 * Self-hosted Andika subsets (SIL Open Font License, see
 * assets/fonts/OFL-Andika.txt). Subsetted to the Ewe orthography range
 * (special letters ɛ ɔ ŋ ʋ ƒ ɖ + capitals, combining tone/nasal marks)
 * to stay within the 60KB woff2 budget; ~21.5KB per weight.
 */
@font-face {
	font-family: 'Andika';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('assets/fonts/andika-regular.woff2') format('woff2');
}

@font-face {
	font-family: 'Andika';
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url('assets/fonts/andika-bold.woff2') format('woff2');
}
