/*
Theme Name: Army & Navy Union
Theme URI: https://www.armyandnavyunion.org/
Author: Army and Navy Union
Description: Single-page theme for the Army & Navy Union of the United States of America. Officers, garrisons, the calendar, and contact live on the home template. Content entered in the page or post editor is displayed after that design.
Version: 1.1.0
Requires at least: 6.2
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: army-navy-union
*/

:root {
	--navy: #0b1f33;
	--navy-2: #16324d;
	--ink: #1a2330;
	--muted: #5c6770;
	--gold: #a68445;
	--gold-bright: #d7c08a;
	--crimson: #8e1d2c;
	--cream: #f4efe4;
	--paper: #fffcf7;
	--line: #e3dac8;
	--white: #ffffff;
	--serif: "Libre Baskerville", Georgia, "Times New Roman", serif;
	--sans: "Source Sans 3", "Segoe UI", sans-serif;
	--wrap: 1120px;
	--narrow: 760px;
	--shadow: 0 16px 40px rgba(11, 31, 51, 0.08);
}

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

html {
	scroll-behavior: smooth;
	scroll-padding-top: 9.5rem;
}

body {
	margin: 0;
	background: var(--cream);
	color: var(--ink);
	font-family: var(--sans);
	font-size: 1.125rem;
	line-height: 1.65;
}

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

a {
	color: var(--crimson);
}

a:hover {
	color: var(--navy);
}

:focus-visible {
	outline: 3px solid var(--gold);
	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;
}

.anu-skip {
	position: absolute;
	left: 1rem;
	top: -4rem;
	z-index: 100;
	background: var(--white);
	color: var(--navy);
	padding: 0.6rem 1rem;
	text-decoration: none;
}

.anu-skip:focus {
	top: 0.5rem;
}

.anu-wrap {
	width: min(var(--wrap), calc(100% - 2.5rem));
	margin-inline: auto;
}

.anu-narrow {
	width: min(var(--narrow), calc(100% - 2.5rem));
	margin-inline: auto;
}

.anu-header {
	position: sticky;
	top: 0;
	z-index: 40;
	background: var(--paper);
	border-bottom: 1px solid var(--line);
}

body.admin-bar .anu-header {
	top: 32px;
}

.anu-topbar {
	background: var(--navy);
	color: #f3ead8;
	font-size: 0.82rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.anu-topbar-inner {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem 1.5rem;
	justify-content: space-between;
	padding: 0.55rem 0;
}

.anu-topbar p {
	margin: 0;
}

.anu-brandbar-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	padding: 1rem 0;
}

.anu-brand {
	display: flex;
	align-items: center;
	gap: 0.85rem;
	color: var(--navy);
	text-decoration: none;
	min-width: 0;
}

.anu-brand:hover {
	color: var(--crimson);
}

.anu-brand .custom-logo {
	width: 56px;
	height: auto;
}

.anu-brand-text {
	display: flex;
	flex-direction: column;
	line-height: 1.15;
}

.anu-brand-name {
	font-family: var(--serif);
	font-size: 1.45rem;
	font-weight: 700;
}

.anu-brand-sub {
	color: var(--muted);
	font-size: 0.82rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.anu-nav-toggle {
	display: none;
	align-items: center;
	gap: 0.5rem;
	border: 1px solid var(--navy);
	background: transparent;
	color: var(--navy);
	font: inherit;
	font-size: 0.95rem;
	padding: 0.45rem 0.75rem;
	cursor: pointer;
}

.anu-nav-toggle-bars,
.anu-nav-toggle-bars::before,
.anu-nav-toggle-bars::after {
	display: block;
	width: 1.1rem;
	height: 2px;
	background: currentColor;
	position: relative;
	content: "";
}

.anu-nav-toggle-bars::before,
.anu-nav-toggle-bars::after {
	position: absolute;
	left: 0;
}

.anu-nav-toggle-bars::before {
	top: -6px;
}

.anu-nav-toggle-bars::after {
	top: 6px;
}

.anu-menu,
.anu-footer-menu {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem 1.25rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.anu-menu a,
.anu-footer-menu a {
	color: var(--navy);
	font-weight: 600;
	text-decoration: none;
	letter-spacing: 0.02em;
}

.anu-menu a:hover,
.anu-footer-menu a:hover,
.anu-menu .current-menu-item > a,
.anu-footer-menu .current-menu-item > a,
.anu-menu a[aria-current="true"] {
	color: var(--crimson);
}

.anu-emblem {
	width: 56px;
	height: 56px;
	object-fit: cover;
	object-position: 42% 28%;
	border-radius: 50%;
	border: 2px solid var(--gold);
	flex-shrink: 0;
}

.anu-hero {
	position: relative;
	background:
		linear-gradient(90deg, rgba(11, 31, 51, 0.78) 0%, rgba(11, 31, 51, 0.45) 46%, rgba(11, 31, 51, 0.2) 100%),
		url("assets/images/flag-banner.jpg") center 40% / cover no-repeat;
	color: var(--paper);
	overflow: hidden;
}

.anu-hero::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 8px;
	background: linear-gradient(90deg, var(--crimson), var(--gold-bright), var(--navy));
}

.anu-hero-inner {
	position: relative;
	z-index: 1;
	padding: 4.5rem 0 5rem;
	max-width: 820px;
}

.anu-hero h1 {
	margin: 0.35rem 0 1rem;
	font-family: var(--serif);
	font-size: clamp(2.1rem, 4.4vw, 3.5rem);
	font-weight: 700;
	line-height: 1.2;
	color: var(--paper);
}

.anu-hero-lead {
	margin: 0 0 1.6rem;
	max-width: 38rem;
	font-size: 1.25rem;
	color: #f3ead8;
}

.anu-kicker {
	margin: 0 0 0.4rem;
	color: var(--gold);
	font-size: 0.82rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.anu-kicker-light {
	color: var(--gold-bright);
}

.anu-hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.anu-button {
	display: inline-block;
	background: var(--gold-bright);
	color: var(--navy);
	text-decoration: none;
	font-weight: 700;
	padding: 0.7rem 1.15rem;
	border: 2px solid var(--gold-bright);
}

.anu-button:hover {
	background: var(--paper);
	color: var(--navy);
	border-color: var(--paper);
}

.anu-button-ghost {
	background: transparent;
	color: var(--paper);
	border-color: rgba(255, 252, 247, 0.7);
}

.anu-button-ghost:hover {
	background: var(--paper);
	color: var(--navy);
}

.anu-section {
	padding: 3.25rem 0;
}

.anu-section h2,
.anu-section h3,
.anu-banner h1,
.anu-banner h2,
.anu-card h2,
.anu-event h3,
.anu-contact h3,
.anu-garrison h3 {
	font-family: var(--serif);
	color: var(--navy);
	line-height: 1.25;
}

.anu-mission {
	background: var(--paper);
}

.anu-mission-grid {
	display: grid;
	grid-template-columns: 180px 1fr;
	gap: 2.5rem;
	align-items: start;
}

.anu-medal {
	width: 171px;
	height: auto;
	display: block;
}

.anu-mission h2,
.anu-purposes h2,
.anu-paths h2 {
	margin-top: 0;
	font-size: 1.8rem;
}

.anu-statute {
	font-weight: 700;
}

.anu-purposes {
	background: var(--cream);
}

.anu-lede {
	max-width: 46rem;
	color: var(--muted);
}

.anu-purpose-list {
	list-style: none;
	margin: 1.5rem 0 0;
	padding: 0;
	display: grid;
	gap: 0.85rem;
}

.anu-purpose-list li {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 1rem;
	background: var(--paper);
	border: 1px solid var(--line);
	padding: 1rem 1.15rem;
	box-shadow: var(--shadow);
}

.anu-purpose-list li::before {
	counter-increment: purpose;
	content: counter(purpose);
	font-family: var(--serif);
	font-weight: 700;
	color: var(--crimson);
	font-size: 1.35rem;
	line-height: 1;
}

.anu-purpose-list {
	counter-reset: purpose;
}

.anu-path-grid,
.anu-garrison-grid,
.anu-contact-grid {
	display: grid;
	gap: 1rem;
}

.anu-path-grid {
	grid-template-columns: repeat(4, 1fr);
	margin-top: 1.25rem;
}

.anu-path,
.anu-garrison,
.anu-contact,
.anu-card {
	background: var(--paper);
	border: 1px solid var(--line);
	border-top: 4px solid var(--navy);
	padding: 1.15rem 1.2rem 1.25rem;
	box-shadow: var(--shadow);
}

.anu-path {
	color: inherit;
	text-decoration: none;
	display: block;
}

.anu-path:hover {
	border-top-color: var(--crimson);
	color: inherit;
}

.anu-path h3,
.anu-garrison h3,
.anu-contact h3,
.anu-card h2,
.anu-event h3 {
	margin: 0 0 0.4rem;
	font-size: 1.2rem;
}

.anu-path p,
.anu-garrison address,
.anu-contact address {
	margin: 0;
	color: var(--muted);
	font-style: normal;
}

.anu-banner {
	background: var(--navy);
	color: var(--paper);
	padding: 2.6rem 0 2.3rem;
	border-bottom: 8px solid var(--gold);
}

.anu-banner h1,
.anu-banner h2 {
	margin: 0;
	color: var(--paper);
	font-size: clamp(2rem, 4vw, 3rem);
}

.anu-banner .anu-lede,
.anu-banner .anu-meta,
.anu-banner .anu-kicker {
	color: #f3ead8;
}

.anu-garrison-grid {
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.anu-contact a {
	font-weight: 700;
}

.anu-events {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 1rem;
}

.anu-event {
	display: grid;
	grid-template-columns: 240px 1fr;
	gap: 1.25rem;
	background: var(--paper);
	border: 1px solid var(--line);
	padding: 1.25rem 1.3rem;
	box-shadow: var(--shadow);
}

.anu-event-when {
	color: var(--crimson);
	font-weight: 700;
}

.anu-event p {
	margin: 0;
}

.anu-contact-grid {
	grid-template-columns: repeat(3, 1fr);
}

.anu-contact-name {
	margin: 0 0 0.35rem;
	font-weight: 700;
	font-size: 1.2rem;
}

.anu-contact address {
	margin-bottom: 0.75rem;
}

.anu-table-wrap {
	overflow-x: auto;
	background: var(--paper);
	border: 1px solid var(--line);
	box-shadow: var(--shadow);
}

.anu-roster {
	width: 100%;
	border-collapse: collapse;
}

.anu-roster th,
.anu-roster td {
	text-align: left;
	padding: 0.85rem 1rem;
	border-bottom: 1px solid var(--line);
	vertical-align: top;
}

.anu-roster tr:last-child th,
.anu-roster tr:last-child td {
	border-bottom: 0;
}

.anu-roster th {
	width: 38%;
	color: var(--navy);
	background: #f8f4ec;
	font-weight: 700;
}

.anu-roster tr:nth-child(even) td {
	background: #fffcf7;
}

.anu-editor {
	background: var(--paper);
	border-top: 1px solid var(--line);
	padding: 2.5rem 0 3.5rem;
}

.anu-editor-inner {
	width: min(var(--narrow), calc(100% - 2.5rem));
}

.anu-editor-inner > :first-child {
	margin-top: 0;
}

.entry-content h2,
.entry-content h3,
.entry-summary h2,
.entry-summary h3 {
	font-family: var(--serif);
	color: var(--navy);
}

.entry-content img,
.anu-featured img {
	height: auto;
}

.anu-featured {
	margin: 0;
	background: var(--paper);
	padding: 1.5rem 0 0;
}

.anu-list {
	display: grid;
	gap: 1rem;
}

.anu-card h2 a {
	color: var(--navy);
	text-decoration: none;
}

.anu-card h2 a:hover {
	color: var(--crimson);
}

.anu-meta {
	margin: 0 0 0.5rem;
	color: var(--muted);
	font-size: 0.95rem;
}

.anu-footer {
	background: var(--navy);
	color: #f3ead8;
	margin-top: 0;
}

.anu-footer a {
	color: var(--gold-bright);
}

.anu-footer a:hover {
	color: var(--white);
}

.anu-footer-grid {
	display: grid;
	grid-template-columns: 1.4fr 1fr;
	gap: 2rem;
	padding: 2.5rem 0;
}

.anu-footer-name {
	margin: 0;
	font-family: var(--serif);
	font-size: 1.4rem;
	color: var(--white);
}

.anu-footer-note {
	max-width: 36rem;
	color: #d9d0c2;
}

.anu-footer-menu {
	justify-content: flex-end;
}

.anu-footer-menu a {
	color: #f3ead8;
	font-weight: 600;
}

.anu-footer-base {
	border-top: 1px solid rgba(255, 252, 247, 0.15);
	padding: 0.9rem 0;
	font-size: 0.92rem;
	color: #d9d0c2;
}

.anu-footer-base p {
	margin: 0;
}

.anu-search {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 1rem 0 1.5rem;
}

.anu-search input[type="search"] {
	flex: 1 1 16rem;
	font: inherit;
	padding: 0.65rem 0.75rem;
	border: 1px solid var(--line);
	background: var(--white);
	color: var(--ink);
}

.anu-search button,
.anu-comments input[type="submit"] {
	font: inherit;
	font-weight: 700;
	background: var(--navy);
	color: var(--paper);
	border: 0;
	padding: 0.65rem 1rem;
	cursor: pointer;
}

.anu-comments {
	background: var(--paper);
	padding: 0 0 3rem;
}

.anu-comment-list {
	padding-left: 1.2rem;
}

.navigation.pagination,
.anu-page-links {
	width: min(var(--wrap), calc(100% - 2.5rem));
	margin: 0 auto 3rem;
}

.nav-links {
	display: flex;
	gap: 0.75rem;
	flex-wrap: wrap;
}

.page-numbers {
	color: var(--navy);
	text-decoration: none;
	font-weight: 700;
}

@media (max-width: 900px) {
	.anu-path-grid,
	.anu-contact-grid,
	.anu-footer-grid,
	.anu-mission-grid,
	.anu-event {
		grid-template-columns: 1fr;
	}

	.anu-footer-menu {
		justify-content: flex-start;
	}

	.anu-medal {
		margin-inline: auto;
	}
}

@media (max-width: 782px) {
	body.admin-bar .anu-header {
		top: var(--wp-admin--admin-bar--height, 46px);
	}
}

@media (max-width: 600px) {
	body.admin-bar .anu-header {
		top: 0;
	}
}

@media (max-width: 760px) {
	.anu-js .anu-nav-toggle {
		display: inline-flex;
	}

	.anu-js .anu-nav {
		display: none;
		position: absolute;
		left: 0;
		right: 0;
		top: 100%;
		background: var(--paper);
		border-bottom: 1px solid var(--line);
		padding: 0.5rem 1.25rem 1rem;
		z-index: 20;
	}

	.anu-js .anu-nav.is-open {
		display: block;
	}

	.anu-brandbar {
		position: relative;
	}

	.anu-js .anu-menu {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.35rem;
	}

	.anu-roster th,
	.anu-roster td {
		display: block;
		width: auto;
	}

	.anu-roster th {
		border-bottom: 0;
		padding-bottom: 0.15rem;
	}

	.anu-hero-inner {
		padding: 3rem 0 3.4rem;
	}
}

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