/*
Theme Name: Crescendum Community
Theme URI: https://crescendum.ca
Author: Crescendum Inc
Author URI: https://crescendum.ca
Description: A warm, modern, community-first block theme for a townhouse condominium. Built to the Community Brand Identity & Style Guide — Crisp White, Soft Greige, Slate, Charcoal, and a Muted Blue accent, with Montserrat headings and Inter body type. Full Site Editing, generous white space, fully responsive, and ready for authenticated (Keycloak/OIDC) resident areas via standard plugins.
Requires at least: 6.5
Tested up to: 6.7
Requires PHP: 7.4
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: crescendum-community
Tags: full-site-editing, block-patterns, block-styles, custom-colors, custom-logo, custom-menu, editor-style, featured-images, threaded-comments, translation-ready, wide-blocks, sticky-post
*/

/*
 * Most styling lives in theme.json (colors, typography, spacing, elements, blocks).
 * This file only holds the few things theme.json cannot express, plus the CSS
 * behind the theme's custom block styles. Keep additions minimal and on-brand.
 */

/* --- Accessibility: visible keyboard focus everywhere --- */
:where(a, button, input, select, textarea, summary, .wp-block-button__link, .wp-block-navigation-item__content):focus-visible {
	outline: 2px solid #557085;
	outline-offset: 2px;
	border-radius: 2px;
}

/* Skip link (WordPress injects it; make it clearly visible when focused) */
.skip-link:focus {
	background-color: #ffffff;
	color: #2b2b2b;
	z-index: 100000;
	padding: 0.75rem 1.25rem;
	border-radius: 6px;
	box-shadow: 0 2px 12px rgba(43, 43, 43, 0.2);
}

/* --- Block style: Card (Soft Greige surface, subtle shadow, comfortable padding) --- */
.wp-block-group.is-style-crescendum-card {
	background-color: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--tertiary);
	border-radius: 10px;
	padding: clamp(1.5rem, 4vw, 2.25rem);
	box-shadow: var(--wp--preset--shadow--card);
	transition: box-shadow 0.2s ease, transform 0.2s ease;
	height: 100%;
}

/* When a card is (or contains) a link, lift it gently on hover */
.wp-block-group.is-style-crescendum-card:hover {
	box-shadow: var(--wp--preset--shadow--card-hover);
	transform: translateY(-2px);
}

/* --- Block style: Section surface (warm greige band for alternating sections) --- */
.wp-block-group.is-style-crescendum-surface {
	background-color: var(--wp--preset--color--surface);
}

/* --- Block style: Eyebrow (small caps label, e.g. "Chapter 1", "Community News") --- */
.is-style-crescendum-eyebrow {
	font-family: var(--wp--preset--font-family--inter);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--wp--preset--color--secondary);
	line-height: 1.4;
	margin-bottom: 0.5rem;
}

/* --- Block style: Checklist (arrow markers, for Do's / feature lists) --- */
.wp-block-list.is-style-crescendum-check {
	list-style: none;
	margin-left: 0;
	padding-left: 0;
}
.wp-block-list.is-style-crescendum-check > li {
	position: relative;
	padding-left: 2rem;
	margin-bottom: 0.9rem;
}
.wp-block-list.is-style-crescendum-check > li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.55em;
	width: 1.1rem;
	height: 2px;
	background-color: var(--wp--preset--color--primary);
}
.wp-block-list.is-style-crescendum-check > li::after {
	content: "";
	position: absolute;
	left: 0.85rem;
	top: calc(0.55em - 3px);
	width: 8px;
	height: 8px;
	border-top: 2px solid var(--wp--preset--color--primary);
	border-right: 2px solid var(--wp--preset--color--primary);
	transform: rotate(45deg);
}

/* --- Icon circle used in personality / resource tiles --- */
.crescendum-icon-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 3rem;
	height: 3rem;
	border-radius: 50%;
	background-color: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
}
.crescendum-icon-badge svg {
	width: 1.4rem;
	height: 1.4rem;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.75;
}

/* --- Header: "Log in / Log out" rendered as a subtle outlined button --- */
/* Muted Blue is reserved for true CTAs, so this control stays neutral. */
.crescendum-login-button a {
	display: inline-block;
	font-family: var(--wp--preset--font-family--inter);
	font-weight: 600;
	font-size: var(--wp--preset--font-size--small);
	line-height: 1;
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
	padding: 0.6rem 1.1rem;
	border: 1px solid var(--wp--preset--color--tertiary);
	border-radius: 6px;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}
.crescendum-login-button a:hover,
.crescendum-login-button a:focus {
	background-color: var(--wp--preset--color--surface);
	border-color: var(--wp--preset--color--secondary);
	text-decoration: none;
}

/* --- Respect reduced-motion preferences --- */
@media (prefers-reduced-motion: reduce) {
	.wp-block-group.is-style-crescendum-card,
	.wp-block-group.is-style-crescendum-card:hover {
		transition: none;
		transform: none;
	}
}
