/*
Theme Name: Annual Report 2026
Theme URI: https://research.unl.edu/annualreport/2026/
Author: Joel Brehm
Author URI: https://bolerois.com/
Description: Starting-point theme for the 2025-2026 Research Report. Deliberately plain — standard template hierarchy plus a coming-soon template, ready to be designed into.
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 8.0
Version: 1.0
Text Domain: ar2026
Tags: one-column, accessibility-ready, custom-menu, editor-style, featured-images, block-patterns
*/

/* --------------------------------------------------------------
   Fonts are enqueued from functions.php, not @import.
   -------------------------------------------------------------- */

:root {
	--ar-measure: 42rem;
	--ar-gutter: clamp(1rem, 4vw, 3rem);
	--ar-text: #1a1a1a;
	--ar-muted: #6a6a68;
	--ar-bg: #ffffff;
	--ar-rule: #e3e3e2;
	--ar-brand: #d00000;
}

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

body {
	margin: 0;
	background: var(--ar-bg);
	color: var(--ar-text);
	font-family: 'Work Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
	font-size: 1.0625rem;
	line-height: 1.6;
}

/* --------------------------------------------------------------
   Layout
   -------------------------------------------------------------- */

.site-content {
	padding: 0 var(--ar-gutter);
}

.content-area {
	max-width: var(--ar-measure);
	margin: 0 auto;
	padding: 3rem 0 4rem;
}

.content-area.wide {
	max-width: 70rem;
}

/* --------------------------------------------------------------
   Typography
   -------------------------------------------------------------- */

h1, h2, h3, h4, h5, h6 {
	font-family: 'Work Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
	/* Heavier than Oswald's 600 was, because Work Sans is the wider face
	   and needs the weight to carry the same presence. */
	font-weight: 700;
	letter-spacing: -0.01em;
	line-height: 1.15;
	margin: 2em 0 0.5em;
	text-wrap: balance;
}

h1 { font-size: clamp(1.9rem, 5vw, 2.75rem); margin-top: 0; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2rem); }
h3 { font-size: 1.3rem; }

p, ul, ol, blockquote, figure, table {
	margin: 0 0 1.25em;
}

a {
	color: var(--ar-brand);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.15em;
}

a:hover,
a:focus {
	text-decoration-thickness: 2px;
}

blockquote {
	margin-left: 0;
	padding-left: 1.25rem;
	border-left: 3px solid var(--ar-rule);
	color: var(--ar-muted);
}

hr {
	height: 1px;
	border: 0;
	margin: 3rem 0;
	background: var(--ar-rule);
}

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

figcaption,
.wp-element-caption {
	font-size: 0.875rem;
	color: var(--ar-muted);
}

/* --------------------------------------------------------------
   Post / archive lists
   -------------------------------------------------------------- */

.entry {
	padding-bottom: 2.5rem;
	margin-bottom: 2.5rem;
	border-bottom: 1px solid var(--ar-rule);
}

.entry:last-child {
	border-bottom: 0;
}

.entry-title {
	margin: 0 0 0.35em;
	font-size: 1.4rem;
}

.entry-meta {
	font-size: 0.875rem;
	color: var(--ar-muted);
}

.page-title {
	padding-bottom: 0.5rem;
	border-bottom: 1px solid var(--ar-rule);
}

.pagination {
	margin-top: 2rem;
	font-size: 0.9375rem;
}

/* --------------------------------------------------------------
   Coming soon

   soon.php is a standalone document with no site header or footer,
   so this centres in the full viewport rather than in the space
   left over between them.
   -------------------------------------------------------------- */

.coming-soon {
	display: flex;
	min-height: 100svh;
	align-items: center;
	justify-content: center;
	padding: 4rem var(--ar-gutter);
	text-align: center;
}

.coming-soon-inner {
	max-width: 34rem;
}

.coming-soon h1 {
	margin-bottom: 0.75rem;
}

.coming-soon p {
	font-size: 1.125rem;
	color: var(--ar-muted);
}

/* --------------------------------------------------------------
   Header / footer
   -------------------------------------------------------------- */

.site-header {
	padding: 1.5rem var(--ar-gutter);
	border-bottom: 1px solid var(--ar-rule);
}

.site-title {
	margin: 0;
	font-size: 1.125rem;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

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

.main-navigation ul {
	display: flex;
	flex-wrap: wrap;
	gap: 1.25rem;
	list-style: none;
	margin: 0.75rem 0 0;
	padding: 0;
	font-size: 0.9375rem;
}

.site-footer {
	padding: 3rem var(--ar-gutter);
	border-top: 1px solid var(--ar-rule);
	font-size: 0.9375rem;
	color: var(--ar-muted);
}

.site-footer h2 {
	font-size: 1rem;
	margin-top: 0;
}

.previous-reports {
	line-height: 2;
}

.copyright {
	margin-top: 2rem;
	font-size: 0.8125rem;
}

/* --------------------------------------------------------------
   Search form
   -------------------------------------------------------------- */

.search-form {
	display: flex;
	gap: 0.5rem;
	max-width: 26rem;
}

.search-field {
	flex: 1 1 auto;
	min-width: 0;
	padding: 0.5rem 0.65rem;
	border: 1px solid var(--ar-rule);
	border-radius: 2px;
	font: inherit;
	font-size: 0.9375rem;
}

.search-submit {
	padding: 0.5rem 1rem;
	border: 0;
	border-radius: 2px;
	background: var(--ar-text);
	color: #fff;
	font: inherit;
	font-size: 0.9375rem;
	cursor: pointer;
}

/* --------------------------------------------------------------
   Accessibility
   -------------------------------------------------------------- */

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

.skip-link:focus {
	position: fixed;
	top: 0.5rem;
	left: 0.5rem;
	z-index: 100000;
	clip-path: none;
	width: auto;
	height: auto;
	padding: 0.75rem 1rem;
	background: #fff;
	color: var(--ar-text);
	font-size: 0.9375rem;
}

:focus-visible {
	outline: 2px solid var(--ar-brand);
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}

/* --------------------------------------------------------------
   Homepage (home.php)

   Structural only -- enough to lay the story cards out sensibly
   while the 2026 design is being worked out. Expect to replace
   all of this rather than build on it.
   -------------------------------------------------------------- */

.home-hero {
	max-width: 70rem;
	margin: 0 auto;
	padding: clamp(3rem, 10vw, 7rem) 0 clamp(2rem, 5vw, 4rem);
}

.home-hero-title {
	margin: 0;
	font-size: clamp(2.25rem, 7vw, 4.5rem);
	letter-spacing: -0.01em;
}

.home-hero-tagline {
	margin: 0.75rem 0 0;
	max-width: var(--ar-measure);
	font-size: 1.125rem;
	color: var(--ar-muted);
}

.section {
	max-width: 70rem;
	margin: 0 auto;
	padding: clamp(2rem, 5vw, 4rem) 0;
	border-top: 1px solid var(--ar-rule);
}

.section-title {
	margin: 0 0 0.5em;
	font-size: clamp(1.5rem, 3.5vw, 2.25rem);
}

.section-intro {
	max-width: var(--ar-measure);
	color: var(--ar-muted);
}

.story_grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(18rem, 100%), 1fr));
	gap: clamp(1.5rem, 3vw, 2.5rem);
	margin-top: 2rem;
}

/* Reset the generic .entry rule -- cards carry their own separation. */
.story_grid .story_link {
	margin: 0;
	padding: 0;
	border-bottom: 0;
}

.story_media {
	display: block;
	margin-bottom: 0.85rem;
}

.story_media img,
.story_placeholder {
	display: block;
	width: 100%;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	background: var(--ar-bg-placeholder, #ebebea);
}

.story_link .post_title {
	margin: 0 0 0.4em;
	font-size: 1.2rem;
	line-height: 1.25;
}

.story_link .post_title a {
	color: inherit;
	text-decoration: none;
}

.story_link .post_title a:hover,
.story_link .post_title a:focus {
	text-decoration: underline;
}

.story_link .excerpt {
	margin: 0 0 0.75em;
	font-size: 0.9375rem;
	color: var(--ar-muted);
}

.story_more {
	margin: 0;
	font-size: 0.9375rem;
}

/* --------------------------------------------------------------
   Circuit layer (home.php + js/circuit.js)

   The traces are the page's connective tissue: they draw across
   the hero, run down the page as a spine, and branch into each
   section to write its title.
   -------------------------------------------------------------- */

:root {
	--ar-circuit: #f9aa8f;          /* trace colour from the cover art */
	--ar-circuit-hot: #ffffff;      /* travelling pulse */
	--ar-red-deep: #8d0b17;
	--ar-red: #c8102e;
}

/* Anchor for the absolutely-positioned spine. */
.page-template-home-php #content {
	position: relative;
}

.circuit-spine {
	position: absolute;
	top: 0;
	left: clamp(0.5rem, 3vw, 4rem);
	width: 4px;
	height: 100%;
	pointer-events: none;
	z-index: 0;
}

.circuit-spine svg {
	width: 100%;
	height: 100%;
}

.circuit-spine line {
	stroke: var(--ar-circuit);
	stroke-width: 1.5;
	opacity: 0.5;
}

/* --------------------------------------------------------------
   Hero
   -------------------------------------------------------------- */

.home-hero {
	position: relative;
	max-width: none;
	display: flex;
	align-items: center;
	min-height: min(100svh, 52rem);
	margin: 0 calc(-1 * var(--ar-gutter));
	padding: clamp(3rem, 10vw, 7rem) var(--ar-gutter);
	overflow: hidden;
	background:
		radial-gradient(120% 90% at 65% 45%, var(--ar-red) 0%, var(--ar-red-deep) 70%);
	color: #fff;
	isolation: isolate;
}

.circuit-canvas {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	z-index: -1;
}

.home-hero-content {
	max-width: 70rem;
	margin: 0 auto;
	width: 100%;
	padding: 0;
}

.home-hero-title {
	margin: 0;
	color: #fff;
	font-size: clamp(2.25rem, 7vw, 4.5rem);
	letter-spacing: -0.01em;
	text-shadow: 0 2px 30px rgba(0, 0, 0, 0.35);
}

.home-hero-tagline {
	margin: 0.75rem 0 0;
	max-width: var(--ar-measure);
	color: rgba(255, 255, 255, 0.82);
	font-size: 1.125rem;
}

/* --------------------------------------------------------------
   Traces, pulses, vias
   -------------------------------------------------------------- */

.trace {
	fill: none;
	stroke: var(--ar-circuit);
	stroke-width: 1.5;
	stroke-linecap: round;
	stroke-linejoin: round;
	opacity: 0.75;
}

.pulse {
	fill: none;
	stroke: var(--ar-circuit-hot);
	stroke-width: 2.25;
	stroke-linecap: round;
	opacity: 0.9;
}

.via {
	fill: var(--ar-circuit);
	opacity: 0;
}

.chip {
	fill: rgba(255, 255, 255, 0.06);
	stroke: rgba(255, 255, 255, 0.55);
	stroke-width: 1.5;
}

/* --------------------------------------------------------------
   Section routing
   -------------------------------------------------------------- */

.section {
	position: relative;
}

.section-circuit {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 0;
	overflow: visible;
}

.section-circuit .trace {
	stroke: var(--ar-red);
	opacity: 0.55;
}

.section-circuit .via {
	fill: var(--ar-red);
}

.section-title,
.section-intro,
.story_grid {
	position: relative;
	z-index: 1;
}

/* The title is clipped shut until the trace reaches it; if JS never runs,
   no inline clip is ever set and it simply renders normally. */
.section-title {
	will-change: clip-path;
}

/* --------------------------------------------------------------
   Motion preferences and no-JS
   -------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	.pulse {
		display: none;
	}

	.trace,
	.via {
		opacity: 0.6;
		transition: none !important;
	}
}

/* GSAP unavailable: circuit.js draws the board statically, so the vias
   that normally fade in with the animation need to be visible outright. */
.circuit-static .via {
	opacity: 1;
}

/* --------------------------------------------------------------
   Real cover geometry

   circuit-traces.svg carries the cover's own 1574.52 x 599.012
   coordinate space, so strokes would otherwise scale with the
   artwork — thick on a wide display, hairline on a phone.
   non-scaling-stroke keeps them a constant weight at any size.
   -------------------------------------------------------------- */

.circuit-canvas .trace {
	vector-effect: non-scaling-stroke;
	stroke-width: 1.2;
}

.circuit-canvas .pulse {
	vector-effect: non-scaling-stroke;
	stroke-width: 2;
}

/* The trace-ends in the cover art are drawn round. */
.trace-round {
	stroke-linejoin: round;
}

.chip-die {
	fill: rgba(255, 255, 255, 0.05);
	stroke: rgba(255, 255, 255, 0.4);
	stroke-width: 1;
	vector-effect: non-scaling-stroke;
}
