/* Onshin — utility + component layer.
   Everything expressible in theme.json lives there instead; this file covers
   what block styles/settings can't reach: the hand-authored logo markup, the
   composed home/class-page sections from the approved mockup, focus states,
   motion preference, and touch-target sizing (plan §16, accessibility). */

/* ==========================================================================
   0. Tokens local to this layer
   ========================================================================== */
:root {
	--onshin-shell: 1360px;          /* header/footer gutter width */
	--onshin-radius: 3px;
	--onshin-hairline: 1px solid var(--wp--preset--color--border);
	--onshin-shadow: 0 1px 2px rgba(43, 42, 41, 0.04), 0 8px 24px -12px rgba(43, 42, 41, 0.14);
	--onshin-shadow-lift: 0 2px 4px rgba(43, 42, 41, 0.06), 0 16px 36px -14px rgba(43, 42, 41, 0.22);
	--onshin-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Fixed type scale in theme.json (WP's own "fluid" auto-interpolation was
   silently ignoring our explicit min/max per size and substituting its own
   computed ranges — verified on the live site: --font-size--large rendered
   as clamp(22px,...,36px) when 18-20px was requested). Mobile step-down
   handled here instead, on the CSS custom properties directly, so every
   generated rule that references var(--wp--preset--font-size--*) picks it
   up automatically without touching each block. */
@media (max-width: 599px) {
	:root {
		--wp--preset--font-size--xxx-large: 32px;
		--wp--preset--font-size--xx-large: 26px;
		--wp--preset--font-size--x-large: 22px;
		--wp--preset--font-size--large: 17px;
	}
}

/* WordPress only sets box-sizing on some of its own blocks, not globally.
   Every .onshin-shell is `width:100%` PLUS horizontal padding, so under the
   default content-box that is viewport + 48px — which is exactly the
   "obrazki wychodzą poza prawy rant" overflow on phones. Fix it at the root
   rather than papering over each component. */
*,
*::before,
*::after {
	box-sizing: border-box;
}

body {
	background-color: var(--wp--preset--color--bone);
	color: var(--wp--preset--color--ink);
	/* Belt and braces: a decorative element that escapes its section must
	   never turn into a horizontal scrollbar. `clip` (not `hidden`) keeps
	   position:sticky working on the header. */
	overflow-x: clip;
}

/* ==========================================================================
   1. Header
   ========================================================================== */
/* Give the header row an explicit height and centre everything in it, so the
   logo's share of that height is a decision rather than a by-product of
   whatever the tallest child happens to be. Without this the row was ~105px
   tall around a 48px logo — half the band was empty. */
.onshin-header {
	max-width: var(--onshin-shell);
	margin-inline: auto;
	width: 100%;
	min-height: 76px;
	align-items: center;
}
@media (min-width: 782px) {
	.onshin-header {
		min-height: 88px;
	}
}
@media (min-width: 1100px) {
	.onshin-header {
		min-height: 96px;
	}
}

.onshin-logo-link {
	display: block;
	line-height: 0;
	flex: 0 1 auto;
	min-width: 0;
}
/* The wordmark carries a lot of internal whitespace, so it reads smaller than
   its box — but it is also the widest thing in the header, so on a phone it
   has to stay modest or it crowds the menu button. Stepped, not one size. */
/* Sized as a share of the header height above (~80%), not as an absolute
   number — that is what keeps it looking deliberate rather than adrift in
   the band. The lockup is 2.5:1, so 60px tall is only ~150px wide and still
   leaves the menu button room on a 360px screen. */
.onshin-logo {
	height: 60px;
	width: auto;
	max-width: 100%;
	display: block;
}
@media (min-width: 480px) {
	.onshin-logo {
		height: 64px;
	}
}
@media (min-width: 782px) {
	.onshin-logo {
		height: 72px;
	}
}
@media (min-width: 1100px) {
	.onshin-logo {
		height: 80px;
	}
}

/* The header row is nowrap, so anything that cannot shrink pushes the others
   into a sliver. A button squeezed to ~30px wide wraps its label to ONE
   LETTER PER LINE and the header grows to half the screen — that is exactly
   what happened on mobile. Never let button labels wrap: the failure mode
   then becomes "slightly too wide", which is recoverable, instead of a
   vertical column of letters. */
.wp-block-button__link {
	white-space: nowrap;
}

/* Menu button: a real 44px target with a legibly sized icon. */
.wp-block-navigation__responsive-container-open,
.wp-block-navigation__responsive-container-close {
	min-width: 44px;
	min-height: 44px;
	justify-content: center;
}
.wp-block-navigation__responsive-container-open svg,
.wp-block-navigation__responsive-container-close svg {
	width: 28px;
	height: 28px;
	fill: currentColor;
}

/* Sticky header: the nav is the only way back out of a long page. */
.wp-site-blocks > header {
	position: sticky;
	top: 0;
	z-index: 40;
	background-color: var(--wp--preset--color--bone);
	border-bottom: var(--onshin-hairline);
}

.onshin-header .wp-block-navigation {
	font-size: 15px;
}
.onshin-header .wp-block-navigation a {
	text-decoration: none;
}
.onshin-header .wp-block-navigation .wp-block-navigation-item > a:hover {
	color: var(--wp--preset--color--crimson);
}

/* Mobile overlay menu. Core's overlay container has no inline padding of its
   own, so the item list sits flush against the left edge of the screen — the
   whole menu reads as if it fell off the viewport. Give the list a real
   gutter and the rows enough height to be comfortable thumb targets. */
.wp-block-navigation__responsive-container.is-menu-open {
	padding: var(--wp--preset--spacing--30);
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	padding-inline: var(--wp--preset--spacing--20);
	padding-top: var(--wp--preset--spacing--30);
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container > .wp-block-navigation-item {
	width: 100%;
	border-bottom: var(--onshin-hairline);
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container > .wp-block-navigation-item:last-child {
	border-bottom: 0;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item > a {
	font-size: 18px;
	padding-block: 10px;
	width: 100%;
}
/* Submenu items indent under their parent instead of aligning with it. */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item > a {
	font-size: 16px;
	padding-left: var(--wp--preset--spacing--20);
	color: var(--wp--preset--color--ink-soft);
}
.wp-block-navigation__responsive-container-close,
.wp-block-navigation__responsive-container-open {
	padding: 6px;
}

/* ==========================================================================
   2. Section scaffolding — eyebrow / centred heading / rules
   ========================================================================== */
/* Inner width for composed sections. The template's <main> uses the "default"
   (unconstrained) layout so full-bleed bands work; each section then opts
   back into a readable measure with this. */
.onshin-shell {
	max-width: var(--onshin-shell);
	margin-inline: auto;
	padding-inline: var(--wp--preset--spacing--30);
	width: 100%;
}

.onshin-section {
	padding-block: clamp(48px, 6vw, 88px);
}
.onshin-section--tight {
	padding-block: clamp(36px, 4vw, 56px);
}
.onshin-section--white {
	background-color: var(--wp--preset--color--white);
	border-block: var(--onshin-hairline);
}
.onshin-section--blush {
	background-color: #F6E7E0;
}

.onshin-eyebrow {
	font-family: var(--wp--preset--font-family--body);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--wp--preset--color--crimson);
	margin: 0 0 10px;
}
.onshin-center {
	text-align: center;
}
.onshin-center .onshin-eyebrow {
	text-align: center;
}

/* A short brush-like rule under a display heading — used instead of a plain
   border so the mark reads as part of the ink/brush vocabulary. */
.onshin-rule::after {
	content: "";
	display: block;
	width: 64px;
	height: 2px;
	margin-top: 18px;
	background: linear-gradient(90deg, var(--wp--preset--color--crimson), rgba(184, 40, 55, 0.15));
}
.onshin-center.onshin-rule::after,
.onshin-rule.onshin-center::after {
	margin-inline: auto;
}

.onshin-lead {
	color: var(--wp--preset--color--ink-soft);
	max-width: 62ch;
}
.onshin-center .onshin-lead {
	margin-inline: auto;
}

/* ==========================================================================
   3. Hero
   ========================================================================== */
.onshin-hero {
	position: relative;
	display: flex;
	align-items: center;
	min-height: clamp(420px, 56vw, 600px);
	background-color: var(--wp--preset--color--ink);
	background-repeat: no-repeat;
	background-size: cover;
	background-position: center right;
	overflow: hidden;
}
/* The hero artwork already carries its own dark-to-light wash on the left.
   This extra scrim only guarantees the text side stays legible when a tall
   viewport crops the image to a brighter slice. */
.onshin-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(
		100deg,
		rgba(24, 22, 21, 0.78) 0%,
		rgba(24, 22, 21, 0.62) 34%,
		rgba(24, 22, 21, 0.18) 62%,
		rgba(24, 22, 21, 0) 82%
	);
}
.onshin-hero__inner {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: var(--onshin-shell);
	margin-inline: auto;
	padding: clamp(40px, 6vw, 72px) var(--wp--preset--spacing--30);
}
.onshin-hero__content {
	max-width: 34rem;
}
.onshin-hero .onshin-eyebrow {
	color: #E8C8BE;
}
.onshin-hero h1,
.onshin-hero h2 {
	color: var(--wp--preset--color--white);
	margin: 0;
}
.onshin-hero p {
	color: rgba(255, 255, 255, 0.88);
}
.onshin-hero .onshin-rule::after {
	background: linear-gradient(90deg, #E06070, rgba(224, 96, 112, 0.1));
}
.onshin-hero .wp-block-buttons {
	margin-top: var(--wp--preset--spacing--30);
}

/* Class-page hero. Built on core's Cover block with useFeaturedImage, so each
   page's own featured image is the backdrop — no per-page template needed. */
.onshin-pagehero {
	min-height: clamp(300px, 34vw, 420px);
}
.onshin-pagehero .wp-block-cover__inner-container {
	width: 100%;
	max-width: none;
}
.onshin-pagehero .onshin-shell {
	padding-inline: var(--wp--preset--spacing--30);
}
.onshin-pagehero .wp-block-post-title {
	color: var(--wp--preset--color--white);
	margin: 0;
	max-width: 16ch;
	font-size: clamp(40px, 6vw, 68px);
	line-height: 1.02;
}
.onshin-pagehero .onshin-eyebrow {
	color: #E8C8BE;
}
.onshin-pagehero .onshin-rule::after {
	background: linear-gradient(90deg, #E06070, rgba(224, 96, 112, 0.1));
}

/* Page body copy: readable measure inside an otherwise full-width shell.
   Targeted at the text elements themselves rather than at "> *": post-content
   renders its blocks inside an .entry-content wrapper, so a child selector
   would cap that single wrapper and every full-width component inside it
   (the value cards, the link tiles) would inherit the 68ch cap with no way
   to escape it. */
.onshin-prose :is(p, h2, h3, h4, h5, h6, blockquote, figure, .wp-block-list) {
	max-width: 68ch;
}
.onshin-prose :is(.onshin-values, .onshin-links, .onshin-band, .onshin-fitssey-block, .wp-block-buttons, .wp-block-image) {
	max-width: none;
}
.onshin-prose :is(.onshin-values, .onshin-links) :is(p, h3, ul) {
	max-width: none;
}
.onshin-prose h2 {
	margin-top: var(--wp--preset--spacing--50);
}
.onshin-prose h3 {
	margin-top: var(--wp--preset--spacing--40);
}
.onshin-prose p {
	color: var(--wp--preset--color--ink-soft);
}
.onshin-prose li {
	color: var(--wp--preset--color--ink-soft);
}

/* ==========================================================================
   4. Grids
   ========================================================================== */
/* WP core Group's "grid" layout type with an explicit columnCount produces a
   FIXED N-column grid that does not collapse on narrow viewports (that only
   happens with minimumColumnWidth, which we'd disabled) — confirmed live: 4
   fixed columns forced "Kenjutsu" to overflow its card on desktop AND
   crammed 3-4 columns onto a 375px phone. Replaced everywhere with real CSS
   Grid auto-fit: columns never get narrower than the minmax minimum, so text
   can't be squeezed into a column too narrow to hold it, and they collapse to
   one column on phones with no media query. */
.onshin-grid-4,
.onshin-grid-3,
.onshin-grid-2 {
	display: grid;
	gap: var(--wp--preset--spacing--30);
	align-items: stretch;
}
.onshin-grid-4 {
	grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.onshin-grid-3 {
	grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}
.onshin-grid-2 {
	grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
	gap: var(--wp--preset--spacing--50);
}

/* Query Loop renders <ul class="wp-block-post-template">. Core's own layout
   classes ship higher-specificity rules than a bare class, and its default
   flow layout re-introduces list semantics/margins — so the grid classes are
   forced here specifically for that element. Without this the instructor
   cards fell back to baseline-aligned inline items, which is exactly the
   staggered, half-overlapping row seen on the live site. */
ul.wp-block-post-template.onshin-grid-4,
ul.wp-block-post-template.onshin-grid-3,
ul.wp-block-post-template.onshin-grid-2 {
	display: grid;
	list-style: none;
	margin: 0;
	padding: 0;
}
ul.wp-block-post-template.onshin-grid-4 > li,
ul.wp-block-post-template.onshin-grid-3 > li,
ul.wp-block-post-template.onshin-grid-2 > li,
.wp-block-post-template.onshin-grid-4 > li,
.wp-block-post-template.onshin-grid-3 > li {
	margin: 0;
	max-width: none;
	width: auto;
}

/* Defensive fallback for any block still using WP's own grid layout type. */
.is-layout-grid {
	align-items: start;
}

/* ==========================================================================
   5. Cards
   ========================================================================== */
.onshin-card {
	background-color: var(--wp--preset--color--white);
	border: var(--onshin-hairline);
	border-radius: var(--onshin-radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform 0.28s var(--onshin-ease), box-shadow 0.28s var(--onshin-ease);
}
.onshin-card:hover {
	transform: translateY(-3px);
	box-shadow: var(--onshin-shadow-lift);
}
.onshin-card__media {
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background-color: var(--wp--preset--color--border);
}
.onshin-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.5s var(--onshin-ease);
}
.onshin-card:hover .onshin-card__media img {
	transform: scale(1.04);
}
.onshin-card__body {
	padding: var(--wp--preset--spacing--30);
	display: flex;
	flex-direction: column;
	gap: 10px;
	flex: 1 1 auto;
}
.onshin-card__body h3 {
	margin: 0;
	font-size: var(--wp--preset--font-size--x-large);
	line-height: 1.15;
}
.onshin-card__body h3 a {
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}
.onshin-card__body p {
	margin: 0;
	color: var(--wp--preset--color--ink-soft);
	font-size: 15px;
	line-height: 1.65;
}

/* Text link with a trailing arrow that nudges on hover. */
.onshin-more {
	margin-top: auto;
	padding-top: 6px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--wp--preset--color--crimson);
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 8px;
}
.onshin-more::after {
	content: "→";
	transition: transform 0.25s var(--onshin-ease);
}
.onshin-card:hover .onshin-more::after,
.onshin-more:hover::after {
	transform: translateX(4px);
}

/* ==========================================================================
   6. "Dla kogo" — icon cards
   ========================================================================== */
.onshin-who {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: var(--wp--preset--spacing--30);
}
.onshin-who__item {
	display: flex;
	gap: var(--wp--preset--spacing--30);
	align-items: flex-start;
	background-color: var(--wp--preset--color--white);
	border: var(--onshin-hairline);
	border-radius: var(--onshin-radius);
	padding: var(--wp--preset--spacing--30);
}
.onshin-who__icon {
	flex: 0 0 auto;
	width: 78px;
	height: 78px;
	border-radius: 50%;
	background-color: #F7E9E3;
	display: grid;
	place-items: center;
}
.onshin-who__icon img {
	width: 56px;
	height: 56px;
	display: block;
}
.onshin-who__item h3 {
	margin: 0 0 6px;
	font-size: var(--wp--preset--font-size--large);
}
.onshin-who__item p {
	margin: 0;
	font-size: 14px;
	line-height: 1.6;
	color: var(--wp--preset--color--ink-soft);
}

/* ==========================================================================
   7. "Dlaczego ONSHIN" — icon row with hairline dividers
   ========================================================================== */
.onshin-why {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 0;
	border: var(--onshin-hairline);
	border-radius: var(--onshin-radius);
	background-color: var(--wp--preset--color--white);
	overflow: hidden;
}
.onshin-why__item {
	padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--20);
	text-align: center;
	border-right: var(--onshin-hairline);
	border-bottom: var(--onshin-hairline);
}
.onshin-why__item img {
	width: 44px;
	height: 44px;
	margin: 0 auto 12px;
	display: block;
}
.onshin-why__item h3 {
	margin: 0 0 6px;
	font-family: var(--wp--preset--font-family--body);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.02em;
}
.onshin-why__item p {
	margin: 0;
	font-size: 13px;
	line-height: 1.55;
	color: var(--wp--preset--color--ink-soft);
}

/* ==========================================================================
   8. Brush CTA band + crimson CTA band
   ========================================================================== */
.onshin-brush {
	position: relative;
	text-align: center;
	padding: clamp(36px, 5vw, 64px) var(--wp--preset--spacing--30);
	background-image: url("../media/deco/deco-pedzel.webp");
	background-repeat: no-repeat;
	background-position: center 46%;
	background-size: min(880px, 94%) auto;
}
/* On phones the heading wraps to 3-4 lines while the brush keeps its own
   3:1 aspect, so it ends up striking through a single line and reads like a
   mistake. Stretch it to the block instead, and soften it so text stays
   readable over the middle of the stroke. */
@media (max-width: 781px) {
	.onshin-brush {
		background-size: 100% 100%;
		background-position: center;
	}
	.onshin-brush h2,
	.onshin-brush p,
	.onshin-brush .onshin-eyebrow {
		position: relative;
	}
}
.onshin-brush h2 {
	margin: 0 0 8px;
}
.onshin-brush p {
	margin: 0 auto var(--wp--preset--spacing--30);
	color: var(--wp--preset--color--ink-soft);
	max-width: 52ch;
}
.onshin-brush .wp-block-buttons {
	justify-content: center;
}

.onshin-band {
	position: relative;
	overflow: hidden;
	background-color: var(--wp--preset--color--crimson);
	border-radius: var(--onshin-radius);
	color: var(--wp--preset--color--white);
	padding: clamp(28px, 4vw, 44px) clamp(24px, 4vw, 48px);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--30);
}
.onshin-band h2,
.onshin-band h3 {
	margin: 0 0 6px;
	color: var(--wp--preset--color--white);
}
.onshin-band p {
	margin: 0;
	color: rgba(255, 255, 255, 0.86);
	font-size: 15px;
}
.onshin-band .wp-block-button__link,
.onshin-band__cta {
	background-color: var(--wp--preset--color--white) !important;
	color: var(--wp--preset--color--crimson) !important;
	text-decoration: none;
}
.onshin-band .wp-block-button__link:hover,
.onshin-band__cta:hover {
	background-color: var(--wp--preset--color--ink) !important;
	color: var(--wp--preset--color--white) !important;
}

/* ==========================================================================
   9. Instructors
   ========================================================================== */
.onshin-people {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
	gap: var(--wp--preset--spacing--40);
	list-style: none;
	margin: 0;
	padding: 0;
}
.onshin-people > li {
	margin: 0;
	text-align: center;
}
.onshin-people .wp-block-post-featured-image {
	margin: 0 auto 16px;
	width: min(190px, 100%);
}
.onshin-people .wp-block-post-featured-image img {
	border-radius: 50%;
	aspect-ratio: 1;
	object-fit: cover;
	width: 100%;
	height: auto;
	border: 3px solid var(--wp--preset--color--white);
	box-shadow: 0 0 0 1px var(--wp--preset--color--border);
}
.onshin-people .wp-block-post-title {
	margin: 0 0 4px;
	font-size: var(--wp--preset--font-size--large);
}
.onshin-people .wp-block-post-title a {
	text-decoration: none;
	color: var(--wp--preset--color--ink);
}
.onshin-people .wp-block-post-excerpt {
	margin: 0;
}
.onshin-people .wp-block-post-excerpt__excerpt {
	font-size: 13px;
	line-height: 1.55;
	color: var(--wp--preset--color--ink-soft);
}
/* Instructors without a photo yet still need to line up with those who have
   one, otherwise the row staggers (the bug visible on the live site). */
.onshin-people > li > .wp-block-group {
	height: 100%;
}

/* Single-instructor highlight block (class pages). */
.onshin-teacher {
	display: grid;
	grid-template-columns: minmax(180px, 260px) 1fr;
	gap: clamp(24px, 4vw, 56px);
	align-items: center;
}
@media (max-width: 700px) {
	.onshin-teacher {
		grid-template-columns: 1fr;
		justify-items: center;
		text-align: center;
	}
}
.onshin-teacher__photo {
	position: relative;
	aspect-ratio: 1;
	border-radius: 50%;
	overflow: hidden;
	border: 4px solid var(--wp--preset--color--white);
	box-shadow: 0 0 0 2px rgba(184, 40, 55, 0.4), var(--onshin-shadow);
}
.onshin-teacher__photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.onshin-teacher__name {
	margin: 0;
	font-size: var(--wp--preset--font-size--xx-large);
}
.onshin-teacher__role {
	margin: 2px 0 var(--wp--preset--spacing--20);
	color: var(--wp--preset--color--crimson);
	font-size: var(--wp--preset--font-size--large);
}
.onshin-teacher ul {
	margin: 0 0 var(--wp--preset--spacing--20);
	padding-left: 1.1em;
}
.onshin-teacher li {
	font-size: 14px;
	color: var(--wp--preset--color--ink-soft);
	margin-bottom: 4px;
}

/* ==========================================================================
   10. Aktualności
   ========================================================================== */
.onshin-news {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: var(--wp--preset--spacing--30);
	list-style: none;
	margin: 0;
	padding: 0;
}
.onshin-news > li {
	margin: 0;
	background-color: var(--wp--preset--color--white);
	border: var(--onshin-hairline);
	border-radius: var(--onshin-radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform 0.28s var(--onshin-ease), box-shadow 0.28s var(--onshin-ease);
}
.onshin-news > li:hover {
	transform: translateY(-3px);
	box-shadow: var(--onshin-shadow-lift);
}
.onshin-news .wp-block-post-featured-image {
	margin: 0;
}
.onshin-news .wp-block-post-featured-image img {
	aspect-ratio: 16 / 10;
	object-fit: cover;
	width: 100%;
	height: auto;
	display: block;
}
.onshin-news .wp-block-group {
	padding: var(--wp--preset--spacing--30);
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 1 1 auto;
}
.onshin-news .wp-block-post-date {
	margin: 0;
	font-size: 12px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--wp--preset--color--ink-soft);
}
.onshin-news .wp-block-post-title {
	margin: 0;
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.25;
}
.onshin-news .wp-block-post-title a {
	text-decoration: none;
	color: var(--wp--preset--color--ink);
}
.onshin-news .wp-block-post-excerpt__excerpt {
	font-size: 14px;
	line-height: 1.6;
	color: var(--wp--preset--color--ink-soft);
	margin: 0;
}
.onshin-news .wp-block-post-excerpt__more-text {
	margin: 0;
}
.onshin-news .wp-block-post-excerpt__more-link {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--wp--preset--color--crimson);
	text-decoration: none;
}

/* ==========================================================================
   10b. Value cards + link tiles (/o-nas/)
   ========================================================================== */
.onshin-values {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: var(--wp--preset--spacing--30);
	margin: var(--wp--preset--spacing--50) 0;
	max-width: none;
}
.onshin-values__item {
	background-color: var(--wp--preset--color--white);
	border: var(--onshin-hairline);
	border-radius: var(--onshin-radius);
	padding: var(--wp--preset--spacing--30);
	position: relative;
}
/* Crimson cap rule: the same "brush stroke" device the section headings use,
   so a card reads as part of the same system rather than a plain box. */
.onshin-values__item::before {
	content: "";
	position: absolute;
	inset: -1px auto auto -1px;
	width: 56px;
	height: 3px;
	background: linear-gradient(90deg, var(--wp--preset--color--crimson), rgba(184, 40, 55, 0.15));
}
.onshin-values__item img {
	width: 44px;
	height: 44px;
	display: block;
	margin-bottom: 14px;
}
.onshin-values__item h3 {
	margin: 0 0 8px;
	font-size: var(--wp--preset--font-size--x-large);
	line-height: 1.15;
}
.onshin-values__item p {
	margin: 0;
	font-size: 14px;
	line-height: 1.65;
	color: var(--wp--preset--color--ink-soft);
}

.onshin-links {
	margin-top: var(--wp--preset--spacing--50);
	max-width: none;
}
.onshin-links ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 8px;
}
.onshin-links li {
	margin: 0;
}
.onshin-links a {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 46px;
	padding: 8px 14px;
	border: var(--onshin-hairline);
	border-radius: var(--onshin-radius);
	background-color: var(--wp--preset--color--white);
	color: var(--wp--preset--color--ink);
	text-decoration: none;
	font-size: 14px;
	transition: border-color 0.2s var(--onshin-ease), color 0.2s var(--onshin-ease);
}
/* Trailing external-link mark, pushed to the right edge of the tile. */
.onshin-links a::after {
	content: "↗";
	margin-left: auto;
	color: var(--wp--preset--color--clay);
	font-size: 13px;
}
.onshin-links a:hover {
	border-color: var(--wp--preset--color--crimson);
	color: var(--wp--preset--color--crimson);
}
.onshin-links a:hover::after {
	color: var(--wp--preset--color--crimson);
}

/* ==========================================================================
   10c. Map / click-to-load embeds (/kontakt/)
   ========================================================================== */
.onshin-map {
	display: grid;
	grid-template-columns: minmax(260px, 0.8fr) 1.2fr;
	gap: var(--wp--preset--spacing--40);
	align-items: center;
	margin-top: var(--wp--preset--spacing--60);
	max-width: none;
}
@media (max-width: 781px) {
	.onshin-map {
		grid-template-columns: 1fr;
	}
}
.onshin-map__info h2 {
	margin: 0 0 10px;
	font-size: var(--wp--preset--font-size--x-large);
}
.onshin-map__info p {
	color: var(--wp--preset--color--ink-soft);
	font-size: 15px;
}
.onshin-map__info .wp-block-buttons {
	margin-top: var(--wp--preset--spacing--20);
}

/* Placeholder keeps the exact box the iframe will occupy, so swapping the
   map in shifts nothing (CLS). */
.onshin-embed {
	position: relative;
	aspect-ratio: 4 / 3;
	border: var(--onshin-hairline);
	border-radius: var(--onshin-radius);
	overflow: hidden;
	background-color: #F1E4DE;
	/* A faint seigaiha wash so the un-loaded state looks intentional rather
	   than like a failed image. */
	background-image: url("../media/deco/deco-fale.webp");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 120% auto;
}
@media (max-width: 781px) {
	.onshin-embed {
		aspect-ratio: 3 / 2;
	}
}
.onshin-embed iframe {
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}
.onshin-embed.is-loaded {
	background-image: none;
}
.onshin-embed__load {
	position: absolute;
	inset: 0;
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: var(--wp--preset--spacing--30);
	background: rgba(250, 243, 240, 0.72);
	border: 0;
	cursor: pointer;
	font-family: var(--wp--preset--font-family--body);
	color: var(--wp--preset--color--ink);
	text-align: center;
	transition: background-color 0.2s var(--onshin-ease);
}
.onshin-embed__load:hover {
	background: rgba(250, 243, 240, 0.88);
}
.onshin-embed__load span {
	font-weight: 600;
	font-size: 15px;
	padding: 10px var(--wp--preset--spacing--30);
	background: var(--wp--preset--color--crimson);
	color: var(--wp--preset--color--white);
	border-radius: 2px;
}
.onshin-embed__load small {
	font-size: 12px;
	line-height: 1.5;
	color: var(--wp--preset--color--ink-soft);
	max-width: 30ch;
}

/* ==========================================================================
   11. Pull quote (class pages)
   ========================================================================== */
.onshin-pullquote {
	border-left: 3px solid var(--wp--preset--color--crimson);
	padding-left: var(--wp--preset--spacing--30);
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--x-large);
	line-height: 1.45;
	color: var(--wp--preset--color--ink);
	margin: 0;
}

/* ==========================================================================
   12. Decorative watermarks
   ========================================================================== */
.onshin-deco {
	position: relative;
	overflow: hidden;
	isolation: isolate;
}
.onshin-deco::before {
	content: "";
	position: absolute;
	z-index: -1;
	pointer-events: none;
	background-repeat: no-repeat;
	background-size: contain;
}
.onshin-deco--waves::before {
	background-image: url("../media/deco/deco-fale.webp");
	width: 520px;
	height: 174px;
	right: -80px;
	top: 24px;
	opacity: 0.22;
}
.onshin-deco--enso::before {
	background-image: url("../media/deco/deco-enso.webp");
	width: 300px;
	height: 300px;
	left: -110px;
	bottom: -90px;
	opacity: 0.1;
}
.onshin-deco--sakura::before {
	background-image: url("../media/deco/deco-sakura.webp");
	width: 340px;
	height: 255px;
	left: -40px;
	top: -30px;
	opacity: 0.5;
}
.onshin-deco--garden::before {
	background-image: url("../media/deco/deco-ogrod.webp");
	width: 460px;
	height: 259px;
	right: -30px;
	bottom: -20px;
	opacity: 0.6;
}
@media (max-width: 781px) {
	.onshin-deco::before {
		display: none;
	}
}

/* ==========================================================================
   13. Dojo / "nasze miejsce"
   ========================================================================== */
.onshin-place {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: var(--wp--preset--spacing--30);
	align-items: stretch;
}
.onshin-place img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	border-radius: var(--onshin-radius);
	aspect-ratio: 16 / 10;
}

/* ==========================================================================
   14. Footer
   ========================================================================== */
.onshin-footer {
	position: relative;
	border-top: var(--onshin-hairline);
	background-color: var(--wp--preset--color--white);
}
.onshin-footer__inner {
	position: relative;
	z-index: 1;
	max-width: var(--onshin-shell);
	margin-inline: auto;
}
.onshin-footer a {
	text-decoration: none;
}
.onshin-footer a:hover {
	text-decoration: underline;
	color: var(--wp--preset--color--crimson);
}
.onshin-footer__cols {
	display: grid;
	grid-template-columns: minmax(220px, 1.4fr) repeat(auto-fit, minmax(140px, 1fr));
	gap: var(--wp--preset--spacing--40);
	align-items: start;
}
.onshin-footer__head {
	font-family: var(--wp--preset--font-family--body);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--ink);
	margin: 0 0 14px;
}
.onshin-footer__list {
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: 14px;
	line-height: 2.1;
}
.onshin-footer__bottom {
	border-top: var(--onshin-hairline);
	padding-top: var(--wp--preset--spacing--20);
}
.onshin-footer__bottom p {
	margin: 0;
}
.onshin-footer .onshin-logo {
	height: 44px;
}

/* ==========================================================================
   15. FAQ (details/summary — no JS)
   ========================================================================== */
.onshin-faq {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
	gap: var(--wp--preset--spacing--20);
}
.onshin-faq details {
	background-color: var(--wp--preset--color--white);
	border: var(--onshin-hairline);
	border-radius: var(--onshin-radius);
}
.onshin-faq summary {
	cursor: pointer;
	list-style: none;
	padding: 14px var(--wp--preset--spacing--30);
	font-size: 15px;
	font-weight: 500;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: 44px;
}
.onshin-faq summary::-webkit-details-marker {
	display: none;
}
.onshin-faq summary::after {
	content: "⌄";
	color: var(--wp--preset--color--crimson);
	font-size: 18px;
	line-height: 1;
	transition: transform 0.2s var(--onshin-ease);
}
.onshin-faq details[open] summary::after {
	transform: rotate(180deg);
}
.onshin-faq details > div {
	padding: 0 var(--wp--preset--spacing--30) var(--wp--preset--spacing--20);
	font-size: 14px;
	line-height: 1.7;
	color: var(--wp--preset--color--ink-soft);
}
.onshin-faq details > div a {
	color: var(--wp--preset--color--crimson);
}

/* Single-column variant for the dedicated /faq/ page, where the questions
   are grouped under real subheadings and reading order matters more than
   fitting two per row. */
.onshin-faq--stack {
	grid-template-columns: 1fr;
	max-width: 68ch;
}
.onshin-faq-head {
	font-family: var(--wp--preset--font-family--body);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--crimson);
	margin: var(--wp--preset--spacing--50) 0 var(--wp--preset--spacing--20);
}
.onshin-faq-head:first-child {
	margin-top: var(--wp--preset--spacing--30);
}

/* ==========================================================================
   15b. Article / listing chrome
   ========================================================================== */
.onshin-article-head .wp-block-post-title {
	margin: 0;
	max-width: 22ch;
	font-size: clamp(30px, 4.2vw, 48px);
	line-height: 1.1;
}
.onshin-article-head .wp-block-post-date {
	margin-top: 12px;
}
.onshin-article-media .wp-block-post-featured-image {
	margin: 0;
}
.onshin-article-media .wp-block-post-featured-image img {
	width: 100%;
	height: auto;
	aspect-ratio: 21 / 9;
	object-fit: cover;
	border-radius: var(--onshin-radius);
	display: block;
}
/* No featured image on most migrated posts — collapse the slot rather than
   leaving a gap where the picture would be. */
.onshin-article-media:not(:has(img)) {
	display: none;
}
.onshin-prose--article > * {
	max-width: 72ch;
}

.onshin-pagination {
	gap: 8px;
	font-size: 14px;
}
.onshin-pagination a,
.onshin-pagination .page-numbers {
	text-decoration: none;
	padding: 6px 12px;
	border: var(--onshin-hairline);
	border-radius: 2px;
	color: var(--wp--preset--color--ink-soft);
	background-color: var(--wp--preset--color--white);
}
.onshin-pagination .page-numbers.current {
	background-color: var(--wp--preset--color--crimson);
	border-color: var(--wp--preset--color--crimson);
	color: var(--wp--preset--color--white);
}

.onshin-searchbox .wp-block-search__input {
	border: var(--onshin-hairline);
	border-radius: 2px;
	padding: 10px 14px;
	background-color: var(--wp--preset--color--white);
	font-family: var(--wp--preset--font-family--body);
}
.onshin-center .onshin-searchbox .wp-block-search__inside-wrapper {
	max-width: 460px;
	margin-inline: auto;
}

.onshin-404-links {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px 8px;
}
.onshin-404-links a {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	padding: 0 16px;
	border: var(--onshin-hairline);
	border-radius: 999px;
	background-color: var(--wp--preset--color--white);
	color: var(--wp--preset--color--ink);
	text-decoration: none;
	font-size: 14px;
}
.onshin-404-links a:hover {
	border-color: var(--wp--preset--color--crimson);
	color: var(--wp--preset--color--crimson);
}

/* Cover blocks have no fixed height here any more (the class-page hero sets
   its own), so the old blanket cap is gone — it would have clipped the hero. */

/* ==========================================================================
   16. Fitssey
   ========================================================================== */
/* Reserved height so the widget popping in doesn't shift the page (CLS).
   Matched to the iframe's own min-height (400px, read off the bundle) plus
   the frame padding — reserving more than that would just leave a visible
   gap under a short week view, since the iframe reports its real height
   back and shrinks to fit. */
.onshin-fitssey-mount {
	min-height: 430px;
}
.onshin-fitssey-block {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--wp--preset--spacing--30);
}
.onshin-fitssey-toggle {
	background: var(--wp--preset--color--crimson);
	color: var(--wp--preset--color--white);
	border: none;
	cursor: pointer;
}
.onshin-fitssey-toggle:hover {
	background: var(--wp--preset--color--ink);
}
.onshin-fitssey-toggle:disabled {
	opacity: 0.7;
	cursor: wait;
}
.onshin-fitssey-mount[hidden] {
	display: none;
	min-height: 0;
}
.onshin-fitssey-mount:not([hidden]) {
	width: 100%;
}

/* Fitssey ships its own stylesheet with the widget. These rules only reframe
   it to sit inside the site's own surfaces — card ground, hairline border,
   brand accent on the primary control, our type — rather than restyling the
   widget's internals, which would break the next time Fitssey ships an
   update. The frame also gives the widget a horizontal scroll container of
   its own so a wide week view can never push the page sideways on a phone. */
.onshin-fitssey-frame {
	background-color: var(--wp--preset--color--white);
	border: var(--onshin-hairline);
	border-radius: var(--onshin-radius);
	padding: clamp(8px, 2vw, 20px);
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}
.onshin-fitssey-frame,
.onshin-fitssey-frame :is(button, input, select, a, div, span, p, td, th) {
	font-family: var(--wp--preset--font-family--body);
}
.onshin-fitssey-frame :is(h1, h2, h3, h4) {
	font-family: var(--wp--preset--font-family--display);
	color: var(--wp--preset--color--ink);
}
/* Fitssey's own primary buttons -> brand crimson. Scoped to the frame so
   nothing else on the page is affected. */
.onshin-fitssey-frame :is(.btn-primary, .lb-btn-primary, [class*="primary"]:is(button, a.btn)) {
	background-color: var(--wp--preset--color--crimson) !important;
	border-color: var(--wp--preset--color--crimson) !important;
	color: var(--wp--preset--color--white) !important;
	border-radius: 2px !important;
}
.onshin-fitssey-frame :is(.btn-primary, .lb-btn-primary, [class*="primary"]:is(button, a.btn)):hover {
	background-color: var(--wp--preset--color--ink) !important;
	border-color: var(--wp--preset--color--ink) !important;
}
.onshin-fitssey-frame a {
	color: var(--wp--preset--color--crimson);
}

/* The bundle injects an <iframe width="100%" style="min-height:400px"> and
   then drives its own height over postMessage
   ("…widget.recalculateIframeHeight"). So it is already fluid in width and
   self-sizing in height — the only thing needed here is for the custom
   element to be a block box, and for the iframe not to carry a border. */
.onshin-fitssey-frame > lb-schedule-widget {
	display: block;
	width: 100%;
}
.onshin-fitssey-frame iframe {
	display: block;
	width: 100%;
	border: 0;
}

/* ==========================================================================
   17. Buttons, focus, motion
   ========================================================================== */
/* WP core's built-in "outline" style ships its own em-based padding, which
   doesn't match the fixed spacing-token padding theme.json sets for the
   default (filled) button — that's why "Zobacz grafik" and "Nasze zajęcia"
   looked like two different button systems rather than a primary/secondary
   pair. Force both to the same box model regardless of which style variant
   (or WP's auto-generated "is-style-outline--N" instance class) is present. */
.wp-block-button__link {
	padding-top: 12px !important;
	padding-bottom: 12px !important;
	padding-left: var(--wp--preset--spacing--30) !important;
	padding-right: var(--wp--preset--spacing--30) !important;
	font-family: var(--wp--preset--font-family--body);
	font-weight: 600;
	font-size: 15px;
	border-radius: 2px;
	transition: background-color 0.2s var(--onshin-ease), color 0.2s var(--onshin-ease);
}
.wp-block-button:not(.is-style-outline) .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--white);
}
.is-style-outline .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--ink);
	border-color: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--white);
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
.wp-block-button__link:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
	outline: 2px solid var(--wp--preset--color--crimson);
	outline-offset: 2px;
}

/* Every tappable control gets a real hit target, even where the visible glyph
   is smaller (plan §6, §16 — 44px minimum). */
.wp-block-navigation .wp-block-navigation-item > a,
.wp-block-navigation__responsive-container-open,
.wp-block-navigation__responsive-container-close,
.wp-block-button__link {
	min-height: 44px;
	display: inline-flex;
	align-items: center;
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* Header CTA button: hidden in the mobile nav overlay list (it has its own
   prominent "Zapisz się" already at the top bar) to avoid showing the same
   action twice on small screens. */
@media (max-width: 781px) {
	/* Scoped to the header and marked important on purpose: core prints its
	   own layout rules (.is-layout-flex{display:flex}) inline, and this
	   element carries wp-block-buttons-is-layout-flex too. Equal specificity
	   means the winner depends on stylesheet order, which is not something
	   this rule should be at the mercy of — the mobile header is unusable if
	   it loses. */
	.onshin-header .onshin-header-cta,
	.onshin-header-cta {
		display: none !important;
	}
}
