/*
Theme Name: A-Line Neighbors
Theme URI: https://beat30x.org/
Author: WXMW
Author URI: https://westxmw.com/
Description: A simple, friendly theme for the Beat 30X Neighborhood Crime Prevention Council – The A-Line Neighbors. Pages, a monthly-meeting box, and a Google Calendar that stays in sync. No blog. Inspired by the Key System "A" line that ended on Havenscourt Boulevard.
Version: 1.1.0
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: a-line-neighbors
Tags: one-column, custom-logo, custom-menu, block-styles, wide-blocks, accessibility-ready
*/

/* ===== Tokens ===== */
:root {
	--orange: #E9841A;       /* logo orange, a touch deeper for text contrast */
	--orange-hot: #F7941D;   /* logo orange, as-is */
	--orange-ink: #A85A06;   /* orange that passes contrast as text on cream */
	--navy: #34303F;         /* logo navy */
	--navy-deep: #24212C;
	--ink: #2B2833;
	--muted: #615B6B;
	--cream: #FBF6EE;
	--cream-2: #F3EADB;
	--line: #E4D9C6;
	--white: #FFFFFF;

	--font-sign: "Barlow Condensed", "Oswald", "Arial Narrow", sans-serif;
	--font-body: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

	--wrap: 1160px;
	--text: 760px;
	--radius: 10px;
	--shadow: 0 1px 2px rgba(36, 33, 44, .06), 0 8px 24px rgba(36, 33, 44, .08);
}

/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--cream);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 1.0625rem;
	line-height: 1.65;
	overflow-x: hidden;
}
img, iframe, video { max-width: 100%; }
img { height: auto; }
a { color: var(--orange-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--orange-hot); outline-offset: 2px; border-radius: 3px; }

h1, h2, h3, h4 {
	font-family: var(--font-sign);
	font-weight: 700;
	line-height: 1.1;
	color: var(--navy);
	letter-spacing: .01em;
	margin: 1.6em 0 .5em;
}
h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); text-transform: uppercase; }
h2 { font-size: clamp(1.7rem, 3vw, 2.15rem); }
h3 { font-size: 1.4rem; }
p { margin: 0 0 1em; }

.skip-link {
	position: absolute; left: -9999px; top: 0; z-index: 100;
	background: var(--navy); color: #fff; padding: .6em 1em;
}
.skip-link:focus { left: 1rem; top: 1rem; }

.aln-wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 700px) { .aln-wrap { padding: 0 28px; } }
.aln-wrap--text { max-width: calc(var(--text) + 56px); }

/* ===== Route badge (the "A" from the train's sign) ===== */
.aln-badge {
	display: inline-grid; place-items: center;
	width: 1.9em; height: 1.9em;
	background: var(--cream); color: var(--navy);
	border: 3px solid var(--navy); outline: 2px solid var(--cream);
	font-family: var(--font-sign); font-weight: 700; font-size: 1.05em; line-height: 1;
	border-radius: 3px;
}
.aln-badge--sm { font-size: 1.1rem; }

/* ===== Buttons ===== */
.aln-btn {
	display: inline-block;
	background: var(--orange); color: var(--navy-deep);
	font-family: var(--font-sign); font-weight: 700; font-size: 1.05rem;
	letter-spacing: .06em; text-transform: uppercase; text-decoration: none;
	padding: .6em 1.15em; border-radius: 6px; border: 2px solid var(--orange);
	transition: background .15s, color .15s, border-color .15s;
}
.aln-btn:hover { background: var(--navy); border-color: var(--navy); color: #fff; }
.aln-btn--ghost { background: transparent; color: var(--navy); border-color: var(--navy); }
.aln-btn--ghost:hover { background: var(--navy); color: #fff; }
.aln-btn--light { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.8); }
.aln-btn--light:hover { background: #fff; color: var(--navy); border-color: #fff; }
.aln-btn--big { font-size: 1.2rem; padding: .7em 1.35em; }
.aln-btn--small { font-size: .95rem; padding: .45em .9em; }

/* ===== Announcement bar (optional, set in Customizer) ===== */
.aln-announce { background: var(--navy); color: #fff; font-size: .95rem; text-align: center; padding: .55em 0; }
.aln-announce a { color: #fff; font-weight: 600; text-decoration: none; }
.aln-announce a:hover { text-decoration: underline; }

/* ===== Header ===== */
.site-header {
	background: var(--white);
	border-bottom: 4px solid var(--orange);
	position: relative; z-index: 20;
}
.site-header__inner { display: flex; align-items: center; gap: 16px; min-height: 78px; }
.site-brand { display: flex; align-items: center; gap: 12px; margin-right: auto; min-width: 0; }
.site-brand .custom-logo { display: block; width: auto; max-height: 56px; }
.site-brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.site-brand__name { font-family: var(--font-sign); font-weight: 700; font-size: 1.45rem; color: var(--navy); text-transform: uppercase; letter-spacing: .02em; }
.site-brand__sub { font-size: .8rem; color: var(--muted); letter-spacing: .04em; }

.site-nav { display: flex; align-items: center; gap: 8px; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.site-nav li { position: relative; }
.site-nav a:not(.aln-btn) {
	display: block; padding: .5em .75em; border-radius: 6px;
	font-family: var(--font-sign); font-weight: 600; font-size: 1.15rem; letter-spacing: .03em;
	text-transform: uppercase; color: var(--navy); text-decoration: none;
}
.site-nav a:not(.aln-btn):hover { background: var(--cream-2); }
.site-nav .current-menu-item > a, .site-nav .current_page_item > a { color: var(--orange-ink); box-shadow: inset 0 -3px 0 var(--orange); border-radius: 0; }
.site-nav .sub-menu { display: none; position: absolute; top: 100%; left: 0; flex-direction: column; background: #fff; box-shadow: var(--shadow); border-radius: 8px; padding: 6px; min-width: 200px; }
.site-nav li:hover > .sub-menu, .site-nav li:focus-within > .sub-menu { display: flex; }
.aln-btn--nav { margin-left: 6px; }

.nav-toggle { display: none; }

@media (max-width: 960px) {
	.site-brand__sub { display: none; }
	.nav-toggle {
		display: inline-flex; align-items: center; gap: 8px;
		background: none; border: 2px solid var(--navy); border-radius: 6px; color: var(--navy);
		font-family: var(--font-sign); font-weight: 700; font-size: 1rem; text-transform: uppercase; letter-spacing: .06em;
		padding: .45em .8em; cursor: pointer;
	}
	.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after { display: block; width: 18px; height: 2px; background: currentColor; position: relative; content: ""; }
	.nav-toggle__bars::before { position: absolute; top: -6px; }
	.nav-toggle__bars::after { position: absolute; top: 6px; }
	.site-nav {
		display: none; position: absolute; left: 0; right: 0; top: 100%;
		flex-direction: column; align-items: stretch; gap: 0;
		background: #fff; border-bottom: 4px solid var(--orange); padding: 8px 16px 16px; box-shadow: var(--shadow);
	}
	.nav-open .site-nav { display: flex; }
	.site-nav ul { flex-direction: column; }
	.site-nav a:not(.aln-btn) { padding: .75em .5em; border-bottom: 1px solid var(--line); border-radius: 0; }
	.site-nav .current-menu-item > a, .site-nav .current_page_item > a { box-shadow: inset 4px 0 0 var(--orange); padding-left: .9em; }
	.site-nav .sub-menu { display: flex; position: static; box-shadow: none; padding: 0 0 0 1em; }
	.aln-btn--nav { margin: 14px 0 0; text-align: center; }
}
@media (max-width: 420px) {
	.site-brand__name { font-size: 1.15rem; }
	.site-brand .custom-logo { max-height: 44px; }
}

/* ===== Hero ===== */
.aln-hero {
	position: relative; color: #fff;
	background: var(--navy-deep) var(--hero-img) center / cover no-repeat;
	isolation: isolate;
}
.aln-hero::before {
	content: ""; position: absolute; inset: 0; z-index: -1;
	background: linear-gradient(90deg, rgba(36,33,44,.92) 0%, rgba(36,33,44,.75) 40%, rgba(36,33,44,.15) 75%, rgba(36,33,44,0) 100%);
}
.aln-hero__inner { padding-top: clamp(64px, 10vw, 128px); padding-bottom: clamp(64px, 10vw, 128px); }
.aln-hero__eyebrow {
	display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
	font-family: var(--font-sign); font-weight: 600; text-transform: uppercase; letter-spacing: .1em; font-size: 1rem;
	color: var(--cream-2); margin: 0 0 18px;
}
.aln-hero__title {
	color: #fff; margin: 0 0 18px;
	font-size: clamp(3.2rem, 9vw, 6.5rem); line-height: .92; letter-spacing: .005em;
	text-shadow: 0 2px 30px rgba(0,0,0,.25);
}
.aln-hero__lede { font-size: clamp(1.1rem, 1.8vw, 1.3rem); max-width: 30em; color: #F1ECF5; margin-bottom: 28px; }
.aln-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }
@media (max-width: 700px) {
	.aln-hero { background-position: 70% center; }
	.aln-hero::before { background: linear-gradient(180deg, rgba(36,33,44,.65) 0%, rgba(36,33,44,.9) 100%); }
}

/* ===== Next-meeting card ===== */
.aln-meeting-band { margin-top: -44px; position: relative; z-index: 2; }
.aln-meeting {
	display: flex; gap: 22px; align-items: center;
	background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
	border-left: 8px solid var(--orange);
	padding: 20px 24px; margin: 1.5em 0;
}
.aln-meeting-band .aln-meeting { margin: 0; }
.aln-meeting__date {
	flex: none; width: 92px; text-align: center;
	background: var(--navy); color: #fff; border-radius: 8px; padding: 10px 0 12px;
	font-family: var(--font-sign); font-weight: 700; text-transform: uppercase; line-height: 1;
}
.aln-meeting__month { display: block; color: var(--orange-hot); font-size: 1.1rem; letter-spacing: .1em; }
.aln-meeting__day { display: block; font-size: 2.9rem; margin: 4px 0; }
.aln-meeting__dow { display: block; font-size: .95rem; letter-spacing: .12em; color: var(--cream-2); }
.aln-meeting__body p { margin: 0; }
.aln-eyebrow { font-family: var(--font-sign); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--orange-ink); font-size: .95rem; }
.aln-meeting__when { font-family: var(--font-sign); font-weight: 700; font-size: 1.6rem; color: var(--navy); line-height: 1.2; margin: 2px 0 4px !important; }
.aln-meeting__where { color: var(--muted); }
.aln-sep { margin: 0 .35em; }
.aln-meeting__note { margin-top: 6px !important; font-weight: 600; color: var(--navy); }
.aln-meeting__actions { margin-top: 12px !important; }
@media (max-width: 560px) {
	.aln-meeting { flex-direction: column; align-items: flex-start; gap: 14px; padding: 18px; }
	.aln-meeting__date { width: auto; display: flex; gap: 10px; align-items: baseline; padding: 8px 14px; }
	.aln-meeting__day { font-size: 1.6rem; margin: 0; }
}

/* ===== Page header ===== */
.aln-page-head {
	background: var(--navy); color: #fff;
	padding: clamp(36px, 6vw, 64px) 0 clamp(32px, 5vw, 52px);
	position: relative;
}
.aln-page-head::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px;
	background: repeating-linear-gradient(90deg, var(--orange) 0 48px, transparent 48px 60px);
}
.aln-page-head .aln-wrap { display: flex; align-items: center; gap: 16px; }
.aln-page-head__title { color: #fff; margin: 0; }

/* ===== Content ===== */
.site-main { min-height: 50vh; }
.entry-content { padding-top: 36px; padding-bottom: 64px; }
.entry-content > :first-child { margin-top: 0; }
.aln-lead { font-size: 1.25rem; line-height: 1.55; color: var(--navy); }
.entry-content ul:not(.aln-phones):not(.aln-links) { padding-left: 1.2em; }
.wp-block-embed iframe { border-radius: var(--radius); box-shadow: var(--shadow); }
.wp-block-image img { border-radius: var(--radius); }
.aln-framed img { box-shadow: var(--shadow); }
.wp-element-caption { font-size: .9rem; color: var(--muted); text-align: left; margin-top: .6em; }

.aln-callout {
	background: #fff; border-radius: var(--radius); border-top: 5px solid var(--orange);
	padding: 18px 24px 8px; margin: 1.6em 0; box-shadow: var(--shadow);
}
.aln-callout h3 { margin-top: 0; }
.aln-emergency {
	background: #FFF3E3; border: 1px solid #F2C894; border-radius: var(--radius);
	padding: 14px 20px 2px; margin: 1.5em 0;
}

.aln-admin-hint { background: #EEF4FF; border: 1px dashed #7A93C7; border-radius: 8px; padding: 10px 14px; font-size: .95rem; }

/* Home */
.aln-home-content { max-width: var(--wrap); padding-top: 56px; }
.aln-intro { gap: 40px !important; align-items: center !important; }
.aln-intro h2 { margin-top: 0; }
.aln-section-title { margin-top: 2.2em !important; }
.aln-section-title::after { content: ""; display: block; width: 64px; height: 5px; background: var(--orange); margin: 14px auto 0; border-radius: 3px; }
.aln-cards { gap: 22px !important; margin-top: 1.6em; }
.aln-cards > .wp-block-column {
	background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
	padding: 24px 24px 10px; border-top: 5px solid var(--navy);
}
.aln-cards h3 { margin-top: 0; }
.aln-cards a { font-weight: 700; text-decoration: none; }

.aln-upcoming { background: var(--cream-2); padding: 48px 0 56px; }
.aln-upcoming__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.aln-upcoming__head h2 { margin: 0 0 14px; }
.aln-upcoming__head a { font-weight: 700; }

/* Links & Resources */
.aln-resource-grid { gap: 40px !important; }
.aln-resource-grid h2 { font-size: 1.6rem; margin-top: 1.4em; padding-bottom: 6px; border-bottom: 3px solid var(--orange); }
.aln-resource-grid > .wp-block-column > h2:first-child { margin-top: 0; }
.aln-links, .aln-phones { list-style: none; padding: 0; margin: 0 0 1em; }
.aln-links li { padding: .55em 0 .55em 1.4em; border-bottom: 1px solid var(--line); position: relative; }
.aln-links li::before { content: ""; position: absolute; left: 0; top: 1.05em; width: 8px; height: 8px; background: var(--orange); border-radius: 2px; }
.aln-links a { font-weight: 600; }
.aln-phone-col { background: #fff; border-radius: var(--radius); padding: 22px 22px 10px; box-shadow: var(--shadow); align-self: flex-start; }
.aln-phones li { display: flex; justify-content: space-between; gap: 12px; padding: .55em 0; border-bottom: 1px solid var(--line); font-size: .98rem; }
.aln-phones li:last-child { border-bottom: 0; }
.aln-phones a { white-space: nowrap; font-weight: 700; color: var(--navy); text-decoration: none; }
.aln-phones a:hover { color: var(--orange-ink); text-decoration: underline; }
.page .entry-content:has(.aln-resource-grid) { max-width: var(--wrap); }

/* Calendar */
.aln-cal { margin: 1.5em 0; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px; }
.aln-cal iframe { display: block; width: 100%; border: 0; }
.aln-cal__agenda { display: none; }
@media (max-width: 700px) {
	.aln-cal__month { display: none; }
	.aln-cal__agenda { display: block; }
}
.page .entry-content:has(.aln-cal) { max-width: var(--wrap); }
.aln-cal-empty { background: #fff; border-radius: var(--radius); border: 2px dashed var(--line); padding: 24px; margin: 1.5em 0; }
.aln-subscribe { background: var(--navy); color: #fff; border-radius: var(--radius); padding: 22px 24px 10px; margin: 1.5em 0; }
.aln-subscribe__label { font-weight: 600; }
.aln-subscribe .aln-btn { margin: 0 6px 10px 0; }
.aln-subscribe .aln-btn--ghost { color: #fff; border-color: rgba(255,255,255,.7); }
.aln-subscribe .aln-btn--ghost:hover { background: #fff; color: var(--navy); }

/* Contact */
.aln-contact { margin: 1.4em 0 2em; }
.aln-contact__addr { color: var(--muted); margin-top: .6em; }

/* Details (meeting minutes pattern) */
.wp-block-details { background: #fff; border-radius: 8px; padding: 12px 18px; margin: 0 0 10px; box-shadow: var(--shadow); }
.wp-block-details summary { font-weight: 700; cursor: pointer; color: var(--navy); }

/* Blog fallback */
.aln-list-item { border-bottom: 1px solid var(--line); padding: 1em 0; }
.aln-list-item h2 { margin: 0 0 .2em; }
.aln-meta { color: var(--muted); font-size: .9rem; }

/* ===== Footer ===== */
.site-footer { background: var(--navy-deep); color: #D9D4DF; font-size: .97rem; }
.aln-rail { height: 10px; background: repeating-linear-gradient(90deg, var(--orange) 0 48px, var(--navy-deep) 48px 60px); }
.site-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-top: 52px; padding-bottom: 36px; }
.site-footer .custom-logo { max-height: 84px; width: auto; display: block; margin-bottom: 16px; }
.site-footer__title { color: #fff; font-size: 1.3rem; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 .7em; }
.site-footer a { color: var(--orange-hot); }
.site-footer a:hover { color: #fff; }
.site-footer__list, .site-footer__menu { list-style: none; padding: 0; margin: 0 0 1em; }
.site-footer__list li { padding: .2em 0; }
.site-footer__legal { border-top: 1px solid rgba(255,255,255,.12); padding-top: 18px; padding-bottom: 22px; font-size: .88rem; color: #A9A3B2; }
.site-footer__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; }
.site-footer__legal p { margin: 0; }
.site-footer__credit a { color: #A9A3B2; text-decoration: none; font-weight: 600; letter-spacing: .04em; }
.site-footer__credit a:hover { color: #fff; text-decoration: underline; }
@media (max-width: 800px) { .site-footer__grid { grid-template-columns: 1fr; gap: 28px; } }

/* WordPress alignment helpers */
.alignwide { max-width: var(--wrap); margin-left: auto; margin-right: auto; }
.alignfull { width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw); }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); }
