/* TIBIT: base styles. Block styles live in blocks/<name>/style.css. */

:root {
	--tibit-ink: var(--wp--preset--color--crnilo, #2B2438);
	--tibit-ink-soft: #463E52;
	--tibit-muted: var(--wp--preset--color--napis, #615A6B);
	--tibit-accent: var(--wp--preset--color--malina, #E8667F);
	--tibit-accent-dark: var(--wp--preset--color--malina-temna, #B83A57);
	--tibit-accent-text: var(--tibit-accent-dark); /* logo red is too light for small text */
	--tibit-heart: var(--wp--preset--color--srcek, #E8667F);
	--tibit-blue: var(--wp--preset--color--modra, #5AAFD0);
	--tibit-link: var(--wp--preset--color--modra-temna, #2B7A9E); /* logo blue is too light for link text */
	--tibit-logo-ti: var(--wp--preset--color--logo-ti, #E8667F);
	--tibit-logo-bit: var(--wp--preset--color--logo-bit, #5AAFD0);
	--tibit-rule: #E3DDE6;

	--tibit-papir: var(--wp--preset--color--papir, #FFFDFC);
	--tibit-stena: var(--wp--preset--color--stena, #F8F8F7);
	--tibit-roza: var(--wp--preset--color--roza, #FDEEF1);
	--tibit-lila: var(--wp--preset--color--lila, #F3ECF7);
	--tibit-nebo: var(--wp--preset--color--nebo, #E9F5F9);
	--tibit-siva: var(--wp--preset--color--siva, #F3F1F0);

	--tibit-font-head: var(--wp--preset--font-family--naslov, Archivo, sans-serif);
	--tibit-font-body: var(--wp--preset--font-family--besedilo, 'Source Sans 3', system-ui, sans-serif);

	--tibit-wide: 1200px;
	--tibit-gutter: clamp(16px, 4vw, 24px);
	--tibit-section-y: clamp(64px, 9vw, 104px);
	--tibit-radius: 16px;

	/* Spacing scale. Blocks use only these. */
	--tibit-space-2xs: 8px;
	--tibit-space-xs: 16px;
	--tibit-space-s: 24px;
	--tibit-space-m: 32px;
	--tibit-space-l: 48px;
	--tibit-space-xl: 64px;

	/* Rhythm inside a section. */
	--tibit-gap-intro: var(--tibit-space-xs);  /* heading -> intro line */
	--tibit-gap-text: var(--tibit-space-s);    /* heading -> running text */
	--tibit-gap-head: 40px;                    /* heading group -> content */
	--tibit-gap-items: var(--tibit-space-m);   /* between items in a list or grid */
	--tibit-gap-cols: var(--tibit-space-l);    /* between columns */
	--tibit-gap-after: var(--tibit-space-m);   /* content -> buttons, notes */
}

/* Base */

*,
*::before,
*::after {
	box-sizing: border-box;
}

body {
	margin: 0;
	background: var(--tibit-papir);
	color: var(--tibit-ink);
	font-family: var(--tibit-font-body);
	font-size: 18px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: var(--tibit-link);
	text-decoration-color: var(--tibit-blue);
	text-underline-offset: 3px;
}

a:hover {
	color: #1F5C7A;
}

:focus-visible {
	outline: 2px solid var(--tibit-link);
	outline-offset: 3px;
}

h1, h2, h3, h4 {
	font-family: var(--tibit-font-head);
	font-stretch: 75%;
	font-weight: 800;
	line-height: 1.05;
	margin: 0 0 0.5em;
	text-wrap: balance;
}

h1 { font-size: clamp(40px, 5.6vw, 76px); line-height: 1.02; letter-spacing: -0.01em; }
h2 { font-size: clamp(34px, 4vw, 48px); }
h3 { font-size: clamp(22px, 2.4vw, 28px); font-stretch: 85%; font-weight: 700; }

p {
	margin: 0 0 1em;
	text-wrap: pretty;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

.skip-link:focus {
	position: fixed;
	top: 8px;
	left: 8px;
	z-index: 100;
	width: auto;
	height: auto;
	clip: auto;
	padding: 12px 20px;
	background: var(--tibit-ink);
	color: #fff;
	border-radius: 999px;
}

/* Layout */

.tibit-wrap {
	max-width: var(--tibit-wide);
	margin-inline: auto;
}

.tibit-section {
	padding: var(--tibit-section-y) var(--tibit-gutter);
}

.is-tint-papir { background: var(--tibit-papir); }
.is-tint-stena { background: var(--tibit-stena); }
.is-tint-roza  { background: var(--tibit-roza); }
.is-tint-lila  { background: var(--tibit-lila); }
.is-tint-nebo  { background: var(--tibit-nebo); }
.is-tint-siva  { background: var(--tibit-siva); }

/* Dark: the hero wave's colour, with the text colours flipped to light for this section. */
.is-tint-temna {
	--tibit-on-dark: #F4F7F3;
	--tibit-heart: var(--tibit-logo-bit);
	--tibit-ink: var(--tibit-on-dark);
	--tibit-ink-soft: rgba(244, 247, 243, 0.86);
	--tibit-muted: rgba(244, 247, 243, 0.7);
	--tibit-rule: rgba(244, 247, 243, 0.22);
	--tibit-link: var(--tibit-on-dark);
	background: var(--tibit-accent-dark);
	color: var(--tibit-ink);
}

.is-tint-temna .tibit-stats__head {
	color: var(--tibit-heart);
}

/* The "cove": backdrop paper bending into the next colour. */
.has-corner-left  { border-top-left-radius: clamp(48px, 9vw, 120px); }
.has-corner-right { border-top-right-radius: clamp(48px, 9vw, 120px); }

/* Wave transitions: each section's colour rises in a wave into the section above (the hero's own
   dark wave reversed), alternating direction down the page. They replace the rounded corners. */
.tibit-section {
	--tibit-wave-in: clamp(40px, 6vw, 96px);
	position: relative;
}

.tibit-section ~ .tibit-section {
	z-index: 1; /* Same layer for all, so each wave paints over the section above it. */
	border-radius: 0;
}

.tibit-section ~ .tibit-section::before {
	content: "";
	position: absolute;
	right: 0;
	bottom: calc(100% - 1px);
	left: 0;
	height: var(--tibit-wave-in);
	background: inherit;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 140' preserveAspectRatio='none'%3E%3Cpath d='M1440 70C1260 18 1080 6 880 40S460 132 240 102C140 88 70 64 0 40V140H1440Z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 140' preserveAspectRatio='none'%3E%3Cpath d='M1440 70C1260 18 1080 6 880 40S460 132 240 102C140 88 70 64 0 40V140H1440Z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
	pointer-events: none;
}

.tibit-section ~ .tibit-section:nth-of-type(odd)::before {
	transform: scaleX(-1);
}

/* The next section's wave rises into this one's bottom padding, so add its height back. */
.tibit-section:not(.tibit-hero):not(:last-of-type) {
	padding-bottom: calc(var(--tibit-section-y) + var(--tibit-wave-in));
}

/* The hero brings its own wave into the section after it. */
.tibit-hero + .tibit-section::before {
	content: none;
}

.tibit-split {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--tibit-space-l) clamp(var(--tibit-space-m), 5vw, 56px);
}

.tibit-split > * {
	flex: 1 1 440px;
	min-width: 0;
}

.tibit-split.is-image-right > .tibit-media {
	order: 2;
}

.tibit-media {
	margin: 0;
}

.tibit-media img {
	width: 100%;
	max-height: min(640px, 85vh);
	object-fit: cover;
	border-radius: var(--tibit-radius);
}

.tibit-media figcaption,
.tibit-note {
	font-size: 14px;
	color: var(--tibit-muted);
	margin-top: 10px;
}

.tibit-intro {
	font-size: 20px;
	color: var(--tibit-ink-soft);
	max-width: 640px;
}

/* One rhythm for every section: heading, optional intro, content, trailing buttons or note. */
.tibit-section h2 {
	margin: 0 0 var(--tibit-gap-head);
}

.tibit-section h2:has(+ .tibit-intro) {
	margin-bottom: var(--tibit-gap-intro);
}

.tibit-section .tibit-intro {
	margin: 0 0 var(--tibit-gap-head);
}

/* Headings followed by running text sit closer. */
.tibit-prose > h1,
.tibit-prose > h2 {
	margin-bottom: var(--tibit-gap-text);
}

.tibit-section .tibit-buttons,
.tibit-after {
	margin-top: var(--tibit-gap-after);
}

.tibit-section p:has(+ .tibit-buttons) {
	margin-bottom: 0;
}

/* Buttons */

.tibit-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.tibit-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 12px 28px;
	border-radius: 999px;
	font-family: var(--tibit-font-body);
	font-size: 19px; /* large text, so white on logo red meets 3:1 */
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.tibit-button.is-primary {
	background: var(--tibit-accent);
	color: #fff;
}

.tibit-button.is-primary:hover {
	background: var(--tibit-accent-dark);
	color: #fff;
}

.tibit-button.is-outline {
	border: 1.5px solid var(--tibit-ink);
	color: var(--tibit-ink);
}

.tibit-button.is-outline:hover {
	background: var(--tibit-ink);
	color: #fff;
}

.tibit-link-arrow {
	font-weight: 700;
	white-space: nowrap;
}

.tibit-link-arrow::after {
	content: " →";
}

/* Header */

/* Fixed to the top, over the page. --tibit-header-h is measured in nav.js (88px = logo + padding). */
:root {
	--tibit-header-h: 88px;
}

.site-header {
	background: var(--tibit-stena);
	padding: 16px var(--tibit-gutter);
	position: fixed;
	top: var(--wp-admin--admin-bar--height, 0px);
	left: 0;
	right: 0;
	z-index: 50;
}

/* The phone admin bar scrolls away with the page. */
@media (max-width: 600px) {
	.admin-bar .site-header {
		top: 0;
	}
}

.site-main {
	padding-top: var(--tibit-header-h);
}

/* The first section runs up under the header, so its own colour fills the header's space
   (the transparent border shows the section background) and the header slides in over it. */
.site-main > .tibit-section:first-child,
.site-main > :first-child > .tibit-section:first-child,
.site-main > :first-child > .entry-content:first-child > .tibit-section:first-child {
	margin-top: calc(-1 * var(--tibit-header-h));
	border-top: var(--tibit-header-h) solid transparent;
}

/* Anchor jumps land below the header. */
html {
	scroll-padding-top: calc(var(--tibit-header-h) + var(--wp-admin--admin-bar--height, 0px) + 16px);
}

/* Intro (assets/js/intro.js): hidden until the loader leaves, then the hero plays and the header slides in. */
.tibit-entrance .site-header {
	transform: translateY(-100%);
}

.tibit-entrance .tibit-hero__text > *,
.tibit-entrance .tibit-hero__media > * {
	opacity: 0;
}

.site-header__inner {
	max-width: var(--tibit-wide);
	margin-inline: auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px 32px;
}

.site-logo {
	display: block;
	line-height: 0;
}

.tibit-logo {
	display: block;
	height: 56px;
	width: auto;
}

.site-nav {
	display: flex;
	align-items: center;
	gap: 8px 24px;
}

.site-nav__menu {
	display: flex;
	align-items: center;
	gap: 4px 24px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.site-nav__menu a {
	display: flex;
	align-items: center;
	min-height: 44px;
	color: var(--tibit-ink);
	text-decoration: none;
	font-family: var(--tibit-font-head);
	font-stretch: 85%;
	font-weight: 700;
	font-size: 15px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.site-nav__menu a:hover,
.site-nav__menu .current-menu-item > a {
	color: var(--tibit-accent-text);
}

.site-nav__menu li {
	position: relative;
}

.site-nav__menu .menu-item-has-children > a::after {
	content: "";
	width: 7px;
	height: 7px;
	margin-left: 8px;
	border-right: 1.6px solid currentColor;
	border-bottom: 1.6px solid currentColor;
	transform: translateY(-2px) rotate(45deg);
}

.site-nav__menu .sub-menu {
	list-style: none;
	margin: 0;
	padding: 8px 0;
	position: absolute;
	top: 100%;
	left: -16px;
	min-width: 220px;
	background: var(--tibit-papir);
	border-radius: 12px;
	box-shadow: 0 12px 32px rgba(43, 36, 56, 0.12);
	opacity: 0;
	visibility: hidden;
	transform: translateY(4px);
	transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}

.site-nav__menu li:hover > .sub-menu,
.site-nav__menu li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: none;
}

.site-nav__menu .sub-menu a {
	padding: 0 16px;
	text-transform: none;
	letter-spacing: 0;
	font-family: var(--tibit-font-body);
	font-stretch: 100%;
	font-weight: 600;
	font-size: 17px;
}

.site-cart {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	color: var(--tibit-ink);
}

.site-cart__count {
	position: absolute;
	top: 4px;
	right: 2px;
	min-width: 18px;
	height: 18px;
	padding: 0 4px;
	border-radius: 999px;
	background: var(--tibit-accent-dark);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	line-height: 18px;
	text-align: center;
}

.site-header .tibit-button {
	min-height: 44px;
	padding: 8px 22px;
	font-size: 19px; /* stays large text for white on logo red */
}

.site-header__actions {
	display: none;
	align-items: center;
	gap: 4px;
}

.site-cart.is-bar {
	display: none;
}

.nav-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	margin-right: -10px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--tibit-ink);
	cursor: pointer;
}

/* Three bars that fold into a cross when the menu is open. */
.nav-toggle__icon {
	position: relative;
	width: 24px;
	height: 16px;
}

.nav-toggle__icon span {
	position: absolute;
	left: 0;
	width: 100%;
	height: 2px;
	border-radius: 2px;
	background: currentColor;
	transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s, top 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-toggle__icon span:nth-child(1) { top: 0; }
.nav-toggle__icon span:nth-child(2) { top: 7px; }
.nav-toggle__icon span:nth-child(3) { top: 14px; }

.site-header.is-open .nav-toggle__icon span:nth-child(1) { top: 7px; transform: rotate(45deg); }
.site-header.is-open .nav-toggle__icon span:nth-child(2) { opacity: 0; transform: scaleX(0.3); }
.site-header.is-open .nav-toggle__icon span:nth-child(3) { top: 7px; transform: rotate(-45deg); }

.site-nav__sub-toggle {
	display: none;
}

/* Phones and small tablets: slim bar with cart and menu button; the menu opens full screen. */
@media (max-width: 960px) {
	.site-header {
		padding-block: 10px;
		/* Hides while scrolling down (nav.js). `translate`, so it never fights the intro's transform. */
		transition: translate 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s;
	}

	.site-header.is-hidden {
		translate: 0 -100%;
	}

	.site-header.is-scrolled:not(.is-open) {
		box-shadow: 0 1px 0 var(--tibit-rule), 0 8px 24px rgba(16, 36, 28, 0.06);
	}

	.tibit-logo {
		height: 44px;
	}

	.site-header__actions {
		display: flex;
	}

	.site-cart.is-bar {
		display: flex;
	}

	.site-cart.is-menu {
		display: none;
	}

	.tibit-menu-open,
	.tibit-menu-open body {
		overflow: hidden;
	}

	.site-nav {
		position: fixed;
		top: calc(var(--tibit-header-h) + var(--wp-admin--admin-bar--height, 0px));
		right: 0;
		bottom: 0;
		left: 0;
		display: flex;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		padding: 8px var(--tibit-gutter) calc(24px + env(safe-area-inset-bottom));
		overflow-y: auto;
		overscroll-behavior: contain;
		background: var(--tibit-stena);
		opacity: 0;
		visibility: hidden;
		transition: opacity 0.25s ease, visibility 0s 0.25s;
	}

	.site-header.is-open .site-nav {
		opacity: 1;
		visibility: visible;
		transition: opacity 0.25s ease;
	}

	.site-nav__menu {
		display: block;
	}

	/* Items come in one after another. */
	.site-nav__menu > li,
	.site-nav > .tibit-button {
		opacity: 0;
		translate: 0 12px;
		transition: opacity 0.35s ease, translate 0.45s cubic-bezier(0.22, 1, 0.36, 1);
	}

	.site-header.is-open .site-nav__menu > li,
	.site-header.is-open .site-nav > .tibit-button {
		opacity: 1;
		translate: none;
		transition-delay: calc(0.06s + var(--i, 0) * 0.05s);
	}

	.site-nav__menu > li {
		display: grid;
		grid-template-columns: 1fr auto;
		align-items: center;
		border-bottom: 1px solid var(--tibit-rule);
	}

	.site-nav__menu > li > a {
		min-height: 64px;
		font-stretch: 75%;
		font-weight: 800;
		font-size: 30px;
		letter-spacing: 0;
		text-transform: none;
	}

	.site-nav__menu .menu-item-has-children > a::after {
		display: none;
	}

	.site-nav__sub-toggle {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 48px;
		height: 48px;
		margin-right: -12px;
		padding: 0;
		border: 0;
		background: none;
		color: var(--tibit-ink);
		cursor: pointer;
	}

	.site-nav__sub-toggle::before {
		content: "";
		width: 10px;
		height: 10px;
		border-right: 2px solid currentColor;
		border-bottom: 2px solid currentColor;
		transform: translateY(-3px) rotate(45deg);
		transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
	}

	.is-sub-open > .site-nav__sub-toggle::before {
		transform: translateY(3px) rotate(-135deg);
	}

	.site-nav__menu .sub-menu {
		grid-column: 1 / -1;
		position: static;
		display: none;
		min-width: 0;
		padding: 0 0 16px;
		opacity: 1;
		visibility: visible;
		transform: none;
		box-shadow: none;
		background: none;
		border-radius: 0;
	}

	.site-nav__menu .is-sub-open > .sub-menu {
		display: block;
		animation: tibit-sub-in 0.3s ease-out;
	}

	.site-nav__menu .sub-menu a {
		min-height: 48px;
		padding: 0;
		font-size: 19px;
		color: var(--tibit-ink-soft);
	}

	.site-nav__menu .sub-menu .current-menu-item > a {
		color: var(--tibit-accent-text);
	}

	.site-nav > .tibit-button {
		margin-top: auto;
		width: 100%;
		min-height: 56px;
		justify-content: center;
	}

	/* Space between the list and the button when the list is short. */
	.site-nav__menu {
		margin-bottom: 32px;
	}
}

@keyframes tibit-sub-in {
	from { opacity: 0; translate: 0 -6px; }
}

@media (min-width: 961px) {
	.nav-toggle {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.site-header,
	.site-nav,
	.site-nav__menu > li,
	.site-nav > .tibit-button,
	.nav-toggle__icon span {
		transition: none !important;
	}
}

/* Footer */

.site-footer {
	background: var(--tibit-lila);
	padding: 64px var(--tibit-gutter) 40px;
}

.site-footer__inner {
	max-width: var(--tibit-wide);
	margin-inline: auto;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 32px 64px;
}

.site-footer__brand {
	flex: 1 1 360px;
}

.site-footer__logo {
	display: inline-block;
	line-height: 0;
	margin-bottom: 20px;
}

.site-footer__logo .tibit-logo {
	height: 52px;
}

.site-footer__motto {
	font-family: var(--tibit-font-head);
	font-stretch: 75%;
	font-weight: 800;
	font-size: 28px;
	line-height: 1.15;
	margin: 0;
}

.site-footer__links {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.site-footer__links ul {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 20px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.site-footer__legal {
	max-width: var(--tibit-wide);
	margin: 40px auto 0;
	padding-top: 20px;
	border-top: 1px solid #DCCFE4;
	font-size: 14px;
	color: var(--tibit-muted);
}

/* Default page content (pages without TIBIT blocks, legal pages, WooCommerce) */

.entry-content > *:not(.tibit-section):not(.alignfull) {
	max-width: 760px;
	margin-inline: auto;
	padding-inline: var(--tibit-gutter);
}

.entry-content > .alignwide {
	max-width: var(--tibit-wide);
}

.page-header {
	padding: 64px var(--tibit-gutter) 24px;
	max-width: 760px;
	margin-inline: auto;
}

.site-main--plain {
	padding-bottom: 96px;
}

/* Editor helper */

.tibit-placeholder {
	padding: 32px;
	border: 1.5px dashed var(--tibit-heart);
	border-radius: 12px;
	color: var(--tibit-muted);
	text-align: center;
	font-family: var(--tibit-font-body);
}

/* WooCommerce baseline (product, cart, checkout, account) */

.tibit-woo {
	max-width: var(--tibit-wide);
	margin-inline: auto;
	padding: var(--tibit-space-xl) var(--tibit-gutter) 96px;
}

.woocommerce-cart .entry-content > *,
.woocommerce-checkout .entry-content > *,
.woocommerce-account .entry-content > * {
	max-width: var(--tibit-wide) !important;
}

.woocommerce .button,
.woocommerce button.button,
.woocommerce a.button,
.woocommerce #respond input#submit,
.wc-block-components-button:not(.is-link) {
	min-height: 48px;
	padding: 12px 28px !important;
	border-radius: 999px !important;
	background: var(--tibit-accent) !important;
	color: #fff !important;
	font-family: var(--tibit-font-body);
	font-size: 19px !important;
	font-weight: 700 !important;
}

.woocommerce .button:hover,
.woocommerce button.button:hover,
.woocommerce a.button:hover {
	background: var(--tibit-accent-dark) !important;
}

.woocommerce-message,
.woocommerce-info {
	border-top-color: var(--tibit-accent) !important;
	background: var(--tibit-roza) !important;
}

.woocommerce-message::before,
.woocommerce-info::before {
	color: var(--tibit-accent-text) !important;
}

/* Page loader (inc/loader.php, assets/js/loader.js) */
.logo-ti {
	fill: var(--tibit-logo-ti);
}

.logo-bit {
	fill: var(--tibit-logo-bit);
}

.tibit-loader {
	display: none;
}

.tibit-loader-loading .tibit-loader,
.tibit-loader-leaving .tibit-loader {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--tibit-stena); /* the hero's colour, so the loader hands over without a flash */
}

/* Reserve the scrollbar's space, so hiding it under the loader doesn't shift the page sideways. */
html {
	scrollbar-gutter: stable;
}

.tibit-loader-loading body {
	overflow: hidden;
}

.tibit-loader__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 20px;
	padding: var(--tibit-gutter);
}

.tibit-loader__logo {
	display: block;
	width: min(220px, 55vw);
	height: auto;
	overflow: visible;
}

.tibit-loader-intro .tibit-loader__fill {
	clip-path: url(#tibit-loader-clip);
}

.tibit-loader__text {
	margin: 0;
	font-family: var(--tibit-font-head);
	font-stretch: 75%;
	font-weight: 800;
	font-size: clamp(26px, 4vw, 34px);
	line-height: 1.1;
	color: var(--tibit-ink);
}

/* Intro entrance runs in CSS, so the logo is visible before GSAP has even downloaded. */
@keyframes tibit-loader-in {
	from { opacity: 0; transform: translateY(10px); }
	to { opacity: 1; transform: none; }
}

.tibit-loader-intro .tibit-loader__ring,
.tibit-loader-intro .tibit-loader__ti,
.tibit-loader-intro .tibit-loader__it,
.tibit-loader-intro .tibit-loader__text {
	animation: tibit-loader-in 0.5s ease-out both;
}

.tibit-loader-intro .tibit-loader__ti { animation-delay: 0.1s; }
.tibit-loader-intro .tibit-loader__it { animation-delay: 0.25s; }
.tibit-loader-intro .tibit-loader__text { animation-duration: 0.6s; animation-delay: 0.6s; }

/* Reveal on scroll (assets/js/reveal.js): fade up into place. Only JS adds .tibit-reveal, so content
   is never hidden without it. */
.tibit-reveal {
	opacity: 0;
	transform: translateY(28px);
	transition: opacity 0.7s ease-out, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
	transition-delay: var(--tibit-reveal-delay, 0s);
}

.tibit-reveal.tibit-media {
	transform: translateY(28px) scale(0.97);
}

.tibit-reveal.is-revealed {
	opacity: 1;
	transform: none;
}

