/*
Theme Name: Sacramento Faire
Theme URI: https://example.test/sacramento-faire
Author: Renaissance Productions
Description: Classic theme for the Sacramento Renaissance Faire homepage, built from the "Sacramento Homepage" design handoff.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sacramento-faire
*/

/* ------------------------------------------------------------------ *
 * Design tokens (from the handoff README)
 * ------------------------------------------------------------------ */
:root {
	--forest: #123220;
	--forest-deep: #0E2616;
	--ink-green: #1F3A26;
	--gold: #C2954B;
	--gold-light: #E3C27A;
	--gold-pale: #F1D894;
	--bronze: #8E6224;
	--gold-shadow: #6E5426;
	--band-gold: #C9974A;
	--band-gold-soft: #C9A56A;
	--burgundy: #5A0A16;
	--burgundy-hover: #6E0F1D;
	--burgundy-deep: #460710;
	--parchment: #F2E5CF;
	--parchment-aged: #DBC39F;
	--cream: #F3E3C0;
	--cream-soft: #F5E7D5;
	--sepia: #3A2E22;
	--logo-gold: #EBD3A0;
	--logo-gold-2: #E3C88E;
	--tickets-ink: #1E2A14;

	--font-inscription: 'Cinzel', serif;
	--font-display: 'Cormorant Garamond', serif;
	--font-body: 'EB Garamond', Georgia, serif;

	--fs-h1: clamp(3rem, 5.5vw, 4.75rem);
	--fs-h2: 2.75rem;
	--fs-h3: 1.6875rem;
	--fs-nav: 1.25rem;
	--fs-lead: 1.125rem;
	--fs-body: 1rem;
	--fs-eyebrow: .8125rem;

	--container: 1244px;
	--header-inner: 1340px;
	--gutter: 32px;
	--card-gap: 24px;
}

/* ------------------------------------------------------------------ *
 * Base
 * ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--parchment);
	color: var(--sepia);
	font-family: var(--font-body);
	font-size: var(--fs-body);
	line-height: 1.4;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}
.site-main { flex: 1 0 auto; }
img { max-width: 100%; height: auto; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-light); }
:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	white-space: nowrap;
}
.skip-link:focus {
	clip: auto; clip-path: none;
	width: auto; height: auto;
	left: 8px; top: 8px; z-index: 100;
	padding: 8px 14px;
	background: var(--parchment); color: var(--ink-green);
}

/* ------------------------------------------------------------------ *
 * Header
 * ------------------------------------------------------------------ */
.site-header {
	position: relative;
	z-index: 2;
	background: linear-gradient(180deg, var(--forest) 0%, var(--forest-deep) 100%);
	border-bottom: 2px solid var(--gold);
	box-shadow: 0 2px 0 var(--gold-shadow);
}
.site-header__oak {
	position: absolute;
	top: 0;
	height: 92px;
	width: auto;
	pointer-events: none;
	opacity: .85;
}
.site-header__oak--left { left: 0; }
.site-header__oak--right { right: 0; }

.site-header__inner {
	position: relative;
	max-width: calc(var(--header-inner) + 2 * var(--gutter));
	min-height: 92px;
	margin: 0 auto;
	padding: 12px var(--gutter);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 32px;
	flex-wrap: wrap;
}

.brand {
	display: flex;
	align-items: center;
	gap: 18px;
	color: var(--logo-gold);
}
.brand:hover { color: var(--logo-gold); }
.brand__mark { width: 58px; height: auto; flex: none; filter: drop-shadow(0 1px 1px rgba(0,0,0,.4)); }
.brand__wordmark { display: flex; flex-direction: column; align-items: center; line-height: 1; }
.brand__line1 {
	font-family: var(--font-inscription);
	font-weight: 600;
	font-size: 36px;
	letter-spacing: .02em;
	color: var(--logo-gold);
	text-transform: uppercase;
	text-shadow: 0 1px 2px rgba(0,0,0,.45);
}
.brand__line2 {
	margin-top: 4px;
	font-family: var(--font-inscription);
	font-weight: 500;
	font-size: 21.5px;
	letter-spacing: .07em;
	color: var(--logo-gold-2);
	text-transform: uppercase;
	text-shadow: 0 1px 2px rgba(0,0,0,.45);
}

.site-nav { margin-left: auto; margin-right: 13px; }
.site-nav__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px 39px;
	font-family: var(--font-body);
	font-weight: 500;
	font-size: 19px;
}
.site-nav__list a {
	display: block;
	color: var(--parchment);
	padding: 4px 0 4px;
	border-bottom: 2px solid transparent;
}
.site-nav__list a:hover { color: var(--gold-light); }
.site-nav__list .current-menu-item > a,
.site-nav__list .current_page_item > a,
.site-nav__list .current-menu-ancestor > a {
	color: var(--gold-light);
	border-bottom-color: var(--gold);
}

.btn-tickets {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	width: 180px;
	height: 54px;
	flex: none;
	background: linear-gradient(180deg, #E0BC72 0%, var(--gold) 55%, #A57A34 100%);
	border: 1px solid var(--gold-pale);
	box-shadow: inset 0 0 0 3px rgba(110,84,38,.35), 0 2px 6px rgba(0,0,0,.35);
	font-family: var(--font-inscription);
	font-weight: 700;
	font-size: 18px;
	letter-spacing: .14em;
	color: var(--tickets-ink);
	text-transform: uppercase;
	line-height: 1;
	padding-bottom: 2px;
}
.btn-tickets:hover { color: var(--tickets-ink); filter: brightness(1.06); }
.btn-tickets__label { padding-left: .14em; }
.btn-tickets__rule {
	display: flex;
	align-items: center;
	width: 132px;
	height: 6px;
	gap: 6px;
}
.btn-tickets__rule::before,
.btn-tickets__rule::after {
	content: "";
	flex: 1;
	height: 1px;
	background: rgba(30,42,20,.55);
}
.btn-tickets__rule i {
	width: 5px; height: 5px;
	background: rgba(30,42,20,.7);
	transform: rotate(45deg);
}

/* ------------------------------------------------------------------ *
 * Hero
 * ------------------------------------------------------------------ */
.hero {
	position: relative;
	min-height: 403px;
	background: var(--forest-deep);
	display: flex;
	justify-content: flex-end;
	align-items: center;
	overflow: hidden;
}
.hero__photo {
	position: absolute;
	left: 0; top: 0; bottom: 0;
	width: 65%;
	background: var(--hero-image) left center / cover no-repeat;
	-webkit-mask-image: linear-gradient(90deg, #000 80%, transparent 100%);
	        mask-image: linear-gradient(90deg, #000 80%, transparent 100%);
}
/* Mirrored copy of the photo gives the right-hand side the foliage texture
   the reference shows behind the copy (the supplied hero.png is cropped). */
.hero__photo--echo {
	left: auto; right: 0;
	width: 42%;
	transform: scaleX(-1);
	background-size: auto 170%;
	background-position: -900px 8%;
	opacity: .7;
	filter: blur(3px) saturate(.85);
	-webkit-mask-image: linear-gradient(90deg, #000 75%, transparent 100%);
	        mask-image: linear-gradient(90deg, #000 75%, transparent 100%);
}
.hero__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(14,38,22,0) 57%, rgba(14,38,22,.5) 66%, rgba(14,38,22,.6) 80%, rgba(14,38,22,.42) 100%);
}
.hero__corner {
	position: absolute;
	top: 0; right: 0;
	width: 86px; height: auto;
	pointer-events: none;
}
.hero__copy {
	position: relative;
	width: min(440px, 100%);
	margin-right: max(6.95vw, 24px);
	padding: 26px 0 28px;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 14px;
}

.rule { display: flex; align-items: center; gap: 10px; width: 100%; }
.rule__line { flex: 1; height: 1px; background: var(--gold); }
.rule--crest { width: 100%; }
.rule--crest .rule__line { position: relative; }
.rule--crest .rule__line:first-child::before,
.rule--crest .rule__line:last-child::after {
	content: ""; position: absolute; top: -2px;
	width: 5px; height: 5px; background: var(--gold); transform: rotate(45deg);
}
.rule--crest .rule__line:first-child::before { left: -2px; }
.rule--crest .rule__line:last-child::after { right: -2px; }
.rule__fleur { width: 18px; height: auto; filter: drop-shadow(0 1px 1px rgba(0,0,0,.5)); }
.rule--short { width: 72%; }
.rule__diamond { width: 6px; height: 6px; background: var(--gold); transform: rotate(45deg); }

.hero__title {
	margin: 4px -24px 0;
	max-width: none;
	font-family: var(--font-display);
	font-weight: 700;
	font-size: var(--fs-h1);
	line-height: .87;
	color: var(--cream);
	background: linear-gradient(180deg, #FFF6DC 0%, #F3E3C0 38%, #E2C489 72%, #C9A262 100%);
	-webkit-background-clip: text;
	        background-clip: text;
	-webkit-text-fill-color: transparent;
	filter: drop-shadow(0 2px 6px rgba(0,0,0,.55));
}
.hero__tagline {
	margin: 0;
	font-family: var(--font-inscription);
	font-weight: 500;
	font-size: 19px;
	letter-spacing: .17em;
	color: var(--cream);
	text-transform: uppercase;
	text-shadow: 0 1px 4px rgba(0,0,0,.6);
}
.hero__lead {
	margin: 0;
	font-size: 19.5px;
	color: var(--cream-soft);
	text-shadow: 0 1px 4px rgba(0,0,0,.6);
}

.btn-cta {
	margin-top: 6px;
	display: inline-flex;
	align-items: center;
	gap: 14px;
	padding: 16px 34px 16px 36px;
	background: var(--burgundy);
	border: 2px solid var(--gold);
	box-shadow: inset 0 0 0 3px var(--burgundy), inset 0 0 0 4px rgba(194,149,75,.5), 0 3px 8px rgba(0,0,0,.35);
	font-family: var(--font-inscription);
	font-weight: 600;
	font-size: 15px;
	letter-spacing: .11em;
	color: var(--cream);
	text-transform: uppercase;
	line-height: 1.2;
}
.btn-cta:hover { background: var(--burgundy-hover); color: var(--cream); box-shadow: inset 0 0 0 3px var(--burgundy-hover), inset 0 0 0 4px rgba(194,149,75,.5), 0 3px 8px rgba(0,0,0,.35); }
.btn-cta img { width: 16px; height: auto; }

/* ------------------------------------------------------------------ *
 * Step Into the Story
 * ------------------------------------------------------------------ */
.story {
	position: relative;
	background: radial-gradient(ellipse 70% 90% at 50% 45%, #F5EAD6 0%, var(--parchment) 55%, #E8D5B4 100%);
	padding: 14px var(--gutter) 20px;
	overflow: hidden;
}
.story__oak {
	position: absolute;
	top: 0;
	height: 100%;
	max-height: 440px;
	width: auto;
	max-width: none;
	pointer-events: none;
}
.story__oak--left { left: 0; }
.story__oak--right { right: 0; }
.story__inner {
	position: relative;
	max-width: var(--container);
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
}
.story__head { display: flex; flex-direction: column; align-items: center; gap: 0; text-align: center; }
.story__title-row { display: flex; align-items: center; justify-content: center; gap: 14px; }
.story__flourish { width: 104px; height: auto; flex: none; }
.story__title {
	margin: 0;
	font-family: var(--font-display);
	font-weight: 700;
	font-size: var(--fs-h2);
	line-height: 1.1;
	color: var(--ink-green);
}
.story__intro { margin: 0; font-size: 19.5px; color: var(--sepia); }

/* Flex-wrap (rather than the handoff's auto-fit grid) so a lone third card
   centres on tablet widths instead of sitting left under two cards. */
.cards {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--card-gap);
	width: 100%;
}
.cards > .card { flex: 1 1 260px; max-width: 400px; }
.card {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 6px;
	color: var(--sepia);
}
.card:hover { color: var(--sepia); }
.card__image {
	display: block;
	width: 100%;
	aspect-ratio: 397 / 170;
	background: var(--ink-green) center / cover no-repeat;
	border: 1px solid var(--parchment-aged);
	transition: filter .2s ease;
}
.card:hover .card__image { filter: brightness(1.06); }
.card__title-row { display: flex; align-items: center; gap: 14px; margin-top: 7px; }
.card__title {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: var(--fs-h3);
	line-height: 1.1;
	color: var(--ink-green);
}
.card__arrow {
	width: 26px; height: 26px;
	flex: none;
	border: 1.5px solid var(--ink-green);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--ink-green);
	transition: background .2s ease, color .2s ease;
}
.card:hover .card__arrow { background: var(--ink-green); color: var(--parchment); }
.card__text {
	display: block;
	max-width: 300px;
	font-size: 17.5px;
	line-height: 1.22;
	text-wrap: pretty;
}

/* ------------------------------------------------------------------ *
 * Burgundy announcement band (footer)
 * ------------------------------------------------------------------ */
.band {
	position: relative;
	overflow: hidden;
	background: radial-gradient(ellipse at center, #6A0E1C 0%, #4C0712 100%);
	border-top: 2px solid var(--gold-shadow);
	padding: 25px var(--gutter) 24px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 9px;
	text-align: center;
}
.band__oak {
	position: absolute;
	top: 0;
	height: 100%;
	width: auto;
	max-width: none;
	opacity: .7;
	pointer-events: none;
}
.band__oak--left { left: 0; }
.band__oak--right { right: 0; }
.band__row { position: relative; display: flex; align-items: center; justify-content: center; gap: 22px; }
.band__fleur { width: 28px; height: auto; flex: none; }
.band__title {
	margin: 0;
	font-family: var(--font-inscription);
	font-weight: 500;
	font-size: clamp(17px, 1.5vw, 23.5px);
	letter-spacing: .06em;
	line-height: 1.2;
	color: var(--band-gold);
	text-transform: uppercase;
	text-shadow: 0 1px 2px rgba(0,0,0,.45);
}
.band__sub {
	position: relative;
	margin: 0;
	font-family: var(--font-inscription);
	font-weight: 400;
	font-size: 12px;
	letter-spacing: .3em;
	color: var(--band-gold-soft);
	text-transform: uppercase;
	white-space: pre-wrap;
}

/* ------------------------------------------------------------------ *
 * Interior pages (page.php / index.php)
 * ------------------------------------------------------------------ */
.page-main {
	position: relative;
	overflow: hidden;
	min-height: 60vh;
	padding: 48px var(--gutter) 64px;
	background: var(--parchment);
}
.page-article {
	position: relative;
	max-width: 760px;
	margin: 0 auto;
	padding: 40px 48px 48px;
	background: rgba(255, 250, 238, .55);
	border: 1px solid var(--parchment-aged);
	box-shadow: inset 0 0 0 4px var(--parchment), inset 0 0 0 5px rgba(194,149,75,.45);
}
.page-article__head { margin-bottom: 24px; }
.entry-content { font-size: var(--fs-lead); line-height: 1.6; color: var(--sepia); }
.entry-content h2, .entry-content h3 { font-family: var(--font-display); color: var(--ink-green); line-height: 1.15; }
.entry-content h2 { font-size: 2rem; }
.entry-content h3 { font-size: var(--fs-h3); }
.entry-content a { color: var(--burgundy); text-decoration: underline; text-underline-offset: 3px; }
.entry-content a:hover { color: var(--burgundy-hover); }
.entry-content img { border: 1px solid var(--parchment-aged); }
.page-article__soon { text-align: center; font-style: italic; }
.post-summary + .post-summary { margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--parchment-aged); }
.post-summary h2 a { color: var(--ink-green); text-decoration: none; }

/* ------------------------------------------------------------------ *
 * Responsive
 * ------------------------------------------------------------------ */
@media (max-width: 1240px) {
	.site-header__inner { justify-content: center; row-gap: 14px; }
	.site-nav { margin-left: 0; }
	.site-header__oak { display: none; }
}
@media (max-width: 1100px) {
	.hero__photo { width: 100%; -webkit-mask-image: none; mask-image: none; }
	.hero__photo--echo, .hero__corner { display: none; }
	.hero__overlay { background: linear-gradient(90deg, rgba(14,38,22,.1) 0%, rgba(14,38,22,.6) 45%, rgba(14,38,22,.85) 75%); }
}
@media (max-width: 760px) {
	:root { --gutter: 16px; --fs-h2: 2.125rem; }
	.site-header__inner { padding-top: 14px; padding-bottom: 14px; gap: 14px; }
	.brand__mark { width: 44px; }
	.brand__line1 { font-size: 28px; }
	.brand__line2 { font-size: 16px; }
	.site-nav { width: 100%; }
	.site-nav__list { justify-content: center; gap: 4px 20px; font-size: 18px; }
	.hero { min-height: 0; justify-content: center; }
	.hero__photo { background-position: 30% center; }
	.hero__overlay { background: linear-gradient(180deg, rgba(14,38,22,.35) 0%, rgba(14,38,22,.78) 55%, rgba(14,38,22,.9) 100%); }
	.hero__copy { width: 100%; margin: 0; padding: 40px var(--gutter) 44px; }
	.rule--crest { width: 100%; }
	.story { padding-top: 24px; padding-bottom: 32px; }
	.hero__title { margin: 4px 0 0; }
	.hero__tagline { font-size: 15px; letter-spacing: .12em; }
	.story__oak { top: 0; height: auto; width: 96px; opacity: .55; }
	.band { padding-left: 20px; padding-right: 20px; }
	.band__fleur { display: none; }
	.band__title { font-size: 17px; letter-spacing: .05em; text-wrap: balance; }
	.band__sub { font-size: 11px; line-height: 1.7; white-space: normal; text-wrap: balance; }
	.story__flourish { width: 56px; }
	.story__title-row { gap: 10px; }
	.story__intro { font-size: 17px; }
	.card__text br { display: none; }
	.band__sub { letter-spacing: .16em; }
	.page-article { padding: 28px 20px 32px; }
}
@media (max-width: 420px) {
	.story__flourish { display: none; }
	.btn-cta { padding: 14px 22px; letter-spacing: .1em; }
}
