/* strg-S global styles: base, keycaps, buttons, header, footer. */

/* ---------- Base typography ---------- */
body {
	overflow-x: clip;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}
h1,
h2,
h3 {
	text-wrap: balance;
}
p,
li {
	text-wrap: pretty;
}
::selection {
	background: var(--wp--preset--color--lime);
	color: var(--wp--preset--color--ink);
}
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Links in content: lime underline, lime is a surface here, never a text color */
main a:not(.wp-element-button):not(.k) {
	text-decoration: underline;
	text-decoration-color: var(--wp--preset--color--lime);
	text-decoration-thickness: 3px;
	text-underline-offset: 4px;
}
main a:not(.wp-element-button):not(.k):hover {
	text-decoration-color: var(--wp--preset--color--ink);
}

/* ---------- Keycap ----------
 * .k       white key with outline
 * .k.lime  lime key without outline
 * .k.is-down  pressed state, set by script (step 5)
 * .kd      large key with a small label in the top left corner
 * .plus    "+" between keys
 */
.k {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 52px;
	height: 52px;
	padding: 0 14px;
	box-sizing: border-box;
	background: var(--wp--preset--color--paper);
	border: 2px solid var(--wp--preset--color--ink);
	border-radius: 7px;
	font-family: var(--wp--preset--font-family--source-code-pro);
	font-weight: 600;
	font-size: 17px;
	line-height: 1;
	color: var(--wp--preset--color--ink);
	text-decoration: none;
	user-select: none;
}
button.k {
	cursor: pointer;
}
.k.lime {
	background: var(--wp--preset--color--lime);
	border-color: var(--wp--preset--color--lime);
}
.k:active,
.k.is-down,
.is-key a:active,
.kd:active {
	transform: translateY(3px) scale(0.94);
}
.k.is-down {
	background: var(--wp--preset--color--violet);
	border-color: var(--wp--preset--color--violet);
	color: var(--wp--preset--color--paper);
}
.kd {
	display: inline-flex;
	align-items: flex-start;
	justify-content: flex-start;
	width: 58px;
	height: 58px;
	padding: 8px 10px;
	box-sizing: border-box;
	background: var(--wp--preset--color--paper);
	border: 2px solid var(--wp--preset--color--ink);
	border-radius: 7px;
	font-family: var(--wp--preset--font-family--source-code-pro);
	font-weight: 500;
	font-size: 14px;
	color: var(--wp--preset--color--ink);
}
.plus {
	font-family: var(--wp--preset--font-family--source-code-pro);
	font-weight: 700;
	font-size: 16px;
}

/* ---------- Buttons ----------
 * Core button block. White by default (theme.json), lime via the color setting.
 * On hover a small lime square pops up in the top right corner (logo motif).
 */
.wp-block-button__link {
	position: relative;
	display: inline-flex;
	align-items: center;
	min-height: 56px;
	padding: 0 26px;
	box-sizing: border-box;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	overflow: visible;
}
.wp-block-button__link::after {
	content: "";
	position: absolute;
	top: -9px;
	right: -9px;
	width: 18px;
	height: 18px;
	border-radius: 4px;
	background: var(--wp--preset--color--lime);
	transform: scale(0);
	pointer-events: none;
}
.wp-block-button__link:hover {
	color: var(--wp--preset--color--ink);
}
.wp-block-button__link:active {
	transform: translateY(2px) scale(0.97);
}
@media (hover: hover) {
	.wp-block-button__link:hover::after {
		transform: scale(1);
	}
}
@media (prefers-reduced-motion: no-preference) {
	.k {
		transition: transform 0.1s ease-out, background-color 0.15s;
	}
	.kd {
		transition: transform 0.1s;
	}
	.wp-block-button__link {
		transition: transform 0.12s ease-out;
	}
	.wp-block-button__link::after {
		transition: transform 0.2s cubic-bezier(0.3, 1.6, 0.5, 1);
	}
}

/* Focus */
a:focus-visible,
button:focus-visible,
summary:focus-visible {
	outline: 2px solid var(--wp--preset--color--ink);
	outline-offset: 3px;
	border-radius: 8px;
}

/* ---------- Logo ---------- */
.logo {
	display: inline-flex;
	align-items: center;
	gap: 14px;
	text-decoration: none;
}
.logo svg {
	display: block;
	height: auto;
}
.logo__text {
	font-size: 15px;
	font-weight: 600;
	line-height: 1.25;
}

/* ---------- Header ---------- */
.site-header__inner {
	gap: 20px;
}
.site-header .main-nav {
	font-size: 16px;
	font-weight: 600;
	gap: 26px;
}
.site-header .wp-block-navigation__container {
	gap: 26px;
	align-items: center;
}
.site-header .wp-block-navigation-item__content {
	text-decoration: none;
	text-underline-offset: 6px;
	text-decoration-thickness: 3px;
	text-decoration-color: var(--wp--preset--color--lime);
}
.site-header .wp-block-navigation-item__content:hover {
	text-decoration-line: underline;
}

/* Contact link as button */
.site-header .is-cta > .wp-block-navigation-item__content {
	position: relative;
	display: inline-flex;
	align-items: center;
	height: 46px;
	box-sizing: border-box;
	padding: 0 18px;
	font-size: 15px;
	font-weight: 700;
	background: var(--wp--preset--color--lime);
	border: 2px solid var(--wp--preset--color--ink);
	border-radius: 8px;
	text-decoration: none;
}
.site-header .is-cta > .wp-block-navigation-item__content::after {
	content: "";
	position: absolute;
	top: -9px;
	right: -9px;
	width: 18px;
	height: 18px;
	border-radius: 4px;
	background: var(--wp--preset--color--lime);
	transform: scale(0);
}

/* Mobile menu button as keycap */
.site-header .wp-block-navigation__responsive-container-open {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 52px;
	padding: 0 14px;
	box-sizing: border-box;
	background: var(--wp--preset--color--paper);
	border: 2px solid var(--wp--preset--color--ink);
	border-radius: 7px;
	font-family: var(--wp--preset--font-family--source-code-pro);
	font-size: 15px;
	font-weight: 600;
	color: var(--wp--preset--color--ink);
	cursor: pointer;
}
.site-header .wp-block-navigation__responsive-container-open::after {
	content: "Menü";
}
.site-header .wp-block-navigation__responsive-container-open svg {
	width: 18px;
	height: 18px;
}

/* Open overlay: full screen, big rows, keycap arrows, contact button at the end */
.site-header .wp-block-navigation__responsive-container.is-menu-open {
	padding: 0;
	background: var(--wp--preset--color--paper);
	overflow-y: auto;
}
.site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-close,
.site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-dialog {
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
}
.site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	box-sizing: border-box;
	width: 100%;
	padding: 88px 24px 40px;
	align-items: stretch;
	justify-content: flex-start;
}
.site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	width: 100%;
	align-items: stretch;
	gap: 0;
}
.site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
	width: 100%;
	align-items: stretch;
}
.site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	display: flex;
	align-items: center;
	justify-content: space-between;
	box-sizing: border-box;
	width: 100%;
	padding: 18px 2px;
	font-size: 26px;
	font-weight: 800;
	line-height: 1.15;
	letter-spacing: -0.01em;
	text-decoration: none;
	border-bottom: 2px solid rgba(51, 51, 51, 0.15);
	border-radius: 0;
}
.site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content::after {
	content: "→";
	display: inline-grid;
	flex: none;
	place-items: center;
	width: 42px;
	height: 42px;
	margin-left: 16px;
	border: 2px solid var(--wp--preset--color--ink);
	border-radius: 7px;
	font-family: var(--wp--preset--font-family--source-code-pro);
	font-size: 18px;
	font-weight: 600;
	background: var(--wp--preset--color--paper);
}
.site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content:active::after {
	background: var(--wp--preset--color--lime);
	border-color: var(--wp--preset--color--lime);
	transform: translateY(3px) scale(0.94);
}
.site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content:focus-visible {
	outline: 2px solid var(--wp--preset--color--ink);
	outline-offset: 3px;
	border-radius: 8px;
}
/* Contact: lime button across the width */
.site-header .wp-block-navigation__responsive-container.is-menu-open .is-cta {
	margin-top: 28px;
}
.site-header .wp-block-navigation__responsive-container.is-menu-open .is-cta > .wp-block-navigation-item__content {
	height: 64px;
	justify-content: center;
	padding: 0 20px;
	font-size: 20px;
	border: 2px solid var(--wp--preset--color--ink);
	border-radius: 10px;
	background: var(--wp--preset--color--lime);
}
.site-header .wp-block-navigation__responsive-container.is-menu-open .is-cta > .wp-block-navigation-item__content::after {
	display: none;
}
/* Direct contact lines, mobile menu only */
.site-header .wp-block-navigation__responsive-container.is-menu-open .nav-mobile-only > .wp-block-navigation-item__content {
	justify-content: flex-start;
	padding: 6px 2px;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.3;
	border-bottom: 0;
}
.site-header .wp-block-navigation__responsive-container.is-menu-open .nav-mobile-only > .wp-block-navigation-item__content::after {
	display: none;
}
.site-header .wp-block-navigation__responsive-container.is-menu-open .is-cta + .nav-mobile-only {
	margin-top: 14px;
}
.site-header .nav-mobile-only {
	display: none;
}
.site-header .is-menu-open .nav-mobile-only {
	display: flex;
}

/* Close button as keycap, top right */
.site-header .wp-block-navigation__responsive-container-close {
	position: absolute;
	top: 20px;
	right: 20px;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 52px;
	padding: 0 14px;
	box-sizing: border-box;
	background: var(--wp--preset--color--lime);
	border: 2px solid var(--wp--preset--color--lime);
	border-radius: 7px;
	font-family: var(--wp--preset--font-family--source-code-pro);
	font-size: 15px;
	font-weight: 600;
	color: var(--wp--preset--color--ink);
	cursor: pointer;
}
.site-header .wp-block-navigation__responsive-container-close::after {
	content: "Esc";
}
.site-header .wp-block-navigation__responsive-container-close svg {
	width: 18px;
	height: 18px;
}
.site-header .wp-block-navigation__responsive-container-close:active {
	transform: translateY(3px) scale(0.94);
}

@media (prefers-reduced-motion: no-preference) {
	.site-header .is-menu-open .wp-block-navigation-item {
		animation: strgs-nav-in 0.4s cubic-bezier(0.3, 1.2, 0.5, 1) both;
	}
	.site-header .is-menu-open .wp-block-navigation-item:nth-child(2) { animation-delay: 0.05s; }
	.site-header .is-menu-open .wp-block-navigation-item:nth-child(3) { animation-delay: 0.1s; }
	.site-header .is-menu-open .wp-block-navigation-item:nth-child(4) { animation-delay: 0.15s; }
	.site-header .is-menu-open .wp-block-navigation-item:nth-child(5) { animation-delay: 0.2s; }
	.site-header .is-menu-open .wp-block-navigation-item:nth-child(6) { animation-delay: 0.25s; }
	.site-header .is-menu-open .wp-block-navigation-item:nth-child(n + 7) { animation-delay: 0.3s; }
	@keyframes strgs-nav-in {
		from { opacity: 0; transform: translateY(14px); }
		to { opacity: 1; transform: none; }
	}
}

/*
 * The navigation block always renders as overlay. From 900px on, the overlay
 * container is shown inline as a normal navigation and the menu button is hidden.
 */
@media (min-width: 900px) {
	.site-header .wp-block-navigation__responsive-container-open,
	.site-header .wp-block-navigation__responsive-container-close {
		display: none !important;
	}
	.site-header .wp-block-navigation__responsive-container:not(.is-menu-open) {
		display: block !important;
		position: static;
		inset: auto;
		width: auto;
		height: auto;
		padding: 0;
		overflow: visible;
		background: transparent;
		color: inherit;
		z-index: auto;
	}
	.site-header .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__responsive-close,
	.site-header .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__responsive-dialog,
	.site-header .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__responsive-container-content {
		display: block;
		position: static;
		width: auto;
		max-width: none;
		margin: 0;
		padding: 0;
	}
	.site-header .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__container {
		display: flex;
		flex-direction: row;
		flex-wrap: wrap;
		align-items: center;
		justify-content: flex-end;
	}
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
	.site-header .is-cta > .wp-block-navigation-item__content::after {
		transition: transform 0.2s cubic-bezier(0.3, 1.6, 0.5, 1);
	}
}
@media (hover: hover) {
	.site-header .is-cta > .wp-block-navigation-item__content:hover::after {
		transform: scale(1);
	}
}

/* ---------- Footer ---------- */
.site-footer a {
	color: var(--wp--preset--color--paper);
}
.site-footer a:focus-visible {
	outline-color: var(--wp--preset--color--paper);
}
.site-footer__cols {
	gap: 48px;
}
.site-footer__brand {
	flex: 1 1 280px;
	min-width: 0;
}
.site-footer__brand > * + * {
	margin-block-start: 20px;
}
.partner-badge {
	display: inline-block;
	width: 110px;
	height: 110px;
}
.site-footer__col {
	flex: 0 1 200px;
	min-width: 0;
}
.site-footer__col--pages {
	flex-basis: 180px;
}
.site-footer__col--shopify {
	flex-basis: 230px;
}
.site-footer__col--legal {
	flex-basis: 160px;
}
.site-footer__title {
	margin: 0 0 12px;
	font-size: 0.9375rem;
	font-weight: 800;
}
.site-footer__list {
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: 0.9375rem;
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.site-footer__list a {
	text-decoration: none;
}
.site-footer__list a:hover,
.site-footer__brand a:hover {
	text-decoration: underline;
	text-underline-offset: 4px;
}
.site-footer__social {
	gap: 10px;
}
.site-footer__bottom {
	max-width: 1280px;
	margin-top: 56px;
	padding-top: 24px;
	border-top: 1px solid rgba(255, 255, 255, 0.35);
	gap: 12px;
}

/* Social links as keycaps (full keycap component in step 3) */
.is-key {
	margin: 0;
}
.is-key a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 38px;
	padding: 0 14px;
	box-sizing: border-box;
	background: var(--wp--preset--color--paper);
	border: 2px solid var(--wp--preset--color--ink);
	border-radius: 7px;
	font-family: var(--wp--preset--font-family--source-code-pro);
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	color: var(--wp--preset--color--ink) !important;
}

@media (max-width: 781px) {
	.site-footer__cols {
		gap: 36px;
	}
}

/* Buttons span the full width on phones, so they do not vary with their label */
@media (max-width: 640px) {
	.wp-block-buttons {
		flex-direction: column;
		align-items: stretch;
	}
	.wp-block-buttons > .wp-block-button {
		width: 100%;
	}
	.wp-block-buttons > .wp-block-button .wp-block-button__link {
		width: 100%;
		justify-content: center;
		text-align: center;
	}
}

/* ---------- Floating keys: contact and back to top ---------- */
.fab {
	position: fixed;
	right: 16px;
	bottom: calc(16px + env(safe-area-inset-bottom, 0px));
	z-index: 40;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 10px;
}
.fab__actions {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.fab__actions[hidden] {
	display: none;
}
.fab__key {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	padding: 0;
	box-sizing: border-box;
	background: var(--wp--preset--color--paper);
	border: 2px solid var(--wp--preset--color--ink);
	border-radius: 7px;
	color: var(--wp--preset--color--ink);
	cursor: pointer;
	text-decoration: none;
}
.fab__key--main {
	background: var(--wp--preset--color--lime);
}
.fab__key svg {
	display: block;
	width: 24px;
	height: 24px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.4;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.fab__key:focus-visible {
	outline: 2px solid var(--wp--preset--color--ink);
	outline-offset: 3px;
}
.fab__key:active {
	transform: translateY(3px) scale(0.94);
}
.fab__key--main .fab__close {
	display: none;
}
.fab__key--main[aria-expanded="true"] .fab__open {
	display: none;
}
.fab__key--main[aria-expanded="true"] .fab__close {
	display: block;
}
.fab__key--top {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}
.fab--scrolled .fab__key--top {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}
@media (hover: hover) {
	.fab__key:hover:not(.fab__key--main) {
		background: var(--wp--preset--color--lime);
	}
}
@media (prefers-reduced-motion: no-preference) {
	.fab__key {
		transition: transform 0.12s ease-out, background-color 0.15s, opacity 0.2s, visibility 0.2s;
	}
	.fab__actions:not([hidden]) .fab__key {
		animation: strgs-fab-pop 0.3s cubic-bezier(0.3, 1.6, 0.5, 1) both;
	}
	.fab__actions:not([hidden]) li:nth-child(1) .fab__key {
		animation-delay: 0.06s;
	}
	@keyframes strgs-fab-pop {
		from { opacity: 0; transform: translateY(14px) scale(0.6); }
		to { opacity: 1; transform: none; }
	}
}
@media print {
	.fab {
		display: none;
	}
}

/*
 * The cookie banner plugin slides panels in from outside the screen. Those fixed
 * panels widened the page on phones and pushed the floating keys out to the right.
 */
html {
	overflow-x: hidden;
}
.cky-consent-container,
.cky-consent-bar {
	max-width: 100%;
	box-sizing: border-box;
}

/*
 * Mobile menu: no focus frame for touch and mouse (the first link is focused by script
 * when the menu opens). Keyboard users still get the frame, see initKeyboardMode in site.js.
 */
.site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content:focus,
.site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content:focus-visible,
.site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close:focus,
.site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close:focus-visible,
.site-header .wp-block-navigation__responsive-container.is-menu-open :focus {
	outline: none;
}
html.is-keyboard .site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content:focus-visible,
html.is-keyboard .site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close:focus-visible {
	outline: 2px solid var(--wp--preset--color--ink);
	outline-offset: 3px;
	border-radius: 8px;
}

/* ---------- Footer: Entf key (small joke) ---------- */
.site-footer__legal {
	gap: 8px 24px;
}
.site-footer__legal > * {
	margin-block: 0;
}
.entf {
	display: inline-flex;
	align-items: center;
	gap: 12px;
}
.k.entf__key {
	min-width: 0;
	height: 38px;
	padding: 0 14px;
	background: var(--wp--preset--color--violet);
	border-color: var(--wp--preset--color--paper);
	color: var(--wp--preset--color--paper);
	font-size: 14px;
	cursor: pointer;
}
.entf__text {
	font-size: 14px;
}

/* Note that shows up after the key was pressed (created by site.js). */
.entf-note {
	position: fixed;
	top: 50%;
	left: 50%;
	z-index: 9999;
	box-sizing: border-box;
	width: min(92vw, 360px);
	padding: 28px 24px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	text-align: center;
	background: var(--wp--preset--color--paper);
	color: var(--wp--preset--color--ink);
	border: 2px solid var(--wp--preset--color--ink);
	border-radius: 14px;
	transform: translate(-50%, -50%);
}
.entf-note p {
	margin: 0;
	font-size: 17px;
	font-weight: 600;
}
.entf-note a {
	font-weight: 600;
	color: var(--wp--preset--color--ink);
	text-underline-offset: 4px;
}
.k.entf-note__key {
	height: 56px;
	padding: 0 22px;
	cursor: pointer;
}

/* ---------- Balu easter egg (paw trail, peeking head, hint) ---------- */
:root {
	--balu-w: clamp(160px, 26vw, 240px);
}
.balu-egg {
	position: fixed;
	inset: 0;
	z-index: 9998;
	overflow: hidden;
	pointer-events: none;
}
.balu-paw {
	position: absolute;
	left: var(--x);
	top: var(--y);
	width: 26px;
	height: 26px;
	margin: -13px 0 0 -13px;
	opacity: 0;
	color: var(--wp--preset--color--ink);
	transform: rotate(var(--r));
}
.balu-head {
	display: block;
	aspect-ratio: 220 / 225;
	background: url("../img/balu-sticker.webp") center / contain no-repeat;
	position: absolute;
	right: 16px;
	bottom: 0;
	width: var(--balu-w);
	transform: translateY(10%);
	transform-origin: 50% 100%;
}
.balu-hint {
	position: fixed;
	right: 16px;
	bottom: calc(var(--balu-w) * 0.9 + 14px);
	z-index: 9999;
	margin: 0;
	padding: 8px 14px;
	background: var(--wp--preset--color--paper);
	color: var(--wp--preset--color--ink);
	border: 2px solid var(--wp--preset--color--ink);
	border-radius: 8px;
	font-size: 15px;
	font-weight: 600;
	pointer-events: none;
}
.balu-hint:empty {
	display: none;
}
.balu-tip {
	margin: 4px 0 0 !important;
	font-size: 14px;
	opacity: 0.8;
}
.team-card .photo img {
	touch-action: manipulation;
}

/* Fake error bar for the Entf joke (created by site.js). */
.entf-error {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 9998;
	padding: 14px 16px;
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--paper);
	font-family: var(--wp--preset--font-family--source-code-pro);
	font-size: 16px;
	font-weight: 600;
	text-align: center;
	pointer-events: none;
}

/* Hints for the Balu easter egg: typing on devices with a mouse, a pointer to the photo on touch devices. */
.hint-touch {
	display: none;
}
@media (hover: none) {
	.hint-mouse {
		display: none;
	}
	.hint-touch {
		display: inline;
	}
}
