/* YJAR CMS – "Modern" theme. Bold business: strong colour blocks, sans-serif,
   card-based layout. Brand colours/font choice come from site.brand.* (see
   layout.html's inline <style> + the [data-font] attribute) — this file
   only 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 {
	--navy: #0f1730;
	--navy-2: #141d3d;
	--ink: #16213e;
	--muted: #5b6478;
	--paper: #ffffff;
	--surface: #f4f6fb;
	--line: #e2e6f0;
	--brand-primary: #5b7cfa;
	--brand-accent: #ff8a3d;
	--wrap: 1080px;
	--font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--font-display: "Helvetica Neue", Arial, sans-serif;
	--font-body: var(--font-sans);
}
:root[data-font="serif"] { --font-body: Georgia, "Times New Roman", serif; }

* { 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.6;
}
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
a { color: var(--brand-primary); text-decoration: none; }
a:hover { color: var(--brand-accent); }
img { max-width: 100%; height: auto; }

/* Consistent, visible keyboard-focus ring — mouse/touch users never see
   it, :focus-visible only fires for keyboard/AT focus. */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible,
select:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
	outline: 2px solid var(--brand-accent); outline-offset: 2px; border-radius: 4px;
}

.skip-link {
	position: absolute; left: -9999px; top: 0; z-index: 100;
	background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

.preview-bar { text-align: center; font-weight: 700; padding: 8px 12px; font-size: 14px; }
.preview-bar:not(.preview-bar--customizer) { background: var(--brand-accent); color: var(--navy); }
.preview-bar--customizer { background: var(--navy); color: #fff; }

/* Header — a strong colour block, the "bold business" signature move. */
.site-header { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 10; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-top: 16px; padding-bottom: 16px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 19px; font-family: var(--font-display); }
.brand__logo { max-height: 36px; width: auto; display: block; }
.brand:hover { color: #fff; }

.menu { list-style: none; display: flex; gap: 2px; margin: 0; padding: 0; flex-wrap: wrap; }
.menu__item a { display: inline-block; padding: 10px 14px; border-radius: 8px; font-weight: 600; font-size: 15px; color: #cdd6f4; transition: background .15s ease, color .15s ease; }
.menu__item a:hover { background: rgba(255,255,255,.08); color: #fff; }

/* Mobile nav toggle — CSS-only checkbox hack, no JS. */
.nav-toggle-input { position: absolute; opacity: 0; pointer-events: none; }
.nav-toggle-label { display: none; }

.lang-switch { display: flex; gap: 2px; margin-left: 8px; }
.lang-switch__item { display: inline-block; padding: 6px 9px; border-radius: 6px; font-weight: 700; font-size: 12px; letter-spacing: .03em; text-transform: uppercase; color: #cdd6f4; border: 1px solid rgba(255,255,255,.25); }
.lang-switch__item:hover { background: rgba(255,255,255,.1); }
.lang-switch__item.is-active { background: var(--brand-primary); color: #fff; border-color: var(--brand-primary); }

/* Main */
.site-main { padding: 48px 0 72px; background: var(--paper); }
.page__title, .post__title { font-family: var(--font-display); color: var(--navy); font-weight: 800; font-size: clamp(1.9rem, 4.4vw, 2.9rem); line-height: 1.12; margin: 0 0 22px; letter-spacing: -.01em; }
.content { font-size: 17px; }
.content p { margin: 0 0 1.1em; }
.content h2 { font-family: var(--font-display); font-weight: 800; color: var(--navy); margin-top: 1.6em; }
.content h3 { font-family: var(--font-display); font-weight: 700; color: var(--navy); }
.content .lead { font-size: 1.25em; color: var(--navy); }
.content a { text-decoration: underline; text-underline-offset: 2px; }
.content ul, .content ol { padding-left: 1.3em; }
.content blockquote { border-left: 4px solid var(--brand-accent); margin: 1.2em 0; padding: .5em 0 .5em 1.1em; color: var(--navy); background: var(--surface); border-radius: 0 10px 10px 0; }

.btn, .content .btn {
	display: inline-block; background: var(--brand-primary); color: #fff; text-decoration: none;
	padding: 12px 24px; border-radius: 999px; font-weight: 700; transition: background .15s ease, transform .1s ease;
}
.btn:hover, .content .btn:hover { background: var(--brand-accent); transform: translateY(-1px); }
.btn:active, .content .btn:active { transform: translateY(0); }
/* .btn--ghost — used by the account templates (login/logout/reset). */
.btn--ghost, .content .btn--ghost {
	background: transparent; color: var(--navy); border: 2px solid var(--navy); padding: 10px 22px; border-radius: 999px;
}
.btn--ghost:hover, .content .btn--ghost:hover { background: var(--navy); color: #fff; transform: none; }

/* Account pages (login/register/forgot/reset/logout) */
.account-page { max-width: 480px; }
.account-form { margin-top: 8px; }
.hint { color: var(--muted); font-size: 14px; margin-top: 20px; }
.hint a { font-weight: 700; color: var(--brand-primary); }

/* Post meta + card-based list */
.post__meta, .postcard__meta { color: var(--muted); font-size: 14px; }
.postgrid { display: grid; gap: 26px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.postcard {
	border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--paper);
	box-shadow: 0 2px 10px rgba(15,23,48,.05); transition: box-shadow .15s ease, transform .15s ease;
	display: flex; flex-direction: column;
}
.postcard:hover { box-shadow: 0 16px 32px rgba(15,23,48,.14); transform: translateY(-3px); }
.postcard__body { padding: 20px 22px 24px; }
.postcard__title { margin: 4px 0 8px; font-size: 1.3rem; font-family: var(--font-display); font-weight: 700; }
.postcard__title a { color: var(--navy); }
.postcard__title a:hover { color: var(--brand-primary); }
.postcard__excerpt { margin: 0 0 10px; color: var(--muted); }
.postcard__more { font-weight: 700; color: var(--brand-primary); }
.postcard__thumb { display: block; margin: 0; }
.postcard__thumb img { display: block; width: 100%; height: 190px; object-fit: cover; }

.post__image, .page > .post__image {
	width: 100%; max-height: 440px; object-fit: cover; border-radius: 16px; margin: 0 0 26px;
}

.post__cats, .post__tags { margin: 0 0 18px; display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
	display: inline-block; padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 700;
	background: var(--surface); color: var(--navy); text-decoration: none;
}
.chip:hover { background: var(--brand-primary); color: #fff; }
.chip--tag { background: transparent; border: 1px solid var(--line); color: var(--muted); font-weight: 600; }
.chip--tag:hover { border-color: var(--brand-accent); color: var(--navy); }

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

.notfound { text-align: center; padding: 70px 0; }
.notfound__code { font-family: var(--font-display); font-size: 5rem; font-weight: 800; color: var(--brand-accent); margin: 0; }
.notfound h1 { font-family: var(--font-display); color: var(--navy); }

.site-footer { background: var(--navy); color: #cdd6f4; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 24px; padding-bottom: 24px; }
.site-footer p { margin: 0; font-size: 14px; }
.site-footer__claim { color: var(--brand-accent); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: 12px; }

@media (max-width: 620px) {
	.site-header .wrap { position: relative; flex-wrap: wrap; }
	.nav-toggle-label {
		display: flex; align-items: center; justify-content: center;
		width: 40px; height: 40px; margin-left: auto; border-radius: 8px; cursor: pointer;
	}
	.nav-toggle-label:hover { background: rgba(255,255,255,.08); }
	.nav-toggle-label span, .nav-toggle-label span::before, .nav-toggle-label span::after {
		content: ""; display: block; width: 22px; height: 2px; background: #fff; border-radius: 2px;
		transition: transform .2s ease, opacity .2s ease;
	}
	.nav-toggle-label span { position: relative; }
	.nav-toggle-label span::before { position: absolute; top: -7px; }
	.nav-toggle-label span::after { position: absolute; top: 7px; }
	.nav-toggle-input:checked + .nav-toggle-label span { background: transparent; }
	.nav-toggle-input:checked + .nav-toggle-label span::before { top: 0; transform: rotate(45deg); }
	.nav-toggle-input:checked + .nav-toggle-label span::after { top: 0; transform: rotate(-45deg); }
	.nav-toggle-input:focus-visible + .nav-toggle-label { outline: 2px solid var(--brand-accent); outline-offset: 2px; }

	.site-nav { display: none; width: 100%; order: 3; margin-top: 10px; }
	.nav-toggle-input:checked ~ .site-nav { display: block; }
	.site-nav .menu { flex-direction: column; gap: 2px; }
	.site-nav .menu__item a { display: block; padding: 12px 14px; }
	.lang-switch { order: 4; width: 100%; margin-left: 0; margin-top: 10px; }
}

/* Comments */
.comments { margin-top: 48px; padding-top: 30px; border-top: 1px solid var(--line); }
.comments__title { font-family: var(--font-display); color: var(--navy); margin: 0 0 16px; }
.comments__empty { color: var(--muted); }
.comments__hint { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.comments__notice { padding: 10px 14px; border-radius: 10px; font-weight: 700; 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); border-radius: 14px; padding: 16px 20px; background: var(--surface); }
.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: 700; color: var(--navy); 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: 11px 14px; border: 1px solid var(--line); border-radius: 10px; font-family: inherit; font-size: 15px; color: var(--ink); background: #fff;
}
.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(--brand-primary); box-shadow: 0 0 0 3px rgba(91,124,250,.2); }
.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 26px; }
.block:last-child { margin-bottom: 0; }
.block--heading { font-family: var(--font-display); font-weight: 800; color: var(--navy); }
.block--image img { display: block; border-radius: 12px; }
.block--image figcaption { margin-top: 8px; font-size: 14px; color: var(--muted); }
.block--spacer { margin: 0; }

.block__btn { display: inline-block; padding: 12px 24px; border-radius: 999px; font-weight: 700; text-decoration: none; transition: background .15s ease, color .15s ease, border-color .15s ease, transform .1s ease; }
.block__btn--primary { background: var(--brand-primary); color: #fff; }
.block__btn--primary:hover { background: var(--brand-accent); transform: translateY(-1px); }
.block__btn--secondary { background: var(--surface); color: var(--navy); }
.block__btn--secondary:hover { background: var(--brand-accent); color: #fff; }
.block__btn--ghost { background: transparent; color: var(--navy); border: 2px solid var(--navy); padding: 10px 22px; }
.block__btn--ghost:hover { border-color: var(--brand-accent); color: var(--brand-accent); }

.block--columns { display: grid; gap: 24px; 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; border-radius: 12px; }

.block--testimonial { margin: 0 0 26px; padding: 28px 30px; border-radius: 16px; background: var(--surface); border-left: 4px solid var(--brand-accent); }
.testimonial__quote { margin: 0 0 16px; font-size: 1.15em; color: var(--navy); 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: 800; color: var(--navy); }
.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); border-radius: 16px; background: var(--paper); }
.pricing-card--featured { border-color: var(--brand-accent); box-shadow: 0 14px 32px rgba(255,138,61,.18); }
.pricing-card__title { margin: 0 0 6px; font-family: var(--font-display); color: var(--navy); }
.pricing-card__price { margin: 0 0 16px; font-size: 1.7em; font-weight: 800; color: var(--navy); overflow-wrap: break-word; }
.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(--brand-primary); font-weight: 700; }
.pricing-card__cta { text-align: center; }

.block--accordion { display: grid; gap: 10px; }
.accordion__item { border: 1px solid var(--line); border-radius: 12px; padding: 4px 18px; background: var(--paper); }
.accordion__summary { cursor: pointer; padding: 14px 0; font-weight: 700; color: var(--navy); list-style: none; }
.accordion__summary::-webkit-details-marker { display: none; }
.accordion__summary::before { content: "+"; display: inline-block; width: 1.2em; color: var(--brand-primary); 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); border-radius: 14px; 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: 700; color: var(--navy); background: var(--surface); border-bottom: 3px solid transparent; }
.tabs__label:hover { color: var(--brand-primary); }
.tabs__radio:checked + .tabs__label { background: var(--paper); border-bottom-color: var(--brand-accent); }
.tabs__radio:focus-visible + .tabs__label { outline: 2px solid var(--brand-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(--brand-primary); margin-top: 2px; }
.icon-list__icon svg { display: block; }

.block--divider { border: none; border-top-style: solid; border-top-width: 2px; 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 26px; }
.video-embed__frame { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; 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. */
@media (prefers-color-scheme: dark) {
	:root {
		--ink: #e7ebf8;
		--muted: #9aa3bd;
		--paper: #0b1024;
		--surface: #131a35;
		--line: #262f52;
	}
	.postcard, .pricing-card, .accordion__item { background: var(--paper); }
	/* Bug fix (2026-09-02): --navy is a dual-purpose token, used as BOTH a
	   background (site-header, site-footer, skip-link, ghost-button hover —
	   correctly still dark and fine as-is) AND, in far more places, as a
	   TEXT color (headings, .lead, pricing-card titles, chip text …) that
	   was meant to read against the light-mode white --paper. Since --navy
	   itself is never overridden here, every --navy-colored heading became
	   near-black text on the --paper above, which is now ALSO near-black —
	   invisible. Overriding --navy directly would in turn break every
	   background usage (e.g. the site header would become a light bar with
	   white text). Instead, override `color` on exactly the text-usage
	   selectors, leaving --navy itself — and its background usages — alone.
	   Found live on omnoryn.de: headings/lead paragraphs rendered as blank
	   space for any visitor in a dark-mode browser, while ordinary --ink
	   body text (already handled above) stayed fully legible. */
	.page__title, .post__title,
	.content h2, .content h3, .content .lead, .content blockquote,
	.postcard__title a, .notfound h1, .comments__title,
	.comment-form label, .yjar-form label,
	.block--heading, .testimonial__quote, .testimonial__name,
	.pricing-card__title, .pricing-card__price,
	.accordion__summary, .tabs__label, .chip,
	.block__btn--secondary {
		color: var(--ink);
	}
	/* Same dual-purpose issue for the transparent "ghost" button/border
	   variant — text AND border color, no background to fall back on. */
	.btn--ghost, .content .btn--ghost, .block__btn--ghost {
		color: var(--ink);
		border-color: var(--ink);
	}
	/* .chip--tag:hover's own color:var(--navy) (two classes + :hover) is more
	   specific than the .chip rule above and would otherwise still win here. */
	.chip--tag:hover {
		color: var(--ink);
	}
}
