:root {
	/* Festival palette */
	--caf-plum: #480433;
	--caf-coral: #cd634f;
	--caf-gold: #cb9123;
	--caf-sage: #737d59;
	--caf-teal: #0e767d;
	--caf-text: #212020;
	--caf-bg: #faf9f6;
	--caf-white: #ffffff;

	/* Typography */
	--caf-heading-font: "Fraunces", Georgia, "Times New Roman", serif;
	--caf-body-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

	/* Shape and spacing */
	--caf-radius-sm: 0.4rem;
	--caf-radius-md: 0.75rem;
	--caf-radius-lg: 1.25rem;
	--caf-shadow: 0 0.5rem 1.5rem rgba(33, 32, 32, 0.10);
	--caf-focus: #0e767d;
}

/* ------------------------------
   Global foundation
   ------------------------------ */

html {
	scroll-behavior: smooth;
}

body.community-art-festival {
	background: var(--caf-bg);
	color: var(--caf-text);
	font-family: var(--caf-body-font);
	line-height: 1.65;
}

body.community-art-festival h1,
body.community-art-festival h2,
body.community-art-festival h3,
body.community-art-festival h4,
body.community-art-festival h5,
body.community-art-festival h6 {
	font-family: var(--caf-heading-font);
	color: var(--caf-plum);
	line-height: 1.1;
	text-wrap: balance;
}

body.community-art-festival a {
	color: var(--caf-teal);
	text-underline-offset: 0.16em;
	text-decoration-thickness: 0.09em;
}

body.community-art-festival a:hover {
	color: var(--caf-plum);
}

body.community-art-festival img {
	max-width: 100%;
	height: auto;
}

::selection {
	background: var(--caf-plum);
	color: var(--caf-white);
}

/* Strong, visible keyboard focus. */
body.community-art-festival :where(a, button, input, select, textarea, [tabindex]):focus-visible {
	outline: 3px solid var(--caf-focus);
	outline-offset: 3px;
}

/* Never hide the focus indicator. */
body.community-art-festival :where(a, button, input, select, textarea, [tabindex]):focus {
	outline-offset: 3px;
}

/* ------------------------------
   Accessible skip link
   ------------------------------ */

body.community-art-festival .skip-link,
body.community-art-festival a.skip-link {
	background: var(--caf-plum);
	color: var(--caf-white);
	font-weight: 700;
	padding: 0.75rem 1rem;
	border-radius: 0 0 var(--caf-radius-sm) var(--caf-radius-sm);
	text-decoration: none;
	z-index: 100000;
}

body.community-art-festival .skip-link:focus,
body.community-art-festival a.skip-link:focus {
	clip: auto;
	clip-path: none;
	height: auto;
	width: auto;
	left: 1rem;
	top: 0;
}

/* ------------------------------
   Buttons / CTAs
   ------------------------------ */

body.community-art-festival .caf-button,
body.community-art-festival .wp-block-button__link,
body.community-art-festival .button,
body.community-art-festival button[type="submit"],
body.community-art-festival input[type="submit"] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.35rem;
	min-height: 48px;
	padding: 0.75rem 1.15rem;
	border: 2px solid transparent;
	border-radius: 999px;
	background: var(--caf-plum);
	color: var(--caf-white);
	font-family: var(--caf-body-font);
	font-weight: 750;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	box-shadow: none;
	transition: transform 150ms ease, background-color 150ms ease, color 150ms ease;
}

body.community-art-festival .caf-button:hover,
body.community-art-festival .wp-block-button__link:hover,
body.community-art-festival .button:hover,
body.community-art-festival button[type="submit"]:hover,
body.community-art-festival input[type="submit"]:hover {
	background: var(--caf-teal);
	color: var(--caf-white);
	transform: translateY(-1px);
}

body.community-art-festival .caf-button--gold {
	background: var(--caf-gold);
	color: var(--caf-text);
}

body.community-art-festival .caf-button--gold:hover {
	background: var(--caf-plum);
	color: var(--caf-white);
}

body.community-art-festival .caf-button--outline {
	background: transparent;
	border-color: currentColor;
	color: var(--caf-plum);
}

body.community-art-festival .caf-button--outline:hover {
	background: var(--caf-plum);
	color: var(--caf-white);
}

/* ------------------------------
   Festival utility classes
   These work with Kadence Row Layout / Advanced Header blocks.
   ------------------------------ */

.caf-section {
	padding-block: clamp(2.75rem, 6vw, 5.5rem);
}

.caf-container {
	width: min(100% - 2rem, 1180px);
	margin-inline: auto;
}

.caf-eyebrow {
	margin: 0 0 0.55rem;
	color: var(--caf-teal);
	font-size: 0.8rem;
	font-weight: 800;
	letter-spacing: 0.12em;
	line-height: 1.2;
	text-transform: uppercase;
}

.caf-section-title {
	margin-block: 0 0.65rem;
	font-size: clamp(2rem, 5vw, 3.5rem);
}

.caf-section-intro {
	max-width: 46rem;
	margin-inline: auto;
	font-size: 1.05rem;
}

/* ------------------------------
   Home hero
   Add class "caf-hero" to a Kadence Row Layout.
   ------------------------------ */

.caf-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	min-height: clamp(34rem, 70vh, 48rem);
	display: grid;
	align-items: end;
	background: var(--caf-plum);
	color: var(--caf-white);
}

.caf-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background:
		linear-gradient(
			180deg,
			rgba(72, 4, 51, 0.10) 10%,
			rgba(72, 4, 51, 0.30) 45%,
			rgba(72, 4, 51, 0.94) 100%
		);
	pointer-events: none;
}

.caf-hero .wp-block-heading,
.caf-hero h1,
.caf-hero h2,
.caf-hero p {
	color: var(--caf-white);
}

.caf-hero h1 {
	max-width: 12ch;
	font-size: clamp(3rem, 9vw, 6.5rem);
	letter-spacing: -0.025em;
}

.caf-hero__content {
	position: relative;
	z-index: 1;
	padding-block: clamp(2.5rem, 8vw, 5rem);
}

.caf-event-meta {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.75rem;
	margin-block: 1.5rem;
}

.caf-event-meta > * {
	padding: 0.85rem 1rem;
	border: 1px solid rgba(255,255,255,0.4);
	border-radius: var(--caf-radius-md);
	background: rgba(72, 4, 51, 0.88);
	color: var(--caf-white);
	font-weight: 750;
}

/* ------------------------------
   Discovery cards
   ------------------------------ */

.caf-discovery-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
}

.caf-discovery-card {
	height: 100%;
	padding: 1.25rem;
	border: 1px solid rgba(33,32,32,0.14);
	border-radius: var(--caf-radius-lg);
	background: var(--caf-white);
	box-shadow: 0 0.2rem 0.75rem rgba(33,32,32,0.05);
	transition: transform 150ms ease, box-shadow 150ms ease;
}

.caf-discovery-card:hover {
	transform: translateY(-2px);
	box-shadow: var(--caf-shadow);
}

.caf-discovery-card__icon {
	display: grid;
	width: 3rem;
	height: 3rem;
	place-items: center;
	margin-bottom: 1rem;
	border-radius: 50%;
	background: var(--caf-teal);
	color: var(--caf-white);
	font-size: 1.25rem;
	font-weight: 800;
}

.caf-discovery-card:nth-child(2) .caf-discovery-card__icon {
	background: var(--caf-gold);
	color: var(--caf-text);
}

.caf-discovery-card:nth-child(3) .caf-discovery-card__icon {
	background: var(--caf-sage);
}

.caf-discovery-card:nth-child(4) .caf-discovery-card__icon {
	background: var(--caf-coral);
}

.caf-discovery-card:nth-child(5) .caf-discovery-card__icon {
	background: var(--caf-plum);
}

.caf-discovery-card h3 {
	margin-block: 0 0.4rem;
}

/* ------------------------------
   Highlights / image cards
   ------------------------------ */

.caf-highlight-card {
	overflow: hidden;
	border-radius: var(--caf-radius-lg);
	background: var(--caf-white);
	box-shadow: 0 0.2rem 0.75rem rgba(33,32,32,0.06);
}

.caf-highlight-card img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

.caf-highlight-card__body {
	padding: 1rem 1.1rem 1.25rem;
}

.caf-highlight-card__body h3 {
	margin: 0 0 0.35rem;
}

/* ------------------------------
   Festival info strip
   ------------------------------ */

.caf-info-strip {
	display: grid;
	grid-template-columns: 1fr;
	border: 1px solid rgba(33,32,32,0.12);
	border-radius: var(--caf-radius-lg);
	background: var(--caf-white);
	overflow: hidden;
}

.caf-info-strip > * {
	padding: 1.25rem;
}

.caf-info-strip > * + * {
	border-top: 1px solid rgba(33,32,32,0.12);
}

/* ------------------------------
   Footer
   ------------------------------ */

body.community-art-festival #colophon {
	background: var(--caf-plum);
	color: var(--caf-white);
}

body.community-art-festival #colophon :where(h2,h3,h4,p,a) {
	color: var(--caf-white);
}

body.community-art-festival #colophon a:hover {
	color: #f5cf82;
}

/* ------------------------------
   Forms
   ------------------------------ */

body.community-art-festival :where(input, select, textarea) {
	min-height: 48px;
	border: 2px solid #5f5b5b;
	border-radius: var(--caf-radius-sm);
	background: var(--caf-white);
	color: var(--caf-text);
	font: inherit;
}

body.community-art-festival textarea {
	min-height: 9rem;
	padding-block: 0.75rem;
}

body.community-art-festival :where(input, select, textarea):focus {
	border-color: var(--caf-teal);
}

/* ------------------------------
   Reduced motion
   ------------------------------ */

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	body.community-art-festival *,
	body.community-art-festival *::before,
	body.community-art-festival *::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		scroll-behavior: auto !important;
	}
}

/* ------------------------------
   Tablet / desktop
   ------------------------------ */

@media (min-width: 640px) {
	.caf-event-meta {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.caf-discovery-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.caf-info-strip {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.caf-info-strip > * + * {
		border-top: 0;
		border-left: 1px solid rgba(33,32,32,0.12);
	}
}

@media (min-width: 900px) {
	.caf-discovery-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.caf-hero__content {
		max-width: 1180px;
		width: min(100% - 3rem, 1180px);
		margin-inline: auto;
	}
}

@media (min-width: 1200px) {
	.caf-discovery-grid {
		grid-template-columns: repeat(6, minmax(0, 1fr));
	}

	.caf-discovery-card {
		padding: 1rem;
	}
}

/* Keep touch targets comfortable on small screens. */
@media (max-width: 639px) {
	body.community-art-festival .main-navigation ul li a,
	body.community-art-festival .header-menu-container a {
		min-height: 48px;
		display: flex;
		align-items: center;
	}

	body.community-art-festival .site-header-item .header-button {
		min-height: 48px;
	}

	.caf-hero h1 {
		font-size: clamp(2.75rem, 13vw, 4.25rem);
	}
}
