/*
Theme Name: Phylex Clarity
Description: A more readable take on the Phylex theme: same brand, larger and crisper type, calmer scroll-in motion. Child theme; uses the Phylex theme's templates and replaces only its styles.
Author: Phylex BioSciences
Template: phylex
Version: 0.1
*/

/* Body type: IBM Plex Sans (self-hosted, SIL Open Font License). Headings keep the brand's Bebas Neue from the parent theme. */
@font-face { font-family: 'IBM Plex Sans'; src: url('fonts/ibm-plex-sans-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'IBM Plex Sans'; src: url('fonts/ibm-plex-sans-400-italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'IBM Plex Sans'; src: url('fonts/ibm-plex-sans-500.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'IBM Plex Sans'; src: url('fonts/ibm-plex-sans-600.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }

:root {
	/* Colour: the brand's blue and red on white, with a dark ink for long text. */
	--bg: #ffffff;
	--surface: #ffffff;
	--surface-tint: #f1f6fa;
	--ink: #16232e;
	--muted: #51606d;
	--strong: #003e6b;
	--heading: #005a98;
	--link: #005a98;
	--on-link: #ffffff;
	--accent: #d9001f;
	--rule: #d6e0e8;
	--focus: #0a74c2;
	--focus-ring: rgba(10, 116, 194, 0.2);
	--banner-bg: #e9eff4;
	--figure-bg: transparent;
	--field-bg: #ffffff;
	--field-rule: #9fb0bd;
	--footer-bg: #ffffff;
	--menu-bg: #ffffff;

	/* Header and title panel */
	--header-bg: rgba(255, 255, 255, 0.92);
	--header-rule: 3px solid #2b9bf2;
	--nav-ink: #3d4a55;
	--nav-ink-active: #005a98;
	--panel-bg: rgba(0, 74, 151, 0.86);
	--panel-ink: #ffffff;
	--panel-ink-soft: rgba(255, 255, 255, 0.94);

	/* Type */
	--font-body: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--font-display: 'BebasNeueRegular', 'Arial Narrow', sans-serif;
	--display-weight: 400;
	--display-tracking: 0.02em;
	--display-transform: uppercase;
	--nav-font: 400 1.3125rem/76px 'BebasNeueRegular', 'Arial Narrow', sans-serif;
	--button-font: 400 1.3125rem/1 'BebasNeueRegular', 'Arial Narrow', sans-serif;
	--nav-tracking: 0.04em;
	--nav-transform: uppercase;
	--text: 1.0625rem;
	--text-lead: 1.125rem;

	/* Layout and motion */
	--page: 72rem;
	--gutter: clamp(20px, 4vw, 40px);
	--radius: 4px;
	--reveal-shift: 22px;                          /* how far rising paragraphs travel */
	--reveal-slide: clamp(48px, 7.5vw, 120px);     /* how far side-entering blocks travel */
	--reveal-time: 1.2s;                           /* the movement */
	--reveal-fade: 0.8s;                           /* the fade, shorter so the block is readable while it settles */
	--reveal-ease: cubic-bezier(0.25, 1, 0.5, 1);  /* even glide that slows to a soft stop, no bounce */
	--reveal-stagger: 0.14s;                       /* gap between blocks that come in together */
}

/* This file is generated. Edit the sources in tools/theme-styles and run build.sh; changes made here are overwritten. */

/* ==========================================================================
   Foundations
   ========================================================================== */

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }

body {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	background: var(--bg);
	color: var(--ink);
	font: 400 var(--text) / 1.65 var(--font-body);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

.wrapper { flex: 1 0 auto; width: 100%; }

img, video { max-width: 100%; height: auto; }

p { padding: 0; margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
strong, b { font-weight: 600; color: var(--strong); }

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.18em; transition: color 0.15s; }
a:hover { color: var(--accent); }

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

h1, h2, h3, h4 {
	font-family: var(--font-display);
	font-weight: var(--display-weight);
	letter-spacing: var(--display-tracking);
	line-height: 1.08;
	text-wrap: balance;
}

/* ==========================================================================
   Header and navigation
   ========================================================================== */

header#masthead {
	position: sticky;
	top: 0;
	z-index: 50;
	width: 100%;
	background: var(--header-bg);
	-webkit-backdrop-filter: saturate(1.4) blur(12px);
	backdrop-filter: saturate(1.4) blur(12px);
	border-bottom: var(--header-rule);
}
/* WordPress's admin bar, shown to logged-in users, is 32px tall; 46px at 782px and below. From
   600px down it scrolls away with the page instead of staying put, so the header goes to the top. */
.admin-bar header#masthead { top: 32px; }
@media (max-width: 782px) { .admin-bar header#masthead { top: 46px; } }
@media (max-width: 600px) { .admin-bar header#masthead { top: 0; } }

header#masthead .header {
	max-width: var(--page);
	margin: 0 auto;
	padding: 0 var(--gutter);
	height: 76px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}
header#masthead .logo a { display: block; line-height: 0; text-decoration: none; }
header#masthead .logo img { display: block; height: 54px; width: auto; }
header#masthead .site-title { font-size: 1.75rem; }

header#masthead nav ul { display: flex; gap: 2px; padding: 0; margin: 0; }
header#masthead nav li a {
	position: relative;
	display: block;
	padding: 0 16px;
	line-height: 76px;
	font: var(--nav-font);
	letter-spacing: var(--nav-tracking);
	text-transform: var(--nav-transform);
	text-decoration: none;
	color: var(--nav-ink);
	white-space: nowrap;
}
header#masthead nav li a::after {
	content: '';
	position: absolute;
	left: 16px;
	right: 16px;
	bottom: 0;
	height: 3px;
	background: var(--accent);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.25s ease;
}
header#masthead nav li.current-menu-item a,
header#masthead nav li a:hover { color: var(--nav-ink-active); }
header#masthead nav li.current-menu-item a::after,
header#masthead nav li a:hover::after { transform: scaleX(1); }

header#masthead nav .burger {
	display: none;
	position: relative;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
}
header#masthead nav .burger span {
	position: absolute;
	left: 8px;
	width: 28px;
	height: 2px;
	background: var(--nav-ink-active);
	transition: transform 0.3s ease, opacity 0.2s ease, top 0.3s ease;
}
header#masthead nav .burger .m1 { top: 13px; }
header#masthead nav .burger .m2 { top: 21px; }
header#masthead nav .burger .m3 { top: 29px; }
header#masthead nav .burger.active .m1 { top: 21px; transform: rotate(45deg); }
header#masthead nav .burger.active .m2 { opacity: 0; }
header#masthead nav .burger.active .m3 { top: 21px; transform: rotate(-45deg); }

/* ==========================================================================
   Page banner and title panel
   ========================================================================== */

#content { display: block; padding-bottom: clamp(64px, 9vw, 128px); }

#content .block-image { position: relative; overflow: hidden; background: var(--banner-bg); }
#content .block-image > img {
	display: block;
	width: 100%;
	height: clamp(260px, 36vw, 500px);
	object-fit: cover;
}
#content .block-image .title-block {
	position: absolute;
	left: 0;
	right: 0;
	bottom: clamp(20px, 3.5vw, 44px);
}
#content .block-image .title-block .content {
	max-width: var(--page);
	margin: 0 auto;
	padding: 0 var(--gutter);
	display: flex;
	justify-content: flex-end;
}
#content .block-image .title-block .text {
	position: relative;
	width: min(100%, 36rem);
	padding: clamp(22px, 2.6vw, 34px) clamp(24px, 3.4vw, 48px);
	background: var(--panel-bg);
	color: var(--panel-ink);
}
#content .block-image .title-block h1 {
	font-size: clamp(2.4rem, 4.6vw, 3.75rem);
	text-transform: var(--display-transform);
	color: inherit;
}
#content .block-image .title-block .subtitle {
	margin-top: 0.6em;
	font-size: 1.0625rem;
	line-height: 1.5;
	color: var(--panel-ink-soft);
}
#content .block-image .title-block .subtitle:empty { display: none; }
#content .block-image .title-block .subtitle br { display: none; }

/* News items reuse the news banner but have no title in the panel. */
.page-single-news .block-image .title-block { display: none; }

#content .page-content {
	max-width: var(--page);
	margin: 0 auto;
	padding: clamp(48px, 7vw, 96px) var(--gutter) 0;
}

/* Text set off by the accent rule: the theme's way of marking body copy. */
.home-content .text-block,
.team-content .text-block,
.tech-content .tech .text,
.product-content .text-top,
.product-content .text-bottom .text p,
.contact-content .blocks .text-block.t1 {
	padding-left: 22px;
	border-left: 3px solid var(--accent);
}

/* ==========================================================================
   Home
   ========================================================================== */

.home-content .page-content .content {
	display: grid;
	grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
	gap: clamp(32px, 6vw, 88px);
	align-items: start;
}
.home-content .conteiner { grid-column: 2; grid-row: 1; }
.home-content .news-block { grid-column: 1; grid-row: 1; }

.home-content .text-block { font-size: var(--text-lead); line-height: 1.6; max-width: 40rem; }
.home-content .text-block p { margin: 0; }

.home-content .news-block h2 {
	font-size: 2.25rem;
	color: var(--accent);
	text-transform: var(--display-transform);
	margin-bottom: 0.4em;
}
.home-content .news-block ul { padding: 0; margin: 0; }
.home-content .news-block li {
	padding: 18px 0;
	border-top: 1px solid var(--rule);
	font-size: 1rem;
	line-height: 1.45;
}
.home-content .news-block li a { color: var(--ink); text-decoration: none; }
.home-content .news-block li a:hover { color: var(--link); text-decoration: underline; }
.home-content .news-block li .read,
.news-content .item .read {
	display: inline-block;
	margin-left: 0.35em;
	font-weight: 600;
	font-size: 0.9375rem;
	color: var(--accent);
	white-space: nowrap;
}

/* ==========================================================================
   News list and news item
   ========================================================================== */

.news-content .page-content .content {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
	gap: clamp(28px, 4vw, 48px);
}
.news-content .item .content-item {
	height: 100%;
	display: flex;
	flex-direction: column;
	background: var(--surface);
	border: 1px solid var(--rule);
	border-radius: var(--radius);
	overflow: hidden;
}
.news-content .item .image { order: 1; background: var(--banner-bg); }
.news-content .item .image a { display: block; line-height: 0; }
.news-content .item .image img { display: block; width: 100%; aspect-ratio: 316 / 150; height: auto; object-fit: cover; }
.news-content .item hr { order: 2; width: 56px; height: 3px; margin: 20px 22px 0; border: 0; background: var(--accent); }
.news-content .item .date { order: 3; padding: 12px 22px 0; font-size: 0.875rem; font-weight: 500; color: var(--muted); }
.news-content .item h2 {
	order: 4;
	padding: 6px 22px 0;
	font-family: var(--font-body);
	font-weight: 600;
	font-size: 1.125rem;
	line-height: 1.35;
	letter-spacing: 0;
	text-wrap: pretty;
}
.news-content .item h2 a { color: var(--ink); text-decoration: none; }
.news-content .item h2 a:hover { color: var(--link); }
.news-content .item .text { order: 5; padding: 10px 22px 24px; font-size: 0.9688rem; line-height: 1.55; color: var(--muted); }
.news-content .pager { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; padding-top: 16px; }
.news-content .pager:empty { display: none; }
.news-content .pager .page-numbers {
	min-width: 44px;
	padding: 0 12px;
	line-height: 42px;
	text-align: center;
	text-decoration: none;
	font-weight: 500;
	color: var(--ink);
	border: 1px solid var(--rule);
	border-radius: var(--radius);
}
.news-content .pager .page-numbers.current { background: var(--link); border-color: var(--link); color: var(--on-link); }
.news-content .pager a.page-numbers:hover { border-color: var(--accent); color: var(--accent); }

.page-single-news .page-content { max-width: 50rem; }
.page-single-news h1 { font-size: clamp(2rem, 3.6vw, 2.9rem); text-transform: var(--display-transform); color: var(--heading); }
.page-single-news .page-content > .image { margin-top: 28px; }
.page-single-news .page-content > .image img { display: block; border-radius: var(--radius); }
.page-single-news .date { margin: 20px 0 28px; font-size: 0.9375rem; font-weight: 500; color: var(--accent); }
.page-single-news .content p { margin-bottom: 1.1em; }
.page-single-news .content img { border-radius: var(--radius); }

/* ==========================================================================
   Team
   ========================================================================== */

.team-content .text-block { max-width: 46rem; margin: 0 auto; font-size: var(--text-lead); line-height: 1.6; }
.team-content .team-block {
	max-width: 56rem;
	margin: clamp(48px, 7vw, 88px) auto 0;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(32px, 6vw, 80px);
	align-items: start;
}
.team-content .team-block .block img {
	display: block;
	width: min(100%, 240px);
	height: auto;
	aspect-ratio: 1;
	object-fit: cover;
	border-radius: 50%;
	margin-bottom: 28px;
}
.team-content .team-block .block .slid { display: block; cursor: pointer; border-radius: var(--radius); }
.team-content .team-block .block h2 {
	display: flex;
	align-items: center;
	gap: 14px;
	font-size: 2.125rem;
	color: var(--heading);
	text-transform: var(--display-transform);
}
.team-content .team-block .block h2::after {
	content: '';
	flex: none;
	width: 11px;
	height: 11px;
	margin-top: -5px;
	border-right: 3px solid var(--accent);
	border-bottom: 3px solid var(--accent);
	transform: rotate(45deg);
	transition: transform 0.3s ease, margin 0.3s ease;
}
.team-content .team-block .block .slid.active h2::after { transform: rotate(-135deg); margin-top: 6px; }
.team-content .team-block .block .position { margin-top: 6px; font-weight: 500; color: var(--link); }
.team-content .team-block .block .hov-block {
	display: none;
	margin-top: 20px;
	padding: 20px 22px;
	font-size: 1rem;
	line-height: 1.6;
	color: var(--ink);
	background: var(--surface-tint);
	border-radius: var(--radius);
}

/* ==========================================================================
   Technology
   ========================================================================== */

.tech-content .page-content {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	gap: clamp(32px, 6vw, 88px);
	align-items: start;
}
.tech-content .blocks { display: grid; gap: clamp(40px, 6vw, 72px); }
.tech-content .blocks .text-block img { display: block; width: 100%; height: auto; border-radius: var(--radius); background: var(--figure-bg); }
.tech-content .blocks .text { margin-top: 14px; font-size: 0.9375rem; line-height: 1.5; color: var(--muted); }
.tech-content .tech { display: grid; gap: clamp(36px, 5vw, 64px); }
.tech-content .tech .text { max-width: 42rem; }
.tech-content .tech .text .subhead {
	display: block;
	margin: 1.6em 0 0.45em;
	font-family: var(--font-display);
	font-weight: var(--display-weight);
	font-size: var(--subhead-size, 1.85rem);
	letter-spacing: var(--display-tracking);
	text-transform: var(--display-transform);
	line-height: 1.15;
	color: var(--heading);
}
.tech-content .tech .text .subhead:first-child { margin-top: 0; }
.tech-content .tech .text .subhead + br { display: none; }
.tech-content .video .wp-video { width: 100% !important; max-width: 100%; }
.tech-content .video video { display: block; width: 100%; height: auto; background: #000; border-radius: var(--radius); }

/* ==========================================================================
   Product development
   ========================================================================== */

#content .product-content .page-content { max-width: 54rem; }
.product-content .text-top { font-size: var(--text-lead); line-height: 1.6; color: var(--heading); }
.product-content .text-bottom { margin-top: clamp(48px, 7vw, 88px); }
.product-content .text-bottom h2 { font-size: 2.25rem; color: var(--heading); text-transform: var(--display-transform); margin-bottom: 0.7em; }
.product-content .text-bottom .text p { margin: 0 0 28px; max-width: 44rem; }

/* ==========================================================================
   Contact
   ========================================================================== */

.contact-content #map { position: relative; height: clamp(300px, 36vw, 475px); overflow: hidden; background: #cbcbcb; }
.contact-content #map .map-link { display: block; width: 100%; height: 100%; }
#content .contact-content #map img { display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 30% 50%; }
.contact-content #map .map-cta {
	position: absolute;
	left: var(--gutter);
	bottom: 20px;
	padding: 12px 20px;
	font-weight: 600;
	font-size: 0.9375rem;
	color: var(--on-link);
	background: var(--link);
	border-radius: var(--radius);
	transition: background 0.15s;
}
.contact-content #map .map-link:hover .map-cta,
.contact-content #map .map-link:focus-visible .map-cta { background: var(--accent); }
.contact-content #map .map-credit { position: absolute; right: 0; bottom: 0; padding: 2px 8px; font-size: 11px; line-height: 1.5; color: #333; background: rgba(255, 255, 255, 0.85); }
.contact-content #map .map-credit a { color: #333; }

.contact-content .page-content {
	display: grid;
	grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
	column-gap: clamp(32px, 6vw, 88px);
	align-items: start;
}
.contact-content .title { grid-column: 2; grid-row: 1; }
.contact-content .conteiner { grid-column: 1; grid-row: 1 / span 2; }
.contact-content .contact-form { grid-column: 2; grid-row: 2; margin-top: 28px; }
.contact-content .title h1,
.contact-content .blocks h2 { font-size: 2.25rem; color: var(--heading); text-transform: var(--display-transform); }
.contact-content .blocks h3 { margin-top: 44px; font-size: 1.6rem; color: var(--accent); text-transform: var(--display-transform); }
.contact-content .blocks .text-block { margin-top: 18px; }
.contact-content .blocks .text-block.t2 { color: var(--muted); max-width: 26rem; }
.contact-content .blocks .text-block.t2 br { display: none; }

.contact-content .contact-form form { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.contact-content .contact-form .field,
.contact-content .contact-form .form-message { grid-column: 1 / -1; }
.contact-content .contact-form .field.pro { grid-column: auto; }
.contact-content .contact-form .field p { margin: 0; }
.contact-content .contact-form input[type="text"],
.contact-content .contact-form input[type="email"],
.contact-content .contact-form input[type="tel"],
.contact-content .contact-form textarea {
	display: block;
	width: 100%;
	padding: 14px 16px;
	font: inherit;
	color: var(--ink);
	background: var(--field-bg);
	border: 1px solid var(--field-rule);
	border-radius: var(--radius);
	transition: border-color 0.15s, box-shadow 0.15s;
}
.contact-content .contact-form textarea { min-height: 180px; resize: vertical; }
.contact-content .contact-form ::placeholder { color: var(--muted); opacity: 1; }
.contact-content .contact-form input:focus,
.contact-content .contact-form textarea:focus { outline: 0; border-color: var(--focus); box-shadow: 0 0 0 3px var(--focus-ring); }
.contact-content .contact-form input[type="submit"] {
	padding: 14px 34px;
	font: var(--button-font);
	letter-spacing: var(--nav-tracking);
	text-transform: var(--nav-transform);
	color: var(--on-link);
	background: var(--link);
	border: 0;
	border-radius: 999px;
	cursor: pointer;
	transition: background 0.15s, transform 0.15s;
}
.contact-content .contact-form input[type="submit"]:hover { background: var(--accent); }
.contact-content .contact-form input[type="submit"]:active { transform: translateY(1px); }
.contact-content .contact-form .field-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-content .contact-form .form-message { padding: 14px 18px; border: 1px solid var(--link); border-radius: var(--radius); color: var(--link); }
.contact-content .contact-form .form-message.error { border-color: var(--accent); color: var(--accent); }
.contact-content .contact-form .form-message p { margin: 0; }

/* ==========================================================================
   Page not found
   ========================================================================== */

#content .not-found-content .page-content { max-width: 46rem; }
.not-found-content h1 { font-size: clamp(2.6rem, 6vw, 4.5rem); color: var(--heading); text-transform: var(--display-transform); }
.not-found-content .lead { margin: 0.9em 0 1.8em; padding-left: 22px; border-left: 3px solid var(--accent); font-size: var(--text-lead); }
.not-found-content .not-found-links { padding: 0; margin: 0.4em 0 1.8em; border-top: 1px solid var(--rule); }
.not-found-content .not-found-links li { border-bottom: 1px solid var(--rule); }
.not-found-content .not-found-links a { display: block; padding: 14px 0; font-weight: 500; text-decoration: none; }
.not-found-content .not-found-links a:hover { text-decoration: underline; }
.not-found-content .home-link { font-weight: 600; color: var(--accent); }

/* ==========================================================================
   Other pages, footer
   ========================================================================== */

.content-page .content,
#primary { max-width: 50rem; margin: 0 auto; padding: clamp(48px, 7vw, 96px) var(--gutter) 0; }
.content-page .content h1, .content-page .content h2, #primary h1, #primary h2 { margin: 1.2em 0 0.5em; color: var(--heading); }
.content-page .content ul, .content-page .content ol { padding-left: 1.4em; margin-bottom: 1em; list-style: revert; }

footer#colophon { flex: none; width: 100%; background: var(--footer-bg); border-top: 1px solid var(--rule); }
footer#colophon .wrap {
	max-width: var(--page);
	margin: 0 auto;
	padding: 26px var(--gutter);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}
footer#colophon .footer-widget-1 { margin-left: auto; font-size: 0.875rem; color: var(--muted); }
footer#colophon .footer-widget-1 p { display: flex; align-items: center; gap: 18px; margin: 0; }
footer#colophon .footer-widget-1 img { display: block; }
footer#colophon ul { display: flex; gap: 16px; padding: 0; margin: 0; }
footer#colophon ul a { font-size: 0.875rem; }

/* ==========================================================================
   Scroll reveals: content settles into place once, as it enters the screen.
   The parent theme's script adds .visible when an element scrolls into view.
   ========================================================================== */

.hidden { opacity: 0; }
.visible { opacity: 1; }
.reveal-ready .post:not(.visible),
.reveal-ready .post-left:not(.visible),
.reveal-ready .post-right:not(.visible),
.reveal-ready .post-p p:not(.visible) { opacity: 0; transform: translateY(var(--reveal-shift)); }
.reveal-ready .post,
.reveal-ready .post-left,
.reveal-ready .post-right,
.reveal-ready .post-p p {
	transition: opacity var(--reveal-time) ease-out, transform var(--reveal-time) cubic-bezier(0.2, 0.7, 0.2, 1);
}

@media (prefers-reduced-motion: reduce) {
	.reveal-ready .post, .reveal-ready .post-left, .reveal-ready .post-right, .reveal-ready .post-p p { transition: none; transform: none !important; }
	header#masthead nav li a::after, .team-content .team-block .block h2::after { transition: none; }
}

/* ==========================================================================
   Narrow screens
   ========================================================================== */

@media (max-width: 860px) {
	:root { --text: 1.0625rem; --text-lead: 1.125rem; }
	html { scroll-padding-top: 80px; }
	header#masthead .header { height: 64px; }
	header#masthead .logo img { height: 44px; }

	header#masthead nav .burger { display: block; }
	/* The menu hangs from the header's bottom edge, wherever the header is (also below the admin bar),
	   and reaches the bottom of the screen. It covers the header's rule, so its top border redraws it. */
	header#masthead nav .menu-main-menu-container {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		height: calc(100vh - 100%);
		height: calc(100dvh - 100%);
		padding: 12px var(--gutter) 32px;
		background: var(--menu-bg);
		border-top: var(--header-rule);
		overflow-y: auto;
		visibility: hidden;
		opacity: 0;
		transform: translateY(-8px);
		transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
	}
	header#masthead nav .menu-main-menu-container.active { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
	header#masthead nav ul { flex-direction: column; gap: 0; }
	header#masthead nav li a { padding: 0; line-height: 60px; font-size: 1.5rem; border-bottom: 1px solid var(--rule); }
	header#masthead nav li a::after { display: none; }
	body.body-hover { overflow: hidden; }

	#content .block-image > img { height: clamp(200px, 48vw, 320px); }
	#content .block-image .title-block { position: static; }
	#content .block-image .title-block .content { padding: 0; }
	#content .block-image .title-block .text { width: 100%; padding: 26px var(--gutter) 30px; }

	.home-content .page-content .content,
	.tech-content .page-content,
	.contact-content .page-content,
	.team-content .team-block { grid-template-columns: minmax(0, 1fr); }
	.home-content .conteiner, .home-content .news-block,
	.contact-content .title, .contact-content .conteiner, .contact-content .contact-form { grid-column: 1; grid-row: auto; }
	.contact-content .title { margin-top: 48px; order: 2; }
	.contact-content .conteiner { order: 1; }
	.contact-content .contact-form { order: 3; }
	.contact-content .contact-form form { grid-template-columns: minmax(0, 1fr); }
	.contact-content .contact-form .field.pro { grid-column: 1 / -1; }
	.team-content .team-block .block img { width: min(60%, 220px); }
	footer#colophon .wrap { justify-content: center; text-align: center; }
	footer#colophon .footer-widget-1 { margin: 0 auto; }
	footer#colophon .footer-widget-1 p { flex-direction: column; gap: 10px; }
}

/* ==========================================================================
   Clarity: brand details
   ========================================================================== */

/* The title panel keeps the original's signature: a blue panel with a red block behind its corner. */
#content .block-image .title-block .text { background: none; isolation: isolate; }
#content .block-image .title-block .text::after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: -1;
	background: var(--panel-bg);
}
#content .block-image .title-block .text::before {
	content: '';
	position: absolute;
	top: -18px;
	right: -18px;
	z-index: -2;
	width: 132px;
	height: 68px;
	background: rgba(217, 0, 31, 0.82);
}

/* As the page scrolls, the header gains a shadow. Browsers without scroll-driven animations show it at rest. */
@supports (animation-timeline: scroll()) {
	@media (prefers-reduced-motion: no-preference) {
		header#masthead {
			animation: clarity-header-lift linear both;
			animation-timeline: scroll(root);
			animation-range: 0 160px;
		}
	}
}
@keyframes clarity-header-lift { to { box-shadow: 0 6px 24px rgba(0, 40, 80, 0.12); } }

/* The banner photo is shown whole, never cropped or zoomed, so the people and what they are doing
   stay in the picture. The title panel hangs off the photo's bottom edge instead of sitting on it. */
#content .block-image { overflow: visible; }
#content .block-image > img { height: auto; aspect-ratio: 2560 / 808; object-fit: cover; }
#content .block-image .title-block { bottom: 0; }
#content .block-image .title-block .text { transform: translateY(42%); }
#content .home-content .block-image .title-block .text { width: min(100%, 30rem); }
#content :is(.home-content, .news-content, .team-content, .tech-content, .product-content) > .page-content { padding-top: calc(clamp(48px, 7vw, 96px) + 72px); }

@media (max-width: 860px) {
	/* On phones the whole photo would be only a thin strip, so it keeps a minimum height and the sides are trimmed. */
	#content .block-image > img { min-height: 190px; }
	#content .block-image .title-block .text { transform: none; }
	#content :is(.home-content, .news-content, .team-content, .tech-content, .product-content) > .page-content { padding-top: clamp(48px, 7vw, 96px); }
	#content .block-image .title-block .text::before { top: -14px; right: 0; width: 96px; height: 14px; z-index: 1; }
}

/* Scroll reveals: the original theme's entrance from the side, slowed and smoothed. Blocks marked
   post-left or post-right glide in from that side as they scroll into view and ease to a stop
   without the original's bounce. Paragraphs that fade in keep base.css's rise, on the same timing
   and easing. Blocks that come into view together arrive one after another: the parent theme's
   script numbers them in --reveal-order, top to bottom, then left to right. Visitors who ask for
   reduced motion get base.css's plain behaviour, with no movement. */
@media (prefers-reduced-motion: no-preference) {
	/* Side blocks wait just outside their places. Clipping keeps that from widening the page on
	   phones; only the four page types that have side blocks are clipped, so wide content elsewhere
	   (a table or embed in a news item) can still be scrolled to. Browsers that cannot clip without
	   making a scroll box keep base.css's rise instead. */
	@supports (overflow-x: clip) {
		:is(.home-content, .team-content, .tech-content, .contact-content) { overflow-x: clip; }
		.reveal-ready .post-left:not(.visible) { transform: translateX(calc(-1 * var(--reveal-slide))); }
		.reveal-ready .post-right:not(.visible) { transform: translateX(var(--reveal-slide)); }
	}
	.reveal-ready :is(.post, .post-left, .post-right, .post-p p) {
		--reveal-delay: calc(min(var(--reveal-order, 0), 4) * var(--reveal-stagger));
		transition:
			opacity var(--reveal-fade) ease-out var(--reveal-delay),
			transform var(--reveal-time) var(--reveal-ease) var(--reveal-delay);
	}
}
