/*
Theme Name: AI Search Score Theme
Theme URI: https://ai-searchscore.com/theme/
Author: AI Search Score
Author URI: https://ai-searchscore.com/
Description: A fast, lightweight, AI-ready classic theme for small businesses. Built for top scores on performance, SEO, accessibility, and Google's Agentic Browsing audit — semantic HTML, zero layout shift, no framework bloat, system fonts, and no jQuery. A clean canvas you make your own.
Version: 1.3.0
Requires at least: 5.9
Tested up to: 6.5
Requires PHP: 7.2
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: lumen-lite
Tags: blog, two-columns, custom-menu, featured-images, threaded-comments, translation-ready, accessibility-ready, custom-logo, footer-widgets
*/

/* =========================================================================
   Lumen Lite — design tokens
   Neutral, themeable. The owner overrides --ll-accent to brand it.
   ========================================================================= */
:root {
	--ll-bg: #ffffff;
	--ll-surface: #f6f7f9;
	--ll-text: #1a1d21;
	--ll-muted: #5b6470;
	--ll-border: #e3e6ea;
	--ll-accent: #1f6feb;          /* one accent — override to rebrand */
	--ll-accent-ink: #ffffff;
	--ll-focus: #1f6feb;
	--ll-maxw: 1120px;
	--ll-readw: 68ch;
	--ll-radius: 10px;
	--ll-gap: clamp(1rem, 2.5vw, 2rem);
	--ll-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
	--ll-font-head: var(--ll-font);
	--ll-fs-step--1: clamp(0.83rem, 0.78rem + 0.2vw, 0.92rem);
	--ll-fs-0: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
	--ll-fs-1: clamp(1.3rem, 1.15rem + 0.6vw, 1.6rem);
	--ll-fs-2: clamp(1.7rem, 1.4rem + 1.2vw, 2.4rem);
	--ll-fs-3: clamp(2.1rem, 1.6rem + 2vw, 3.2rem);
}

@media (prefers-color-scheme: dark) {
	:root:not([data-ll-light]) {
		--ll-bg: #14171a;
		--ll-surface: #1c2025;
		--ll-text: #eceef1;
		--ll-muted: #a3acb8;
		--ll-border: #2a2f36;
		--ll-accent: #4d8dff;
	}
}

/* =========================================================================
   Reset — minimal, intentional
   ========================================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font-family: var(--ll-font);
	font-size: var(--ll-fs-0);
	line-height: 1.65;
	color: var(--ll-text);
	background: var(--ll-bg);
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
}
/* CLS guards: media always reserves space */
img, video, iframe, svg { max-width: 100%; height: auto; }
img[width][height] { height: auto; }

h1, h2, h3, h4 { font-family: var(--ll-font-head); line-height: 1.2; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: var(--ll-fs-3); letter-spacing: -.02em; }
h2 { font-size: var(--ll-fs-2); letter-spacing: -.01em; }
h3 { font-size: var(--ll-fs-1); }
p, ul, ol { margin: 0 0 1rem; }
a { color: var(--ll-accent); text-underline-offset: .15em; }
a:hover { text-decoration: none; }

/* Visible keyboard focus everywhere (accessibility-ready + agent-friendly) */
:focus-visible { outline: 3px solid var(--ll-focus); outline-offset: 2px; border-radius: 3px; }

/* =========================================================================
   Layout primitives
   ========================================================================= */
.ll-wrap { width: 100%; max-width: var(--ll-maxw); margin-inline: auto; padding-inline: var(--ll-gap); }
.ll-flow > * + * { margin-top: 1rem; }
.ll-prose { max-width: var(--ll-readw); }
.ll-section { padding-block: clamp(2rem, 5vw, 4rem); }

/* Skip link */
.ll-skip {
	position: absolute; left: -9999px; top: 0; z-index: 1000;
	background: var(--ll-accent); color: var(--ll-accent-ink);
	padding: .6rem 1rem; border-radius: 0 0 var(--ll-radius) 0;
}
.ll-skip:focus { left: 0; }

/* =========================================================================
   Header / nav
   ========================================================================= */
.ll-header {
	border-bottom: 1px solid var(--ll-border);
	background: var(--ll-bg);
}
.ll-header__inner {
	display: flex; align-items: center; justify-content: space-between;
	gap: 1rem; padding-block: .85rem;
}
.ll-brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 700; font-size: var(--ll-fs-1); color: var(--ll-text); text-decoration: none; }
.ll-brand img { display: block; }
.ll-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: .25rem 1.1rem; margin: 0; padding: 0; }
.ll-nav a { display: inline-block; padding: .4rem .2rem; color: var(--ll-text); text-decoration: none; font-weight: 500; }
.ll-nav a:hover, .ll-nav .current-menu-item > a { color: var(--ll-accent); }

/* Mobile nav toggle — CSS only, no JS dependency for core nav */
.ll-nav__toggle { display: none; }
@media (max-width: 720px) {
	.ll-nav__toggle {
		display: inline-flex; align-items: center; gap: .4rem;
		background: var(--ll-surface); border: 1px solid var(--ll-border);
		border-radius: var(--ll-radius); padding: .5rem .8rem; font: inherit; cursor: pointer; color: var(--ll-text);
	}
	.ll-nav__list { display: none; width: 100%; flex-direction: column; gap: 0; padding-top: .5rem; }
	.ll-nav[data-open="true"] .ll-nav__list { display: flex; }
	.ll-nav__list li { border-top: 1px solid var(--ll-border); }
	.ll-nav__list a { display: block; padding: .7rem .2rem; }
	.ll-header__inner { flex-wrap: wrap; }
}

/* =========================================================================
   Buttons
   ========================================================================= */
.ll-btn {
	display: inline-block; background: var(--ll-accent); color: var(--ll-accent-ink);
	padding: .7rem 1.2rem; border-radius: var(--ll-radius); text-decoration: none; font-weight: 600;
	border: 1px solid transparent; cursor: pointer;
}
.ll-btn:hover { filter: brightness(.94); }
.ll-btn--ghost { background: transparent; color: var(--ll-accent); border-color: var(--ll-border); }

/* =========================================================================
   Content
   ========================================================================= */
.ll-main { display: block; }
.ll-hero { padding-block: clamp(2.5rem, 6vw, 5rem); }
.ll-hero h1 { margin-bottom: .3em; }
.ll-hero p { font-size: var(--ll-fs-1); color: var(--ll-muted); max-width: 55ch; }
.ll-hero__cta { margin-top: 1.5rem; display: flex; gap: .8rem; flex-wrap: wrap; }

.ll-entry__meta { color: var(--ll-muted); font-size: var(--ll-fs-step--1); margin-bottom: 1rem; }
.ll-entry__content > * { max-width: var(--ll-readw); }
.ll-entry__content > .alignwide,
.ll-entry__content > figure,
.ll-entry__content > .wp-block-image { max-width: 100%; }
.ll-entry__content img { border-radius: var(--ll-radius); }
.ll-entry__content figure { margin: 1.5rem 0; }

/* Cards / archive grid */
.ll-grid { display: grid; gap: var(--ll-gap); grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.ll-card { border: 1px solid var(--ll-border); border-radius: var(--ll-radius); overflow: hidden; background: var(--ll-bg); display: flex; flex-direction: column; }
.ll-card__media { aspect-ratio: 16 / 9; background: var(--ll-surface); }
.ll-card__media img { width: 100%; height: 100%; object-fit: cover; }
.ll-card__body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .4rem; }
.ll-card__body h3 { margin: 0; font-size: var(--ll-fs-1); }
.ll-card__body h3 a { color: var(--ll-text); text-decoration: none; }
.ll-card__body h3 a:hover { color: var(--ll-accent); }

/* =========================================================================
   Footer
   ========================================================================= */
.ll-footer { border-top: 1px solid var(--ll-border); background: var(--ll-surface); margin-top: clamp(3rem, 8vw, 6rem); }
.ll-footer__inner { padding-block: 2.5rem; display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.ll-footer__bottom { border-top: 1px solid var(--ll-border); padding-block: 1.2rem; color: var(--ll-muted); font-size: var(--ll-fs-step--1); }
.ll-footer__widgets .widget { margin-bottom: 1rem; }

/* =========================================================================
   Utilities & WP core classes
   ========================================================================= */
.screen-reader-text {
	border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
	height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; word-wrap: normal !important;
}
.alignleft { float: left; margin: .3rem 1.2rem 1rem 0; }
.alignright { float: right; margin: .3rem 0 1rem 1.2rem; }
.aligncenter { display: block; margin-inline: auto; }
.wp-caption-text, .gallery-caption { color: var(--ll-muted); font-size: var(--ll-fs-step--1); }
.sticky, .bypostauthor { display: block; }
.ll-pagination { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 2rem; }
.ll-pagination .page-numbers { padding: .5rem .85rem; border: 1px solid var(--ll-border); border-radius: var(--ll-radius); text-decoration: none; color: var(--ll-text); }
.ll-pagination .current { background: var(--ll-accent); color: var(--ll-accent-ink); border-color: var(--ll-accent); }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* =========================================================================
   Silo scaffolding — breadcrumbs + section links (silo-ready, not silo-builder)
   ========================================================================= */
.ll-breadcrumb { border-bottom: 1px solid var(--ll-border); background: var(--ll-bg); font-size: var(--ll-fs-step--1); }
.ll-breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; padding-block: .6rem; }
.ll-breadcrumb li { display: flex; align-items: center; gap: .35rem; color: var(--ll-muted); }
.ll-breadcrumb li + li::before { content: "/"; color: var(--ll-border); }
.ll-breadcrumb a { color: var(--ll-muted); text-decoration: none; }
.ll-breadcrumb a:hover { color: var(--ll-accent); }
.ll-breadcrumb [aria-current="page"] { color: var(--ll-text); font-weight: 600; }

.ll-section-links { border-top: 1px solid var(--ll-border); background: var(--ll-surface); margin-top: clamp(2rem, 5vw, 3.5rem); }
.ll-section-links > .ll-wrap { padding-block: clamp(1.5rem, 4vw, 2.5rem); }
.ll-section-links__title { font-size: var(--ll-fs-1); margin: 0 0 .8rem; }
.ll-section-links ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem 1.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.ll-section-links li { margin: 0; }
.ll-section-links a { display: inline-block; padding: .35rem 0; color: var(--ll-text); text-decoration: none; border-bottom: 1px solid transparent; }
.ll-section-links a:hover { color: var(--ll-accent); border-bottom-color: var(--ll-accent); }

/* "Last updated" freshness signal */
.ll-updated { color: var(--ll-muted); font-size: var(--ll-fs-step--1); margin: -.3rem 0 1.2rem; }
