/* YJAR CMS – "Minimal" theme. Clean editorial: serif/sans pairing, generous
   whitespace, understated. Brand colours/font choice come from site.brand.*
   (see layout.html's inline <style> + the [data-font] attribute) — this
   file only ever defines the FIXED, safe font-family lists those hook into;
   no user-supplied text is ever concatenated into a CSS declaration (see
   lib/api.js's FONT_CHOICES comment for the reasoning). */
:root {
	--ink: #1c1a17;
	--muted: #6b6459;
	--paper: #faf8f4;
	--paper-2: #f1ede4;
	--line: #e6e1d6;
	--accent: #c9a15a;
	--wrap: 980px;
	--font-serif: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
	--font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--font-heading: var(--font-serif);
	--font-body: var(--font-sans);
}
/* brand.font — a curated key ("serif" | "sans"), never free text (see
   lib/api.js's FONT_CHOICES) — switches which of the two FIXED stacks above
   is used for body copy; headings stay serif in both, which is the whole
   "editorial" point of this theme (a --font-heading override is left in
   for a future variant, not currently reachable from the customizer). */
:root[data-font="sans"] { --font-heading: var(--font-sans); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font-family: var(--font-body);
	color: var(--ink);
	background: var(--paper);
	line-height: 1.7;
}
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
a { color: var(--ink); text-decoration-color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; }

/* Skip link — visually hidden until focused, first focusable element in the DOM. */
.skip-link {
	position: absolute; left: -9999px; top: 0; z-index: 100;
	background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* Preview bars */
.preview-bar { text-align: center; font-weight: 600; padding: 8px 12px; font-size: 14px; }
.preview-bar:not(.preview-bar--customizer) { background: var(--accent); color: var(--ink); }
.preview-bar--customizer { background: var(--ink); color: var(--paper); }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 28px; padding-bottom: 28px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; color: var(--ink); font-weight: 600; }
.brand__name { font-family: var(--font-heading); font-size: 22px; letter-spacing: -.01em; }
.brand__logo { max-height: 40px; width: auto; display: block; }
.brand:hover { color: var(--ink); }

.menu { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; flex-wrap: wrap; }
.menu__item a { display: inline-block; padding: 8px 12px; font-size: 15px; color: var(--muted); }
.menu__item a:hover { color: var(--ink); }

.lang-switch { display: flex; gap: 2px; margin-left: 8px; }
.lang-switch__item { display: inline-block; padding: 6px 9px; font-weight: 700; font-size: 12px; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); }
.lang-switch__item:hover { border-color: var(--accent); color: var(--ink); }
.lang-switch__item.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* Main */
.site-main { padding: 56px 0 80px; }
.page__title, .post__title { font-family: var(--font-heading); color: var(--ink); font-size: clamp(2rem, 5vw, 3rem); line-height: 1.15; margin: 0 0 26px; letter-spacing: -.01em; }
.content { font-size: 18px; }
.content p { margin: 0 0 1.3em; }
.content h2 { font-family: var(--font-heading); color: var(--ink); margin-top: 1.8em; }
.content h3 { font-family: var(--font-heading); color: var(--ink); }
.content .lead { font-size: 1.25em; color: var(--ink); }
.content a { text-decoration: underline; }
.content ul, .content ol { padding-left: 1.3em; }
.content blockquote { border-left: 3px solid var(--accent); margin: 1.4em 0; padding: .4em 0 .4em 1.2em; color: var(--muted); font-style: italic; }

.btn, .content .btn {
	display: inline-block; background: var(--ink); color: var(--paper); text-decoration: none;
	padding: 12px 22px; font-weight: 600; transition: background .15s ease, color .15s ease;
}
.btn:hover, .content .btn:hover { background: var(--accent); color: var(--ink); }

/* Post meta + list */
.post__meta, .postcard__meta { color: var(--muted); font-size: 14px; }
.postlist { display: grid; gap: 40px; }
.postcard { padding-bottom: 36px; border-bottom: 1px solid var(--line); }
.postcard__title { font-family: var(--font-heading); margin: 8px 0 10px; font-size: 1.7rem; }
.postcard__title a { color: var(--ink); }
.postcard__title a:hover { color: var(--accent); }
.postcard__excerpt { margin: 0 0 10px; color: var(--muted); }
.postcard__more { font-weight: 600; color: var(--ink); border-bottom: 1px solid var(--accent); }
.postcard__thumb { display: block; margin: 0 0 18px; }
.postcard__thumb img { display: block; width: 100%; height: 260px; object-fit: cover; }

.post__image, .page > .post__image {
	width: 100%; max-height: 460px; object-fit: cover; margin: 0 0 28px;
	border-radius: 12px; border: 1px solid var(--line); background: #fff;
}

.post__cats, .post__tags { margin: 0 0 18px; display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
	display: inline-block; padding: 5px 12px; font-size: 13px; font-weight: 600;
	background: var(--paper-2); color: var(--ink); text-decoration: none;
}
.chip:hover { background: var(--accent); color: var(--ink); }
.chip--tag { background: transparent; border: 1px solid var(--line); color: var(--muted); font-weight: 500; }
.chip--tag:hover { border-color: var(--accent); color: var(--ink); }

.pagination { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 12px; padding-top: 22px; border-top: 1px solid var(--line); }
.pagination__status { color: var(--muted); font-size: 14px; }
.pagination__prev, .pagination__next { font-weight: 600; color: var(--ink); }
.pagination__prev:hover, .pagination__next:hover { color: var(--accent); }

.notfound { text-align: center; padding: 80px 0; }
.notfound__code { font-family: var(--font-heading); font-size: 4.5rem; font-weight: 700; color: var(--accent); margin: 0; }
.notfound h1 { font-family: var(--font-heading); color: var(--ink); }

.site-footer p { margin: 0; font-size: 14px; }

/* Hamburger toggle — CSS-only (checkbox hack), no script dependency.
   Hidden entirely above the breakpoint where the full inline menu fits. */
.nav-toggle-btn { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 30px; height: 30px; cursor: pointer; margin-left: auto; }
.nav-toggle-btn span { display: block; height: 2px; width: 100%; background: var(--ink); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.nav-toggle:checked ~ .nav-toggle-btn span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle:checked ~ .nav-toggle-btn span:nth-child(2) { opacity: 0; }
.nav-toggle:checked ~ .nav-toggle-btn span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
	.site-header .wrap { flex-wrap: wrap; }
	.nav-toggle-btn { display: flex; }
	.site-nav {
		order: 10; flex-basis: 100%; overflow: hidden; max-height: 0;
		transition: max-height .25s ease;
	}
	.nav-toggle:checked ~ .site-nav { max-height: 480px; }
	.menu { flex-direction: column; gap: 2px; padding: 14px 0 6px; border-top: 1px solid var(--line); margin-top: 14px; }
	/* 44px-ish tap target (WCAG 2.5.5 / iOS HIG guidance), not just a hover state */
	.menu__item a { display: block; padding: 12px 10px; border-radius: 8px; }
}

/* Comments */
.comments { margin-top: 56px; padding-top: 34px; border-top: 1px solid var(--line); }
.comments__title { font-family: var(--font-heading); color: var(--ink); margin: 0 0 18px; }
.comments__empty { color: var(--muted); }
.comments__hint { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.comments__notice { padding: 10px 14px; font-weight: 600; margin: 0 0 18px; }
.comments__notice--ok { background: #e3f3e8; color: #1c6b3a; }
.comments__notice--err { background: #fce4e2; color: #c0392b; }
.comments__list { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 16px; }
.comment { border: 1px solid var(--line); padding: 16px 20px; background: var(--paper-2); }
.comment__meta { margin: 0 0 6px; font-size: 13px; color: var(--muted); }
.comment__body { margin: 0; white-space: pre-wrap; word-wrap: break-word; }

.comment-form, .yjar-form { max-width: 560px; }
.comment-form label, .yjar-form label { display: block; font-weight: 600; color: var(--ink); font-size: 14px; margin: 14px 0 5px; }
.comment-form input[type=text], .comment-form input[type=email], .comment-form textarea,
.yjar-form input[type=text], .yjar-form input[type=email], .yjar-form textarea, .yjar-form select {
	width: 100%; padding: 10px 12px; border: 1px solid var(--line); font-family: inherit; font-size: 15px; color: var(--ink); background: var(--paper);
}
.comment-form textarea, .yjar-form textarea { resize: vertical; line-height: 1.5; min-height: 100px; }
.comment-form input:focus, .comment-form textarea:focus,
.yjar-form input:focus, .yjar-form textarea:focus, .yjar-form select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(191,0,21,.18); }
.yjar-form { padding: 24px 26px; background: var(--paper-2); border: 1px solid var(--line); border-radius: 10px; }
.yjar-form button {
	background: var(--accent); color: #fff; border-radius: 999px; padding: 12px 28px; font-weight: 700; font-size: 15px;
}
.yjar-form button:hover { background: var(--ink); }
.comment-form button, .yjar-form button { margin-top: 16px; border: none; cursor: pointer; }
.comment-form__hp, .hp-field { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.yjar-form .form-field { margin: 14px 0; }
.yjar-form .form-field--checkbox label { display: flex; align-items: center; gap: 8px; font-weight: 400; }

/* ===================================================================
   Page-builder blocks (plugins/page-builder/) — same fixed class names
   regardless of theme; see themes/yjar/style.css for the authoritative
   list of what the renderer emits.
   =================================================================== */
.block { margin: 0 0 28px; }
.block:last-child { margin-bottom: 0; }
.block--heading { font-family: var(--font-heading); color: var(--ink); }
.block--image img { display: block; }
.block--image figcaption { margin-top: 8px; font-size: 14px; color: var(--muted); }
.block--spacer { margin: 0; }

.block__btn { display: inline-block; padding: 12px 24px; font-weight: 600; text-decoration: none; transition: background .15s ease, color .15s ease, border-color .15s ease; }
.block__btn--primary { background: var(--ink); color: var(--paper); }
.block__btn--primary:hover { background: var(--accent); color: var(--ink); }
.block__btn--secondary { background: var(--paper-2); color: var(--ink); }
.block__btn--secondary:hover { background: var(--accent); color: var(--ink); }
.block__btn--ghost { background: transparent; color: var(--ink); border: 2px solid var(--ink); padding: 10px 22px; }
.block__btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

.block--columns { display: grid; gap: 28px; grid-template-columns: repeat(var(--cols, 2), 1fr); align-items: start; }
.block__col > .block:last-child { margin-bottom: 0; }

.block--gallery { display: grid; gap: 14px; grid-template-columns: repeat(var(--gallery-cols, 3), 1fr); }
.gallery__item { margin: 0; }
.gallery__item img { display: block; width: 100%; height: 100%; aspect-ratio: 1 / 1; object-fit: cover; }

.block--testimonial { margin: 0 0 28px; padding: 30px 32px; background: var(--paper-2); border-left: 3px solid var(--accent); }
.testimonial__quote { font-family: var(--font-heading); margin: 0 0 16px; font-size: 1.2em; color: var(--ink); font-style: italic; }
.testimonial__author { display: flex; align-items: center; gap: 12px; }
.testimonial__avatar { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; }
.testimonial__who { display: flex; flex-direction: column; }
.testimonial__name { font-weight: 700; color: var(--ink); }
.testimonial__role { font-size: 13px; color: var(--muted); }

.block--pricing-table { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); align-items: stretch; }
.pricing-card { display: flex; flex-direction: column; padding: 28px 26px; border: 1px solid var(--line); background: var(--paper); }
.pricing-card--featured { border-color: var(--accent); }
.pricing-card__title { font-family: var(--font-heading); margin: 0 0 6px; color: var(--ink); }
.pricing-card__price { margin: 0 0 16px; font-size: 1.6em; font-weight: 700; color: var(--ink); }
.pricing-card__features { list-style: none; margin: 0 0 20px; padding: 0; flex: 1; display: grid; gap: 8px; }
.pricing-card__features li { padding-left: 22px; position: relative; }
.pricing-card__features li::before { content: "\2713"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.pricing-card__cta { text-align: center; }

.block--accordion { display: grid; gap: 10px; }
.accordion__item { border: 1px solid var(--line); padding: 4px 18px; background: var(--paper); }
.accordion__summary { cursor: pointer; padding: 14px 0; font-weight: 600; color: var(--ink); list-style: none; }
.accordion__summary::-webkit-details-marker { display: none; }
.accordion__summary::before { content: "+"; display: inline-block; width: 1.2em; color: var(--accent); font-weight: 700; }
.accordion__item[open] > .accordion__summary::before { content: "\2013"; }
.accordion__content { padding: 0 0 16px; }
.accordion__content p:last-child { margin-bottom: 0; }

.block--tabs { display: flex; flex-wrap: wrap; border: 1px solid var(--line); overflow: hidden; }
.tabs__radio { position: absolute; opacity: 0; width: 1px; height: 1px; order: 0; }
.tabs__label { order: 1; padding: 13px 20px; cursor: pointer; font-weight: 600; color: var(--ink); background: var(--paper-2); border-bottom: 3px solid transparent; }
.tabs__label:hover { color: var(--accent); }
.tabs__radio:checked + .tabs__label { background: var(--paper); border-bottom-color: var(--accent); }
.tabs__radio:focus-visible + .tabs__label { outline: 2px solid var(--accent); outline-offset: -2px; }
.tabs__panel { order: 9; display: none; width: 100%; padding: 24px; background: var(--paper); }
.tabs__radio:checked + .tabs__label + .tabs__panel { display: block; }

.block--icon-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.icon-list__item { display: flex; align-items: flex-start; gap: 10px; }
.icon-list__icon { flex: none; color: var(--accent); margin-top: 2px; }
.icon-list__icon svg { display: block; }

.block--divider { border: none; border-top-style: solid; border-top-width: 1px; border-top-color: var(--line); width: var(--divider-width, 100%); margin: var(--divider-spacing, 24px) auto; }
.block--divider-dashed { border-top-style: dashed; }
.block--divider-dotted { border-top-style: dotted; }

.block--video-embed { margin: 0 0 28px; }
.video-embed__frame { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #000; }
.video-embed__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

@media (max-width: 680px) {
	.u-hide-mobile { display: none !important; }
	.block--columns { grid-template-columns: 1fr; }
	.block--columns.block--columns-keep { grid-template-columns: repeat(var(--cols, 2), 1fr); }
}
@media (min-width: 681px) {
	.u-hide-desktop { display: none !important; }
}

/* Entrance animations — see /theme/block-animations.js. */
html.can-animate [data-animate] { transition: opacity .6s ease, transform .6s ease; }
html.can-animate [data-animate="fade-in"] { opacity: 0; }
html.can-animate [data-animate="slide-up"] { opacity: 0; transform: translateY(28px); }
html.can-animate [data-animate].is-inview { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
	html.can-animate [data-animate] { transition: none !important; opacity: 1 !important; transform: none !important; }
}

/* Dark mode — respected only when the visitor hasn't forced a theme choice
   elsewhere (this CMS has no per-visitor light/dark toggle UI, purely the
   OS-level media query). Keeps ink/paper roles inverted, same variable
   names throughout so every rule above needs zero duplication. */
/* !important below is deliberate, not a specificity shortcut: layout.html
   injects `:root{--ink:{{brand.primary}};--accent:{{brand.accent}}}` as an
   inline <style> AFTER this stylesheet's <link>, with the same (:root)
   specificity — so without !important that later, unconditional rule would
   always win over this media-query-gated one even while dark mode is
   active, silently repainting near-black brand text onto this section's
   near-black background. Gated strictly behind the media query, so it
   never touches light mode's brand colors. */
@media (prefers-color-scheme: dark) {
	:root {
		--ink: #f1ede4 !important;
		--muted: #a9a196;
		--paper: #171512;
		--paper-2: #201d19;
		--line: #332f29;
		--accent: #ff4d5e !important;
	}
}

/* ===================================================================
   RMG Haßfurt additions: mosaic brand palette, hero, cards, badges.
   The mosaic colors come straight from the school's own real logo icon
   (content/uploads/branding/rmg-icon.png) — sampled, not invented — so
   these visual accents are the school's actual identity, not a generic
   template palette.
   =================================================================== */
:root {
	--mosaic-red: #bf0015;
	--mosaic-orange: #ffae40;
	--mosaic-yellow: #ffdb4d;
	--mosaic-green: #40ff5d;
	--mosaic-cyan: #40f8ff;
	--mosaic-maroon: #7f001c;
	--mosaic-magenta: #ff20d6;
}

/* Header gets a hairline mosaic strip instead of a plain border — a subtle
   nod to the icon's own colored squares, visible on every page. */
.site-header {
	border-bottom: none;
	box-shadow: 0 3px 0 0 var(--line);
	background: var(--paper);
	position: relative;
}
.site-header::after {
	content: ""; display: block; height: 3px; width: 100%;
	background: linear-gradient(to right,
		var(--mosaic-red) 0 14.28%, var(--mosaic-orange) 14.28% 28.56%,
		var(--mosaic-yellow) 28.56% 42.84%, var(--mosaic-green) 42.84% 57.12%,
		var(--mosaic-cyan) 57.12% 71.4%, var(--mosaic-maroon) 71.4% 85.68%,
		var(--mosaic-magenta) 85.68% 100%);
}
.brand__logo { max-height: 44px; }
.menu__item a { border-radius: 999px; transition: background .15s ease, color .15s ease; }
.menu__item a:hover { background: var(--paper-2); }

/* Footer */
.footer-menu { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 18px 0 0; padding: 14px 0 0; border-top: 1px solid var(--line); }
.footer-menu a { color: var(--muted); font-size: 14px; }
.footer-menu a:hover { color: var(--ink); }

/* Hero (homepage) */
.hero {
	margin: -8px 0 40px; padding: 34px 36px; border-radius: 16px;
	background: var(--paper-2); border: 1px solid var(--line);
}
.hero__banner { display: block; width: 100%; height: auto; border-radius: 10px; margin: 0 0 26px; }
.content .lead { font-size: 1.3em; line-height: 1.55; }

/* Cards */
.card-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; margin: 32px 0; }
.card {
	background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 24px 26px 22px;
	border-top: 4px solid var(--card-accent, var(--accent));
	transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px -12px rgba(0,0,0,.25); }
.card h3 { font-family: var(--font-heading); margin: 0 0 10px; font-size: 1.15rem; }
.card p { margin: 0 0 .6em; color: var(--muted); }
.card p:last-child { margin-bottom: 0; }
.card a { color: var(--ink); font-weight: 600; }
.card a:hover { color: var(--accent); }
/* Cycle the mosaic colors across successive cards so a row reads as a set,
   same spirit as the icon's own grid — nth-child, not inline style, so
   content stays plain semantic HTML. */
.card-row .card:nth-child(7n+1) { --card-accent: var(--mosaic-red); }
.card-row .card:nth-child(7n+2) { --card-accent: var(--mosaic-orange); }
.card-row .card:nth-child(7n+3) { --card-accent: var(--mosaic-green); }
.card-row .card:nth-child(7n+4) { --card-accent: var(--mosaic-cyan); }
.card-row .card:nth-child(7n+5) { --card-accent: var(--mosaic-magenta); }
.card-row .card:nth-child(7n+6) { --card-accent: var(--mosaic-maroon); }
.card-row .card:nth-child(7n+7) { --card-accent: var(--mosaic-yellow); }

/* Badges — same mosaic cycling, solid pills instead of outline for more punch */
.badge-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 8px; }
.badge {
	display: inline-block; padding: 7px 16px; font-size: 13px; font-weight: 700; letter-spacing: .01em;
	border-radius: 999px; color: #fff; background: var(--badge-accent, var(--accent));
}
.badge-row .badge:nth-child(7n+1) { --badge-accent: var(--mosaic-red); }
.badge-row .badge:nth-child(7n+2) { --badge-accent: var(--mosaic-orange); color: #3a2400; }
.badge-row .badge:nth-child(7n+3) { --badge-accent: #1f9e3a; }
.badge-row .badge:nth-child(7n+4) { --badge-accent: #0891a8; }
.badge-row .badge:nth-child(7n+5) { --badge-accent: var(--mosaic-magenta); }
.badge-row .badge:nth-child(7n+6) { --badge-accent: var(--mosaic-maroon); }
.badge-row .badge:nth-child(7n+7) { --badge-accent: #a8860a; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 6px; }

/* Buttons — rounded, slightly more presence */
.btn, .content .btn {
	border-radius: 999px;
	box-shadow: 0 2px 8px -2px rgba(0,0,0,.2);
}


/* ===================================================================
   RMG Haßfurt v2: sticky header, page-title accent, stat strip,
   section heads, richer footer, secondary buttons, mosaic dividers,
   post-list polish. Same mosaic palette throughout — no new colors.
   =================================================================== */

/* Sticky header with a soft shadow once content scrolls beneath it. */
.site-header {
	position: sticky; top: 0; z-index: 50;
	backdrop-filter: saturate(1.1) blur(6px);
	background: color-mix(in srgb, var(--paper) 92%, transparent);
}
.site-header .wrap { padding-top: 18px; padding-bottom: 18px; }
@supports not (backdrop-filter: blur(1px)) {
	.site-header { background: var(--paper); }
}

/* Every page title gets the same mosaic accent bar the header/footer use —
   a small, consistent signature that ties every single page back to the
   school's own icon instead of a generic rule. */
.page__title, .post__title {
	position: relative; padding-bottom: 22px;
}
.page__title::after, .post__title::after {
	content: ""; position: absolute; left: 0; bottom: 0; height: 4px; width: 84px; border-radius: 4px;
	background: linear-gradient(to right, var(--mosaic-red), var(--mosaic-orange) 33%, var(--mosaic-cyan) 66%, var(--mosaic-magenta));
}

/* Section head — small eyebrow label + heading, used to break the homepage
   into clearly named sections instead of one long scroll of h2s. */
.section-head { margin: 56px 0 26px; }
.section-head:first-child { margin-top: 0; }
.section-head__eyebrow {
	display: block; font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
	color: var(--accent); margin: 0 0 6px;
}
.section-head h2 { font-family: var(--font-heading); color: var(--ink); margin: 0; font-size: clamp(1.5rem, 3.2vw, 2rem); }

/* Quick-facts strip */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin: 28px 0; }
.stat { background: var(--paper); padding: 22px 20px; display: flex; align-items: flex-start; gap: 14px; }
.stat__icon {
	flex: none; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
	background: var(--stat-accent, var(--accent)); color: #fff; font-size: 17px;
}
.stat:nth-child(4n+1) .stat__icon { --stat-accent: var(--mosaic-red); }
.stat:nth-child(4n+2) .stat__icon { --stat-accent: #0891a8; }
.stat:nth-child(4n+3) .stat__icon { --stat-accent: #1f9e3a; }
.stat:nth-child(4n+4) .stat__icon { --stat-accent: var(--mosaic-magenta); }
.stat__label { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 2px 0 3px; }
.stat__value { font-weight: 700; color: var(--ink); line-height: 1.35; }
.stat__value a { font-weight: 700; }

/* Mosaic dot divider — a quiet decorative echo of the icon's own grid,
   used between homepage sections instead of a plain <hr>. */
.mosaic-dots { display: flex; justify-content: center; gap: 10px; margin: 48px 0; }
.mosaic-dots span { width: 10px; height: 10px; border-radius: 3px; display: block; }
.mosaic-dots span:nth-child(1) { background: var(--mosaic-red); }
.mosaic-dots span:nth-child(2) { background: var(--mosaic-orange); }
.mosaic-dots span:nth-child(3) { background: var(--mosaic-yellow); }
.mosaic-dots span:nth-child(4) { background: var(--mosaic-green); }
.mosaic-dots span:nth-child(5) { background: var(--mosaic-cyan); }
.mosaic-dots span:nth-child(6) { background: var(--mosaic-maroon); }
.mosaic-dots span:nth-child(7) { background: var(--mosaic-magenta); }

/* Secondary/ghost button — for a lower-priority action next to a primary .btn */
.btn--ghost, .content .btn--ghost {
	background: transparent; color: var(--ink); box-shadow: none;
	border: 2px solid var(--line);
}
.btn--ghost:hover, .content .btn--ghost:hover { background: transparent; color: var(--accent); border-color: var(--accent); }

/* News teaser cards on the homepage — same .card shell, distinct top strip
   pattern instead of a photo (this CMS has no stock imagery), so a section
   with no real photos yet still reads as designed rather than empty. */
.news-card { display: flex; flex-direction: column; }
.news-card__pattern {
	height: 64px; border-radius: 8px; margin: 0 0 16px;
	background:
		repeating-linear-gradient(135deg, var(--news-a, var(--mosaic-red)) 0 10px, transparent 10px 20px),
		var(--news-b, var(--paper-2));
	opacity: .9;
}
.news-card:nth-child(3n+1) .news-card__pattern { --news-a: var(--mosaic-red); }
.news-card:nth-child(3n+2) .news-card__pattern { --news-a: var(--mosaic-cyan); }
.news-card:nth-child(3n+3) .news-card__pattern { --news-a: var(--mosaic-magenta); }
.news-card__date { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }

/* Footer — multi-column */
.site-footer { border-top: none; background: var(--ink); color: color-mix(in srgb, var(--paper) 70%, transparent); position: relative; }
.footer-mosaic { display: flex; height: 5px; }
.footer-mosaic span { flex: 1; }
.footer-mosaic span:nth-child(1) { background: var(--mosaic-red); }
.footer-mosaic span:nth-child(2) { background: var(--mosaic-orange); }
.footer-mosaic span:nth-child(3) { background: var(--mosaic-yellow); }
.footer-mosaic span:nth-child(4) { background: var(--mosaic-green); }
.footer-mosaic span:nth-child(5) { background: var(--mosaic-cyan); }
.footer-mosaic span:nth-child(6) { background: var(--mosaic-maroon); }
.footer-mosaic span:nth-child(7) { background: var(--mosaic-magenta); }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 36px; padding-top: 44px; padding-bottom: 30px; }
.footer-col__title { font-family: var(--font-heading); color: var(--paper); font-size: 15px; margin: 0 0 14px; }
.footer-col p { margin: 0 0 8px; font-size: 14px; line-height: 1.6; }
.footer-col a { color: color-mix(in srgb, var(--paper) 85%, transparent); text-decoration-color: var(--accent); }
.footer-col a:hover { color: var(--paper); }
.footer-logo { max-height: 40px; width: auto; display: block; margin: 0 0 12px; background: var(--paper); border-radius: 6px; padding: 6px 10px; }
.site-footer__claim { color: color-mix(in srgb, var(--paper) 75%, transparent); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; font-size: 11px; margin: 0; }
.footer-menu { list-style: none; display: grid; gap: 8px; margin: 0; padding: 0; border-top: none; }
.footer-menu a { color: color-mix(in srgb, var(--paper) 85%, transparent); font-size: 14px; }
.footer-copy { border-top: 1px solid color-mix(in srgb, var(--paper) 18%, transparent); padding: 18px 0 26px; margin: 0; font-size: 13px; color: color-mix(in srgb, var(--paper) 55%, transparent); }

@media (max-width: 780px) {
	.footer-grid { grid-template-columns: 1fr; gap: 26px; }
}
@media (max-width: 620px) {
	.hero { padding: 24px 20px; border-radius: 12px; }
}

/* Entrance animation hook reused from block-animations.js for our own
   hero/card content, not just page-builder blocks. */
.hero, .card-row .card, .stat-row .stat { will-change: opacity, transform; }

/* Post list / single post — same "no stock photo, use the mosaic instead"
   treatment as the homepage news teasers, so a list of text-only posts
   still reads as a designed page instead of a bare list of links. */
.postlist { gap: 28px; }
.postcard {
	background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 26px 28px 24px;
	transition: transform .15s ease, box-shadow .15s ease;
}
.postcard:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -14px rgba(0,0,0,.3); }
.postcard__pattern, .post__pattern {
	display: block; border-radius: 10px; margin: 0 0 18px;
	background:
		repeating-linear-gradient(135deg, var(--pat-a, var(--mosaic-red)) 0 10px, transparent 10px 20px),
		var(--pat-b, var(--paper-2));
	opacity: .9;
}
.postcard__pattern { height: 56px; }
.post__pattern { height: 90px; margin-bottom: 28px; }
.postcard:nth-of-type(3n+1) { --pat-a: var(--mosaic-red); }
.postcard:nth-of-type(3n+2) { --pat-a: var(--mosaic-cyan); }
.postcard:nth-of-type(3n+3) { --pat-a: var(--mosaic-magenta); }
.postcard__title { margin-top: 0; }

/* ===================================================================
   Mobile perfection pass — one consolidated, deliberate breakpoint
   instead of the small scattered media queries added across earlier
   rounds. Priorities: full-width tap-friendly actions, tighter vertical
   rhythm (desktop's generous whitespace reads as "too much scrolling"
   on a phone), readable type at arm's length, no layout that requires
   horizontal scrolling at any width down to 320px.
   =================================================================== */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* A visible, on-brand focus ring everywhere — mouse users never see it
   (`:focus-visible`), keyboard/switch users always do. Every interactive
   element in this theme (links, buttons, form fields, accordion/tab
   controls) shares this instead of the browser's inconsistent default. */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible,
select:focus-visible, summary:focus-visible, .btn:focus-visible, .card:focus-visible {
	outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 2px;
}

@media (max-width: 620px) {
	.wrap { padding: 0 18px; }
	.site-main { padding: 34px 0 56px; }
	.brand__logo { max-height: 34px; }
	.footer-logo { max-height: 34px; }

	/* Tighter type scale + rhythm so a phone isn't just a squeezed desktop page */
	.page__title, .post__title { font-size: clamp(1.7rem, 8vw, 2.2rem); padding-bottom: 16px; margin-bottom: 20px; }
	.content { font-size: 16.5px; }
	.content .lead, .hero .lead { font-size: 1.15em; }
	.section-head { margin: 40px 0 20px; }
	.stat-row, .card-row { margin: 22px 0; }
	.mosaic-dots { margin: 34px 0; gap: 8px; }
	.mosaic-dots span { width: 8px; height: 8px; }

	.hero { padding: 22px 18px; border-radius: 14px; margin-top: -4px; }
	.footer-grid { padding-top: 34px; }

	/* Primary actions become full-width, stacked — easier to hit with a
	   thumb than two half-width pills, and reads as an intentional
	   "next step" instead of a cramped button pair. */
	.hero-actions { flex-direction: column; align-items: stretch; }
	.hero-actions .btn { text-align: center; }
	.yjar-form button { width: 100%; text-align: center; }

	/* Badges wrap fine already (flex-wrap), just tighten the gap and size
	   a touch so 5 pills don't force 3 short rows on a 360px screen. */
	.badge-row { gap: 8px; }
	.badge { padding: 6px 13px; font-size: 12px; }

	.card, .postcard { padding: 20px 20px 18px; }
	.stat { padding: 18px 16px; }

	/* Single-column stat/card grids read better without the 1px hairline
	   seams the grid-gap:1px-on-background trick leaves between rows. */
	.stat-row { grid-template-columns: 1fr; }
}

/* Very small phones (iPhone SE class, ≤375px) — one more notch down so
   nothing clips or forces horizontal scroll at the narrowest real
   device width still in common use. */
@media (max-width: 375px) {
	.wrap { padding: 0 14px; }
	.badge-row { flex-direction: column; align-items: flex-start; }
	.hero-actions .btn, .btn--ghost { width: 100%; }
}
