/*
Theme Name: CBY Academy
Theme URI: https://cbyacademy.com
Author: The CBY Academy of Performing Arts
Description: Custom block-based theme for the public marketing site of The CBY Academy of Performing Arts (Waterdown, Ontario). Mobile-first, brand-driven, replaces Elementor. The CBYOS plugin powers the member/staff portal beneath it.
Version: 0.9.18
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 7.4
Text Domain: cby-academy
*/

/* ========================================================================
   CBY Academy — mobile-first stylesheet
   Built phone-first; min-width media queries scale up to tablet/desktop.
   Brand tokens come from theme.json (--wp--preset--color--*, font-family).
   ======================================================================== */

:root {
	--cby-shadow-sm: 0 1px 2px rgba(22,22,22,.06), 0 2px 8px rgba(29,77,118,.06);
	--cby-shadow-md: 0 6px 18px rgba(29,77,118,.10), 0 2px 6px rgba(22,22,22,.05);
	--cby-shadow-lg: 0 18px 50px rgba(29,77,118,.16), 0 6px 16px rgba(22,22,22,.06);
	--cby-radius: 18px;
	--cby-radius-lg: 28px;
	--cby-header-h: 68px;
	--cby-maxw: 1200px;
	--cby-wrap-pad: clamp(1.15rem, 5vw, 3rem);
}

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--ink);
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--medium);
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 800;
	line-height: 1.08;
	letter-spacing: -0.02em;
	color: var(--wp--preset--color--ink);
	margin: 0 0 .5em;
	text-wrap: balance;
}

a { color: var(--wp--preset--color--primary); }

:focus-visible {
	outline: 3px solid var(--wp--preset--color--secondary);
	outline-offset: 2px;
	border-radius: 4px;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---- Layout container ---- */
.cby-wrap {
	width: 100%;
	max-width: var(--cby-maxw);
	margin-inline: auto;
	padding-inline: var(--cby-wrap-pad);
}
.cby-wrap--narrow { max-width: 820px; }

.cby-section { padding-block: clamp(3rem, 9vw, 6rem); }

.section-head { max-width: 640px; margin: 0 auto clamp(2rem, 5vw, 3rem); text-align: center; }
.section-head .eyebrow { margin-bottom: .75rem; }
.section-head p { color: var(--wp--preset--color--muted); font-size: var(--wp--preset--font-size--large); margin: 0; }

.eyebrow {
	display: inline-block;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700;
	font-size: .8rem;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--wp--preset--color--primary);
}

/* ========================================================================
   Buttons  (applied to core Button block wrappers via className)
   ======================================================================== */
.btn > .wp-block-button__link,
a.btn,
button.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .5rem;
	width: auto;
	appearance: none;
	-webkit-appearance: none;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700;
	font-size: 1.0625rem;
	line-height: 1.1;
	text-decoration: none;
	padding: .95rem 1.7rem;
	border-radius: 999px;
	border: 2px solid transparent;
	min-height: 52px;               /* comfortable tap target */
	cursor: pointer;
	transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, color .15s ease;
}
.btn > .wp-block-button__link:hover,
a.btn:hover,
button.btn:hover { transform: translateY(-2px); text-decoration: none; }

/* Primary — solid blue */
.btn-primary > .wp-block-button__link, a.btn.btn-primary, button.btn.btn-primary {
	background: var(--wp--preset--color--primary);
	color: #fff;
	box-shadow: var(--cby-shadow-md);
}
.btn-primary > .wp-block-button__link:hover, a.btn.btn-primary:hover, button.btn.btn-primary:hover {
	background: var(--wp--preset--color--primary-dark);
	box-shadow: var(--cby-shadow-lg);
}

/* Amber — warm secondary CTA */
.btn-amber > .wp-block-button__link, a.btn.btn-amber, button.btn.btn-amber {
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--ink);
	box-shadow: var(--cby-shadow-md);
}
.btn-amber > .wp-block-button__link:hover, a.btn.btn-amber:hover, button.btn.btn-amber:hover { background: #ffbb2e; }

/* Outline — on light backgrounds */
.btn-outline > .wp-block-button__link, a.btn.btn-outline, button.btn.btn-outline {
	background: transparent;
	color: var(--wp--preset--color--primary);
	border-color: var(--wp--preset--color--line);
}
.btn-outline > .wp-block-button__link:hover, a.btn.btn-outline:hover, button.btn.btn-outline:hover {
	border-color: var(--wp--preset--color--primary);
	background: var(--wp--preset--color--tint);
}

/* Ghost — for dark/photo backgrounds */
.btn-ghost > .wp-block-button__link, a.btn.btn-ghost, button.btn.btn-ghost {
	background: rgba(255,255,255,.12);
	color: #fff;
	border-color: rgba(255,255,255,.55);
	backdrop-filter: blur(4px);
}
.btn-ghost > .wp-block-button__link:hover, a.btn.btn-ghost:hover, button.btn.btn-ghost:hover { background: rgba(255,255,255,.22); }

/* ========================================================================
   Image placeholder slots  (swap for real photos later)
   ======================================================================== */
.imgslot {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	background:
		repeating-linear-gradient(45deg, rgba(41,103,155,.05) 0 14px, rgba(41,103,155,.09) 14px 28px),
		var(--wp--preset--color--tint);
	border: 2px dashed rgba(41,103,155,.35);
	border-radius: var(--cby-radius);
	color: var(--wp--preset--color--primary);
	overflow: hidden;
	aspect-ratio: 4 / 3;
}
.imgslot__label {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700;
	font-size: .85rem;
	letter-spacing: .04em;
	padding: .5rem 1rem;
	max-width: 90%;
}
.imgslot__label::before { content: "▧ "; opacity: .6; }
.imgslot--wide { aspect-ratio: 16 / 9; }
.imgslot--tall { aspect-ratio: 3 / 4; }
.imgslot--square { aspect-ratio: 1 / 1; }

/* ========================================================================
   HEADER
   ======================================================================== */
.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(255,255,255,.88);
	backdrop-filter: saturate(1.4) blur(10px);
	border-bottom: 1px solid var(--wp--preset--color--line);
}
.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	min-height: var(--cby-header-h);
	max-width: var(--cby-maxw);
	margin-inline: auto;
	padding-inline: var(--cby-wrap-pad);
}
.site-brand { display: inline-flex; align-items: center; flex: 0 0 auto; }
.site-brand img { height: 40px; width: auto; }

/* right cluster on mobile: login + hamburger */
.site-header__actions { display: flex; align-items: center; gap: .5rem; }

/* login button (header) */
.btn-login {
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700;
	font-size: .95rem;
	text-decoration: none;
	padding: .6rem 1.05rem;
	min-height: 44px;
	border-radius: 999px;
	background: var(--wp--preset--color--primary);
	color: #fff;
	white-space: nowrap;
	transition: background-color .15s ease, transform .15s ease;
}
.btn-login:hover { background: var(--wp--preset--color--primary-dark); color:#fff; transform: translateY(-1px); }
.btn-login__text { display: none; }

/* hamburger toggle */
.nav-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px; height: 46px;
	padding: 0;
	background: transparent;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 12px;
	color: var(--wp--preset--color--primary);
	cursor: pointer;
}
.nav-toggle__bars { position: relative; width: 22px; height: 2px; background: currentColor; border-radius: 2px; transition: background .2s; }
.nav-toggle__bars::before, .nav-toggle__bars::after {
	content: ""; position: absolute; left: 0; width: 22px; height: 2px; background: currentColor; border-radius: 2px;
	transition: transform .25s ease, top .25s ease;
}
.nav-toggle__bars::before { top: -7px; }
.nav-toggle__bars::after { top: 7px; }

/* desktop nav — hidden on mobile */
.primary-nav { display: none; }

/* ---- Mobile nav panel ---- */
.nav-panel {
	position: fixed;
	inset: 0;
	height: 100vh;
	height: 100dvh;      /* fill the true viewport under mobile browser chrome */
	z-index: 99;
	background: linear-gradient(160deg, #1d4d76 0%, #29679b 60%, #1fb0d5 100%);
	color: #fff;
	padding: calc(var(--cby-header-h) + 1.5rem) var(--cby-wrap-pad) 2.5rem;
	display: flex;
	flex-direction: column;
	gap: .25rem;
	transform: translateX(100%);
	visibility: hidden;
	transition: transform .3s cubic-bezier(.4,0,.2,1), visibility .3s;
	overflow-y: auto;
}
.nav-panel a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	color: #fff;
	text-decoration: none;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700;
	font-size: 1.5rem;
	padding: 1rem 0;
	border-bottom: 1px solid rgba(255,255,255,.15);
	min-height: 56px;
}
.nav-panel a::after { content: "→"; opacity: .5; font-size: 1.1rem; }
.nav-panel .nav-panel__login {
	margin-top: 1.75rem;
	justify-content: center;
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--ink);
	border-radius: 999px;
	border: none;
}
.nav-panel .nav-panel__login::after { content: none; }

body.nav-open { overflow: hidden; }
body.nav-open .nav-panel { transform: translateX(0); visibility: visible; }
body.nav-open .btn-login { display: none; }   /* panel has its own login; keep the top bar to logo + close */
body.nav-open .nav-toggle__bars { background: transparent; }
body.nav-open .nav-toggle__bars::before { top: 0; transform: rotate(45deg); }
body.nav-open .nav-toggle__bars::after { top: 0; transform: rotate(-45deg); }

/* ========================================================================
   HERO
   ======================================================================== */
.cby-hero {
	background:
		radial-gradient(120% 120% at 85% -10%, rgba(31,176,213,.18), transparent 55%),
		radial-gradient(90% 90% at -10% 110%, rgba(240,95,152,.10), transparent 50%),
		var(--wp--preset--color--tint);
	padding-block: clamp(2.5rem, 8vw, 5rem);
}
.cby-hero__grid { display: grid; gap: clamp(2rem, 6vw, 3.5rem); align-items: center; }
.cby-hero__copy { text-align: center; }
.cby-hero h1 {
	font-size: var(--wp--preset--font-size--display);
	margin-bottom: .35em;
}
.cby-hero__sub {
	font-size: var(--wp--preset--font-size--large);
	color: var(--wp--preset--color--muted);
	max-width: 34ch;
	margin: 0 auto 1.75rem;
}
.cby-hero .cby-hero__ctas { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; }
.cby-hero__media .imgslot { aspect-ratio: 4 / 3; box-shadow: var(--cby-shadow-lg); border-style: solid; border-color: #fff; }
.cby-hero__media { position: relative; }
.cby-hero__badge {
	position: absolute; bottom: -14px; left: 50%; transform: translateX(-50%);
	background: #fff; color: var(--wp--preset--color--ink);
	box-shadow: var(--cby-shadow-md); border-radius: 999px;
	padding: .55rem 1.1rem; font-weight: 700; font-family: var(--wp--preset--font-family--heading);
	font-size: .9rem; white-space: nowrap;
	display: inline-flex; align-items: center; gap: .4rem;
}
.cby-hero__badge .star { color: var(--wp--preset--color--accent); }

/* ========================================================================
   TRUST BAR
   ======================================================================== */
.cby-trust { background: var(--wp--preset--color--primary); color: #fff; }
.cby-trust .cby-wrap { padding-block: 1.1rem; }
.cby-trust__row {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
	gap: .5rem 1.5rem; text-align: center;
}
.cby-trust__item {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700; font-size: .95rem; color: #fff;
	display: inline-flex; align-items: center; gap: .4rem;
}
.cby-trust__item .star { color: var(--wp--preset--color--accent); }
.cby-trust__sep { display: none; color: rgba(255,255,255,.4); }

/* ========================================================================
   PROGRAMS
   ======================================================================== */
.prog-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
}
.prog-card {
	background: #fff;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--cby-radius);
	padding: 1.4rem 1.4rem 1.5rem;
	box-shadow: var(--cby-shadow-sm);
	transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.prog-card:hover { transform: translateY(-4px); box-shadow: var(--cby-shadow-md); border-color: var(--wp--preset--color--secondary); }
.prog-card__icon {
	width: 46px; height: 46px; border-radius: 12px;
	display: grid; place-items: center; margin-bottom: .9rem;
	background: var(--wp--preset--color--tint);
	color: var(--wp--preset--color--primary);
	font-size: 1.4rem;
}
.prog-card h3 { font-size: 1.2rem; margin-bottom: .3rem; }
.prog-card p { margin: 0; color: var(--wp--preset--color--muted); font-size: 1rem; line-height: 1.5; }

/* Photo-filled cards: the background photo sits under a white scrim so the
   icon + text stay crisp. Border, shadow and hover-lift are inherited. */
.prog-card--photo {
	position: relative;
	isolation: isolate;                 /* keep the scrim below content, above the photo */
	background-size: cover;
	background-position: center;
	overflow: hidden;
}
.prog-card--photo::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;                         /* above the photo, below icon/text */
	/* Diagonal fade: strongest at the bottom-left (behind the text), easing
	   out toward the top-right so the photo reveals itself in that corner. */
	background: linear-gradient(
		to top right,
		rgba(255, 255, 255, .95) 0%,
		rgba(255, 255, 255, .90) 22%,
		rgba(255, 255, 255, .64) 55%,
		rgba(255, 255, 255, .30) 100%
	);
	transition: opacity .18s ease;
}
.prog-card--photo:hover::before { opacity: .82; }
.cby-programs__foot { text-align: center; margin-top: clamp(2rem, 5vw, 3rem); }

/* Entrance reveal: card-reveal.js adds .js-reveal to a grid once it can drive
   the cascade, hiding the cards until each one is animated in (staggered by
   --rev-i). Driven by an animation, not a transition, so the hover-lift keeps
   its own snappy timing; the script strips these classes once the cascade ends.
   No JS / reduced-motion → this whole block never engages and cards show as normal. */
.js-reveal .prog-card { opacity: 0; }
.js-reveal .prog-card.is-in {
	animation: progCardReveal .7s cubic-bezier(.2, .75, .25, 1) both;
	animation-delay: calc(var(--rev-i, 0) * 75ms);
}
@keyframes progCardReveal {
	from { opacity: 0; transform: translateY(34px) scale(.94); }
	to   { opacity: 1; transform: none; }
}

/* ========================================================================
   CAMPS banner
   ======================================================================== */
.cby-camps { background: var(--wp--preset--color--ink); color: #fff; overflow: hidden; }
.cby-camps__grid { display: grid; gap: clamp(1.75rem, 5vw, 3rem); align-items: center; }
.cby-camps .eyebrow { color: var(--wp--preset--color--accent); }
.cby-camps h2 { color: #fff; font-size: var(--wp--preset--font-size--xx-large); }
.cby-camps p { color: rgba(255,255,255,.82); font-size: var(--wp--preset--font-size--large); }
.cby-camps__note { font-size: .95rem !important; color: rgba(255,255,255,.6) !important; margin-top: .75rem; }
.cby-camps__media .imgslot {
	aspect-ratio: 16/10;
	background: repeating-linear-gradient(45deg, rgba(255,255,255,.05) 0 14px, rgba(255,255,255,.09) 14px 28px), rgba(255,255,255,.06);
	border-color: rgba(255,255,255,.3); color: #fff;
}

/* ========================================================================
   TESTIMONIALS
   ======================================================================== */
.cby-testi { background: var(--wp--preset--color--tint); }
.testi-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.testi-card {
	background: #fff; border-radius: var(--cby-radius);
	padding: 1.6rem; box-shadow: var(--cby-shadow-sm);
	border: 1px solid var(--wp--preset--color--line);
	display: flex; flex-direction: column; gap: 1rem;
}
.testi-card__stars { color: var(--wp--preset--color--accent); font-size: 1.05rem; letter-spacing: .1em; }
.testi-card__quote { font-size: 1.1rem; line-height: 1.55; color: var(--wp--preset--color--ink); margin: 0; font-weight: 500; }
.testi-card__who { font-family: var(--wp--preset--font-family--heading); font-weight: 700; font-size: .95rem; color: var(--wp--preset--color--muted); margin: 0; }
.g-badge {
	display: inline-flex; align-items: center; gap: .6rem;
	background: #fff; border: 1px solid var(--wp--preset--color--line);
	box-shadow: var(--cby-shadow-sm); border-radius: 999px;
	padding: .7rem 1.3rem; margin: clamp(2rem,5vw,2.5rem) auto 0; text-decoration: none;
	font-family: var(--wp--preset--font-family--heading); font-weight: 700; color: var(--wp--preset--color--ink);
	width: fit-content;
}
.g-badge:hover { box-shadow: var(--cby-shadow-md); color: var(--wp--preset--color--ink); }
.g-badge .star { color: var(--wp--preset--color--accent); }
.g-badge .g-badge__g { color: var(--wp--preset--color--secondary); }
.cby-testi__foot { text-align: center; }

/* ========================================================================
   ABOUT teaser
   ======================================================================== */
.cby-about__grid { display: grid; gap: clamp(2rem, 6vw, 3.5rem); align-items: center; }
.cby-about__media .imgslot { aspect-ratio: 4/5; box-shadow: var(--cby-shadow-md); }
.cby-about p { color: var(--wp--preset--color--muted); font-size: var(--wp--preset--font-size--large); }

/* ========================================================================
   FINAL CTA
   ======================================================================== */
.cby-cta { background: linear-gradient(160deg, #1d4d76 0%, #29679b 55%, #1fb0d5 100%); color:#fff; }
.cby-cta__inner { text-align: center; max-width: 720px; margin-inline: auto; }
.cby-cta h2 { color: #fff; font-size: var(--wp--preset--font-size--xx-large); }
.cby-cta p { color: rgba(255,255,255,.85); font-size: var(--wp--preset--font-size--large); margin-bottom: 1.75rem; }
.cby-cta .cby-cta__ctas { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; }

/* ========================================================================
   FOOTER
   ======================================================================== */
.site-footer { background: var(--wp--preset--color--ink); color: rgba(255,255,255,.72); padding-block: clamp(3rem, 7vw, 4.5rem) 2rem; font-size: .95rem; }
.site-footer__grid { display: grid; grid-template-columns: 1fr; gap: 2.25rem; }
.site-footer__brand img { height: 46px; width: auto; margin-bottom: 1rem; filter: brightness(0) invert(1); opacity: .95; }
.site-footer__brand p { margin: 0; max-width: 34ch; }
.site-footer h4 { color: #fff; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 1rem; }
.site-footer a { color: rgba(255,255,255,.72); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.site-footer__contact li { display: flex; gap: .5rem; margin-bottom: .6rem; }
.site-footer__social { display: flex; gap: .75rem; }
.site-footer__social a {
	width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
	background: rgba(255,255,255,.08); color:#fff;
}
.site-footer__social a:hover { background: var(--wp--preset--color--primary); }
.site-footer__bar {
	margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.12);
	display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; align-items: center; justify-content: space-between;
	font-size: .85rem; color: rgba(255,255,255,.55);
}

/* ========================================================================
   RESPONSIVE — scale up from the mobile base
   ======================================================================== */

/* ≥ 560px — two-up program/testimonial grids, show login label */
@media (min-width: 560px) {
	.btn-login__text { display: inline; }
	.prog-grid { grid-template-columns: repeat(2, 1fr); }
	.testi-grid { grid-template-columns: repeat(2, 1fr); }
	.cby-trust__sep { display: inline; }
}

/* ≥ 900px — desktop nav, multi-column sections, side-by-side heroes */
@media (min-width: 900px) {
	:root { --cby-header-h: 76px; }

	/* swap hamburger for inline nav */
	.nav-toggle { display: none; }
	.nav-panel { display: none; }
	.primary-nav { display: flex; align-items: center; gap: .35rem; }
	.primary-nav a {
		font-family: var(--wp--preset--font-family--heading);
		font-weight: 700; font-size: 1rem; text-decoration: none;
		color: var(--wp--preset--color--ink);
		padding: .5rem .85rem; border-radius: 10px;
		transition: color .15s ease, background .15s ease;
	}
	.primary-nav a:hover { color: var(--wp--preset--color--primary); background: var(--wp--preset--color--tint); }
	.site-brand img { height: 46px; }

	.cby-hero__grid { grid-template-columns: 1.05fr .95fr; }
	.cby-hero__copy { text-align: left; }
	.cby-hero__sub { margin-inline: 0; }
	.cby-hero .cby-hero__ctas { justify-content: flex-start; }

	.prog-grid { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
	.testi-grid { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }

	.cby-camps__grid { grid-template-columns: 1.1fr .9fr; }
	.cby-about__grid { grid-template-columns: .85fr 1.15fr; }

	.site-footer__grid { grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 2.5rem; }
}

/* ≥ 1120px — a touch more air */
@media (min-width: 1120px) {
	.cby-hero { padding-block: clamp(3.5rem, 6vw, 6rem); }
}

/* ---- Camps informational pill ---- */
.cby-camps__pill {
	display: inline-flex; align-items: center; gap: .6rem;
	margin-top: 1.5rem; padding: .7rem 1.3rem;
	border-radius: 999px;
	background: rgba(255,255,255,.08);
	border: 1px solid rgba(255,255,255,.25);
	color: #fff;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700; font-size: .95rem;
}
.cby-camps__pill-dot {
	width: 9px; height: 9px; border-radius: 50%;
	background: var(--wp--preset--color--accent);
	box-shadow: 0 0 0 4px rgba(255,198,77,.22);
}

/* ---- Anchor scroll offset (account for the sticky header) ---- */
.cby-hero, .cby-section { scroll-margin-top: calc(var(--cby-header-h) + 14px); }

/* ========================================================================
   PHOTOS  (from the WebP library, output by cby_photo())
   ======================================================================== */
.cby-photo {
	display: block;
	width: 100%;
	height: auto;
	object-fit: cover;
	border-radius: var(--cby-radius);
	box-shadow: var(--cby-shadow-md);
	background: var(--wp--preset--color--tint);
}
.cby-hero__img { box-shadow: var(--cby-shadow-lg); }

/* Full-bleed photo bands (Programs / Testimonials) */
.photo-band { width: 100%; line-height: 0; }
.photo-band .cby-photo { border-radius: 0; box-shadow: none; aspect-ratio: 16 / 10; }
@media (min-width: 900px) { .photo-band .cby-photo { aspect-ratio: 24 / 7; } }

/* Pre-footer band (global, above the footer) */
.prefooter-band { width: 100%; line-height: 0; }
.prefooter-band .cby-photo { border-radius: 0; box-shadow: none; aspect-ratio: 16 / 9; }
@media (min-width: 900px) { .prefooter-band .cby-photo { aspect-ratio: 32 / 9; } }

/* ========================================================================
   HERO — full-bleed photo variant (photo as the section background)
   ======================================================================== */
.cby-hero--photo {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	padding: 0;
	min-height: clamp(600px, 90svh, 820px);
	display: flex;
	color: #fff;
	background: var(--wp--preset--color--primary-dark); /* fallback while the photo loads */
}
.cby-hero__bg { position: absolute; inset: 0; z-index: 0; margin: 0; will-change: transform; }
.cby-hero__bgimg {
	position: absolute; inset: 0;
	width: 100%; height: 100%;
	object-fit: cover;
	border-radius: 0;
	box-shadow: none;
}
/* Scrim — MOBILE: subject stays clear up top, text sits over a dark base.
   margin:0 cancels the block-gap the WP flow layout injects on 2nd+ children —
   without it, this absolute layer (top:0) gets pushed down and leaves a gap. */
.cby-hero__scrim {
	position: absolute; inset: 0; z-index: 1; margin: 0;
	background: linear-gradient(180deg,
		rgba(15,40,64,0)   0%,
		rgba(15,40,64,.18) 34%,
		rgba(15,40,64,.72) 68%,
		rgba(15,40,64,.94) 100%);
}
.cby-hero__inner {
	position: relative; z-index: 2;
	display: flex;
	align-items: flex-end;                 /* mobile: text at the bottom */
	width: 100%;
	padding-block: clamp(2rem, 7vw, 3.5rem);
}
.cby-hero--photo .cby-hero__copy { max-width: 36rem; text-align: left; }
.cby-hero--photo h1 { color: #fff; text-shadow: 0 2px 18px rgba(10,25,40,.35); }
.cby-hero--photo .cby-hero__sub { color: rgba(255,255,255,.92); margin-inline: 0; }
.cby-hero--photo .eyebrow { color: var(--wp--preset--color--accent); }
.cby-hero--photo .cby-hero__ctas { justify-content: flex-start; }
.cby-hero--photo .cby-hero__badge {
	position: static; transform: none; margin: 1.4rem 0 0;
	background: rgba(255,255,255,.14); color: #fff;
	border: 1px solid rgba(255,255,255,.30);
	backdrop-filter: blur(6px);
	width: fit-content;
}

@media (min-width: 900px) {
	.cby-hero--photo { min-height: clamp(640px, 92vh, 900px); }   /* taller, so cover crops less */
	.cby-hero__bgimg { object-position: 50% 18%; }                /* bias the crop up → keep the head in frame */
	.cby-hero__inner { align-items: center; }                     /* desktop: vertically centred */
	/* Scrim — DESKTOP: a soft top-down wash (covers the photo's bright top edge)
	   layered over the left→right text scrim (dark left, clear over the subject). */
	.cby-hero__scrim {
		background:
			linear-gradient(180deg,
				rgba(15,40,64,.5)  0%,
				rgba(15,40,64,.12) 16%,
				rgba(15,40,64,0)   38%),
			linear-gradient(90deg,
				rgba(15,40,64,.9)  0%,
				rgba(15,40,64,.66) 24%,
				rgba(15,40,64,.3)  46%,
				rgba(15,40,64,0)   68%);
	}
}

/* ---- Camp CBY banner as a full-bleed photo (shares the hero's bg/scrim) ---- */
.cby-camps--photo {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	padding: 0;
	min-height: clamp(440px, 66svh, 600px);
	display: flex;
	color: #fff;
	background: var(--wp--preset--color--ink); /* fallback while the photo loads */
	scroll-margin-top: calc(var(--cby-header-h) + 14px);
}
.cby-camps__inner {
	position: relative; z-index: 2;
	display: flex;
	align-items: flex-end;                 /* mobile: text at the bottom */
	width: 100%;
	padding-block: clamp(2rem, 6vw, 3.5rem);
}
.cby-camps--photo .cby-camps__copy { max-width: 34rem; }
.cby-camps--photo h2 { color: #fff; }
.cby-camps--photo p { color: rgba(255,255,255,.9); }
@media (min-width: 900px) {
	.cby-camps__inner { align-items: center; }   /* desktop: vertically centred */
}

/* ---- Compact photo hero for sub-page headers (same design as the home hero,
   just shorter, with a slightly smaller H1 so the home splash stays the biggest) ---- */
.cby-hero--compact { min-height: clamp(400px, 56svh, 540px); }
.cby-hero--compact h1 { font-size: var(--wp--preset--font-size--xx-large); }
@media (min-width: 900px) {
	/* Floor sits above the tallest hero's content (Testimonials, ~624px with its
	   badge) so all four sub-page heroes render at the same height. */
	.cby-hero--compact { min-height: clamp(640px, 60vh, 760px); }
}

/* Camps hero — "cover + focal point" background (like a Facebook cover photo).
   The photo was generatively expanded with extra scenery around the campers, so
   we zoom in PAST the browser's auto-cover (background-size > 100%) and pan the
   group toward the right, leaving the copy over the open park on the left. Two
   knobs: background-size = zoom, background-position = pan. Tuned per breakpoint
   (mobile portrait vs. desktop landscape). Uses the small WebP on phones. */
.cby-hero__bg--zoom {
	background-repeat: no-repeat;
	background-image: url('assets/img/library/camp-hero-13A-960.webp');
	background-size: 195%;
	background-position: 46% 62%;     /* phone: zoomed so the end kids just touch the side edges; group left of centre */
}
@media (min-width: 600px) {
	/* Large phone / tablet: box turns landscape-ish, so ease the zoom. */
	.cby-hero__bg--zoom {
		background-image: url('assets/img/library/camp-hero-13A-1600.webp');
		background-size: 160%;
		background-position: 10% 64%;
	}
}
@media (min-width: 900px) {
	/* Desktop: gentle zoom, group along the right with faces raised to eye level,
	   copy on the open left. */
	.cby-hero__bg--zoom {
		background-size: 120%;
		background-position: 22% 56%;
	}
}

/* Testimonials parade hero — same cover model. Phone zooms in on the parade
   and centres it; desktop pulls the frame up so the parade leader's feet meet
   the bottom edge, leaving the dark sky as a bed for the copy. */
.cby-hero__bg--parade {
	background-repeat: no-repeat;
	background-image: url('assets/img/library/about-hero-2-960.webp');
	background-size: 220%;
	background-position: 50% 100%;    /* phone: image pushed as far up as possible (show bottom of frame) */
}
@media (min-width: 600px) {
	.cby-hero__bg--parade {
		background-image: url('assets/img/library/about-hero-2-1600.webp');
	}
}
@media (min-width: 900px) {
	.cby-hero__bg--parade {
		background-size: 105%;
		background-position: 50% 66%;  /* desktop: raised so the parade leader's feet meet the bottom */
	}
}

/* ---- Belt-and-braces: keep home sections edge-to-edge regardless of layout ---- */
.site-main > .alignfull { max-width: none; }
.site-main .cby-wrap.cby-hero__grid,
.site-main .cby-wrap.cby-camps__grid,
.site-main .cby-wrap.cby-about__grid,
.site-main .cby-wrap.cby-cta__inner { max-width: var(--cby-maxw); }

/* ========================================================================
   SUB-PAGES
   ======================================================================== */

/* ---- Page hero ---- */
.page-hero {
	background:
		radial-gradient(110% 120% at 90% -20%, rgba(31,176,213,.16), transparent 55%),
		var(--wp--preset--color--tint);
	padding-block: clamp(2.5rem, 8vw, 4.5rem);
	text-align: center;
}
.page-hero__inner { max-width: 760px; }
.page-hero h1 { font-size: var(--wp--preset--font-size--xx-large); margin-bottom: .35em; }
.page-hero__sub {
	font-size: var(--wp--preset--font-size--large);
	color: var(--wp--preset--color--muted);
	margin: 0 auto;
	max-width: 42ch;
}
.page-hero .g-badge { margin-top: 1.5rem; }
.page-hero--dark {
	background:
		radial-gradient(120% 130% at 85% -20%, rgba(31,176,213,.28), transparent 55%),
		var(--wp--preset--color--ink);
}
.page-hero--dark h1 { color: #fff; }
.page-hero--dark .eyebrow { color: var(--wp--preset--color--accent); }
.page-hero--dark .page-hero__sub { color: rgba(255,255,255,.78); }

/* ---- Detailed program cards (Programs page) ---- */
.prog-card--detailed { display: flex; flex-direction: column; }
.prog-card--detailed p { flex: 1 1 auto; margin-bottom: 1.1rem; }
.prog-card__cta {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700; font-size: .98rem; text-decoration: none;
	color: var(--wp--preset--color--primary);
	display: inline-flex; align-items: center; gap: .4rem;
}
.prog-card__cta span { transition: transform .15s ease; }
.prog-card--detailed:hover .prog-card__cta span { transform: translateX(3px); }

/* ---- Reusable CTA band ---- */
.cta-band {
	background: linear-gradient(160deg, #1d4d76 0%, #29679b 55%, #1fb0d5 100%);
	color: #fff;
	padding-block: clamp(3rem, 8vw, 5rem);
	text-align: center;
}
.cta-band__inner { max-width: 640px; margin-inline: auto; }
.cta-band h2 { color: #fff; font-size: var(--wp--preset--font-size--xx-large); }
.cta-band p { color: rgba(255,255,255,.85); font-size: var(--wp--preset--font-size--large); margin: 0 auto 1.75rem; }
.cta-band--register .cby-camps__pill { margin: 0 auto 1.5rem; }

/* ---- Camp highlights ---- */
.cby-camps-highlights { background: var(--wp--preset--color--tint); }
.highlight-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.highlight-card {
	background: #fff; border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--cby-radius); padding: 1.5rem; box-shadow: var(--cby-shadow-sm);
	text-align: center;
}
.highlight-card__icon { font-size: 2rem; margin-bottom: .6rem; }
.highlight-card h3 { font-size: 1.15rem; margin-bottom: .35rem; }
.highlight-card p { margin: 0; color: var(--wp--preset--color--muted); font-size: 1rem; line-height: 1.5; }

/* ---- Camp sessions ---- */
.session-list { display: flex; flex-direction: column; gap: 1rem; }
.session-row {
	display: flex; flex-direction: column; gap: .5rem;
	background: #fff; border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--cby-radius); padding: 1.4rem 1.5rem; box-shadow: var(--cby-shadow-sm);
}
.session-row__main h3 { font-size: 1.2rem; margin-bottom: .2rem; }
.session-row__main p { margin: 0; color: var(--wp--preset--color--muted); }
.session-row__when {
	font-family: var(--wp--preset--font-family--heading); font-weight: 700;
	color: var(--wp--preset--color--primary); font-size: .95rem;
	background: var(--wp--preset--color--tint); border-radius: 999px;
	padding: .4rem .9rem; align-self: flex-start; white-space: nowrap;
}

/* ---- About values ---- */
.cby-values { background: var(--wp--preset--color--tint); }
.value-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.value-card {
	background: #fff; border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--cby-radius); padding: 1.6rem; box-shadow: var(--cby-shadow-sm);
}
.value-card__icon { font-size: 1.8rem; margin-bottom: .6rem; }
.value-card h3 { font-size: 1.15rem; margin-bottom: .35rem; }
.value-card p { margin: 0; color: var(--wp--preset--color--muted); line-height: 1.55; }

/* ---- About team ---- */
.team-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.team-card { margin: 0; }
.team-card .imgslot { margin-bottom: .75rem; }
.team-card figcaption h3 { font-size: 1.05rem; margin-bottom: .15rem; }
.team-card figcaption p { margin: 0; color: var(--wp--preset--color--muted); font-size: .95rem; }

/* ---- Contact ---- */
.contact-grid { display: grid; grid-template-columns: 1fr; gap: clamp(2rem, 5vw, 3rem); }
.contact-form-wrap {
	background: #fff; border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--cby-radius-lg); padding: clamp(1.4rem, 4vw, 2.25rem);
	box-shadow: var(--cby-shadow-md);
}
.inquiry-form .field { margin-bottom: 1.1rem; }
.inquiry-form .field-row { display: grid; grid-template-columns: 1fr; gap: 0; }
.inquiry-form label {
	display: block; font-family: var(--wp--preset--font-family--heading);
	font-weight: 700; font-size: .92rem; margin-bottom: .4rem; color: var(--wp--preset--color--ink);
}
.inquiry-form .req { color: var(--wp--preset--color--pink); }
.inquiry-form input,
.inquiry-form textarea {
	width: 100%; font: inherit; color: var(--wp--preset--color--ink);
	padding: .8rem .95rem; border: 1.5px solid var(--wp--preset--color--line);
	border-radius: 12px; background: #fff; transition: border-color .15s ease, box-shadow .15s ease;
}
.inquiry-form input:focus,
.inquiry-form textarea:focus {
	outline: none; border-color: var(--wp--preset--color--secondary);
	box-shadow: 0 0 0 3px rgba(31,176,213,.18);
}
.inquiry-form textarea { resize: vertical; min-height: 120px; }
.inquiry-form__submit { margin-top: .25rem; width: 100%; }
.inquiry-form__fineprint { font-size: .82rem; color: var(--wp--preset--color--muted); margin: .9rem 0 0; text-align: center; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-alert { border-radius: 12px; padding: 1rem 1.15rem; margin-bottom: 1.5rem; font-size: 1rem; line-height: 1.5; }
.form-alert--ok { background: #e7f7ee; border: 1px solid #a9e0c1; color: #14663c; }
.form-alert--err { background: #fdeaf1; border: 1px solid #f6b9d0; color: #9c2456; }
.form-alert a { color: inherit; text-decoration: underline; }

.contact-info__block { margin-bottom: 1.5rem; }
.contact-info__block h3 { font-size: 1rem; margin-bottom: .35rem; }
.contact-info__block p { margin: 0; color: var(--wp--preset--color--muted); line-height: 1.6; }
.contact-info a { color: var(--wp--preset--color--primary); text-decoration: none; }
.contact-info a:hover { text-decoration: underline; }
.contact-info .muted { color: var(--wp--preset--color--muted); font-size: .85rem; }
.contact-map { margin-top: .5rem; }
.contact-map iframe { width: 100%; aspect-ratio: 16 / 10; border: 0; border-radius: var(--cby-radius); display: block; }

/* ---- Sub-page responsive scale-up ---- */
@media (min-width: 560px) {
	.highlight-grid { grid-template-columns: repeat(2, 1fr); }
	.value-grid { grid-template-columns: repeat(2, 1fr); }
	.inquiry-form .field-row { grid-template-columns: 1fr 1fr; gap: 1rem; }
	.session-row { flex-direction: row; align-items: center; justify-content: space-between; }
}

@media (min-width: 900px) {
	.highlight-grid { grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
	.value-grid { grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
	.team-grid { grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
	.contact-grid { grid-template-columns: 1.4fr .8fr; align-items: start; }
	.page-hero { padding-block: clamp(3rem, 6vw, 5rem); }
}
