/*
Theme Name: A&B Optical Thanksgiving
Description: A custom block theme scaffolded by Studio Code.
Requires at least: 6.7
Tested up to: 6.9
Requires PHP: 7.2
Version: 0.1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: abo-thanksgiving
Tags: full-site-editing, block-patterns, block-styles, wide-blocks, accessibility-ready, style-variations
*/

/* WordPress inserts a margin-block-start equal to the block gap (24px unless
   theme.json sets styles.spacing.blockGap) between the template's top-level
   sections (header part, main, footer part) — a gap that exists even when no
   markup asks for it. Zero it so sections butt edge-to-edge and own their
   vertical rhythm via padding; this does not affect block gaps inside nested
   layouts. */
.wp-site-blocks > * + * {
	margin-block-start: 0;
}

/* With that gap gone, main carries its own vertical padding so templates this
   theme does not author (WooCommerce shop, product, cart…) still clear the
   header and footer. A descendant selector, not a child one: WooCommerce wraps
   the single-product main in an extra group. Templates built from full-bleed
   sections opt out with is-flush and let the sections own the rhythm. */
.wp-site-blocks main {
	padding-block: var(--wp--preset--spacing--60) var(--wp--preset--spacing--70);
}
.wp-site-blocks main.is-flush {
	padding-block: 0;
}

/* ------------------------------------------------------------------ */
/* Thanksgiving design system —— warm cocoa, harvest gold, ember       */
/* ------------------------------------------------------------------ */
:root{
	--abo-cocoa:var(--wp--preset--color--primary);
	--abo-umber:var(--wp--preset--color--panel);
	--abo-cream:var(--wp--preset--color--text);
	--abo-gold:var(--wp--preset--color--accent);
	--abo-ember:var(--wp--preset--color--accent2);
	--abo-wheat:var(--wp--preset--color--muted);
	--abo-secondary:var(--wp--preset--color--secondary);
	--abo-rule:var(--wp--preset--color--rule);
	--abo-serif:var(--wp--preset--font-family--cormorant-garamond, Georgia, serif);
	--abo-sans:var(--wp--preset--font-family--albert-sans, system-ui, sans-serif);
}

/* The shared page content carries a Halloween "Monsters of the Night"
   band (right for that theme, wrong here). Hide it under Thanksgiving. */
body.wp-theme-abo-thanksgiving .abo-monster-band{
	display:none;
}

/* --- Header -------------------------------------------------------- */
.abo-header-wrap{
	position:sticky;
	top:0;
	z-index:50;
	background:var(--abo-cocoa);
	border-bottom:1px solid var(--abo-rule);
}
.abo-header{
	align-items:center;
	gap:1.5rem;
}
.abo-wordmark{
	font-family:var(--abo-serif);
	font-size:1.8rem;
	font-weight:500;
	line-height:1;
	letter-spacing:0.01em;
	margin:0;
}
.abo-nav{
	align-items:center;
}
.abo-nav-link{
	margin:0;
	font-size:0.82rem;
	letter-spacing:0.06em;
	text-transform:uppercase;
	color:var(--abo-secondary);
}
.abo-nav-link a{
	color:inherit;
	text-decoration:none;
	padding:0.35rem 0.2rem;
	display:inline-block;
}
.abo-nav-link a:hover{
	color:var(--abo-gold);
}
.abo-phone{
	margin:0;
}
.abo-phone a{
	display:inline-block;
	background:var(--abo-gold);
	color:var(--abo-cocoa);
	padding:0.6rem 1.3rem;
	border-radius:4px;
	font-size:0.78rem;
	font-weight:500;
	letter-spacing:0.08em;
	white-space:nowrap;
	text-decoration:none;
}
.abo-phone a:hover{
	filter:brightness(1.05);
}

/* --- Bands --------------------------------------------------------- */
.abo-band{
	background:var(--abo-cocoa);
}
.abo-band--panel{
	background:var(--abo-umber);
}
.abo-eyebrow{
	font-family:var(--abo-sans);
	font-size:0.72rem;
	font-weight:500;
	letter-spacing:0.22em;
	text-transform:uppercase;
	color:var(--abo-ember);
	margin:0 0 1.2rem;
}
.abo-title{
	font-family:var(--abo-serif);
	font-size:clamp(2.25rem,4vw,3.4rem);
	font-weight:500;
	line-height:1.05;
	margin:0;
}
.abo-rule{
	width:3rem;
	height:2px;
	background:var(--abo-gold);
	margin:1.4rem 0 0;
}

/* --- Hero ---------------------------------------------------------- */
.abo-hero{
	position:relative;
	min-height:86dvh;
	display:flex;
	align-items:flex-end;
	padding-block:6rem;
	background:
		radial-gradient(ellipse at 20% 12%, rgba(201,111,51,0.28) 0%, transparent 62%),
		var(--abo-cocoa);
	overflow:hidden;
}
.abo-hero .abo-inner{
	max-width:46rem;
}

/* The page content carries a shared navy-scrim image (right for Midnight,
   wrong here). Override it with a warm autumn optical counter under a
   cocoa scrim so Thanksgiving reads as firelight. */
body.wp-theme-abo-thanksgiving .abo-hero{
	background-image:
		linear-gradient(180deg, rgba(58,33,20,0.86) 0%, rgba(58,33,20,0.55) 42%, rgba(58,33,20,0.92) 100%),
		url(assets/images/abo-thanksgiving-hero.png) !important;
	background-size:cover, cover !important;
	background-position:center !important;
}
.abo-hero-title{
	font-family:var(--abo-serif);
	font-size:clamp(3rem,7vw,5.6rem);
	font-weight:500;
	line-height:1.02;
	letter-spacing:-0.01em;
	margin:0;
}
.abo-hero-title .accent{
	font-style:italic;
	color:var(--abo-gold);
}
.abo-hero-sub{
	color:var(--abo-secondary);
	max-width:32rem;
	font-size:1.1rem;
	margin:1.4rem 0 0;
}
.abo-hero-quote{
	font-family:var(--abo-serif);
	font-style:italic;
	font-size:1.5rem;
	color:var(--abo-gold);
	margin:1.4rem 0 0;
}
.abo-btn-outline .wp-block-button__link{
	background:transparent;
	border:1px solid var(--abo-rule);
	color:var(--abo-cream);
}
.abo-btn-outline .wp-block-button__link:hover{
	background:var(--abo-rule);
	color:var(--abo-cream);
}
.abo-hero .abo-btn-outline .wp-block-button__link,
.abo-band--panel .abo-btn-outline .wp-block-button__link{
	color:var(--abo-cream);
}
.abo-hero-cta{
	margin-top:2.2rem;
}
.abo-hero-figure{
	font-size:0.75rem;
	letter-spacing:0.14em;
	text-transform:uppercase;
	color:var(--abo-wheat);
	margin-top:2.6rem;
}
.abo-hero-figure b{
	color:var(--abo-cream);
	font-family:var(--abo-serif);
	font-size:2.4rem;
	font-weight:500;
	display:block;
	letter-spacing:0;
}

/* --- Split image/text --------------------------------------------- */
.abo-split{
	align-items:center;
}
.abo-media{
	border-radius:4px;
	aspect-ratio:4 / 3;
	object-fit:cover;
	width:100%;
	filter:contrast(1.03) saturate(1.06);
}
.abo-media--frame{
	box-shadow:inset 0 0 0 1px var(--abo-rule);
}

/* --- Cards --------------------------------------------------------- */
.wp-block-columns.abo-cards{
	display:grid;
	grid-template-columns:repeat(3,1fr);
	gap:1.5rem;
	align-items:stretch;
}
.abo-card{
	background:var(--abo-umber);
	border:1px solid var(--abo-rule);
	border-radius:4px;
	padding:2.2rem 2rem;
	position:relative;
}
.abo-card--navy{
	background:var(--abo-cocoa);
}
.abo-card-num{
	font-family:var(--abo-sans);
	font-size:0.72rem;
	letter-spacing:0.16em;
	color:var(--abo-gold);
	margin:0 0 1.2rem;
}
.abo-card h3{
	font-family:var(--abo-serif);
	font-size:1.6rem;
	font-weight:500;
	line-height:1.1;
	margin:0 0 0.7rem;
}
.abo-card p{
	margin:0;
	color:var(--abo-secondary);
	font-size:0.98rem;
}

/* --- Why-choose number row ---------------------------------------- */
.abo-stat{
	border-top:1px solid var(--abo-rule);
	padding-top:1rem;
}
.abo-stat b{
	font-family:var(--abo-serif);
	font-weight:500;
	color:var(--abo-cream);
	font-size:1.25rem;
}

/* --- Promise strip ------------------------------------------------- */
.abo-promise{
	border-left:2px solid var(--abo-gold);
	padding-left:1.5rem;
}

/* --- Thanksgiving gathering band (theme template) ------------------ */
.abo-gather-band{
	position:relative;
	overflow:hidden;
}
.abo-gather-band::before{
	content:"";
	position:absolute;
	inset:0;
	background:
		radial-gradient(ellipse at 80% 0%, rgba(201,111,51,0.22) 0%, transparent 55%),
		radial-gradient(ellipse at 10% 100%, rgba(217,164,65,0.12) 0%, transparent 55%);
	pointer-events:none;
}
.abo-gather-band > *{
	position:relative;
}
.abo-gather-quote{
	font-family:var(--abo-serif);
	font-style:italic;
	font-size:clamp(1.9rem,4.4vw,3rem);
	line-height:1.15;
	color:var(--abo-cream);
	margin:0;
}
.abo-gather-quote .accent{
	color:var(--abo-gold);
}

/* --- Footer -------------------------------------------------------- */
.abo-footer{
	background:var(--abo-umber);
	border-top:1px solid var(--abo-rule);
}
.abo-footer-top{
	align-items:flex-start;
}
.abo-footer-cols{
	align-items:flex-start;
}
.abo-footer .abo-wordmark{
	font-size:2rem;
}
.abo-footer-quote{
	color:var(--abo-gold);
	font-family:var(--abo-serif);
	font-style:italic;
	font-size:1.3rem;
	margin:1rem 0;
}
.abo-footer-title{
	font-family:var(--abo-sans);
	font-size:0.72rem;
	font-weight:500;
	letter-spacing:0.2em;
	text-transform:uppercase;
	color:var(--abo-wheat);
	margin:0 0 1rem;
}
.abo-footer p{
	font-size:0.95rem;
	color:var(--abo-secondary);
}
.abo-footer-cols a{
	color:var(--abo-secondary);
	text-decoration:none;
}
.abo-footer-cols a:hover{
	color:var(--abo-gold);
}
.abo-footer-bottom{
	border-top:1px solid var(--abo-rule);
}
.abo-footer-bottom p{
	font-size:0.85rem;
	color:var(--abo-wheat);
	margin:0;
}
.abo-footer-legal a{
	color:var(--abo-secondary);
	text-decoration:none;
}
.abo-footer-legal a:hover{
	color:var(--abo-gold);
}

/* Seasonal footer: a faint autumn harvest still life glows through a
   deep cocoa scrim so the footer still reads as a warm umber band. */
body.wp-theme-abo-thanksgiving .abo-footer{
	background-image:
		linear-gradient(180deg, rgba(84,53,33,0.94) 0%, rgba(58,33,20,0.97) 100%),
		url(assets/images/abo-thanksgiving-harvest.png) !important;
	background-size:cover !important;
	background-position:center !important;
}

/* --- Legal / reading pages ---------------------------------------- */
.abo-legal h2{
	font-family:var(--abo-serif);
	font-weight:500;
}

/* --- Responsive ---------------------------------------------------- */
@media (max-width:782px){
	.abo-header{
		flex-wrap:wrap;
		row-gap:0.6rem;
	}
	.abo-nav{
		order:99;
		width:100%;
		display:flex;
		justify-content:center;
		flex-wrap:wrap;
		gap:0.9rem 1.4rem;
		padding-top:0.2rem;
	}
	.abo-hero{
		min-height:70dvh;
		align-items:flex-end;
	}
	.wp-block-columns.abo-cards{
		display:grid;
		grid-template-columns:1fr;
	}
}

/* --- Motion -------------------------------------------------------- */
@media (prefers-reduced-motion:reduce){
	*,*::before,*::after{
		animation:none !important;
		transition:none !important;
	}
}
