/*
Theme Name: Koncerty
Theme URI: https://koncerty.art
Description: Block theme for koncerty.art: event pages, shop and seat picker styling.
Version: 0.4.3
Requires at least: 6.6
Requires PHP: 8.1
Text Domain: koncerty
License: Proprietary
*/

/*
 * Design tokens live in theme.json. This file holds only what theme.json
 * cannot express: focus rings, the brand mark, the header bar, reduced motion.
 * Components and motion are in assets/css/components.css.
 */

:focus-visible {
	outline: 2px solid var(--wp--preset--color--wine-bright);
	outline-offset: 3px;
}

html {
	scroll-behavior: smooth;
}

body {
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

::selection {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--paper);
}

/* Brand mark: "koncerty.art", the TLD in the accent colour */
.wp-block-site-title.kc-brand a {
	text-decoration: none;
}

.kc-brand__tld {
	color: var(--wp--preset--color--wine);
}

.has-ink-background-color .kc-brand__tld,
.has-ink-soft-background-color .kc-brand__tld,
.kc-hero .kc-brand__tld {
	color: var(--wp--preset--color--wine-bright);
}

.has-ink-background-color a:where(:not(.wp-element-button)),
.has-ink-soft-background-color a:where(:not(.wp-element-button)) {
	color: inherit;
}

/* Outline display type */
.kc-outline {
	-webkit-text-stroke: 1.5px currentColor;
	-webkit-text-fill-color: transparent;
}

.kc-outline .kc-brand__tld {
	-webkit-text-fill-color: var(--wp--preset--color--wine-bright);
	-webkit-text-stroke: 0;
}

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

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

/* Template parts sit flush; sections carry their own padding */
.wp-site-blocks > * + * {
	margin-block-start: 0;
}

/* Header bar
   ========================================================================== */

.wp-site-blocks > header.wp-block-template-part {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 100;
	transition: transform .45s cubic-bezier(.22, 1, .36, 1);
}

.wp-site-blocks > header.wp-block-template-part.is-hidden {
	transform: translateY(-100%);
}

.kc-header {
	border-bottom: 1px solid transparent;
	transition: border-color .3s;
}

.is-scrolled .kc-header {
	border-bottom-color: var(--wp--preset--color--rule-on-dark);
}

.kc-header__bar {
	align-items: center;
	grid-template-columns: 1fr auto 1fr !important;
}

.kc-header .wp-block-site-title {
	font-size: clamp(1.25rem, 4vw, 1.75rem);
	white-space: nowrap;
}

.kc-header .wp-block-button__link {
	white-space: nowrap;
}

.kc-header .wp-block-navigation-item__content {
	position: relative;
	white-space: nowrap;
}

/* Underline that draws in from the left, as on vanmorrison.com */
.kc-header .wp-block-navigation-item__content::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -.25em;
	height: 2px;
	background: currentColor;
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform .25s cubic-bezier(.22, 1, .36, 1);
}

.kc-header .wp-block-navigation-item__content:hover::after,
.kc-header .wp-block-navigation-item__content:focus-visible::after,
.kc-header .current-menu-item > .wp-block-navigation-item__content::after {
	transform: scaleX(1);
}

/*
 * Core switches the navigation to its overlay below 600px. Four links plus the
 * centred brand do not fit until ~1024px, so keep the overlay up to there.
 */
@media (max-width: 1023px) {
	.kc-header .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: flex;
	}

	.kc-header .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
		display: none;
	}
}

/* Account: an icon beside the cart on wide screens, a menu link on narrow
   ones, where the overlay has room and the bar does not */
.kc-header .wc-block-customer-account a {
	display: inline-flex;
	padding: .5em;
	color: var(--wp--preset--color--paper);
}

.kc-header .wc-block-customer-account svg {
	width: 22px;
	height: 22px;
}

.kc-header .kc-nav-overlay-only {
	display: none;
}

.kc-header .wp-block-navigation__responsive-container.is-menu-open .kc-nav-overlay-only {
	display: flex;
}

@media (max-width: 1023px) {
	.kc-header .kc-account {
		display: none;
	}
}
