/* Kokkolan Budo – styles that theme.json can't express. */

html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
:where(.wp-site-blocks) > * { margin-block-start: 0; }
img { height: auto; }
::selection { background: var(--wp--preset--color--gold); color: var(--wp--preset--color--ink); }
:focus-visible { outline: 2px solid var(--wp--preset--color--gold); outline-offset: 3px; }

/* ---------- Header ---------- */
.kb-site-header {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 50;
	box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06), 0 8px 24px -16px rgba(0, 0, 0, 0.6);
}
.kb-header .wp-block-site-title { margin: 0; line-height: 1.1; }
.kb-header .wp-block-site-title a { text-decoration: none; }
.kb-tagline {
	margin: 0;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.72rem;
	font-weight: 500;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	line-height: 1.3;
}
.kb-logo { margin: 0; flex-shrink: 0; }
.kb-logo img { display: block; transition: transform 0.25s ease; }
.kb-logo a:hover img { transform: rotate(-4deg) scale(1.04); }

.kb-nav .wp-block-navigation-item__content { text-decoration: none; padding-block: 0.4rem; position: relative; }
.kb-nav > .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 2px;
	background: var(--wp--preset--color--gold);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.2s ease;
}
.kb-nav .wp-block-navigation-item__content:hover::after,
.kb-nav .current-menu-item > .wp-block-navigation-item__content::after { transform: scaleX(1); }
.kb-nav .wp-block-navigation-item__content:hover { color: var(--wp--preset--color--gold); }
.kb-nav .wp-block-navigation__submenu-container {
	background: var(--wp--preset--color--ink) !important;
	border: 1px solid rgba(255, 255, 255, 0.08) !important;
	border-radius: 4px;
	padding: 0.4rem 0;
	min-width: 13rem !important;
}
.kb-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content { padding: 0.5rem 1rem; }
.kb-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	padding-top: 2rem;
	font-size: 1.35rem;
	gap: 1.1rem;
}
@media (max-width: 899px) {
	.kb-header .kb-header-cta { display: none !important; }
}
.wp-site-blocks { overflow-x: clip; }
@media (max-width: 420px) {
	.kb-tagline { display: none; }
}

/* ---------- Kicker (small label above headings) ---------- */
.is-style-kb-kicker {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 0.25rem !important;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--wp--preset--color--gold-dark);
}
.has-ink-background-color .is-style-kb-kicker,
.has-charcoal-background-color .is-style-kb-kicker,
.wp-block-cover .is-style-kb-kicker { color: var(--wp--preset--color--gold); }
.is-style-kb-kicker::before {
	content: "";
	width: 2rem;
	height: 2px;
	background: currentColor;
}
.is-style-kb-kicker a { color: inherit; text-decoration: none; }

/* ---------- Page hero ---------- */
.kb-page-hero .wp-block-cover__image-background { filter: grayscale(25%) contrast(1.05); }
.kb-page-hero .wp-block-cover__background {
	background: linear-gradient(180deg, rgba(28, 29, 32, 0.35) 0%, rgba(28, 29, 32, 0.92) 100%) !important;
	opacity: 1 !important;
}
.wp-block-cover.kb-page-hero .wp-block-cover__inner-container { width: 100% !important; max-width: 1200px; margin-inline: auto !important; }
.kb-hero-title { margin: 0; text-transform: uppercase; letter-spacing: -0.01em; font-size: clamp(2.1rem, 8vw, 4.5rem) !important; overflow-wrap: normal; }
.kb-hero-sub { margin-top: 0.5rem; font-family: var(--wp--preset--font-family--heading); font-size: var(--wp--preset--font-size--large); font-weight: 500; }
.kb-hero-sub p { margin: 0; }
.kb-hero-sub:empty, .kb-hero-sub:has(p:empty) { display: none; }

/* ---------- Home hero ---------- */
.kb-home-hero .wp-block-cover__image-background { filter: grayscale(20%); }
.kb-home-hero .wp-block-cover__background {
	background: linear-gradient(90deg, rgba(28, 29, 32, 0.96) 0%, rgba(28, 29, 32, 0.82) 45%, rgba(28, 29, 32, 0.35) 100%) !important;
	opacity: 1 !important;
}
.kb-home-hero h1 { text-transform: uppercase; line-height: 0.98; }
.kb-home-hero h1 .kb-gold { color: var(--wp--preset--color--gold); }
.kb-lead { font-size: var(--wp--preset--font-size--large); line-height: 1.6; }

/* ---------- Stats strip ---------- */
.kb-stats .kb-stat-number {
	margin: 0;
	font-family: var(--wp--preset--font-family--heading);
	font-size: clamp(2rem, 4vw, 2.75rem);
	font-weight: 700;
	line-height: 1;
	color: var(--wp--preset--color--gold);
}
.kb-stats .kb-stat-label { margin: 0.35rem 0 0; font-size: 0.9rem; color: rgba(255, 255, 255, 0.72); }
@media (max-width: 640px) {
	.wp-block-columns.is-not-stacked-on-mobile.kb-stats-cols { flex-wrap: wrap !important; row-gap: 1.5rem !important; }
	.wp-block-columns.is-not-stacked-on-mobile.kb-stats-cols > .wp-block-column { flex: 0 0 calc(50% - 0.75rem) !important; }
}

/* ---------- Cards ---------- */
.is-style-kb-card {
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 6px;
	padding: clamp(1.25rem, 3vw, 2rem);
	box-shadow: var(--wp--preset--shadow--soft);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.is-style-kb-card-dark {
	background: var(--wp--preset--color--charcoal);
	color: var(--wp--preset--color--white);
	border-top: 3px solid var(--wp--preset--color--gold);
	border-radius: 6px;
	padding: clamp(1.25rem, 3vw, 2rem);
}
.is-style-kb-card-dark :where(h2, h3, h4) { color: var(--wp--preset--color--white); }
.kb-news-card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -18px rgba(28, 29, 32, 0.35); }
.kb-news-card .wp-block-post-title a { text-decoration: none; color: var(--wp--preset--color--ink); }
.kb-news-card .wp-block-post-title a:hover { color: var(--wp--preset--color--gold-dark); }
.kb-news-card { overflow: hidden; height: 100%; }
.kb-news-card > * { width: 100%; }
.kb-news-card .wp-block-post-featured-image { margin: 0 0 0.5rem; overflow: hidden; border-radius: 4px; }
.kb-news-card .wp-block-post-featured-image img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Sport feature rows ---------- */
@media (max-width: 781px) {
	.kb-sport-reverse { flex-direction: column-reverse; }
	.is-style-kb-framed::after { inset: 8px -6px -8px 6px; }
}
.kb-sport-num {
	margin: 0;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.85rem;
	font-weight: 700;
	letter-spacing: 0.18em;
	color: var(--wp--preset--color--gold-dark);
}

/* ---------- Images ---------- */
.is-style-kb-framed img { border-radius: 6px; box-shadow: var(--wp--preset--shadow--soft); }
.is-style-kb-framed { position: relative; isolation: isolate; }
.is-style-kb-framed::after {
	content: "";
	position: absolute;
	inset: 14px -14px -14px 14px;
	border: 2px solid var(--wp--preset--color--gold);
	border-radius: 6px;
	z-index: -1;
}
.kb-section { position: relative; isolation: isolate; }

/* ---------- Schedule table ---------- */
.wp-block-table.is-style-kb-schedule { margin: 0; }
.is-style-kb-schedule table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; border: 0; }
.is-style-kb-schedule thead, .is-style-kb-schedule tfoot { border: 0; }
.wp-block-table.is-style-kb-schedule td,
.wp-block-table.is-style-kb-schedule th { border: 0; border-bottom: 1px solid var(--wp--preset--color--line); padding: 0.85rem 0.5rem; text-align: left; }
.wp-block-table.is-style-kb-schedule thead th {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.75rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
	border-bottom: 2px solid var(--wp--preset--color--ink);
}
.is-style-kb-schedule tbody td:first-child { font-weight: 600; color: var(--wp--preset--color--ink); }
.is-style-kb-schedule tbody td:last-child { text-align: right; white-space: nowrap; font-family: var(--wp--preset--font-family--heading); font-weight: 600; }
.is-style-kb-schedule thead th:last-child { text-align: right; }
.is-style-kb-schedule tbody tr:hover td { background: var(--wp--preset--color--paper); }
.has-ink-background-color .wp-block-table.is-style-kb-schedule :is(td, th),
.is-style-kb-card-dark .wp-block-table.is-style-kb-schedule :is(td, th) { border-bottom-color: rgba(255, 255, 255, 0.12); }
.is-style-kb-card-dark .is-style-kb-schedule tbody td:first-child { color: var(--wp--preset--color--white); }
.is-style-kb-card-dark .wp-block-table.is-style-kb-schedule thead th { color: rgba(255, 255, 255, 0.6); border-bottom-color: var(--wp--preset--color--gold); }
.is-style-kb-card-dark .is-style-kb-schedule tbody tr:hover td { background: rgba(255, 255, 255, 0.04); }

/* ---------- Lists ---------- */
.is-style-kb-checks { list-style: none; padding-left: 0 !important; }
.is-style-kb-checks li { position: relative; padding-left: 2rem; margin-bottom: 0.7rem; }
.is-style-kb-checks li::before {
	content: "";
	position: absolute;
	left: 0.1rem;
	top: 0.55em;
	width: 0.9rem;
	height: 0.5rem;
	border-left: 2px solid var(--wp--preset--color--gold-dark);
	border-bottom: 2px solid var(--wp--preset--color--gold-dark);
	transform: rotate(-45deg);
}
.kb-rules { list-style: none; padding-left: 0 !important; }
.kb-rules > li { position: relative; padding: 1rem 0 1rem 1.75rem; border-bottom: 1px solid var(--wp--preset--color--line); }
.kb-rules > li::before {
	content: "";
	position: absolute;
	left: 0.15rem;
	top: 1.6rem;
	width: 0.45rem;
	height: 0.45rem;
	background: var(--wp--preset--color--gold);
	transform: rotate(45deg);
}

/* ---------- Statute (club rules) ---------- */
.kb-statute h3 {
	font-size: 1.05rem;
	margin-top: 2.25rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--wp--preset--color--line);
	color: var(--wp--preset--color--gold-dark);
	letter-spacing: 0.04em;
}
.kb-statute h3 + p { margin-top: 0.5rem; }

/* ---------- Quote ---------- */
.kb-quote { border: 0 !important; padding: 0 !important; text-align: center; }
.kb-quote p { font-family: var(--wp--preset--font-family--heading); font-style: normal; font-size: var(--wp--preset--font-size--x-large); font-weight: 500; line-height: 1.35; color: var(--wp--preset--color--white); }
.kb-quote cite { display: block; margin-top: 1rem; font-style: normal; font-size: 0.85rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--wp--preset--color--gold); }

/* ---------- Contact ---------- */
.kb-contact-item h3 {
	margin: 0 0 0.25rem;
	font-size: 0.78rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
}
.kb-contact-item p { margin: 0; font-size: 1.05rem; }
.kb-contact-item + .kb-contact-item { margin-top: 1.75rem !important; }
.kb-contact-item a { color: var(--wp--preset--color--ink); text-decoration-color: var(--wp--preset--color--gold); text-underline-offset: 3px; }
.kb-board { margin: 0 !important; padding: 0.75rem 0; border-bottom: 1px solid rgba(255, 255, 255, 0.12); display: flex; justify-content: space-between; align-items: baseline; gap: 0.25rem 1rem; flex-wrap: wrap; }
.kb-board:last-of-type { border-bottom: 0; }
.kb-board strong { color: var(--wp--preset--color--gold); font-weight: 600; }
.kb-board span { color: rgba(255, 255, 255, 0.8); }
.is-style-kb-card-dark a:not(.wp-element-button) { color: var(--wp--preset--color--gold); text-decoration: none; }
.is-style-kb-card-dark a:not(.wp-element-button):hover { text-decoration: underline; }
.kb-map iframe { width: 100%; height: 420px; border: 0; display: block; filter: grayscale(30%); }

/* ---------- Gallery ---------- */
.wp-block-gallery.kb-gallery .wp-block-image { overflow: hidden; border-radius: 4px; }
.wp-block-gallery.kb-gallery .wp-block-image img { transition: transform 0.4s ease, filter 0.4s ease; filter: grayscale(15%); }
.wp-block-gallery.kb-gallery .wp-block-image:hover img { transform: scale(1.04); filter: none; }

/* ---------- CTA band ---------- */
.kb-cta { overflow: hidden; }
.kb-cta h2 { color: var(--wp--preset--color--ink); }

/* ---------- Footer ---------- */
.kb-footer .kb-footer-title {
	font-size: 0.8rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--wp--preset--color--gold);
	margin-bottom: 1rem;
}
.kb-footer-muted, .kb-footer-links { color: rgba(255, 255, 255, 0.72); font-size: 0.95rem; }
.kb-footer-links { list-style: none; padding-left: 0 !important; }
.kb-footer-links li { margin-bottom: 0.45rem; }
.kb-footer a { text-decoration: none; }
.kb-footer a:hover { color: var(--wp--preset--color--gold) !important; text-decoration: underline; }
.kb-footer-sep { border-color: rgba(255, 255, 255, 0.12) !important; margin-block: var(--wp--preset--spacing--50) var(--wp--preset--spacing--30) !important; }
.kb-footer-legal { color: rgba(255, 255, 255, 0.5); margin: 0; }
.kb-footer-logo { margin: 0 0 1rem; }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
