/*
Theme Name: AIDA CZ
Theme URI: https://aida.cz
Author: Daniel Doktor
Description: Child theme for the AIDA Czech Republic national website. Design tokens ported from the Lovable prototype.
Template: twentytwentyfive
Version: 0.1.0
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: aida-cz
*/

/* ---------------------------------------------------------------
   Everything below is CSS that theme.json cannot express.
   Tokens themselves live in theme.json — do not duplicate them here.
   --------------------------------------------------------------- */

/* Body rendering */
body {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	min-height: 100vh;
}

html {
	scroll-behavior: smooth;
}

/* Hairline borders everywhere, matching the prototype's `* { border-color }` reset */
.wp-block-group,
.wp-block-columns,
.wp-block-column {
	border-color: var(--wp--preset--color--border);
}

/* --- Glass surface -------------------------------------------- */
/* Apply as an Additional CSS class on any Group block. */
.is-style-glass,
.glass {
	background: var(--wp--custom--glass--background);
	border: 1px solid var(--wp--custom--glass--border);
	border-radius: var(--wp--custom--radius-xl);
	backdrop-filter: blur(var(--wp--custom--glass--blur));
	-webkit-backdrop-filter: blur(var(--wp--custom--glass--blur));
}

/* --- Radius helpers ------------------------------------------- */
.has-radius-sm { border-radius: var(--wp--custom--radius-sm); }
.has-radius-md { border-radius: var(--wp--custom--radius-md); }
.has-radius-lg { border-radius: var(--wp--custom--radius-lg); }
.has-radius-xl { border-radius: var(--wp--custom--radius-xl); }
.has-radius-2xl { border-radius: var(--wp--custom--radius-2xl); }
.has-radius-3xl { border-radius: var(--wp--custom--radius-3xl); }

/* --- Text balance --------------------------------------------- */
.text-balance {
	text-wrap: balance;
}

/* --- Motion ---------------------------------------------------- */
/* Ported from the prototype. Add as Additional CSS classes. */

@keyframes aida-drift {
	0%, 100% { transform: translateY(0) translateX(0); opacity: 0.4; }
	50% { transform: translateY(-30px) translateX(10px); opacity: 0.8; }
}

@keyframes aida-breathe {
	0%, 100% { opacity: 0.6; transform: scale(1); }
	50% { opacity: 1; transform: scale(1.02); }
}

@keyframes aida-fade-up {
	from { opacity: 0; transform: translateY(20px); }
	to { opacity: 1; transform: translateY(0); }
}

.animate-drift { animation: aida-drift 8s ease-in-out infinite; }
.animate-breathe { animation: aida-breathe 6s ease-in-out infinite; }
.animate-fade-up { animation: aida-fade-up 0.8s ease-out both; }

/* Accessibility floor: the prototype's ambient motion is decorative,
   so it must yield to an OS-level reduced-motion preference. */
@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
	.animate-drift,
	.animate-breathe,
	.animate-fade-up {
		animation: none;
		opacity: 1;
		transform: none;
	}
}

/* --- Focus visibility ------------------------------------------ */
/* Dark backgrounds swallow default focus rings. */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
}

/* ---------------------------------------------------------------
   Mřížka sekcí
   Ostatní sekce = alignfull skupina s padding-inline 4rem a
   contentSize 72rem. Cover tohle nemá, tak mu to dodáme, aby
   levá hrana textu seděla na stejné svislici v každé šířce okna.
   --------------------------------------------------------------- */

.wp-block-cover.alignfull > .wp-block-cover__inner-container {
	box-sizing: border-box;
	max-width: 80rem;          /* 72rem obsahu + 2 x 4rem odsazení */
	margin-inline: auto;
	padding-inline: 4rem;
}

/* Vnitřní skupina má vlastní globální odsazení, které by se přičetlo */
.wp-block-cover.alignfull > .wp-block-cover__inner-container > .has-global-padding {
	padding-inline: 0;
}

/* Výška hero (citát skupinu uvnitř nemá, ten se netýká) */
.wp-block-cover.alignfull:has(.wp-block-cover__inner-container > .wp-block-group) {
	min-height: 88vh;
}

/* ---------------------------------------------------------------
   Nadpis stránky na homepage
   Obal má odsazení inline, proto !important — jinak ho nepřebijeme.
   --------------------------------------------------------------- */

body.home .wp-block-post-title {
	display: none;
}

body.home .wp-block-group:has(> .wp-block-post-title) {
	padding-block: 0 !important;
	margin-block: 0 !important;
}

body.home main.wp-block-group {
	margin-top: 0 !important;
}

/* ---------------------------------------------------------------
   Kontrast
   --------------------------------------------------------------- */

.wp-block-button.is-style-outline > .wp-block-button__link.wp-element-button {
	background-color: transparent;
	color: var(--wp--preset--color--foreground);
	border: 1px solid color-mix(in oklch, var(--wp--preset--color--foreground) 45%, transparent);
}

.wp-block-button.is-style-outline > .wp-block-button__link.wp-element-button:hover {
	border-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--primary);
}

.wp-block-cover .has-x-large-font-size {
	font-size: clamp(1.5rem, 1rem + 1.6vw, 2.25rem);
}
