/*
Theme Name: A&B Optical — Midnight
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-midnight
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;
}

/* ------------------------------------------------------------------ */
/* Midnight design system                                             */
/* ------------------------------------------------------------------ */
:root{
	--abo-navy:var(--wp--preset--color--primary);
	--abo-panel:var(--wp--preset--color--panel);
	--abo-cream:var(--wp--preset--color--text);
	--abo-gold:var(--wp--preset--color--accent);
	--abo-muted: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);
}

/* --- Header -------------------------------------------------------- */
.abo-header-wrap{
	position:sticky;
	top:0;
	z-index:50;
	background:var(--abo-navy);
	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-navy);
	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.06);
}

/* --- Bands --------------------------------------------------------- */
.abo-band{
	background:var(--abo-navy);
}
.abo-band--panel{
	background:var(--abo-panel);
}
.abo-eyebrow{
	font-family:var(--abo-sans);
	font-size:0.72rem;
	font-weight:500;
	letter-spacing:0.22em;
	text-transform:uppercase;
	color:var(--abo-gold);
	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%, #1e345e 0%, transparent 60%),
		var(--abo-navy);
	overflow:hidden;
}
.abo-hero .abo-inner{
	max-width:46rem;
}
.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-muted);
	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.05) saturate(0.9);
}
.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-panel);
	border:1px solid var(--abo-rule);
	border-radius:4px;
	padding:2.2rem 2rem;
	position:relative;
}
.abo-card--navy{
	background:var(--abo-navy);
}
.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;
}

/* --- Footer -------------------------------------------------------- */
.abo-footer{
	background:var(--abo-panel);
	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-muted);
	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-muted);
	margin:0;
}
.abo-footer-legal a{
	color:var(--abo-secondary);
	text-decoration:none;
}
.abo-footer-legal a:hover{
	color:var(--abo-gold);
}

/* --- 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;
	}
}

