/*
Theme Name: Logline It
Theme URI: https://loglineit.com
Author: The Story Shop
Description: Lightweight, accessible, fast theme for loglineit.com — the purpose-built companion to the Logline Engine plugin. Classic PHP theme, no build step, system fonts, minimal payload.
Version: 0.1.0
Requires at least: 6.4
Requires PHP: 8.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: loglineit
*/

/* Design tokens --------------------------------------------------------- */
:root {
	--brand-bg: #ffffff;
	--brand-surface: #f6f8fa;
	--brand-text: #16202b;
	--brand-muted: #56636f;
	--brand-border: #e2e6ea;
	--brand-accent: #2563eb;
	--brand-accent-hover: #1d4ed8;
	--brand-accent-contrast: #ffffff;
	--brand-maxw: 46rem;
	--brand-maxw-wide: 64rem;
	--brand-radius: 10px;
	--brand-space: clamp(1rem, 2.5vw, 1.5rem);
}

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

html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--brand-bg);
	color: var(--brand-text);
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 1.0625rem;
	line-height: 1.65;
}

h1, h2, h3, h4 {
	line-height: 1.25;
	font-weight: 700;
	color: var(--brand-text);
}

a {
	color: var(--brand-accent);
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
}

a:hover {
	color: var(--brand-accent-hover);
}

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

/* Visible, high-contrast focus for keyboard users. */
:focus-visible {
	outline: 3px solid var(--brand-accent);
	outline-offset: 2px;
}

/* Accessibility helpers ------------------------------------------------- */
.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: absolute;
	left: -999px;
	top: 0;
	z-index: 100;
	padding: 0.6rem 1rem;
	background: var(--brand-accent);
	color: var(--brand-accent-contrast);
	border-radius: 0 0 var(--brand-radius) 0;
}

.skip-link:focus {
	left: 0;
	color: var(--brand-accent-contrast);
}

/* Layout ---------------------------------------------------------------- */
.site-container {
	width: 100%;
	max-width: var(--brand-maxw-wide);
	margin: 0 auto;
	padding: 0 var(--brand-space);
}

/* Header ---------------------------------------------------------------- */
.site-header {
	border-bottom: 1px solid var(--brand-border);
	background: var(--brand-bg);
}

.site-header-inner {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
	align-items: baseline;
	justify-content: space-between;
	padding: 1rem 0;
}

.site-branding {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
}

.site-title {
	margin: 0;
	font-size: 1.4rem;
	font-weight: 800;
	letter-spacing: -0.01em;
}

.site-title a {
	color: var(--brand-text);
	text-decoration: none;
}

.site-description {
	margin: 0;
	color: var(--brand-muted);
	font-size: 0.9rem;
}

/* Primary nav ----------------------------------------------------------- */
.primary-nav ul {
	display: flex;
	flex-wrap: wrap;
	gap: 1.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.primary-nav a {
	color: var(--brand-text);
	text-decoration: none;
	font-weight: 600;
	padding: 0.25rem 0;
	border-bottom: 2px solid transparent;
}

.primary-nav a:hover,
.primary-nav .current-menu-item > a {
	color: var(--brand-accent);
	border-bottom-color: var(--brand-accent);
}

/* Content --------------------------------------------------------------- */
.site-main {
	padding: var(--brand-space) 0 3rem;
}

.content-narrow {
	max-width: var(--brand-maxw);
	margin: 0 auto;
}

.page-title {
	font-size: clamp(1.5rem, 4vw, 2rem);
	margin: 0 0 1rem;
}

.entry-content > * + * {
	margin-top: 1rem;
}

/* Search form ----------------------------------------------------------- */
.search-form {
	display: flex;
	gap: 0.5rem;
	max-width: 30rem;
}

.search-form input[type="search"] {
	flex: 1 1 auto;
	padding: 0.5rem 0.7rem;
	border: 1px solid var(--brand-border);
	border-radius: var(--brand-radius);
	font: inherit;
}

.search-form button {
	padding: 0.5rem 1rem;
	border: 0;
	border-radius: var(--brand-radius);
	background: var(--brand-accent);
	color: var(--brand-accent-contrast);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

/* Footer ---------------------------------------------------------------- */
.site-footer {
	border-top: 1px solid var(--brand-border);
	padding: 2rem 0;
	color: var(--brand-muted);
	font-size: 0.9rem;
}

.site-footer a {
	color: var(--brand-muted);
}

/* Home hub -------------------------------------------------------------- */
.home-hero {
	padding: 1.5rem 0 0.5rem;
}

.home-hero h1 {
	font-size: clamp(1.75rem, 5vw, 2.5rem);
	margin: 0 0 0.5rem;
}

.home-hero p {
	margin: 0;
	color: var(--brand-muted);
	font-size: 1.1rem;
}

.home-section-title {
	margin: 2rem 0 0.5rem;
	font-size: 1.2rem;
}

/* Logline list on theme pages (home hub, etc.). The plugin styles these on
   its own views; this covers pages where the plugin bundle is not loaded. */
.logline-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.logline-list-item {
	padding: 0.85rem 0;
	border-bottom: 1px solid var(--brand-border);
}

.logline-list-title {
	margin: 0 0 0.2rem;
	font-size: 1.1rem;
	line-height: 1.35;
}

.logline-list-meta {
	margin: 0;
	color: var(--brand-muted);
	font-size: 0.85rem;
}

/* Pagination (WordPress default markup). */
.pagination .page-numbers,
.nav-links .page-numbers {
	display: inline-block;
	padding: 0.3rem 0.6rem;
	margin: 0 0.25rem 0.25rem 0;
	border: 1px solid var(--brand-border);
	border-radius: 6px;
	text-decoration: none;
}

.pagination .current,
.nav-links .current {
	background: var(--brand-accent);
	color: var(--brand-accent-contrast);
	border-color: var(--brand-accent);
}

@media (max-width: 600px) {
	body {
		font-size: 1rem;
	}
}
