/*
Theme Name: Historical Sudbury
Theme URI: https://fenwaycreative.com/
Author: Fenway Creative
Author URI: https://fenwaycreative.com/
Description: A one-page landing theme for Historical Sudbury (Sudbury, Massachusetts). Every section is editable in Appearance → Customize, and historic sites are managed under Historic Places.
Version: 1.4.0
Requires at least: 6.0
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: historical-sudbury
*/

:root {
	--hs-primary: #2F4A3A;
	--hs-accent: #8A2F1F;
	--hs-ink: #1F2A2E;
	--hs-paper: #F5F0E6;
	--hs-surface: #FBF8F2;
	--hs-rule: #D9CFBD;
	--hs-muted: #4A5458;
	--hs-on-dark: #FBF8F2;
	--hs-on-dark-muted: #E9E3D6;
	--hs-serif: 'Libre Caslon Text', Georgia, 'Times New Roman', serif;
	--hs-sans: 'Source Sans 3', 'Helvetica Neue', Arial, sans-serif;
	--hs-wrap: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
	margin: 0;
	background: var(--hs-paper);
	color: var(--hs-ink);
	font-family: var(--hs-sans);
	font-size: 18px;
	line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--hs-accent); }
a:hover { filter: brightness(0.8); }
:focus-visible { outline: 3px solid #E0A83A; outline-offset: 3px; }
h1, h2, h3 { font-family: var(--hs-serif); font-weight: 400; margin: 0; line-height: 1.12; }
p { margin: 0; }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link:focus {
	position: fixed; top: 8px; left: 8px; z-index: 1000; width: auto; height: auto; clip: auto;
	background: var(--hs-surface); color: var(--hs-ink); padding: 12px 18px; border-radius: 4px;
}

.hs-wrap { max-width: var(--hs-wrap); margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.hs-eyebrow { font-size: 14px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 700; color: var(--hs-accent); }
.hs-muted { color: var(--hs-muted); }

/* Buttons */
.hs-btn {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 52px; padding: 0 28px; border-radius: 4px;
	font-family: var(--hs-sans); font-size: 17px; font-weight: 700; text-decoration: none;
	border: 1.5px solid transparent; cursor: pointer; line-height: 1.2;
}
.hs-btn:hover { filter: none; opacity: 0.9; }
.hs-btn--lg { min-height: 56px; padding: 0 32px; font-size: 18px; }
.hs-btn--accent { background: var(--hs-accent); color: var(--hs-on-dark); }
.hs-btn--ink { background: var(--hs-ink); color: var(--hs-on-dark); }
.hs-btn--light { background: var(--hs-surface); color: var(--hs-primary); }
.hs-btn--outline { border-color: var(--hs-ink); color: var(--hs-ink); background: transparent; }
.hs-btn--outline-light { border-color: var(--hs-on-dark); color: var(--hs-on-dark); background: transparent; }
.hs-btns { display: flex; flex-wrap: wrap; gap: 14px; }

/* Header */
.hs-header { background: var(--hs-primary); color: var(--hs-on-dark); }
.hs-header__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 22px; padding-bottom: 22px; }
.hs-brand { display: flex; flex-direction: column; line-height: 1.1; color: var(--hs-on-dark); text-decoration: none; }
.hs-brand:hover { filter: none; }
.hs-brand__name { font-family: var(--hs-serif); font-size: 26px; font-weight: 700; letter-spacing: -0.01em; }
.hs-brand__tag { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: #D9E2D6; font-weight: 600; }
.hs-brand img { max-height: 64px; width: auto; }
.hs-nav__toggle { display: none; }
.hs-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }
.hs-nav a { color: var(--hs-on-dark); text-decoration: none; font-size: 16px; font-weight: 600; display: inline-flex; align-items: center; min-height: 44px; }
.hs-nav li:last-child a { background: var(--hs-surface); color: var(--hs-primary); padding: 0 20px; border-radius: 4px; }

/* Hero */
.hs-hero { background: var(--hs-primary); color: var(--hs-on-dark); }
.hs-hero__inner { display: flex; flex-wrap: wrap; gap: 64px; align-items: center; padding-top: 72px; padding-bottom: 96px; }
.hs-hero__copy { flex: 1 1 500px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.hs-hero .hs-eyebrow { color: #E6D9C2; }
.hs-hero h1 { font-size: clamp(46px, 6.4vw, 84px); line-height: 1.02; letter-spacing: -0.02em; }
.hs-hero__text { font-size: 21px; color: var(--hs-on-dark-muted); max-width: 30em; }
.hs-hero__figure { flex: 1 1 400px; min-width: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.hs-hero__figure img { border-radius: 6px; width: 100%; object-fit: cover; }
.hs-hero__figure svg { width: 100%; height: auto; display: block; }
.hs-hero__figure figcaption { font-size: 14px; color: #D9E2D6; text-align: center; }

/* Milestones */
.hs-milestones { background: var(--hs-surface); border-bottom: 1px solid var(--hs-rule); }
.hs-milestones__inner { display: flex; flex-wrap: wrap; gap: 20px 40px; justify-content: space-between; padding-top: 32px; padding-bottom: 32px; }
.hs-milestone { flex: 1 1 200px; display: flex; flex-direction: column; }
.hs-milestone__year { font-family: var(--hs-serif); font-size: 34px; line-height: 1.1; }
.hs-milestone__label { font-size: 15px; color: var(--hs-muted); }

/* Event */
.hs-event { padding-top: 88px; }
.hs-event__card { background: var(--hs-surface); border: 1px solid var(--hs-rule); border-radius: 8px; padding: 40px; display: flex; flex-wrap: wrap; gap: 32px; align-items: center; justify-content: space-between; }
.hs-event__copy { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.hs-event__copy h2, .hs-event__copy h3 { font-size: 34px; line-height: 1.15; }
.hs-events__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 24px; margin-bottom: 16px; }
.hs-events__head h2 { font-family: var(--hs-sans); font-size: 14px; line-height: 1.6; }
.hs-events__head a { font-weight: 700; font-size: 16px; }
.hs-events { display: flex; flex-direction: column; gap: 16px; }
.hs-event__meta { font-size: 16px; font-weight: 600; color: var(--hs-ink); }
.hs-event__dates { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hs-date { width: 128px; border: 1.5px solid var(--hs-ink); border-radius: 6px; display: flex; flex-direction: column; align-items: center; padding: 12px 0; }
.hs-date__month { font-size: 13px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.hs-date__days { font-family: var(--hs-serif); font-size: 40px; line-height: 1.1; }

/* Section heads */
.hs-section { padding-top: 96px; padding-bottom: 96px; }
.hs-section--band { background: var(--hs-surface); border-top: 1px solid var(--hs-rule); border-bottom: 1px solid var(--hs-rule); }
.hs-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 40px; }
.hs-head__copy { display: flex; flex-direction: column; gap: 12px; max-width: 720px; }
.hs-h2 { font-size: clamp(34px, 4vw, 48px); }

/* Places */
.hs-places { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 20px; }
.hs-place { background: var(--hs-surface); border: 1px solid var(--hs-rule); border-radius: 8px; padding: 28px; display: flex; flex-direction: column; gap: 6px; color: var(--hs-ink); text-decoration: none; }
a.hs-place:hover { filter: none; border-color: var(--hs-ink); }
.hs-place__where { font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700; color: var(--hs-muted); }
.hs-place__title { font-family: var(--hs-serif); font-size: 24px; line-height: 1.2; }
.hs-place__text { font-size: 16px; color: var(--hs-muted); }
.hs-place__more { margin-top: auto; padding-top: 8px; font-weight: 700; font-size: 16px; }
.hs-place--featured { grid-row: span 2; background: var(--hs-ink); border-color: var(--hs-ink); color: var(--hs-on-dark); padding: 36px; gap: 12px; }
.hs-place--featured .hs-place__where { color: #E6D9C2; }
.hs-place--featured .hs-place__title { font-size: 30px; }
.hs-place--featured .hs-place__text { color: var(--hs-rule); font-size: 18px; }
.hs-place__img { border-radius: 4px; margin-bottom: 10px; aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.hs-empty { padding: 28px; border: 1.5px dashed var(--hs-rule); border-radius: 8px; color: var(--hs-muted); }

/* Hosmer */
.hs-split { display: flex; flex-wrap: wrap; gap: 64px; align-items: stretch; }
.hs-split__main { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.hs-split__side { flex: 1 1 360px; min-width: 0; }
.hs-quote { font-family: var(--hs-serif); font-style: italic; font-size: 24px; line-height: 1.4; }
.hs-stat { background: var(--hs-primary); color: var(--hs-on-dark); border-radius: 8px; padding: 40px; display: flex; flex-direction: column; gap: 16px; height: 100%; }
.hs-stat__num { font-family: var(--hs-serif); font-size: 88px; line-height: 0.9; }
.hs-stat__lead { font-family: var(--hs-serif); font-size: 24px; line-height: 1.3; }
.hs-stat__sub { color: var(--hs-on-dark-muted); font-size: 17px; }
.hs-stat a { margin-top: auto; color: var(--hs-on-dark); font-weight: 700; min-height: 44px; display: inline-flex; align-items: center; }
.hs-stat img { border-radius: 4px; }

/* Preservation / links */
.hs-links-head { font-family: var(--hs-sans); font-size: 15px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--hs-muted); margin-bottom: 12px; font-weight: 700; }
.hs-links { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hs-rule); }
.hs-links a { min-height: 56px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--hs-rule); color: var(--hs-ink); text-decoration: none; font-weight: 600; }
.hs-links a::after { content: "›"; color: var(--hs-accent); font-size: 22px; }
.hs-links a:hover { filter: none; color: var(--hs-accent); }

/* Signup */
.hs-signup { padding-bottom: 96px; }
.hs-signup__card { background: var(--hs-surface); border: 1px solid var(--hs-rule); border-radius: 8px; padding: 48px; display: flex; flex-wrap: wrap; gap: 40px; align-items: center; }
.hs-signup__copy { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.hs-signup__copy h2 { font-size: clamp(30px, 3.4vw, 40px); line-height: 1.15; }
.hs-signup__form { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.hs-fields { display: flex; flex-wrap: wrap; gap: 14px; }
.hs-field { flex: 1 1 180px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.hs-field--wide { flex: 2 1 240px; }
.hs-field label { font-size: 15px; font-weight: 600; }
.hs-field label span { font-weight: 400; color: var(--hs-muted); }
.hs-field input { min-height: 52px; padding: 0 16px; font: inherit; font-size: 17px; color: var(--hs-ink); background: #fff; border: 1.5px solid #8C8574; border-radius: 4px; width: 100%; }
.hs-signup__foot { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; font-size: 14px; color: var(--hs-muted); }
.hs-hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }
.hs-notice { font-size: 16px; padding: 12px 16px; border-radius: 4px; border: 1px solid; }
.hs-notice--ok { background: #E6F0E8; color: #1E3A28; border-color: #9FC2A8; }
.hs-notice--error { background: #F8E5E1; color: #6B1E12; border-color: #E0A598; }
.hs-admin-note { font-size: 14px; background: #FFF4D6; color: #5A4500; border: 1px solid #E8D28A; padding: 10px 14px; border-radius: 4px; }

/* Visit CTA */
.hs-cta { background: var(--hs-primary); color: var(--hs-on-dark); }
.hs-cta__inner { padding-top: 104px; padding-bottom: 104px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 24px; }
.hs-cta h2 { font-size: clamp(38px, 5vw, 64px); line-height: 1.08; max-width: 14em; }
.hs-cta__text { font-size: 20px; color: var(--hs-on-dark-muted); max-width: 34em; }
.hs-cta .hs-btns { justify-content: center; margin-top: 8px; }
.hs-cta__small { margin-top: 24px; font-size: 16px; color: #D9E2D6; }
.hs-cta__small a { color: var(--hs-on-dark); font-weight: 700; }

/* Footer */
.hs-footer { background: var(--hs-ink); color: var(--hs-rule); }
.hs-footer__inner { padding-top: 40px; padding-bottom: 40px; display: flex; flex-wrap: wrap; gap: 16px 40px; justify-content: space-between; align-items: center; font-size: 15px; }
.hs-footer__name { font-family: var(--hs-serif); color: var(--hs-on-dark); font-size: 20px; }
.hs-footer__links { display: flex; flex-wrap: wrap; gap: 8px 24px; list-style: none; margin: 0; padding: 0; }
.hs-footer a { color: var(--hs-on-dark); }

/* Generic content pages */
.hs-content { padding-top: 72px; padding-bottom: 96px; }
.hs-content .hs-wrap { max-width: 760px; }
.hs-content h1 { font-size: clamp(36px, 5vw, 56px); margin-bottom: 24px; }
.hs-content .entry-content > * + * { margin-top: 1em; }
.hs-content .entry-content img { border-radius: 6px; }
.hs-post + .hs-post { margin-top: 56px; padding-top: 56px; border-top: 1px solid var(--hs-rule); }

/* Phones and small tablets */
@media (max-width: 760px) {
	.hs-header__inner { position: relative; padding-top: 16px; padding-bottom: 16px; }
	.hs-nav.is-ready .hs-nav__toggle {
		display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px;
		background: transparent; color: var(--hs-on-dark); border: 1.5px solid var(--hs-on-dark);
		border-radius: 4px; font: inherit; font-size: 16px; font-weight: 600; cursor: pointer;
	}
	.hs-nav__toggle svg { width: 18px; height: 18px; }
	.hs-nav.is-ready ul { display: none; }
	.hs-nav.is-open ul {
		display: flex; flex-direction: column; align-items: stretch; gap: 0;
		position: absolute; left: 0; right: 0; top: 100%; z-index: 50;
		background: var(--hs-primary); padding: 8px 24px 20px; border-top: 1px solid rgba(255,255,255,0.15);
	}
	.hs-nav.is-open a { min-height: 52px; border-bottom: 1px solid rgba(255,255,255,0.12); }
	.hs-nav.is-open li:last-child a { justify-content: center; margin-top: 12px; border-bottom: 0; }
	.hs-brand__name { font-size: 22px; }
	.hs-hero__inner { gap: 40px; padding-top: 40px; padding-bottom: 64px; }
	.hs-hero h1 { font-size: clamp(38px, 10vw, 56px); }
	.hs-hero__text, .hs-cta__text { font-size: 18px; }
	.hs-hero .hs-btn, .hs-cta .hs-btn { flex: 1 1 100%; }
	.hs-milestone { flex-basis: 40%; }
	.hs-milestone__year { font-size: 28px; }
	.hs-event { padding-top: 56px; }
	.hs-event__copy h2, .hs-event__copy h3 { font-size: 28px; }
	.hs-date { width: auto; flex: 1 1 110px; }
	.hs-event__dates .hs-btn { flex: 1 1 100%; }
	.hs-section { padding-top: 64px; padding-bottom: 64px; }
	.hs-head { margin-bottom: 28px; }
	.hs-split { gap: 40px; }
	.hs-quote { font-size: 21px; }
	.hs-stat__num { font-size: 68px; }
	.hs-event__card, .hs-signup__card, .hs-stat { padding: 28px 22px; }
	.hs-place--featured { grid-row: auto; padding: 28px; }
	.hs-signup { padding-bottom: 64px; }
	.hs-signup__foot .hs-btn { flex: 1 1 100%; }
	.hs-cta__inner { padding-top: 72px; padding-bottom: 72px; }
	.hs-footer__inner { flex-direction: column; align-items: flex-start; }
}
