/* ==========================================================================
   Matematrix – main stylesheet
   1. Fonts   2. Tokens & base   3. Layout   4. Components
   5. Header & menus   6. Front page   7. Programs   8. Footer & fixed UI
   9. Responsive
   ========================================================================== */

/* 1. Fonts (self-hosted, OFL) ------------------------------------------- */
@font-face {
	font-family: "Bricolage Grotesque";
	font-style: normal;
	font-weight: 200 800;
	font-display: swap;
	src: url("../fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2-variations");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "Bricolage Grotesque";
	font-style: normal;
	font-weight: 200 800;
	font-display: swap;
	src: url("../fonts/bricolage-grotesque-latin-ext-wght-normal.woff2") format("woff2-variations");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: "Figtree";
	font-style: normal;
	font-weight: 300 900;
	font-display: swap;
	src: url("../fonts/figtree-latin-wght-normal.woff2") format("woff2-variations");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "Figtree";
	font-style: normal;
	font-weight: 300 900;
	font-display: swap;
	src: url("../fonts/figtree-latin-ext-wght-normal.woff2") format("woff2-variations");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: "STIX Two Text";
	font-style: italic;
	font-weight: 400;
	font-display: swap;
	src: url("../fonts/stix-two-text-latin-400-italic.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "STIX Two Text";
	font-style: italic;
	font-weight: 400;
	font-display: swap;
	src: url("../fonts/stix-two-text-latin-ext-400-italic.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Math symbols (∫ ≈ √ ∑ ∞ → …) from STIX Two Math – STIX Two Text has none.
   Declared upright and italic so browsers don't slant them a second time. */
@font-face {
	font-family: "STIX Two Math Symbols";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("../fonts/stix-two-math-symbols.woff2") format("woff2");
	unicode-range: U+2032-2037, U+2070-209F, U+2190-21FF, U+2200-22FF;
}
@font-face {
	font-family: "STIX Two Math Symbols";
	font-style: italic;
	font-weight: 400;
	font-display: swap;
	src: url("../fonts/stix-two-math-symbols.woff2") format("woff2");
	unicode-range: U+2032-2037, U+2070-209F, U+2190-21FF, U+2200-22FF;
}
@font-face {
	font-family: "STIX Two Text";
	font-style: italic;
	font-weight: 400;
	font-display: swap;
	src: url("../fonts/stix-two-text-greek-400-italic.woff2") format("woff2");
	unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}

/* 2. Tokens & base ------------------------------------------------------- */
:root {
	--ink: #1E0B3A;
	--ink-2: #150829;
	--ink-3: #2A1450;
	--purple: #6B2BD9;
	--purple-dark: #4A1AA3;
	--yellow: #FFD23F;
	--paper: #FBFAFE;
	--lav: #F1ECFB;
	--lav-2: #ECE4FB;
	--muted: #5B4D73;
	--text-2: #3E3156;
	--line: #DCD2F0;
	--past: #CFC3E6;

	--font-display: "Bricolage Grotesque", "Trebuchet MS", sans-serif;
	--font-body: "Figtree", "Segoe UI", system-ui, sans-serif;
	--font-math: "STIX Two Text", "STIX Two Math Symbols", "Cambria Math", "Times New Roman", serif;

	--radius: 24px;
	--radius-lg: 28px;
	--shadow: 4px 4px 0 var(--ink);

	/* Header island: gap above it + its height = space it covers at the top. */
	--island-gap: 16px;
	--island-h: 88px;
	--header-h: calc(var(--island-gap) + var(--island-h));
}

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

html {
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--header-h) + 16px);
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 17px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

img,
svg {
	max-width: 100%;
	height: auto;
}

a {
	color: var(--purple);
}

a:hover {
	color: var(--purple-dark);
}

:focus-visible {
	outline: 3px solid var(--purple);
	outline-offset: 3px;
}

.section--dark :focus-visible,
.site-header :focus-visible,
.site-footer :focus-visible,
.mobile-menu :focus-visible,
.to-top:focus-visible {
	outline-color: var(--yellow);
}

h1,
h2,
h3 {
	margin: 0;
	font-family: var(--font-display);
	font-weight: 800;
	text-wrap: balance;
}

p {
	margin: 0;
}

.icon {
	flex-shrink: 0;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: absolute;
	left: 16px;
	top: -100px;
	z-index: 200;
	padding: 12px 18px;
	border-radius: 12px;
	background: var(--ink);
	color: #fff;
	font-weight: 700;
}

.skip-link:focus {
	top: 16px;
	color: #fff;
}

/* 3. Layout -------------------------------------------------------------- */
.container {
	width: 100%;
	max-width: 1240px;
	margin: 0 auto;
	padding: 0 32px;
}

.container--narrow {
	max-width: 960px;
}

.container--text {
	max-width: 820px;
}

.section {
	padding: 112px 0;
}

.section--tight {
	padding: 96px 0;
}

.section--dark {
	background-color: var(--ink);
	color: #fff;
}

.section--lav {
	background: var(--lav);
}

.section--ruled {
	border-bottom: 2px solid var(--ink);
}

.section--ruled-top {
	border-top: 2px solid var(--ink);
}

.grid-paper {
	background-color: var(--paper);
	background-image: linear-gradient(rgba(107, 43, 217, 0.075) 1px, transparent 1px), linear-gradient(90deg, rgba(107, 43, 217, 0.075) 1px, transparent 1px);
	background-size: 32px 32px;
}

.grid-dark {
	background-image: linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
	background-size: 32px 32px;
}

.grid {
	display: grid;
	gap: 28px;
}

.grid--3 {
	grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
}

.grid--2 {
	grid-template-columns: repeat(auto-fill, minmax(min(420px, 100%), 1fr));
	gap: 32px;
}

.split {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr));
	gap: 56px 72px;
	align-items: center;
}

.split--top {
	grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr));
	align-items: start;
	gap: 48px 72px;
}

.split--hero {
	grid-template-columns: repeat(auto-fit, minmax(min(460px, 100%), 1fr));
	gap: 56px;
	margin-top: 32px;
}

.stack {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.stack--start {
	align-items: flex-start;
	gap: 22px;
}

.btn-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px;
}

.chip-row {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

/* 4. Components ---------------------------------------------------------- */
.h1 {
	font-size: 76px;
	line-height: 1.02;
	letter-spacing: -0.03em;
}

.h1--page {
	font-size: 72px;
}

.h1--program {
	font-size: 64px;
	line-height: 1.04;
}

.h2 {
	font-size: 54px;
	line-height: 1.05;
	letter-spacing: -0.025em;
}

.h2--md {
	font-size: 44px;
	letter-spacing: -0.02em;
}

.h2--sm {
	font-size: 36px;
	line-height: 1.1;
	letter-spacing: -0.02em;
}

.h2--light {
	color: #fff;
}

.lead {
	font-size: 20px;
	line-height: 1.6;
	color: var(--muted);
	max-width: 600px;
}

.body-lg {
	font-size: 19px;
	line-height: 1.65;
	color: var(--text-2);
}

.text-yellow {
	color: var(--yellow);
}

.text-soft {
	color: rgba(255, 255, 255, 0.8);
}

.hl {
	background: linear-gradient(100deg, transparent 0.1em, var(--yellow) 0.25em, var(--yellow) calc(100% - 0.2em), transparent calc(100% - 0.05em)) 0 88% / 100% 0.5em no-repeat;
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
	padding: 0 0.06em;
}

.eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	font: 700 14px/1 var(--font-body);
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--purple);
}

.eyebrow::before,
.eyebrow--center::after {
	content: "";
	width: 28px;
	height: 2px;
	background: currentColor;
}

.eyebrow--light {
	color: var(--yellow);
}

.section-head {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin-bottom: 40px;
}

.section-head--split {
	flex-direction: row;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: flex-end;
	gap: 24px;
	margin-bottom: 56px;
}

.section-head__title {
	display: flex;
	flex-direction: column;
	gap: 16px;
	max-width: 680px;
}

.section-head__text {
	max-width: 380px;
	font-size: 18px;
	line-height: 1.6;
	color: var(--muted);
}

.section-head--row {
	flex-direction: row;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
}

.section-head--center {
	align-items: center;
	text-align: center;
	gap: 16px;
	margin-bottom: 36px;
}

.section-head--center .section-head__text {
	max-width: none;
}

/* Buttons */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 56px;
	padding: 0 26px;
	border: 2px solid var(--ink);
	border-radius: 999px;
	box-shadow: var(--shadow);
	font: 700 17px/1.1 var(--font-body);
	text-decoration: none;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.btn:hover {
	transform: translate(-2px, -2px);
	box-shadow: 6px 6px 0 var(--ink);
}

.btn--primary,
.btn--primary:hover {
	background: var(--purple);
	color: #fff;
}

.btn--light,
.btn--light:hover {
	background: #fff;
	color: var(--ink);
}

.btn--yellow,
.btn--yellow:hover {
	background: var(--yellow);
	color: var(--ink);
	box-shadow: 4px 4px 0 var(--purple);
}

.btn--yellow:hover {
	box-shadow: 6px 6px 0 var(--purple);
}

.btn--dark,
.btn--dark:hover {
	background: var(--ink);
	color: #fff;
	box-shadow: 4px 4px 0 var(--yellow);
}

.btn--dark:hover {
	box-shadow: 6px 6px 0 var(--yellow);
}

.btn--outline-light,
.btn--outline-light:hover {
	background: transparent;
	color: #fff;
	border-color: #fff;
	box-shadow: none;
}

.btn--outline-light:hover {
	background: rgba(255, 255, 255, 0.1);
	transform: none;
}

.btn--sm {
	min-height: 48px;
	padding: 0 20px;
	font-size: 15px;
}

.btn--tile {
	min-height: 50px;
	padding: 0 10px;
	border-radius: 14px;
	box-shadow: 3px 3px 0 var(--ink);
	font-size: 15px;
}

/* Chips */
.chip {
	display: inline-flex;
	align-items: center;
	align-self: flex-start;
	min-height: 30px;
	padding: 0 14px;
	border-radius: 999px;
	font: 700 13px/1.2 var(--font-body);
}

.chip--lav {
	background: var(--lav);
	color: var(--purple-dark);
}

.chip--yellow {
	background: var(--yellow);
	color: var(--ink);
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.chip--ghost-light {
	border: 2px solid rgba(255, 255, 255, 0.6);
	color: #fff;
}

.chip--muted {
	min-height: 26px;
	padding: 0 10px;
	background: #EDE9F4;
	color: #4A3D63;
	font-size: 12px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.chip--outlined {
	border: 2px solid var(--ink);
	background: #fff;
	color: var(--ink);
}

.chip--outlined.chip--yellow {
	background: var(--yellow);
}

/* Links */
.link-arrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	align-self: flex-start;
	padding-bottom: 2px;
	border-bottom: 3px solid var(--yellow);
	color: var(--ink);
	font: 700 16px var(--font-body);
	text-decoration: none;
}

.link-arrow:hover {
	color: var(--purple);
}

.link-arrow--light,
.link-arrow--light:hover {
	color: #fff;
}

.link-underline {
	display: inline-flex;
	align-items: center;
	min-height: 52px;
	padding: 0 8px;
	color: #fff;
	font: 700 16px var(--font-body);
	text-decoration: underline;
	text-decoration-color: var(--yellow);
	text-decoration-thickness: 3px;
	text-underline-offset: 6px;
}

.link-underline:hover {
	color: var(--yellow);
}

/* Cards */
.card {
	position: relative;
	background: #fff;
	border: 2px solid var(--ink);
	border-radius: var(--radius);
	box-shadow: 6px 6px 0 var(--purple);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
	transform: translate(-3px, -3px);
	box-shadow: 10px 10px 0 var(--purple);
}

/* Meta list (icon rows) */
.meta-list {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 8px;
	font-size: 16px;
	color: var(--text-2);
}

.meta-list li {
	display: flex;
	align-items: center;
	gap: 10px;
}

.meta-list .icon {
	color: var(--purple);
}

.meta-list--light {
	gap: 10px;
	font-size: 17px;
	color: #fff;
}

.meta-list--light .icon {
	color: var(--yellow);
}

/* Image placeholders */
.ph {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	text-align: center;
	background: repeating-linear-gradient(135deg, #EFE8FC 0 14px, #E7DDFA 14px 28px);
	color: #4A3D63;
	font: 600 15px var(--font-body);
}

.ph--dark {
	background: repeating-linear-gradient(135deg, #3A1F6B 0 14px, #33195F 14px 28px);
	color: rgba(255, 255, 255, 0.8);
}

.ph--muted {
	display: block;
	background: repeating-linear-gradient(135deg, #F1EEF6 0 14px, #EAE6F1 14px 28px);
}

/* Breadcrumb */
.breadcrumb {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	font: 600 15px var(--font-body);
	color: var(--muted);
}

.breadcrumb a {
	color: var(--muted);
}

.breadcrumb [aria-current] {
	color: var(--ink);
}

/* 5. Header & menus ------------------------------------------------------ */

/* Floating "island" header (as in V1): a rounded purple bar that floats over
   the page and stays at the top while scrolling. The wrapper covers
   --header-h at the top of the page and pulls the content up under itself
   (negative margin), so the first section's background runs behind the island. */
.site-header {
	position: sticky;
	top: 0;
	z-index: 40;
	height: var(--header-h);
	margin-bottom: calc(-1 * var(--header-h));
	padding: var(--island-gap) 32px 0;
	pointer-events: none;
}

.admin-bar .site-header {
	top: 32px;
}

.site-header__island {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	max-width: 1176px;
	min-height: var(--island-h);
	margin: 0 auto;
	padding: 12px 14px 12px 28px;
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 999px;
	background-color: var(--purple-dark);
	/* Vertical gradient: lighter purple on top, dark at the bottom. */
	/* Dark part takes over early, as on STEM-online's menu. */
	background-image: linear-gradient(180deg, var(--purple) 0%, var(--purple-dark) 26%, var(--ink-3) 58%, var(--ink) 100%);
	color: #fff;
	box-shadow: 0 12px 32px rgba(30, 11, 58, 0.3);
	pointer-events: auto;
}

.brand {
	display: flex;
	align-items: center;
	gap: 12px;
	color: var(--ink);
	text-decoration: none;
}

.brand__logo {
	display: block;
	width: auto;
	height: 48px;
}

.brand__text {
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.brand__name {
	font: 800 20px/1 var(--font-display);
	letter-spacing: 0.03em;
	text-transform: uppercase;
}

.brand__sub {
	font: 500 13px/1.2 var(--font-body);
	color: var(--muted);
}

.brand:hover {
	color: var(--ink);
}

.site-header .brand,
.site-header .brand:hover {
	color: #fff;
}

.site-header .brand {
	gap: 14px;
}

.site-header .brand__logo {
	height: 58px;
	max-width: 180px;
	object-fit: contain;
}

.site-header .brand__name {
	font-size: 27px;
}

.site-header .brand__sub {
	color: rgba(255, 255, 255, 0.75);
	font-size: 15px;
}

.nav-list {
	display: flex;
	align-items: center;
	gap: 32px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.nav-list a {
	display: block;
	padding: 8px 0;
	border-bottom: 2px solid transparent;
	color: #fff;
	font: 600 17px var(--font-body);
	text-decoration: none;
	transition: color 0.15s ease;
}

.nav-list a:hover {
	color: var(--yellow);
}

.nav-list .current-menu-item > a {
	border-bottom-color: var(--yellow);
	color: var(--yellow);
}

.site-header__actions {
	display: flex;
	align-items: center;
	gap: 10px;
}

.site-header .header-call {
	min-height: 56px;
	padding: 0 24px;
	font-size: 16px;
	border-color: var(--yellow);
	background: var(--yellow);
	color: var(--ink);
	box-shadow: none;
}

.site-header .header-call:hover {
	transform: none;
	border-color: #fff;
	background: #fff;
	color: var(--ink);
	box-shadow: none;
}

.burger {
	display: none;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.burger:hover {
	background: rgba(255, 255, 255, 0.24);
}

/* Mobile flyout (slides in from the left) */
.mobile-menu {
	position: fixed;
	inset: 0;
	z-index: 100;
}

.mobile-menu[hidden] {
	display: none;
}

.mobile-menu__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(14, 6, 30, 0.55);
	opacity: 0;
	transition: opacity 0.3s ease;
}

.mobile-menu__panel {
	position: absolute;
	top: 0;
	left: 0;
	bottom: 0;
	display: flex;
	flex-direction: column;
	gap: 24px;
	width: min(86vw, 360px);
	padding: 20px 24px 32px;
	overflow-y: auto;
	background: var(--ink);
	color: #fff;
	transform: translateX(-100%);
	transition: transform 0.3s ease;
}

.mobile-menu.is-open .mobile-menu__backdrop {
	opacity: 1;
}

.mobile-menu.is-open .mobile-menu__panel {
	transform: translateX(0);
}

.mobile-menu__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 48px;
}

.mobile-menu__close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border: 2px solid rgba(255, 255, 255, 0.6);
	border-radius: 14px;
	background: transparent;
	color: #fff;
	cursor: pointer;
}

.mobile-nav-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.mobile-nav-list a {
	display: block;
	padding: 14px 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.12);
	color: #fff;
	font: 700 22px var(--font-display);
	text-decoration: none;
}

.mobile-nav-list .current-menu-item > a,
.mobile-nav-list a:hover {
	color: var(--yellow);
}

.mobile-menu__contact {
	display: grid;
	gap: 12px;
	margin-top: auto;
}

body.menu-open {
	overflow: hidden;
}

/* 6. Front page ---------------------------------------------------------- */

/* Hero */
.hero {
	border-bottom: 2px solid var(--ink);
}

/* Hero over a background image (Postavke → Slike) with a dark overlay. */
.hero--image {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	background: var(--ink);
	color: #fff;
}

.hero__bg {
	position: absolute;
	inset: 0;
	z-index: -1;
}

.hero__bg-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 70% 40%;
}

/* With the photo: evenly dark, the board shows faintly around it. */
.hero__bg::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(21, 8, 41, 0.94) 0%, rgba(30, 11, 58, 0.84) 42%, rgba(30, 11, 58, 0.64) 100%);
}

/* Without the photo: dark behind the text, the board clear on the right. */
.hero--no-photo .hero__bg::after {
	background: linear-gradient(90deg, rgba(21, 8, 41, 0.95) 0%, rgba(30, 11, 58, 0.88) 32%, rgba(30, 11, 58, 0.5) 60%, rgba(30, 11, 58, 0.12) 100%);
}

.hero--no-photo .hero__inner {
	min-height: 740px;
}

.hero--no-photo .hero__text {
	max-width: 640px;
}

.hero--image .h1 {
	color: #fff;
}

.hero--image .lead {
	color: rgba(255, 255, 255, 0.86);
}

.hero--image .pill-label {
	border-color: rgba(255, 255, 255, 0.45);
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
}

.hero--image .pill-label__dot {
	background: var(--yellow);
}

.hero--image .hero__note {
	color: rgba(255, 255, 255, 0.8);
}

.hero--image .hero__note strong,
.hero--image .hero__note a {
	color: #fff;
}

.hero--image .hero__photo {
	border-color: #fff;
}

.hero--image :focus-visible {
	outline-color: var(--yellow);
}

.hero__inner {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(460px, 100%), 1fr));
	gap: 64px;
	align-items: center;
	padding-top: calc(72px + var(--header-h));
	padding-bottom: 104px;
}

.hero__text {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 28px;
}

.pill-label {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 36px;
	padding: 0 16px;
	border: 2px solid var(--ink);
	border-radius: 999px;
	background: #fff;
	font: 600 14px var(--font-body);
}

.pill-label__dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--purple);
}

.hero__note {
	font-size: 15px;
	color: var(--muted);
}

.hero__note strong,
.hero__note a {
	color: var(--ink);
	font-weight: 700;
}

.hero__media {
	/* How far the right-hand formula cards reach past the page edge: up to 66 px on
	   wide screens, less where the screen margin is narrow. Whatever they can't
	   reach out, the photo moves left instead, so the cards always stick out
	   past the photo by the same amount. */
	--card-out: clamp(6px, calc((100vw - 1240px) / 2 + 8px), 66px);
	--card-shift: calc(66px - var(--card-out));
	position: relative;
	justify-self: end;
	width: 100%;
	/* Photo width + room for the name card (left) and formula cards (sides). */
	max-width: calc(428px + var(--card-shift));
	padding: 36px calc(8px + var(--card-shift)) 48px 40px;
}

.hero__photo {
	max-width: 380px;
	margin-left: auto;
	aspect-ratio: 4 / 5;
	overflow: hidden;
	border: 2px solid var(--ink);
	border-radius: var(--radius-lg);
	box-shadow: 12px 12px 0 var(--purple);
}

.hero__img,
.about__img,
.slide__img,
.program-card__img,
.past-card__img,
.program-hero__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ph.hero__img,
.ph.about__img,
.ph.slide__img,
.ph.program-card__img,
.ph.program-hero__img {
	display: flex;
}

.name-card {
	position: absolute;
	left: 0;
	bottom: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 16px 22px;
	border: 2px solid var(--ink);
	border-radius: 16px;
	background: var(--yellow);
	/* Same dark ink as the yellow buttons (the hero text around it is white). */
	color: var(--ink);
	box-shadow: var(--shadow);
	transform: rotate(-4deg);
}

.name-card__name {
	font: 800 20px/1.15 var(--font-display);
}

.name-card__role {
	font: 600 14px/1.3 var(--font-body);
}

.eq-card {
	position: absolute;
	top: 0;
	right: calc(-1 * var(--card-out, 6px));
	padding: 10px 18px;
	border: 2px solid var(--ink);
	border-radius: 14px;
	background: #fff;
	box-shadow: var(--shadow);
	color: var(--purple);
	font: italic 400 26px/1.2 var(--font-math);
	transform: rotate(5deg);
}

/* Formula markup (mm_formula): raised/lowered text, stacked limits, big ∫ and ∑. */
.eq-card sup,
.eq-card sub {
	font-size: 0.6em;
	line-height: 0;
}

.eq-lim {
	display: inline-flex;
	flex-direction: column;
	gap: 0.42em;
	margin: 0 0.16em 0 0;
	font-size: 0.58em;
	line-height: 1.1;
	/* The box sits on its first line (the upper limit): raise it to the top of ∫. */
	vertical-align: 0.95em;
}

.eq-lim sup,
.eq-lim sub {
	font-size: 1em;
	line-height: 1.1;
	vertical-align: baseline;
}

.eq-lim sup {
	padding-left: 0.35em;
}

.eq-big {
	font-size: 1.45em;
	line-height: 0;
	vertical-align: -0.16em;
}

/* Two more formula cards: top-left corner, and lower right side of the photo. */
.eq-card--2 {
	top: 14px;
	right: auto;
	left: -14px;
	font-size: 22px;
	transform: rotate(-4deg);
}

.eq-card--3 {
	top: auto;
	right: calc(-1 * var(--card-out, 10px));
	/* Just above the name card. */
	bottom: 18%;
	font-size: 22px;
	transform: rotate(3deg);
}

/* Levels */
.level-card {
	display: flex;
	flex-direction: column;
	gap: 16px;
	min-height: 340px;
	padding: 32px;
	overflow: hidden;
}

.level-card > * {
	position: relative;
}

.level-card__symbol {
	position: absolute;
	top: 18px;
	right: 28px;
	color: var(--lav-2);
	/* Line height leaves room for tall glyphs (∫, x²) so they are not clipped. */
	font: italic 400 84px/1.3 var(--font-math);
}

.level-card__title {
	font-size: 28px;
	line-height: 1.15;
}

.level-card__text {
	flex-grow: 1;
	font-size: 17px;
	color: var(--muted);
}

/* Carousel */
.carousel__viewport {
	overflow: hidden;
	border: 2px solid #fff;
	border-radius: var(--radius-lg);
	background: var(--ink-3);
	box-shadow: 10px 10px 0 var(--yellow);
}

.carousel__track {
	display: flex;
	transition: transform 0.5s ease;
}

.slide {
	flex: 0 0 100%;
	min-width: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr));
	background: var(--ink-3);
}

.slide__body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 22px;
	padding: 48px;
}

.slide__title {
	color: #fff;
	font-size: 46px;
	line-height: 1.05;
	letter-spacing: -0.02em;
}

.slide__text {
	max-width: 520px;
	font-size: 17px;
	line-height: 1.65;
	color: rgba(255, 255, 255, 0.8);
}

.slide__media {
	position: relative;
	min-height: 380px;
}

.slide__media .slide__img {
	position: absolute;
	inset: 0;
}

.slide__symbol {
	position: absolute;
	right: 28px;
	bottom: 20px;
	color: rgba(255, 210, 63, 0.35);
	font: italic 400 96px/1 var(--font-math);
	pointer-events: none;
}

.carousel__controls {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	margin-top: 24px;
}

.carousel__dots {
	display: flex;
	align-items: center;
	gap: 4px;
}

.carousel__dot {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 32px;
	height: 44px;
	padding: 0 4px;
	border: 0;
	background: transparent;
	cursor: pointer;
}

.carousel__dot span {
	display: block;
	width: 12px;
	height: 12px;
	border: 2px solid #fff;
	border-radius: 999px;
	transition: width 0.3s ease, background-color 0.3s ease;
}

.carousel__dot[aria-current="true"] span {
	width: 32px;
	background: var(--yellow);
}

.carousel__nav {
	display: flex;
	align-items: center;
	gap: 12px;
}

.carousel__count {
	margin-right: 6px;
	font: 700 15px var(--font-body);
	color: rgba(255, 255, 255, 0.75);
}

.carousel__arrow {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	border: 2px solid #fff;
	border-radius: 50%;
	background: transparent;
	color: #fff;
	cursor: pointer;
}

.carousel__arrow:hover {
	background: rgba(255, 255, 255, 0.14);
}

/* About */
.about__photo {
	position: relative;
	padding: 0 16px 16px 0;
}

.about__photo .about__img,
.about__photo .ph {
	max-width: 520px;
	aspect-ratio: 1 / 1;
	border: 2px solid var(--ink);
	border-radius: var(--radius-lg);
	box-shadow: 12px 12px 0 var(--yellow);
}

.facts {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
	gap: 14px;
	margin-top: 8px;
}

.fact {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 18px 20px;
	border: 2px solid var(--ink);
	border-radius: 18px;
	background: #fff;
}

.fact__value {
	font: 800 30px/1.1 var(--font-display);
	color: var(--purple);
}

.fact__label {
	font-size: 15px;
	color: var(--muted);
}

/* Prices */
.tabs {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 36px;
}

.tabs__list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
	padding: 6px;
	border: 2px solid var(--ink);
	border-radius: 28px;
	background: #fff;
}

.tabs__tab {
	min-height: 48px;
	padding: 0 22px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--ink);
	font: 700 16px/1 var(--font-body);
	cursor: pointer;
}

.tabs__tab:hover {
	background: var(--lav);
}

.tabs__tab[aria-selected="true"] {
	background: var(--ink);
	color: #fff;
}

.price-card {
	width: 100%;
	padding: 12px 40px;
	border: 2px solid var(--ink);
	border-radius: var(--radius-lg);
	background: #fff;
	box-shadow: 10px 10px 0 var(--purple);
}

.price-panel__caption {
	padding: 20px 0 6px;
	font: 600 14px/1.5 var(--font-body);
	color: var(--purple-dark);
}

.price-row {
	display: flex;
	align-items: flex-end;
	gap: 16px;
	padding: 20px 0;
	border-bottom: 2px dashed var(--line);
}

.price-row:last-child {
	border-bottom: 0;
}

.price-row__label {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.price-row__name {
	font: 700 21px/1.2 var(--font-display);
}

.price-row__desc,
.price-row__unit {
	font-size: 15px;
	color: var(--muted);
}

.price-row__dots {
	flex: 1 1 24px;
	border-bottom: 2px dotted #C9BBE8;
	transform: translateY(-9px);
}

.price-row__value {
	display: flex;
	align-items: baseline;
	gap: 6px;
	white-space: nowrap;
}

.price-row__price {
	font: 800 30px/1 var(--font-display);
}

.price-foot {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 20px 32px;
	margin-top: 36px;
}

.pdf-btn {
	gap: 14px;
	padding: 8px 22px 8px 10px;
	border-radius: 18px;
}

.pdf-btn__icon {
	display: flex;
	align-items: flex-end;
	justify-content: center;
	flex-shrink: 0;
	width: 40px;
	height: 46px;
	padding-bottom: 6px;
	border: 2px solid var(--ink);
	border-radius: 8px;
	background: var(--yellow);
	font: 800 11px/1 var(--font-body);
	letter-spacing: 0.04em;
}

.pdf-btn__text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	text-align: left;
}

.pdf-btn__title {
	font-size: 16px;
}

.pdf-btn__sub {
	font-size: 13px;
	font-weight: 500;
	color: var(--muted);
}

.price-foot__note {
	max-width: 520px;
	font-size: 14px;
	line-height: 1.55;
	color: var(--muted);
}

/* FAQ */
.phone-link {
	border-bottom: 3px solid var(--yellow);
	color: var(--ink);
	font: 800 24px var(--font-display);
	text-decoration: none;
}

.faq {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.faq__item {
	border: 2px solid var(--ink);
	border-radius: 18px;
	background: #fff;
}

.faq__q {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 20px 22px;
	font: 700 20px/1.3 var(--font-display);
	list-style: none;
	cursor: pointer;
}

.faq__q::-webkit-details-marker {
	display: none;
}

.faq__plus {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 36px;
	height: 36px;
	border: 2px solid var(--ink);
	border-radius: 50%;
	transition: transform 0.2s ease, background-color 0.2s ease;
}

.faq__item[open] .faq__plus {
	transform: rotate(45deg);
	background: var(--yellow);
}

.faq__a {
	padding: 0 22px 22px;
	font-size: 17px;
	line-height: 1.65;
	color: var(--muted);
}

/* Contact */
.phone-block {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.phone-block__label {
	font: 600 14px var(--font-body);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.7);
}

.phone-block__number {
	color: var(--yellow);
	font: 800 56px/1.05 var(--font-display);
	letter-spacing: -0.02em;
	text-decoration: none;
}

.phone-block__number:hover {
	color: #fff;
}

.phone-block__hours {
	font-size: 16px;
	color: rgba(255, 255, 255, 0.78);
}

.contact-buttons {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr));
	gap: 12px;
	width: 100%;
	max-width: 520px;
}

.contact-buttons .btn {
	min-height: 54px;
	padding: 0 18px;
	font-size: 16px;
}

.mail-link {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	min-height: 44px;
	color: #fff;
	font: 600 17px var(--font-body);
	text-decoration: underline;
	text-decoration-color: var(--yellow);
	text-decoration-thickness: 2px;
	text-underline-offset: 5px;
}

.mail-link:hover {
	color: var(--yellow);
}

/* Right column of the contact section: address card + Google review block. */
.contact-side {
	display: flex;
	flex-direction: column;
	gap: 28px;
	min-width: 0;
}

.review-box {
	display: grid;
	grid-template-columns: auto 1fr;
	align-items: center;
	gap: 14px 20px;
	padding: 22px 24px;
	border: 1px solid rgba(255, 255, 255, 0.22);
	border-radius: var(--radius-lg);
	background: rgba(255, 255, 255, 0.05);
	color: #fff;
}

.review-box__stars {
	display: flex;
	gap: 3px;
	color: var(--yellow);
}

.review-box__stars svg {
	fill: currentColor;
}

.review-box__text {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.review-box__title {
	margin: 0;
	font: 700 17px/1.35 var(--font-body);
}

.review-box__body {
	margin: 0;
	color: rgba(255, 255, 255, 0.78);
	font-size: 15px;
	line-height: 1.5;
}

.review-box .btn {
	grid-column: 1 / -1;
	justify-self: start;
}

@media (max-width: 640px) {
	.review-box {
		grid-template-columns: 1fr;
		padding: 20px;
	}
}

.footer-review {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: #fff;
	font-weight: 600;
	text-decoration: underline;
	text-decoration-color: var(--yellow);
	text-underline-offset: 4px;
}

.footer-review svg {
	color: var(--yellow);
	fill: currentColor;
}

.footer-review:hover {
	color: var(--yellow);
}

.address-card {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 18px;
	padding: 44px;
	overflow: hidden;
	border: 2px solid #fff;
	border-radius: var(--radius-lg);
	box-shadow: 10px 10px 0 var(--purple);
	color: var(--ink);
}

.address-card > * {
	position: relative;
	z-index: 1;
}

.address-card__pin {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 60px;
	height: 60px;
	margin: 6px 0 4px 6px;
	border: 2px solid var(--ink);
	border-radius: 50% 50% 50% 0;
	background: var(--purple);
	transform: rotate(-45deg);
}

.address-card__pin span {
	width: 18px;
	height: 18px;
	border: 2px solid var(--ink);
	border-radius: 50%;
	background: var(--yellow);
}

.address-card__label {
	font: 700 13px var(--font-body);
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--purple);
}

.address-card__address {
	display: flex;
	flex-direction: column;
	font: normal 800 38px/1.12 var(--font-display);
	letter-spacing: -0.015em;
}

.address-card__how {
	font-size: 16px;
	line-height: 1.55;
	color: var(--muted);
}

.address-card__symbol {
	position: absolute;
	right: 28px;
	bottom: 8px;
	z-index: 0;
	color: #E4DAF8;
	font: italic 400 140px/1 var(--font-math);
}

/* 7. Programs ------------------------------------------------------------ */
.page-hero {
	border-bottom: 2px solid var(--ink);
}

.page-hero > .container {
	display: flex;
	flex-direction: column;
	gap: 20px;
	padding-top: calc(56px + var(--header-h));
	padding-bottom: 72px;
}

.page-hero .split--hero {
	margin-top: 12px;
}

.program-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.program-card__media {
	position: relative;
	display: block;
	aspect-ratio: 16 / 9;
	border-bottom: 2px solid var(--ink);
}

.program-card__badge {
	position: absolute;
	top: 16px;
	left: 16px;
	border: 2px solid var(--ink);
}

.program-card__body {
	display: flex;
	flex-direction: column;
	gap: 14px;
	flex-grow: 1;
	padding: 28px;
}

.program-card__title {
	font-size: 28px;
	line-height: 1.15;
}

.program-card__title a {
	color: var(--ink);
	text-decoration: none;
}

.program-card__title a:hover {
	color: var(--purple);
}

.program-card__text {
	flex-grow: 1;
	font-size: 16px;
	color: var(--muted);
}

.program-card .btn-row {
	gap: 12px;
	margin-top: 4px;
}

.past-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 2px solid var(--past);
	border-radius: 20px;
	background: #fff;
	color: var(--ink);
	text-decoration: none;
	transition: border-color 0.15s ease;
}

.past-card:hover {
	border-color: var(--ink);
	color: var(--ink);
}

.past-card__media {
	display: block;
	aspect-ratio: 16 / 9;
}

.past-card__img {
	filter: grayscale(0.6);
}

.past-card__body {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 22px;
}

.past-card__title {
	font: 800 21px/1.2 var(--font-display);
}

.past-card__text {
	font-size: 15px;
	line-height: 1.55;
	color: var(--muted);
}

.empty-note {
	padding: 28px 32px;
	border: 2px dashed var(--past);
	border-radius: 20px;
	background: #fff;
	font-size: 17px;
	color: var(--text-2);
}

.year-group {
	display: flex;
	flex-direction: column;
	gap: 20px;
	margin-bottom: 40px;
}

.year-group__head {
	display: flex;
	align-items: center;
	gap: 16px;
}

.year-group__year {
	font: 800 26px/1 var(--font-display);
}

.year-group__line {
	flex: 1;
	height: 2px;
	background: var(--ink);
}

.pager {
	display: flex;
	justify-content: center;
	gap: 16px;
}

.cta-band {
	border-top: 2px solid var(--ink);
	background: var(--yellow);
}

.cta-band__inner {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 24px 40px;
	padding-top: 56px;
	padding-bottom: 56px;
}

.cta-band__text {
	display: flex;
	flex-direction: column;
	gap: 8px;
	max-width: 640px;
	font-size: 18px;
}

.price-line {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 6px 12px;
	font-size: 17px;
	color: var(--text-2);
}

.price-line__value {
	color: var(--ink);
	font: 800 34px/1 var(--font-display);
}

.program-hero__media {
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border: 2px solid var(--ink);
	border-radius: var(--radius-lg);
	box-shadow: 12px 12px 0 var(--purple);
}

.program-layout {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 56px;
}

.program-layout__main {
	flex: 999 1 560px;
	min-width: 0;
	max-width: 720px;
}

.program-layout__aside {
	flex: 1 1 340px;
	position: sticky;
	top: calc(var(--header-h) + 32px);
}

/* Content from the block editor */
.entry-content > * + * {
	margin-top: 22px;
}

.entry-content h2 {
	margin-top: 44px;
	font-size: 34px;
	line-height: 1.15;
	letter-spacing: -0.02em;
}

.entry-content h3 {
	margin-top: 32px;
	font-size: 24px;
}

.entry-content > h2:first-child,
.entry-content > h3:first-child {
	margin-top: 0;
}

.entry-content p,
.entry-content li {
	font-size: 18px;
	line-height: 1.75;
	color: var(--text-2);
}

.entry-content ul {
	padding: 0;
	list-style: none;
}

.entry-content ul li {
	position: relative;
	padding-left: 40px;
}

.entry-content ul li + li {
	margin-top: 12px;
}

.entry-content ul li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 2px;
	width: 26px;
	height: 26px;
	border: 2px solid var(--ink);
	border-radius: 8px;
	background: var(--yellow) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231E0B3A' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center / 13px no-repeat;
}

.entry-content ol {
	padding-left: 1.4em;
}

.entry-content img {
	border: 2px solid var(--ink);
	border-radius: 18px;
}

.entry-content a {
	font-weight: 600;
}

.callout {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	margin-top: 32px;
	padding: 20px 24px;
	border: 2px solid var(--ink);
	border-radius: 18px;
	background: var(--lav);
	font-size: 17px;
	line-height: 1.6;
}

.callout__mark {
	color: var(--purple);
	font: italic 400 28px/1 var(--font-math);
}

.summary-card {
	display: flex;
	flex-direction: column;
	gap: 20px;
	padding: 28px;
	border: 2px solid var(--ink);
	border-radius: var(--radius);
	background: #fff;
	box-shadow: 8px 8px 0 var(--purple);
}

.summary-card__title {
	font-size: 24px;
	line-height: 1.2;
}

.summary-list {
	margin: 0;
}

.summary-list__row {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	padding: 12px 0;
	border-bottom: 2px dashed var(--line);
}

.summary-list__row:last-child {
	border-bottom: 0;
}

.summary-list dt {
	font-size: 15px;
	color: var(--muted);
}

.summary-list dd {
	margin: 0;
	font-weight: 700;
	text-align: right;
}

.package-prices {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 14px 16px;
	border: 2px solid var(--ink);
	border-radius: 16px;
	background: var(--lav);
}

.package-prices__title {
	font: 700 13px var(--font-body);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--purple-dark);
}

.package-prices__row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	font-size: 15px;
}

.package-prices__row strong {
	font: 800 22px/1 var(--font-display);
}

.summary-card__contact {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.summary-card__cta {
	font: 700 16px var(--font-body);
}

.contact-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
}

.summary-card__hint,
.summary-card__closed {
	font-size: 14px;
	line-height: 1.5;
	color: var(--muted);
}

.post-list {
	display: flex;
	flex-direction: column;
	gap: 32px;
}

.post-list__item a {
	color: var(--ink);
	text-decoration: none;
}

.eq-404 {
	color: var(--purple);
	font: italic 400 48px/1 var(--font-math);
}

/* 8. Footer & fixed UI --------------------------------------------------- */
.site-footer {
	padding: 48px 0 32px;
	background: var(--ink-2);
	color: rgba(255, 255, 255, 0.72);
}

.site-footer .container {
	display: flex;
	flex-direction: column;
	gap: 28px;
}

.site-footer__top {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 24px;
}

.brand--light,
.brand--light:hover {
	color: #fff;
}

.site-footer .brand__logo {
	height: 40px;
	max-width: 180px;
	object-fit: contain;
}

.site-footer .brand__name {
	font-size: 18px;
}

.footer-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 24px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 15px;
}

.footer-nav a {
	color: rgba(255, 255, 255, 0.72);
	text-decoration: none;
}

.footer-nav a:hover {
	color: #fff;
}

.site-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 10px 24px;
	padding-top: 20px;
	border-top: 1px solid rgba(255, 255, 255, 0.14);
	font-size: 14px;
	line-height: 1.6;
}

/* Mobile call bar (phones only) */
.call-bar {
	display: none;
}

.call-bar__btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 52px;
	border: 2px solid var(--ink);
	border-radius: 14px;
	background: #fff;
	color: var(--ink);
	font: 700 15px var(--font-body);
	text-decoration: none;
}

.call-bar__btn--main {
	background: var(--purple);
	color: #fff;
}

.call-bar__btn:hover {
	color: inherit;
}

/* Back-to-top angle gauge */
.to-top {
	position: fixed;
	right: 28px;
	bottom: 28px;
	z-index: 60;
	display: flex;
	align-items: center;
	gap: 10px;
	height: 54px;
	padding: 0 20px 0 8px;
	border: 2px solid var(--ink);
	border-radius: 999px;
	background: var(--ink);
	color: #fff;
	box-shadow: 4px 4px 0 var(--purple);
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.to-top:hover {
	transform: translate(-2px, -2px);
	box-shadow: 6px 6px 0 var(--purple);
}

.to-top__gauge {
	flex-shrink: 0;
}

.to-top__deg {
	min-width: 3.4ch;
	font: 800 18px/1 var(--font-display);
	font-variant-numeric: tabular-nums;
	text-align: right;
}

/* 9. Responsive ---------------------------------------------------------- */
@media (min-width: 1081px) and (max-width: 1240px) {
	.nav-list {
		gap: 24px;
	}

	.site-header .brand__sub {
		display: none;
	}
}

@media (max-width: 1080px) {
	.main-nav {
		display: none;
	}

	.burger {
		display: flex;
	}
}

@media (max-width: 900px) {
	.hero__bg::after,
	.hero--no-photo .hero__bg::after {
		background: linear-gradient(180deg, rgba(21, 8, 41, 0.93) 0%, rgba(30, 11, 58, 0.82) 100%);
	}

	.hero--no-photo .hero__inner {
		min-height: 0;
	}

	.h1,
	.h1--page {
		font-size: 54px;
	}

	.h1--program {
		font-size: 48px;
	}

	.h2 {
		font-size: 40px;
	}

	.h2--md {
		font-size: 36px;
	}

	.slide__title {
		font-size: 36px;
	}

	.section {
		padding: 88px 0;
	}

	.section--tight {
		padding: 72px 0;
	}

	.eq-card,
	.slide__symbol,
	.address-card__symbol {
		display: none;
	}

	.program-layout__aside {
		position: static;
	}
}

@media (max-width: 782px) {
	.admin-bar .site-header {
		top: 46px;
	}
}

@media (max-width: 600px) {
	.admin-bar .site-header {
		top: 0;
	}
}

@media (max-width: 640px) {
	body {
		padding-bottom: 78px;
	}

	.container {
		padding: 0 20px;
	}

	.h1,
	.h1--page {
		font-size: 40px;
	}

	.h1--program {
		font-size: 36px;
	}

	.h2 {
		font-size: 32px;
	}

	.h2--md,
	.h2--sm {
		font-size: 30px;
	}

	.slide__title {
		font-size: 30px;
	}

	.section {
		padding: 64px 0;
	}

	.section--tight {
		padding: 56px 0;
	}

	.header-call,
	.brand__sub {
		display: none;
	}

	:root {
		--island-gap: 10px;
		--island-h: 70px;
	}

	.site-header {
		padding: var(--island-gap) 12px 0;
	}

	.site-header__island {
		padding: 8px 8px 8px 18px;
	}

	.site-header .brand__logo {
		height: 46px;
	}

	.brand__name {
		font-size: 18px;
	}

	.site-header .brand__name {
		font-size: 22px;
	}

	.burger {
		width: 52px;
		height: 52px;
	}

	.hero__inner {
		padding-top: calc(40px + var(--header-h));
		padding-bottom: 64px;
	}

	.hero__media {
		padding: 20px 0 36px;
	}

	.slide__body,
	.address-card,
	.summary-card {
		padding: 28px 22px;
	}

	.slide__media {
		min-height: 220px;
	}

	.carousel__count {
		display: none;
	}

	.price-card {
		padding: 8px 20px;
	}

	.price-row__price {
		font-size: 24px;
	}

	.tabs__tab {
		flex: 1 1 40%;
		padding: 0 12px;
	}

	.phone-block__number {
		font-size: 36px;
	}

	.address-card__address {
		font-size: 28px;
	}

	.page-hero > .container {
		padding-top: calc(36px + var(--header-h));
		padding-bottom: 56px;
	}

	.call-bar {
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 50;
		display: grid;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 8px;
		padding: 10px 12px calc(12px + env(safe-area-inset-bottom));
		border-top: 2px solid var(--ink);
		background: #fff;
	}

	.to-top {
		right: 14px;
		bottom: calc(86px + env(safe-area-inset-bottom));
		height: 48px;
		padding: 0 14px 0 5px;
	}
}

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

	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
	}
}

/* Gallery section ---------------------------------------------------------- */
.gallery-thumbs {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 112px));
	gap: 12px;
	margin: 4px 0 0;
	padding: 0;
	list-style: none;
}

.gallery-thumb {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 1;
	padding: 0;
	overflow: hidden;
	border: 2px solid rgba(255, 255, 255, 0.75);
	border-radius: 14px;
	background: var(--ink-3);
	cursor: pointer;
}

.gallery-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.gallery-thumb:hover img {
	transform: scale(1.06);
}

.gallery-thumb__more {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(30, 11, 58, 0.72);
	color: #fff;
	font: 800 24px var(--font-display);
}

.gallery-count {
	font-weight: 600;
	opacity: 0.75;
}

.gallery-empty {
	max-width: 520px;
	padding: 16px 20px;
	border: 1px dashed rgba(255, 255, 255, 0.45);
	border-radius: 12px;
	color: rgba(255, 255, 255, 0.85);
	font-size: 15px;
	line-height: 1.5;
}

.gallery-visual {
	min-width: 0;
}

/* Pyramid (template-parts/front/piramida.php) ------------------------------ */
.pyr {
	position: relative;
	height: 520px;
	perspective: 1300px;
	perspective-origin: 50% 40%;
}

.pyr__root {
	position: absolute;
	top: 68%;
	left: 50%;
	width: 0;
	height: 0;
	transform: scale3d(1.25, 1.25, 1.25) rotateX(-17deg);
	transform-style: preserve-3d;
}

.pyr__spin {
	position: absolute;
	width: 0;
	height: 0;
	transform: rotateY(32deg);
	transform-style: preserve-3d;
	animation: mm-pyr-spin 32s linear infinite;
}

.pyr__shadow {
	position: absolute;
	top: -320px;
	left: -320px;
	width: 640px;
	height: 640px;
	background: radial-gradient(circle, rgba(139, 92, 246, 0.38) 0%, rgba(139, 92, 246, 0) 62%);
	transform: rotateX(90deg) translateZ(-2px);
}

.pyr__base {
	position: absolute;
	top: -100px;
	left: -100px;
	width: 200px;
	height: 200px;
	transform: rotateX(90deg);
	transform-style: preserve-3d;
}

.pyr__base-svg,
.pyr__face svg {
	display: block;
	overflow: visible;
	filter: drop-shadow(0 0 6px rgba(183, 148, 255, 0.55));
}

.pyr__base-svg {
	position: absolute;
	inset: 0;
}

.pyr__edge {
	stroke: #B794FF;
	stroke-width: 3;
	stroke-linejoin: round;
}

.pyr__floor {
	fill: rgba(255, 210, 63, 0.55);
}

.pyr__grid {
	fill: none;
	stroke: rgba(107, 43, 217, 0.45);
	stroke-width: 1.5;
}

.pyr__hinge {
	position: absolute;
	inset: 0;
	transform-style: preserve-3d;
}

.pyr__hinge--1 {
	transform: rotateZ(90deg);
}

.pyr__hinge--2 {
	transform: rotateZ(180deg);
}

.pyr__hinge--3 {
	transform: rotateZ(270deg);
}

/* Each face hinges on a base edge: 0° = lying flat (the net), −125.26° = folded up. */
.pyr__face {
	position: absolute;
	top: -173.2px;
	left: 0;
	width: 200px;
	height: 173.2px;
	transform: rotateX(-125.26deg);
	transform-origin: 50% 100%;
	animation: mm-pyr-fold 12s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

.pyr__face--1 {
	animation-delay: -0.35s;
}

.pyr__face--2 {
	animation-delay: -0.7s;
}

.pyr__face--3 {
	animation-delay: -1.05s;
}

.pyr.is-paused .pyr__spin,
.pyr.is-paused .pyr__face {
	animation-play-state: paused;
}

@keyframes mm-pyr-spin {
	from {
		transform: rotateY(0deg);
	}

	to {
		transform: rotateY(360deg);
	}
}

@keyframes mm-pyr-fold {
	0%,
	14% {
		transform: rotateX(0deg);
	}

	42%,
	74% {
		transform: rotateX(-125.26deg);
	}

	97%,
	100% {
		transform: rotateX(0deg);
	}
}

/* Gallery lightbox (native <dialog>) --------------------------------------- */
body.lightbox-open {
	overflow: hidden;
}

.lightbox {
	width: 100%;
	max-width: none;
	height: 100%;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: rgba(15, 6, 30, 0.96);
	color: #fff;
}

.lightbox[open] {
	display: grid;
	grid-template-rows: auto minmax(0, 1fr);
}

.lightbox::backdrop {
	background: rgba(15, 6, 30, 0.7);
}

.lightbox__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
}

.lightbox__count {
	margin: 0;
	color: var(--yellow);
	font: 700 16px var(--font-body);
	letter-spacing: 0.04em;
}

.lightbox__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.lightbox__btn:hover {
	background: rgba(255, 255, 255, 0.24);
}

.lightbox :focus-visible {
	outline: 3px solid var(--yellow);
	outline-offset: 3px;
}

.lightbox__stage {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 0;
	padding: 0 96px 32px;
}

.lightbox__slide {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	max-width: 100%;
	max-height: 100%;
	margin: 0;
}

.lightbox__slide[hidden] {
	display: none;
}

.lightbox__img {
	display: block;
	width: auto;
	max-width: min(1200px, 100%);
	height: auto;
	max-height: calc(100vh - 170px);
	max-height: calc(100dvh - 170px);
	border-radius: 12px;
	object-fit: contain;
}

.lightbox__caption {
	max-width: 720px;
	color: rgba(255, 255, 255, 0.82);
	font-size: 15px;
	line-height: 1.5;
	text-align: center;
}

.lightbox__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
}

.lightbox__nav--prev {
	left: 20px;
}

.lightbox__nav--next {
	right: 20px;
}

@media (prefers-reduced-motion: reduce) {
	.pyr__spin,
	.pyr__face {
		animation: none;
	}
}

@media (max-width: 640px) {
	.gallery-thumbs {
		gap: 8px;
	}

	.pyr {
		height: 330px;
	}

	.pyr__root {
		transform: scale3d(0.7, 0.7, 0.7) rotateX(-17deg);
	}

	.lightbox__stage {
		padding: 0 12px 100px;
	}

	.lightbox__img {
		max-height: calc(100vh - 220px);
		max-height: calc(100dvh - 220px);
	}

	.lightbox__nav {
		top: auto;
		bottom: 24px;
		transform: none;
	}

	.lightbox__nav--prev {
		left: calc(50% - 68px);
	}

	.lightbox__nav--next {
		right: calc(50% - 68px);
	}
}

/* Sections with 3D animations: keep the turning shapes from widening the page
   (phones count 3D-transformed parts in the page width and let it scroll sideways). */
.gallery-section,
.faq-section {
	overflow: hidden;
}

/* FAQ intro column with the 3D logo ------------------------------------------ */
.faq-intro {
	display: flex;
	flex-direction: column;
	gap: 48px;
	min-width: 0;
}

/* 3D logo (template-parts/front/kocka.php) ---------------------------------- */
/* Planet + slogan under it. */
.planet-wrap {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 26px;
	align-self: center;
	flex: 0 0 auto;
}

.planet-slogan {
	margin: 0;
	color: var(--ink);
	font: 800 21px/1.25 var(--font-display);
	letter-spacing: 0.01em;
	text-align: center;
	text-wrap: balance;
}

.planet-slogan__dash {
	color: var(--muted);
	font-weight: 600;
}

.planet-slogan__accent {
	color: var(--purple);
}

/* A dark disc ("space") with stars and a ring; the logo cube turns inside. */
.planet {
	--planet: 300px;
	--cube: 112px;
	position: relative;
	align-self: center;
	width: var(--planet);
	height: var(--planet);
	flex: 0 0 auto;
	border-radius: 50%;
	background: radial-gradient(circle at 50% 42%, #33186A 0%, var(--ink) 52%, #10051F 100%);
	box-shadow: 0 0 0 1px rgba(183, 148, 255, 0.3), 0 0 64px rgba(107, 43, 217, 0.4), 0 22px 48px rgba(30, 11, 58, 0.3);
	perspective: 900px;
}

.planet__stars {
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background:
		radial-gradient(1.6px 1.6px at 18% 28%, #fff 50%, transparent 52%),
		radial-gradient(1.2px 1.2px at 30% 74%, #fff 50%, transparent 52%),
		radial-gradient(2px 2px at 76% 22%, #fff 50%, transparent 52%),
		radial-gradient(1.2px 1.2px at 84% 62%, #fff 50%, transparent 52%),
		radial-gradient(1.4px 1.4px at 62% 86%, #fff 50%, transparent 52%),
		radial-gradient(1.2px 1.2px at 12% 52%, #fff 50%, transparent 52%),
		radial-gradient(1.6px 1.6px at 46% 12%, #FFD23F 50%, transparent 52%),
		radial-gradient(1.2px 1.2px at 90% 40%, #fff 50%, transparent 52%),
		radial-gradient(1.2px 1.2px at 24% 90%, #fff 50%, transparent 52%),
		radial-gradient(1.4px 1.4px at 70% 48%, rgba(255, 255, 255, 0.7) 50%, transparent 52%),
		radial-gradient(1.2px 1.2px at 40% 40%, rgba(255, 255, 255, 0.6) 50%, transparent 52%),
		radial-gradient(1.6px 1.6px at 56% 66%, rgba(255, 255, 255, 0.6) 50%, transparent 52%);
	opacity: 0.85;
}

.planet__scene {
	position: absolute;
	top: 52%;
	left: 50%;
	width: 0;
	height: 0;
	transform: rotateX(-30deg);
	transform-style: preserve-3d;
}

/* Ring lies flat around the cube: its front half passes in front, the back half behind. */
.planet__ring {
	position: absolute;
	top: calc(var(--cube) * -1.1);
	left: calc(var(--cube) * -1.1);
	width: calc(var(--cube) * 2.2);
	height: calc(var(--cube) * 2.2);
	border: 1.5px solid rgba(196, 170, 255, 0.4);
	border-radius: 50%;
	transform: rotateX(90deg);
}

.cube {
	position: absolute;
	width: 0;
	height: 0;
	transform: rotateY(-45deg);
	transform-style: preserve-3d;
	animation: mm-cube-turn var(--mm-cube-turn, 24s) linear infinite;
}

.cube__face {
	position: absolute;
	top: calc(var(--cube) / -2);
	left: calc(var(--cube) / -2);
	width: var(--cube);
	height: var(--cube);
	background: linear-gradient(160deg, #2C1458 0%, #1A0935 100%);
	box-shadow: inset 0 0 24px rgba(139, 92, 246, 0.35);
}

.cube__face svg {
	display: block;
	width: 100%;
	height: 100%;
	overflow: visible;
	filter: drop-shadow(0 0 3px rgba(196, 170, 255, 0.8));
}

.cube__face--front {
	transform: translateZ(calc(var(--cube) / 2));
}

.cube__face--right {
	transform: rotateY(90deg) translateZ(calc(var(--cube) / 2));
}

.cube__face--back {
	transform: rotateY(180deg) translateZ(calc(var(--cube) / 2));
}

.cube__face--left {
	transform: rotateY(-90deg) translateZ(calc(var(--cube) / 2));
}

.cube__face--top {
	transform: rotateX(90deg) translateZ(calc(var(--cube) / 2));
}

.cube__face--bottom {
	transform: rotateX(-90deg) translateZ(calc(var(--cube) / 2));
}

.cube__thin,
.cube__mid,
.cube__thick {
	fill: none;
	stroke: #F4EEFF;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.cube__thin {
	stroke-width: 3.5;
}

.cube__mid {
	stroke-width: 5;
}

.cube__thick {
	stroke-width: 9;
}

.cube__fill {
	fill: #F4EEFF;
}

.planet--still .cube,
.planet.is-paused .cube {
	animation-play-state: paused;
}

.planet--still .cube {
	animation: none;
}

@keyframes mm-cube-turn {
	from {
		transform: rotateY(-45deg);
	}

	to {
		transform: rotateY(315deg);
	}
}

@media (prefers-reduced-motion: reduce) {
	.cube {
		animation: none;
	}
}

/* Tablet: the FAQ is one column, so the planet sits beside the heading. */
@media (min-width: 641px) and (max-width: 860px) {
	.faq-intro {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		gap: 32px;
	}

	.planet {
		--planet: 240px;
		--cube: 90px;
	}
}

@media (max-width: 640px) {
	.planet {
		--planet: 230px;
		--cube: 86px;
	}

	.planet--no-phone {
		display: none;
	}

	.planet-slogan {
		font-size: 18px;
	}

	.faq-intro {
		gap: 36px;
	}
}
