/*
Theme Name: SAVTEK
Description: Block theme for SAVTEK, the Defense Technologies Congress at Middle East Technical University.
Author: SAVTEK
Version: 0.35.0
Requires at least: 7.1
Tested up to: 7.1
Requires PHP: 8.1
License: Proprietary
Text Domain: savtek
Domain Path: /languages
Update URI: false
*/

/*
 * What every page needs; tokens in theme.json, blocks, home and other pages in their own files.
 * Visual direction A3 "Broşür vitrini" (ADR-0024): white and paper surfaces, the brochure's dotted
 * grid and slanted bands, and the edition color as the one strong color. accent is its readable
 * tone, accent-raw as chosen (decoration only), accent-tint/soft/light its tints, accent-deep its
 * depth, accent-on-dark its light tone for the "Dark section" block style.
 */

:root {
	/* Tall enough for the full congress logo at 76 px (brand.css), the size at which its lines can be read. */
	--savtek-header-height: 6.25rem;
	/* The brochure's dotted engineering grid, laid under the hero, the heritage band and the title bands. */
	--savtek-dots: radial-gradient(circle, rgba(16, 27, 41, 0.1) 1px, transparent 1.5px) 0 0 / 24px 24px;
	/* The slanted edge of the brochure's bands and photo panels: 14 % of the width cut off the left. */
	--savtek-slant: polygon(14% 0, 100% 0, 100% 100%, 0 100%);
}

@media (max-width: 781px) {

	:root {
		--savtek-header-height: 5rem;
	}
}

@media (max-width: 599px) {

	:root {
		--savtek-header-height: 4.5rem;
	}
}

/* Colors the dark context below switches and a card inside it switches back (muted-on-light keeps the preset). */
body {
	--savtek-accent-text: var(--wp--preset--color--accent);
	--savtek-ring: var(--wp--preset--color--accent);
	--savtek-muted: var(--wp--preset--color--muted);
	--savtek-muted-on-light: var(--wp--preset--color--muted);
	-webkit-font-smoothing: antialiased;
	/* No faux bold (the fonts are variable); editors' italics stay. */
	font-synthesis: style;
	overflow-wrap: break-word;
}

::selection {
	background: var(--wp--custom--accent-soft);
	color: var(--wp--preset--color--contrast);
}

/*
 * The one dark surface left, the "Dark section" block style (slug section-navy): the edition
 * color's light tone reads at 6:1 or more on night (savtek-core). A card inside switches back.
 */
.is-style-section-navy {
	--savtek-accent-text: var(--wp--custom--accent-on-dark);
	--savtek-ring: var(--wp--custom--accent-on-dark);
	--savtek-muted: var(--wp--custom--on-dark-muted);
	--wp--preset--color--muted: var(--wp--custom--on-dark-muted);
	color: #fff;
}

.is-style-section-navy :is(h1, h2, h3, h4, h5, h6),
.is-style-section-navy a:where(:not(.wp-element-button)) {
	color: #fff;
}

/* Two classes: the lead's own color, further down, would win otherwise. */
.is-style-section-navy .savtek-lead {
	color: var(--savtek-muted);
}

/* Default buttons take the light tone with night text; outlined ones a light hairline. */
.is-style-section-navy .wp-block-button:not([class*="is-style-"]) .wp-element-button {
	background-color: var(--wp--custom--accent-on-dark);
	color: var(--wp--preset--color--night);
}

.is-style-section-navy .wp-block-button:not([class*="is-style-"]) .wp-element-button:hover {
	background-color: #fff;
	color: var(--wp--preset--color--night);
}

.is-style-section-navy .is-style-outline .wp-element-button {
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.34);
	color: #fff;
}

.is-style-section-navy .is-style-outline .wp-element-button:hover {
	background-color: rgba(255, 255, 255, 0.06);
	box-shadow: inset 0 0 0 1px #fff;
	color: #fff;
}

.savtek-num,
.savtek-count__number {
	font-variant-numeric: tabular-nums lining-nums;
}

:where(a, button, input, select, textarea, summary, label, .wp-element-button):focus-visible {
	outline: 3px solid var(--savtek-ring);
	outline-offset: 2px;
}

h1,
h2,
h3 {
	text-wrap: balance;
}

/* Core lets buttons, columns and post titles split a word to fit them; a word stays whole. */
html :is(.wp-block-button__link, .wp-block-column, .wp-block-post-title) {
	word-break: normal;
}

/* A display heading shrinks to its widest word (--savtek-fit em) instead of splitting it (inc/fit.php). */
:root {
	--savtek-room: calc(100cqi - var(--wp--style--root--padding-left, 1rem) - var(--wp--style--root--padding-right, 1rem));
}

:where(h1, h2) {
	--savtek-fit-cap: calc(var(--savtek-room) / var(--savtek-fit, 0.01));
}

:is(h1, h2).has-huge-font-size {
	font-size: min(var(--wp--preset--font-size--huge), var(--savtek-fit-cap)) !important;
}

:is(h1, h2).has-xx-large-font-size {
	font-size: min(var(--wp--preset--font-size--xx-large), var(--savtek-fit-cap)) !important;
}

:is(h1, h2).has-x-large-font-size {
	font-size: min(var(--wp--preset--font-size--x-large), var(--savtek-fit-cap)) !important;
}

p {
	text-wrap: pretty;
}

a {
	text-decoration-thickness: 0.08em;
	text-underline-offset: 0.2em;
	transition: color var(--wp--custom--transition);
}

.wp-site-blocks > main,
.wp-site-blocks > footer {
	margin-block-start: 0;
}

.screen-reader-text {
	border: 0;
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	white-space: nowrap;
	width: 1px;
	word-wrap: normal !important;
}

/* A quiet label above a section title, in sentence case. */
.savtek-eyebrow {
	color: var(--savtek-muted);
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.3;
}

/* The first paragraph of a page or a section, a little larger. */
.savtek-lead {
	color: var(--wp--preset--color--contrast);
	font-size: clamp(1.1rem, 1rem + 0.4vw, 1.25rem);
	line-height: 1.55;
}

/* Section head: the title and a line on the left, a link to everything on the right. */
.savtek-head {
	align-items: flex-end;
	gap: 0.75rem 2.5rem;
	justify-content: space-between;
	margin-block-end: clamp(1.75rem, 3.5vw, 2.75rem);
}

/* The title takes the room the link leaves; the link moves below it only on narrow screens. */
.savtek-head > :first-child {
	flex: 1 1 20rem;
	min-width: 0;
}

.savtek-head .wp-block-heading {
	margin-block-start: 0.5rem;
}

.savtek-head .wp-block-heading:first-child {
	margin-block-start: 0;
}

.savtek-head__intro {
	color: var(--savtek-muted);
	margin-block-start: 0.6rem;
	max-width: 40rem;
}

/* A link to everything: an underline grows under it on hover. */
.savtek-more a,
a.savtek-more {
	align-items: center;
	background: linear-gradient(currentcolor, currentcolor) 0 100% / 0 1px no-repeat;
	color: var(--savtek-accent-text);
	display: inline-flex;
	font-weight: 600;
	gap: 0.5rem;
	padding-bottom: 2px;
	text-decoration: none;
	transition: background-size 250ms var(--wp--custom--ease);
	white-space: nowrap;
}

.savtek-more a:hover,
a.savtek-more:hover {
	background-size: 100% 1px;
}

.savtek-more a::after,
a.savtek-more::after,
.savtek-arrow .wp-element-button::after,
:is(.wp-block-button:not([class*="is-style-"]), .is-style-fill) > .wp-element-button::after,
.savtek-slider__button:not(.is-secondary)::after {
	content: "→";
	content: "→" / "";
	display: inline-block;
	transition: transform 250ms var(--wp--custom--ease);
}

.savtek-more a:hover::after,
a.savtek-more:hover::after,
.savtek-arrow .wp-element-button:hover::after,
:is(.wp-block-button:not([class*="is-style-"]), .is-style-fill) > .wp-element-button:hover::after,
.savtek-slider__button:not(.is-secondary):hover::after {
	transform: translateX(4px);
}

/* Buttons: the edition color; "White" and "Glass" on photos, "Outline" quiet, "Link" a text link. */
.wp-element-button {
	align-items: center;
	box-sizing: border-box;
	display: inline-flex;
	gap: 0.6rem;
	justify-content: center;
	min-height: 3rem;
	transition: background-color var(--wp--custom--transition), color var(--wp--custom--transition), box-shadow var(--wp--custom--transition);
	white-space: nowrap;
}

/* Phones: a long label wraps between its words instead of pushing the page sideways. */
@media (max-width: 479px) {

	.wp-element-button {
		white-space: normal;
	}
}

.is-style-white .wp-element-button {
	background-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
}

.is-style-white .wp-element-button:hover {
	background-color: var(--wp--preset--color--paper);
	color: var(--wp--preset--color--contrast);
}

.is-style-glass .wp-element-button {
	backdrop-filter: blur(6px);
	background-color: rgba(255, 255, 255, 0.08);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
	color: var(--wp--preset--color--base);
}

.is-style-glass .wp-element-button:hover {
	background-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
}

.is-style-outline .wp-element-button {
	background-color: transparent;
	box-shadow: inset 0 0 0 1px var(--wp--custom--border-strong);
	color: var(--wp--preset--color--contrast);
}

.is-style-outline .wp-element-button:hover {
	background-color: transparent;
	box-shadow: inset 0 0 0 1px var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--contrast);
}

/* Without core's 2px outline border and padding. */
.wp-block-buttons .wp-block-button.is-style-outline > .wp-block-button__link {
	border-width: 0;
	padding: 0.75rem 1.3rem;
}

.is-style-link .wp-element-button {
	background: none;
	color: inherit;
	font-weight: 600;
	/* A 24px target, the text in place (WCAG 2.5.8). */
	margin-block: -0.3125rem;
	min-height: 0;
	padding: 0.3125rem 0;
	text-decoration: underline;
	text-decoration-thickness: 0.08em;
	text-underline-offset: 0.2em;
	white-space: normal;
}

.savtek-footer__more > a {
	padding-block: 0.3125rem;
}

.is-style-link .wp-element-button:hover {
	background: none;
	color: var(--savtek-accent-text);
}

/*
 * Header: white under the edition color's 4px line, sticky from 782px, where a soft shadow appears
 * once the page has scrolled; below 782px the main button moves to the top bar (page.css).
 */
.savtek-header {
	--savtek-menu-pad: 0.75rem;
	background: var(--wp--preset--color--base);
	border-bottom: 1px solid var(--wp--custom--border-color);
	border-top: 4px solid var(--wp--custom--accent-raw);
}

/* Where the whole menu first fits beside the logo, its items sit closer so the logo keeps its size. */
@media (min-width: 1200px) and (max-width: 1365px) {

	.savtek-header {
		--savtek-menu-pad: 0.5rem;
	}
}

/* Relative: the open search hangs below the row (savtek-header-search). The 5px are the two borders. */
.savtek-header > .alignwide {
	min-height: calc(var(--savtek-header-height) - 5px);
	position: relative;
}

/* Sticky from 782px, but not on a phone held sideways, where it would take a fifth of the screen. */
@media (min-width: 782px) and (min-height: 560px) {

	/* Room for the sticky header when a link jumps to an anchor. */
	html {
		scroll-padding-top: calc(var(--savtek-header-height) + 1.5rem + var(--wp-admin--admin-bar--height, 0px));
	}

	.wp-site-blocks > header.wp-block-template-part {
		position: sticky;
		top: var(--wp-admin--admin-bar--height, 0px);
		z-index: 100;
	}

	/* The shadow of the stuck header, driven by the page's scroll position: no script, nothing at the top. */
	@supports (animation-timeline: scroll()) {

		.wp-site-blocks > header.wp-block-template-part {
			animation: savtek-stuck linear both;
			animation-range: 0 1px;
			animation-timeline: scroll(root);
		}
	}
}

@keyframes savtek-stuck {

	to {
		box-shadow: 0 12px 28px -18px rgba(16, 27, 41, 0.28);
	}
}

/* The brand (logo or wordmark) is in assets/css/brand.css. */
.savtek-header__actions {
	flex-shrink: 0;
}

.savtek-header .savtek-header-cta:empty {
	display: none;
}

/* As tall as the search button beside it; a long label wraps between its words. */
.savtek-header-cta .wp-element-button {
	max-width: 12rem;
	min-height: 2.75rem;
	padding: 0.55rem 1.1rem;
}

/* Below 782px the logo keeps the room; the slim bar above the header offers the button's link (page.css). */
@media (max-width: 781px) {

	.savtek-header .savtek-header-cta {
		display: none;
	}
}

/*
 * Menu: quiet items on paper under the pointer; the current one carries a bar in the edition
 * color. A submenu's chevron sits inside its button's padding, as core places it.
 */
/* Border box: links and submenu buttons are the same 44px, so the current item's bar lines up. */
.savtek-header .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content {
	align-items: center;
	border-radius: var(--wp--custom--radius-sm);
	box-sizing: border-box;
	display: inline-flex;
	min-height: 2.75rem;
	padding: 0.5rem var(--savtek-menu-pad);
	transition: background-color var(--wp--custom--transition), color var(--wp--custom--transition);
	white-space: nowrap;
}

/*
 * The chevron (0.6em) sits in its button's right padding; its right margin gives the item back the
 * padding after it, so the space after a chevron equals the space between plain items.
 */
.savtek-header .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__container > .open-on-click > .wp-block-navigation-submenu__toggle {
	padding-right: calc(var(--savtek-menu-pad) + 0.85em);
}

.savtek-header .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__container > .open-on-click > .wp-block-navigation-submenu__toggle + .wp-block-navigation__submenu-icon {
	margin-left: calc(-1 * var(--savtek-menu-pad) - 0.6em);
	margin-right: var(--savtek-menu-pad);
	opacity: 0.7;
}

.savtek-header .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content:hover {
	background-color: var(--wp--preset--color--paper);
	color: var(--wp--preset--color--contrast);
}

.savtek-header .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__container > .wp-block-navigation-item:is(.current-menu-item, .current-menu-ancestor) > .wp-block-navigation-item__content {
	border-radius: 0;
	box-shadow: inset 0 -3px 0 var(--wp--preset--color--accent);
	color: var(--wp--preset--color--contrast);
}

.savtek-header .wp-block-navigation .current-menu-item > .wp-block-navigation-item__content,
.savtek-header .wp-block-navigation .current-menu-ancestor > .wp-block-navigation-item__content {
	color: var(--wp--preset--color--contrast);
}

/* A submenu opens from its item's left edge; the last one's stays inside the window. */
.savtek-header .wp-block-navigation.items-justified-right .wp-block-navigation__container > .has-child:not(:last-child) > .wp-block-navigation__submenu-container {
	left: 0;
	right: auto;
}

.savtek-header .wp-block-navigation:not(.has-background) .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__submenu-container {
	background-color: var(--wp--preset--color--base);
	border: 1px solid var(--wp--custom--border-color);
	border-radius: var(--wp--custom--radius);
	box-shadow: var(--wp--custom--shadow-card);
	color: var(--wp--preset--color--contrast);
	padding: 0.5rem 0;
}

.savtek-header .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	padding: 0.6rem 1.1rem;
	transition: background-color var(--wp--custom--transition), color var(--wp--custom--transition);
}

/* The submenu item under the pointer stands out, like a list row. */
.savtek-header .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover {
	background-color: var(--wp--preset--color--paper);
	color: var(--wp--preset--color--accent);
}

/* The overlay menu: white with ink links. */
.savtek-header .wp-block-navigation:not(.has-background) .wp-block-navigation__responsive-container.is-menu-open {
	background-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
}

.savtek-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	color: var(--wp--preset--color--contrast);
}

.savtek-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content,
.savtek-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container,
.savtek-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
	align-items: flex-start !important;
	text-align: left;
}

.savtek-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	padding-top: var(--wp--preset--spacing--60);
}

/* Overlay: 44px rows; a group's name (core's open button) is a quiet heading. */
.savtek-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	gap: 0;
}

.savtek-header .wp-block-navigation__responsive-container.is-menu-open :is(.wp-block-navigation__container > .wp-block-navigation-item, .wp-block-navigation__submenu-container) {
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 600;
	width: 100%;
}

.savtek-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container {
	gap: 0;
	padding-left: 0 !important;
}

.savtek-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	align-items: center;
	display: flex;
	min-height: 2.75rem;
}

.savtek-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container > .has-child > .wp-block-navigation-item__content {
	color: var(--wp--preset--color--muted);
	font-size: 0.8125rem;
	letter-spacing: 0.12em;
	min-height: 2rem;
	text-transform: uppercase;
}

.savtek-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container > :is(.has-child:not(:first-child), .has-child + :not(.has-child)) {
	margin-top: 1.25rem;
}

/*
 * One row from 1200px; below it the overlay (undoing core's 600px query). "Menu" keeps its place in the
 * source, so the keyboard meets the buttons in the order they show (WCAG 2.4.3).
 */
.savtek-header nav.wp-block-navigation {
	margin-inline: auto;
}

@media (min-width: 600px) and (max-width: 1199px) {

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

	.savtek-header .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: flex;
	}
}

@media (max-width: 1199px) {

	/* Three classes: the row's gap is core's layout rule. */
	.savtek-header > .wp-block-group.alignwide {
		column-gap: 0.625rem;
	}

	.savtek-header nav.wp-block-navigation {
		margin-inline: auto 0;
	}
}

/*
 * The header's icon buttons: the search and, below 1200px, "Menu", 44px tall with a hairline.
 * Their icons are masks in the text color; the overlay's "Close" button matches them.
 */
.savtek-header-search > summary,
.savtek-header nav.wp-block-navigation button:is(.wp-block-navigation__responsive-container-open, .wp-block-navigation__responsive-container-close) {
	align-items: center;
	background-color: var(--wp--preset--color--base);
	border: 1px solid var(--wp--custom--border-strong);
	border-radius: var(--wp--custom--radius-sm);
	box-sizing: border-box;
	color: var(--wp--preset--color--contrast);
	cursor: pointer;
	font-size: 0.875rem;
	font-weight: 600;
	gap: 0.5rem;
	height: 2.75rem;
	line-height: 1;
	min-width: 2.75rem;
	padding: 0 0.75rem;
	transition: border-color var(--wp--custom--transition), background-color var(--wp--custom--transition);
}

/* Core shows and hides the "Menu" button (display: flex); the "Close" button shows in the open overlay only. */
.savtek-header .wp-block-navigation__responsive-container.is-menu-open button.wp-block-navigation__responsive-container-close {
	display: inline-flex;
}

.savtek-header-search > summary:hover,
.savtek-header-search[open] > summary,
.savtek-header nav.wp-block-navigation button:is(.wp-block-navigation__responsive-container-open, .wp-block-navigation__responsive-container-close):hover {
	background-color: var(--wp--preset--color--paper);
	border-color: var(--wp--preset--color--contrast);
}

.savtek-header-search > summary::before,
.savtek-header nav.wp-block-navigation button:is(.wp-block-navigation__responsive-container-open, .wp-block-navigation__responsive-container-close)::before {
	background-color: currentcolor;
	content: "";
	flex: none;
	height: 1.125rem;
	mask: var(--savtek-icon) center / contain no-repeat;
	width: 1.125rem;
}

.savtek-header-search > summary {
	--savtek-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='M20 20l-4-4'/%3E%3C/svg%3E");
}

.savtek-header nav.wp-block-navigation button.wp-block-navigation__responsive-container-open {
	--savtek-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M4 7h16M4 12h16M4 17h16'/%3E%3C/svg%3E");
}

.savtek-header nav.wp-block-navigation button.wp-block-navigation__responsive-container-close {
	--savtek-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E");
}

/* The search: a disclosure with an icon summary; open, core's form hangs below the row on a panel, no script. */
.savtek-header-search > summary {
	display: block;
	overflow: hidden;
	padding: 0;
	position: relative;
	text-indent: 2.75rem;
	white-space: nowrap;
	width: 2.75rem;
}

.savtek-header-search > summary::-webkit-details-marker {
	display: none;
}

.savtek-header-search > summary::before {
	inset: 0;
	margin: auto;
	position: absolute;
}

/* Below 480px the logo takes the room: "Menu" shows its icon only and keeps its name for screen readers. */
@media (max-width: 479px) {

	.savtek-header > .wp-block-group.alignwide {
		column-gap: 0.5rem;
	}

	.savtek-header nav.wp-block-navigation button.wp-block-navigation__responsive-container-open {
		display: block;
		overflow: hidden;
		padding: 0;
		position: relative;
		text-indent: 2.75rem;
		white-space: nowrap;
		width: 2.75rem;
	}

	.savtek-header nav.wp-block-navigation button.wp-block-navigation__responsive-container-open::before {
		inset: 0;
		margin: auto;
		position: absolute;
	}
}

.savtek-header-search > .wp-block-search {
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--custom--border-color);
	border-radius: var(--wp--custom--radius);
	box-shadow: var(--wp--custom--shadow-card);
	box-sizing: border-box;
	margin: 0;
	padding: 0.75rem;
	position: absolute;
	right: 0;
	top: calc(100% + 0.75rem);
	width: min(26rem, 100%);
	z-index: 20;
}

.savtek-header .savtek-header-search .wp-block-search__inside-wrapper {
	gap: 0.5rem;
	max-width: none;
}

.savtek-header .savtek-header-search .wp-block-search__input {
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--custom--border-strong);
	border-radius: var(--wp--custom--radius-sm);
	color: var(--wp--preset--color--contrast);
	min-height: 2.75rem;
	padding: 0.5rem 0.85rem;
}

.savtek-header .savtek-header-search .wp-block-search__button {
	background: var(--wp--preset--color--accent);
	border: 0;
	border-radius: var(--wp--custom--radius-sm);
	color: var(--wp--preset--color--base);
	margin: 0;
	min-height: 2.75rem;
	min-width: 2.75rem;
	padding: 0 0.6rem;
}

.savtek-header .savtek-header-search .wp-block-search__button:hover {
	background: var(--wp--custom--accent-hover);
}

@media (max-width: 599px) {

	.savtek-header-search > .wp-block-search {
		left: 0;
		width: auto;
	}
}

/* The current page is marked by more than its color where the bar does not show. */
:is(.wp-block-navigation__responsive-container.is-menu-open, .wp-block-navigation__submenu-container) .current-menu-item > .wp-block-navigation-item__content {
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 0.3em;
}

/* Block styles (functions.php): the dark section (slug section-navy) is night; a card inside switches back. */
.is-style-section-paper {
	background-color: var(--wp--preset--color--paper);
	color: var(--wp--preset--color--contrast);
}

.is-style-section-navy {
	background-color: var(--wp--preset--color--night);
}

/* The edition color's readable tone gives white text only about 4.5:1, so all text is white. */
.is-style-section-accent {
	--savtek-accent-text: var(--wp--preset--color--base);
	--savtek-muted: var(--wp--preset--color--base);
	--savtek-ring: var(--wp--preset--color--base);
	--wp--preset--color--muted: var(--wp--preset--color--base);
	background-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--base);
}

.is-style-section-accent :is(h1, h2, h3, h4, h5, h6),
.is-style-section-accent a:where(:not(.wp-element-button)) {
	color: var(--wp--preset--color--base);
}

.is-style-section-accent .wp-block-button:not(.is-style-glass) .wp-element-button {
	background-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--accent);
}

.is-style-card {
	--savtek-accent-text: var(--wp--preset--color--accent);
	--savtek-ring: var(--wp--preset--color--accent);
	--savtek-muted: var(--savtek-muted-on-light);
	--wp--preset--color--muted: var(--savtek-muted-on-light);
	background-color: var(--wp--preset--color--base);
	border-radius: var(--wp--custom--radius);
	box-shadow: var(--wp--custom--shadow-soft);
	color: var(--wp--preset--color--contrast);
	padding: var(--wp--preset--spacing--40);
}

.is-style-card :is(h1, h2, h3, h4, h5, h6) {
	color: var(--wp--preset--color--contrast);
}

.is-style-card .is-style-outline .wp-element-button,
.is-style-card .is-style-outline .wp-element-button:hover {
	color: var(--wp--preset--color--contrast);
}

.is-style-card .is-style-outline .wp-element-button {
	box-shadow: inset 0 0 0 1px var(--wp--custom--border-strong);
}

.is-style-card .is-style-outline .wp-element-button:hover {
	box-shadow: inset 0 0 0 1px var(--wp--preset--color--contrast);
}

:is(.is-style-section-navy, .is-style-section-accent) .is-style-card a:where(:not(.wp-element-button)) {
	color: var(--wp--preset--color--accent);
}

/* Label and value pairs: the site's one label style above each value; an unset value goes with its label. */
.savtek-details {
	display: grid;
	gap: 1.1rem;
	margin-block: var(--wp--preset--spacing--40);
}

.savtek-details__item > * {
	margin: 0;
}

.savtek-details__item:not(:has(.wp-block-button, .savtek-details__value)) {
	display: none;
}

.savtek-details__label {
	color: var(--wp--preset--color--muted);
	font-size: 0.875rem;
	font-weight: 500;
	line-height: 1.3;
}

.savtek-details__item > :is(.savtek-details__value, .wp-block-buttons) {
	color: var(--wp--preset--color--contrast);
	font-weight: 600;
	margin-top: 0.2rem;
}

.savtek-details .wp-block-buttons {
	column-gap: 1.25rem;
	row-gap: 0.25rem;
}

.savtek-details .is-style-link .wp-element-button {
	color: var(--wp--preset--color--contrast);
	text-decoration-color: color-mix(in srgb, currentcolor 35%, transparent);
}

.savtek-details .is-style-link .wp-element-button:hover {
	color: var(--savtek-accent-text);
	text-decoration-color: currentcolor;
}

/* An icon (inc/icons.php) beside its card's text; a card's link that covers the whole card. */
.is-icon-beside {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
}

.savtek-stretch {
	position: relative;
}

.savtek-stretch a::before {
	content: "";
	inset: 0;
	position: absolute;
}

/* The video link card and the "Notice" paragraph style are page patterns: their rules live in page.css. */

.wp-block-post-content > :is(h2, h3):not(:first-child) {
	margin-block-start: var(--wp--preset--spacing--60);
}

/* Congress facts: a card; the home page's console (home.css) and a past congress's facts (page.css). */
.savtek-facts {
	background: var(--wp--preset--color--base);
	border-radius: var(--wp--custom--radius);
	box-shadow: var(--wp--custom--shadow-card);
	display: grid;
}

.savtek-facts > * {
	margin: 0;
}

.savtek-facts__item {
	padding: 1.6rem 1.75rem;
}

.savtek-facts__item + .savtek-facts__item {
	border-left: 1px solid var(--wp--custom--border-color);
}

.savtek-facts__item > * {
	margin: 0;
}

.savtek-facts__label {
	color: var(--wp--preset--color--muted);
	font-size: 0.9375rem;
	line-height: 1.3;
}

:where(.savtek-facts__item) > .savtek-facts__value {
	color: var(--wp--preset--color--contrast);
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.35;
	margin-top: 0.45rem;
}

.savtek-facts__value a {
	color: inherit;
}

:where(.savtek-facts__item) > .savtek-facts__chip {
	color: var(--savtek-accent-text);
	font-size: 0.8125rem;
	font-weight: 600;
	margin-bottom: 0.35rem;
}

:where(.savtek-facts__item) > .savtek-facts__note {
	color: var(--wp--preset--color--muted);
	font-size: 0.85rem;
	line-height: 1.45;
	margin-top: 0.15rem;
}

/*
 * Footer: the edition color in its readable tone (white text stays AA on it whatever the editor
 * picks), the logo on a white plate (brand.css), the menu groups and the contact column
 * (1.4 : 3 : 1); below 1100px two rows, below 782px stacked; the bottom row a shade deeper.
 */
.savtek-footer {
	--savtek-accent-text: #fff;
	--savtek-ring: #fff;
	/* White throughout: a translucent white fails 4.5:1 on an edition color that is only just readable (edition-color.spec.ts). */
	--savtek-muted: #fff;
	--wp--preset--color--muted: #fff;
	background-color: var(--wp--preset--color--accent);
	color: #fff;
	font-size: 0.9375rem;
}

.savtek-footer :is(h1, h2, h3, h4, h5, h6) {
	color: #fff;
}

/* Two classes: core's columns rule (display: flex) would win otherwise. */
.savtek-footer .savtek-footer__top {
	display: grid;
	gap: 2rem;
	grid-template-columns: minmax(0, 1.4fr) minmax(0, 3fr) minmax(0, 1fr);
}

.savtek-footer__top > .wp-block-column {
	margin: 0;
}

/* The congress line: the edition, the dates and the venue, one to a line, so none breaks apart. */
.savtek-footer__line {
	line-height: 1.55;
	margin-block-start: 1rem;
}

.savtek-footer__line > * {
	margin: 0;
}

.savtek-footer a:where(:not(.wp-element-button)) {
	color: #fff;
	text-decoration: none;
}

.savtek-footer a:where(:not(.wp-element-button)):hover,
.savtek-footer a[aria-current="page"] {
	color: #fff;
	text-decoration: underline;
}

.savtek-footer__menu .wp-block-navigation__container {
	align-items: flex-start;
	display: grid !important;
	gap: 2rem;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	width: 100%;
}

.savtek-footer__menu {
	font-size: 0.9375rem;
	line-height: 1.6;
}

/* The footer's submenus are always open; core still adds a toggle button that would do nothing. */
.savtek-footer__menu .wp-block-navigation-submenu__toggle {
	display: none;
}

.savtek-footer__menu .has-child.open-always {
	align-items: flex-start;
	flex-direction: column;
	gap: 0.85rem;
}

/* A group's name: a small label, white for 4.5:1 on a pale edition color. */
.savtek-footer__menu .has-child.open-always > .wp-block-navigation-item__content,
.savtek-footer__title {
	color: #fff;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	line-height: 1.3;
	text-transform: uppercase;
}

.savtek-footer__menu .has-child.open-always .wp-block-navigation__submenu-container {
	gap: 0.7rem;
	padding: 0 !important;
}

.savtek-footer__menu .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	font-weight: 400;
}

/* The contact column: a title like the menu's groups, the e-mail and phone underlined, the contact page. */
.savtek-footer .savtek-footer__contact {
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
}

.savtek-footer__contact > * {
	margin: 0;
}

.savtek-footer__contact:not(:has(a)),
.savtek-footer__details:not(:has(a)) {
	display: none;
}

.savtek-footer .savtek-footer__details {
	gap: 0.5rem;
}

.savtek-footer__details .wp-element-button {
	color: #fff;
	font-variant-numeric: tabular-nums lining-nums;
	font-weight: 400;
	text-decoration-line: none;
}

.savtek-footer__details .wp-element-button:hover {
	color: #fff;
	text-decoration-line: underline;
}

.savtek-footer__more a::after {
	content: " →";
	content: " →" / "";
}

@media (max-width: 1099px) {

	.savtek-footer .savtek-footer__top {
		grid-template-columns: minmax(0, 3fr) minmax(0, 1fr);
	}

	.savtek-footer__about {
		grid-column: 1 / -1;
	}
}

@media (max-width: 781px) {

	/* Call, mail, download: a 44px target in place. */
	.is-style-link .wp-element-button {
		margin-block: -0.625rem;
		padding-block: 0.625rem;
	}


	.savtek-footer .savtek-footer__top {
		grid-template-columns: minmax(0, 1fr);
	}

	/* Two groups to a row; an odd last group (A2's "Arşiv") runs across with its links in two columns. */
	.savtek-footer__menu .wp-block-navigation__container {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.savtek-footer__menu .wp-block-navigation__container > :last-child:nth-child(odd) {
		grid-column: 1 / -1;
	}

	.savtek-footer__menu .wp-block-navigation__container > :last-child:nth-child(odd) .wp-block-navigation__submenu-container {
		align-self: stretch;
		column-gap: 2rem;
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* The bottom row: a shade deeper than the footer, full width, flush with the footer's foot. */
.savtek-footer__bottom {
	background-color: var(--wp--custom--accent-deep);
	border-top: 1px solid rgba(255, 255, 255, 0.18);
	color: rgba(255, 255, 255, 0.78);
	font-size: 0.875rem;
	padding-block: 1.25rem 2rem;
}

.savtek-footer__bottom > * {
	margin: 0;
}

/*
 * The deep tone runs to the window's edges, like the invitation's bottom band, and the row swallows
 * the footer's bottom padding (four classes: core zeroes a constrained group's last child's margin).
 */
.savtek-footer.wp-block-group > .savtek-footer__bottom:last-child {
	box-shadow: 0 0 0 100vmax var(--wp--custom--accent-deep);
	clip-path: inset(0 -100vmax);
	margin-block-end: -2rem;
}

@media print {

	.savtek-topbar,
	.wp-block-navigation,
	.savtek-header-cta,
	.wp-block-buttons {
		display: none !important;
	}

	.wp-site-blocks > header.wp-block-template-part {
		position: static;
	}

	:is(.is-style-section-navy, .is-style-section-accent, .savtek-footer, .savtek-footer__bottom) {
		--wp--preset--color--muted: #000;
		background: none !important;
		box-shadow: none !important;
		color: #000 !important;
	}

	:is(.is-style-section-navy, .is-style-section-accent, .savtek-footer) :is(h1, h2, h3, h4, h5, h6, p, a, li) {
		color: #000 !important;
	}

	/* A figure that counts up (inc/count-up.php) prints its value, not the count where it stands. */
	[data-wp-interactive="savtek/count-up"] {
		display: none;
	}

	.savtek-figure__value > .screen-reader-text {
		clip-path: none;
		height: auto;
		margin: 0;
		overflow: visible;
		position: static !important;
		white-space: normal;
		width: auto;
	}
}

/*
 * Motion: transitions become instant and nothing moves by itself. Infinite animations such as the
 * logo row are stopped outright; a very short duration alone would make them flicker.
 */
@media (prefers-reduced-motion: reduce) {

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