/* ==========================================================================
   Layout and components
   ========================================================================== */

:root {
	--ms-gutter: clamp(16px, 4vw, 56px);
	--ms-header-h: 88px;
	--ms-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media (max-width: 720px) {
	:root { --ms-header-h: 64px; }
}

/* Remove the default gap WordPress puts between header, main and footer */
.wp-site-blocks > * + * { margin-block-start: 0; }

.ms-main { padding-top: var(--ms-header-h); }
.home .ms-main { padding-top: 0; }

a { transition: opacity 200ms ease; }
a:hover { opacity: 0.75; }

.ms-dot {
	display: inline-block;
	width: 10px;
	height: 10px;
	margin-right: 12px;
	border-radius: 50%;
	background: var(--ms-signal);
	vertical-align: 0;
}

/* ---------- Header ---------- */
.wp-site-blocks > header.wp-block-template-part {
	position: fixed;
	inset: 0 0 auto 0;
	z-index: 50;
}

/* Frosted glass sits on a pseudo element so the fixed menu inside the header is not trapped */
.wp-site-blocks > header.wp-block-template-part::before {
	content: "";
	position: absolute;
	inset: 0 0 auto 0;
	height: var(--ms-header-h);
	background: rgba(var(--ms-header-rgb), 0.72);
	-webkit-backdrop-filter: saturate(180%) blur(20px);
	backdrop-filter: saturate(180%) blur(20px);
	border-bottom: 1px solid var(--ms-line-2);
	opacity: 0;
	transition: opacity 300ms ease, border-color 200ms ease;
	pointer-events: none;
}

/* On the home page the divider waits until the sequencer has passed it */
.home .wp-site-blocks > header.wp-block-template-part::before { border-bottom-color: transparent; }
.ms-seq-in .home .wp-site-blocks > header.wp-block-template-part::before { border-bottom-color: var(--ms-line-2); }

.is-scrolled .wp-site-blocks > header.wp-block-template-part::before,
body:not(.home) .wp-site-blocks > header.wp-block-template-part::before {
	opacity: 1;
}

.ms-header,
.ms-menu__bar {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	align-items: center;
	height: var(--ms-header-h);
	padding: 0 var(--ms-gutter);
	margin: 0;
}

.ms-header > *,
.ms-menu__bar > * { margin: 0; }

.ms-header__status { justify-self: start; }

.ms-logo {
	justify-self: center;
	font-size: 20px;
	font-weight: 600;
	letter-spacing: -0.02em;
}

.ms-logo a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 44px;
	text-decoration: none;
}

.ms-logo a::after {
	content: "";
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--ms-text);
}

.ms-header__actions {
	justify-self: end;
	display: flex;
	align-items: center;
	gap: 6px;
}

.ms-menu-button,
.ms-menu-close {
	position: relative;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	color: var(--ms-text);
}

.ms-menu-button span {
	position: absolute;
	right: 8px;
	height: 2px;
	background: currentColor;
}
.ms-menu-button span:first-child { top: 17px; width: 28px; }
.ms-menu-button span:last-child { top: 25px; width: 18px; }

.ms-menu-close span {
	position: absolute;
	left: 8px;
	top: 21px;
	width: 28px;
	height: 2px;
	background: currentColor;
}
.ms-menu-close span:first-child { transform: rotate(45deg); }
.ms-menu-close span:last-child { transform: rotate(-45deg); }

@media (max-width: 720px) {
	.ms-header { grid-template-columns: minmax(0, 1fr) auto; }
	.ms-header .ms-header__status { display: none; }
	.ms-header .ms-logo { justify-self: start; }
	.ms-menu__bar { grid-template-columns: minmax(0, 1fr) auto; }
	.ms-menu__bar .ms-logo { display: none; }
}

/* ---------- Dropdown menu ---------- */
.ms-menu {
	position: fixed;
	inset: 0;
	z-index: 60;
	margin: 0;
	display: flex;
	flex-direction: column;
	background: rgba(var(--ms-header-rgb), 0.82);
	-webkit-backdrop-filter: saturate(160%) blur(28px);
	backdrop-filter: saturate(160%) blur(28px);
	clip-path: inset(0 0 100% 0);
	visibility: hidden;
	transition: clip-path 560ms var(--ms-ease), visibility 0s linear 560ms;
}

.ms-menu-open .ms-menu {
	clip-path: inset(0 0 0 0);
	visibility: visible;
	transition: clip-path 560ms var(--ms-ease), visibility 0s;
}

.ms-menu-open { overflow: hidden; }

.ms-menu__nav {
	margin: clamp(32px, 6vh, 64px) 0 0;
	padding: 0 var(--ms-gutter);
	counter-reset: ms-nav;
}

.ms-menu__nav .wp-block-navigation__container { gap: 6px; }

.ms-menu__nav .wp-block-navigation-item {
	counter-increment: ms-nav;
	opacity: 0;
	transform: translateY(-28px);
	transition: opacity 300ms ease, transform 300ms ease;
}

.ms-menu-open .ms-menu__nav .wp-block-navigation-item {
	opacity: 1;
	transform: none;
	transition: opacity 380ms ease, transform 560ms var(--ms-ease);
}
.ms-menu-open .ms-menu__nav .wp-block-navigation-item:nth-child(1) { transition-delay: 120ms; }
.ms-menu-open .ms-menu__nav .wp-block-navigation-item:nth-child(2) { transition-delay: 190ms; }
.ms-menu-open .ms-menu__nav .wp-block-navigation-item:nth-child(3) { transition-delay: 260ms; }
.ms-menu-open .ms-menu__nav .wp-block-navigation-item:nth-child(4) { transition-delay: 330ms; }

.ms-menu__nav .wp-block-navigation-item__content {
	display: flex;
	align-items: baseline;
	gap: 28px;
	font-size: clamp(56px, 7.5vw, 108px);
	font-weight: 500;
	font-stretch: 92%;
	letter-spacing: -0.045em;
	line-height: 1.02;
	color: var(--ms-muted);
	text-decoration: none;
}

.ms-menu__nav .wp-block-navigation-item__content::before {
	content: "0" counter(ms-nav);
	width: 28px;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 13px;
	letter-spacing: 0;
	color: var(--ms-muted);
}

.ms-menu__nav .wp-block-navigation-item__content:hover,
.ms-menu__nav .wp-block-navigation-item__content[aria-current] {
	color: var(--ms-text);
	opacity: 1;
}

.ms-menu__foot {
	margin: auto 0 0;
	padding: 0 var(--ms-gutter) 48px;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto auto;
	align-items: end;
	gap: 56px;
	opacity: 0;
	transform: translateY(-20px);
	transition: opacity 300ms ease, transform 300ms ease;
}

.ms-menu-open .ms-menu__foot {
	opacity: 1;
	transform: none;
	transition: opacity 380ms ease 420ms, transform 560ms var(--ms-ease) 420ms;
}

.ms-menu__foot > *, .ms-menu__mail > * { margin: 0; }
.ms-menu__mail { display: flex; flex-direction: column; gap: 10px; }
.ms-menu__mail-link { font-size: clamp(22px, 2.4vw, 34px); font-weight: 500; letter-spacing: -0.03em; }
.ms-menu__social { font-size: 20px; }
.ms-menu__meta { text-align: right; line-height: 2; }
.ms-menu__meta a { margin-left: 10px; }
.ms-menu__meta a[lang="en"] { color: var(--ms-text); margin-left: 0; }

@media (max-width: 720px) {
	.ms-menu__foot { grid-template-columns: 1fr; gap: 16px; padding-bottom: 36px; }
	.ms-menu__meta { text-align: left; }
}

/* ---------- Hero ---------- */
.ms-hero {
	position: relative;
	min-height: 100svh;
	box-sizing: border-box;
	margin: 0;
	padding: var(--ms-header-h) var(--ms-gutter) 120px;
	display: grid;
	place-items: center;
	text-align: center;
}

.ms-hero__text { display: flex; flex-direction: column; align-items: center; gap: 30px; }
.ms-hero__text > * { margin: 0; }

.ms-name {
	color: var(--ms-name);
	font-size: var(--wp--preset--font-size--display);
}

.ms-name::after {
	content: "";
	display: inline-block;
	width: 0.15em;
	height: 0.15em;
	margin-left: 0.05em;
	border-radius: 50%;
	background: currentColor;
}

.ms-hero__claim {
	max-width: 600px;
	font-size: 20px;
	line-height: 1.5;
	color: var(--ms-sub);
}

.ms-hero__status { display: none; }

.ms-hero__foot {
	position: absolute;
	left: var(--ms-gutter);
	bottom: 66px;
	margin: 0;
}

.ms-hero__instrument {
	position: absolute;
	left: 50%;
	bottom: 66px;
	transform: translateX(-50%);
	width: min(634px, 90vw);
	height: 28px;
}

@media (max-width: 720px) {
	/* Phone: one centred axis from status line to sequencer */
	.ms-hero { place-items: center; text-align: center; padding-bottom: 160px; }
	.ms-hero__text { align-items: center; gap: 24px; }
	.ms-hero__status { display: block; position: absolute; top: calc(var(--ms-header-h) + 16px); left: var(--ms-gutter); right: var(--ms-gutter); margin: 0; text-align: center; }
	.ms-hero__foot { display: none; }
	.ms-hero__claim { font-size: 17px; max-width: 300px; text-wrap: balance; }
	.ms-hero__instrument { bottom: 120px; }
}

/* ---------- Sections ---------- */
.ms-section {
	position: relative;
	margin: 0;
	padding: clamp(64px, 9vw, 120px) var(--ms-gutter) clamp(40px, 6vw, 80px);
	background: var(--ms-bg);
	display: flex;
	flex-direction: column;
	gap: 40px;
}

.ms-section > * { margin: 0; }
.ms-section__head { display: flex; flex-direction: column; gap: 14px; }
.ms-section__head > * { margin: 0; }

/* ---------- Cards ---------- */
.ms-card {
	position: relative;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 14px;
}
.ms-card > * { margin: 0; }

.ms-card--feature {
	display: grid;
	grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
	gap: 40px;
	align-items: end;
}

.ms-card__body { display: flex; flex-direction: column; gap: 14px; padding-bottom: 8px; }
.ms-card__body > * { margin: 0; }

.ms-card__title { font-size: 30px; letter-spacing: -0.035em; line-height: 1.05; }
.ms-card__title--large { font-size: clamp(30px, 3.4vw, 48px); letter-spacing: -0.04em; line-height: 1; }

/* Whole card is clickable, the link text stays the project title */
.ms-card__title a { text-decoration: none; }
.ms-card__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }

.ms-card__text { font-size: 17px; line-height: 1.5; color: var(--ms-sub); }
.ms-card__more { font-size: 17px; }

.ms-media {
	position: relative;
	aspect-ratio: 16 / 9;
	margin: 0;
	border-radius: 20px;
	background: var(--ms-surface);
	border: 1px solid var(--ms-line-2);
	display: grid;
	place-items: center;
	overflow: hidden;
}

.ms-media--type { place-items: end start; padding: 28px 32px; box-sizing: border-box; }
.ms-media__note { position: absolute; top: 24px; left: 32px; margin: 0; }
.ms-media__number {
	margin: 0;
	font-size: clamp(76px, 9vw, 128px);
	font-weight: 500;
	font-stretch: 88%;
	letter-spacing: -0.05em;
	line-height: 1;
}

.ms-grid-2 {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
	margin: 0;
}

@media (max-width: 860px) {
	.ms-card--feature, .ms-grid-2 { grid-template-columns: 1fr; gap: 36px; }
	.ms-card--feature { gap: 16px; }
}

/* ---------- Services: three tracks of the same groove ---------- */
.ms-offer { gap: clamp(40px, 5vw, 64px); }
.ms-offer__head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: 40px; row-gap: 14px; align-items: end; }
.ms-offer__head > .ms-label, .ms-offer__head > .ms-section__title { grid-column: 1; }
.ms-offer__intro { grid-column: 2; grid-row: 1 / span 2; max-width: 440px; font-size: 19px; line-height: 1.55; color: var(--ms-sub); }
.ms-offer__list { border-bottom: 1px solid var(--ms-line-2); }
.ms-offer__list > *, .ms-offer__row > *, .ms-offer__main > *, .ms-offer__body > * { margin: 0; }
.ms-offer__row {
	--voice: 50%;
	display: grid;
	grid-template-columns: 96px minmax(0, 5fr) minmax(0, 6fr);
	column-gap: 40px;
	padding: 44px 0;
	border-top: 1px solid var(--ms-line-2);
	align-items: start;
	transition: border-color 300ms ease;
}
.ms-offer__row--ch { --voice: 50% 50% 0 0; }
.ms-offer__row--oh { --voice: 0 0 50% 50%; }
.ms-offer__row > .ms-offer__n { margin-top: 6px; color: var(--ms-name); }
.ms-offer__main { display: flex; flex-direction: column; gap: 24px; }
.ms-offer__title { font-size: clamp(30px, 3.6vw, 52px); letter-spacing: -0.04em; line-height: 1; transition: color 300ms ease; }
.ms-offer__steps { display: flex; align-items: center; gap: 5px; }
.ms-offer__steps i { display: block; flex-shrink: 0; width: 10px; height: 10px; border-radius: var(--voice); background: var(--ms-line-2); transition: background-color 300ms ease, transform 300ms ease; }
.ms-offer__steps i:nth-child(4n):not(:last-child) { margin-right: 9px; }
.ms-offer__steps i.on { background: color-mix(in srgb, var(--ms-accent) 55%, var(--ms-step-dim)); }
.ms-offer__body { display: flex; flex-direction: column; gap: 18px; padding-top: 6px; }
.ms-offer__text { max-width: 520px; font-size: 19px; line-height: 1.55; color: var(--ms-sub); text-wrap: pretty; }
.ms-offer__proof { display: flex; flex-wrap: wrap; gap: 6px 20px; color: var(--ms-muted); }
.ms-offer__proof span { white-space: nowrap; }
@media (hover: hover) {
	.ms-offer__row:hover { border-top-color: var(--ms-line); }
	.ms-offer__row:hover .ms-offer__title { color: var(--ms-name); }
	.ms-offer__row:hover .ms-offer__steps i.on { background: var(--ms-accent); }
}
@media (max-width: 720px) {
	.ms-offer__head { grid-template-columns: 1fr; }
	.ms-offer__intro { grid-column: 1; grid-row: auto; margin-top: 6px; font-size: 17px; line-height: 1.5; }
	.ms-offer__row { grid-template-columns: auto minmax(0, 1fr); column-gap: 14px; row-gap: 16px; padding: 28px 0; }
	.ms-offer__row > .ms-offer__n { margin-top: 9px; }
	.ms-offer__main { gap: 0; }
	.ms-offer__steps { display: none; }
	.ms-offer__title { font-size: 30px; line-height: 1.05; }
	.ms-offer__body { grid-column: 1 / -1; gap: 14px; padding-top: 0; }
	.ms-offer__text { font-size: 16px; line-height: 1.5; }
}

/* ---------- Contact ---------- */
.ms-contact { gap: 28px; padding-bottom: clamp(80px, 10vw, 160px); }

.ms-contact__title {
	font-size: clamp(76px, 10vw, 140px);
	line-height: 0.92;
}
.ms-contact__title a { text-decoration: none; }
.ms-contact__title a::after {
	content: "";
	display: inline-block;
	width: 0.15em;
	height: 0.15em;
	margin-left: 0.05em;
	border-radius: 50%;
	background: var(--ms-name);
}

.ms-contact__links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px 40px;
	font-size: clamp(20px, 2vw, 24px);
}
.ms-contact__links a { min-height: 44px; display: inline-flex; align-items: center; text-decoration: none; }
.ms-contact__mail { font-size: 18px; color: var(--ms-muted) !important; }

/* ---------- Footer ---------- */
.ms-footer {
	margin: 0;
	padding: 28px var(--ms-gutter);
	border-top: 1px solid var(--ms-line-2);
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 12px 32px;
}
.ms-footer > * { margin: 0; }
.ms-footer__links { display: flex; gap: 24px; }
.ms-footer__links a { text-decoration: none; color: var(--ms-muted); min-height: 44px; display: inline-flex; align-items: center; }
.ms-footer__links a:hover { color: var(--ms-text); }

/* ---------- Generic pages (Impressum, Datenschutz, Contact) ---------- */
.ms-page {
	max-width: 880px;
	margin: 0 auto;
	padding-inline: var(--ms-gutter);
	padding-bottom: 120px;
	box-sizing: content-box;
}
.ms-page__title {
	margin: clamp(48px, 8vw, 96px) 0 48px;
	font-size: var(--wp--preset--font-size--x-large);
}
.ms-page__content { font-size: 18px; line-height: 1.65; }
.ms-page__content h2 { margin: 64px 0 16px; font-size: var(--wp--preset--font-size--medium); line-height: 1.15; }
.ms-page__content h3 { margin: 32px 0 8px; font-size: 18px; letter-spacing: 0; line-height: 1.3; }
.ms-page__content ul { padding-left: 1.1em; }
.ms-page__content li + li { margin-top: 6px; }
.ms-page__content .m-elements li + li { margin-top: 12px; }
.ms-page__content a { color: var(--ms-text); text-underline-offset: 3px; overflow-wrap: anywhere; }
.ms-page__content .seal { margin-top: 64px; font-size: 14px; color: var(--ms-muted); }
.ms-legal-summary {
	margin: 0 0 56px;
	padding: 28px clamp(20px, 3vw, 32px);
	border: 1px solid var(--ms-line);
	border-radius: 20px;
	background: var(--ms-surface);
}
.ms-legal-summary > :first-child { margin-top: 0; }
.ms-legal-summary > :last-child { margin-bottom: 0; color: var(--ms-sub); }

/* ---------- Editor: show the menu inline so it can be edited ---------- */
.editor-styles-wrapper .ms-menu {
	position: relative;
	inset: auto;
	visibility: visible;
	clip-path: none;
	min-height: 0;
}
.editor-styles-wrapper .ms-menu__nav .wp-block-navigation-item,
.editor-styles-wrapper .ms-menu__foot { opacity: 1; transform: none; }
.editor-styles-wrapper .ms-hero { min-height: 80vh; }

/* ---------- Work list (query loop of projects) ---------- */
.ms-work { margin: 0; }

.ms-work__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 56px 20px;
}

.ms-work__list > li { margin: 0; }
.ms-work__list > li:first-child { grid-column: 1 / -1; }

.ms-work__list > li:first-child .ms-card {
	display: grid;
	grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
	gap: 40px;
	align-items: end;
}

.ms-work__list > li:first-child .ms-card__title { font-size: clamp(30px, 3.4vw, 48px); letter-spacing: -0.04em; line-height: 1; }
.ms-work__list > li:not(:first-child) .ms-card__more { display: none; }

.ms-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ms-card .wp-block-post-terms a { color: inherit; text-decoration: none; position: relative; z-index: 2; }
.ms-card__text p { margin: 0; }

@media (max-width: 860px) {
	.ms-work__list { grid-template-columns: 1fr; gap: 48px; }
	.ms-work__list > li:first-child .ms-card { grid-template-columns: 1fr; gap: 16px; }
}

/* ---------- Case study ---------- */
.ms-case {
	max-width: 1040px;
	margin: 0 auto;
	padding-inline: var(--ms-gutter);
	padding-bottom: 120px;
	box-sizing: content-box;
}

.ms-case__head {
	display: flex;
	flex-direction: column;
	gap: 24px;
	margin: 0;
	padding-top: clamp(32px, 5vw, 56px);
}
.ms-case__head > * { margin: 0; }
.ms-case__back a { color: var(--ms-muted); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.ms-case__kicker a { color: inherit; text-decoration: none; }

.ms-case__title {
	font-size: clamp(52px, 7vw, 104px);
	line-height: 0.92;
	letter-spacing: -0.045em;
}

.ms-case__lead, .ms-case__lead p {
	margin: 0;
	max-width: 760px;
	font-size: clamp(19px, 2vw, 24px);
	line-height: 1.45;
	color: var(--ms-sub);
}

.ms-case__cover {
	margin: 56px 0 0;
	border-radius: 20px;
	overflow: hidden;
	border: 1px solid var(--ms-line-2);
}
.ms-case__cover img { width: 100%; height: 100%; object-fit: cover; }

.ms-case__content { margin-top: 56px; display: flex; flex-direction: column; gap: 64px; }
.ms-case__content > * { margin: 0; }

.ms-case__meta {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 24px;
	padding-top: 24px;
	border-top: 1px solid var(--ms-line-2);
}
.ms-case__fact > * { margin: 0; }
/* WordPress adds a top margin to every block after the first. In grids that pushes the later columns down. */
.ms-case__meta.ms-case__meta > *,
.ms-grid-2.ms-grid-2 > * { margin: 0; }
.ms-case__fact { display: flex; flex-direction: column; gap: 8px; font-size: 17px; line-height: 1.4; }

.ms-case__section {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
	gap: 48px;
}
.ms-case__section > * { margin: 0; }
.ms-case__h { font-size: clamp(28px, 2.6vw, 34px); letter-spacing: -0.03em; line-height: 1.1; }

.ms-case__body {
	display: flex;
	flex-direction: column;
	gap: 18px;
	font-size: 19px;
	line-height: 1.65;
	color: var(--ms-text);
}
.ms-case__body > * { margin: 0; }
.ms-case__body h3 { margin-top: 18px; font-size: 22px; letter-spacing: -0.02em; line-height: 1.2; }
.ms-case__body ul { padding-left: 1.1em; display: flex; flex-direction: column; gap: 8px; }
.ms-case__body li::marker { color: var(--ms-accent); }
.ms-case__note { font-size: 15px; color: var(--ms-muted); }
.ms-case__confirm { padding-top: 24px; border-top: 1px solid var(--ms-line-2); }

/* Key number (animated from glyphs in a later step, readable as text now) */
.ms-glyph-number {
	margin: 0;
	padding: 56px 0;
	border-top: 1px solid var(--ms-line-2);
	text-align: center;
}
.ms-glyph-number__value {
	margin: 0 0 18px;
	font-size: clamp(76px, 12vw, 168px);
	font-weight: 500;
	font-stretch: 88%;
	letter-spacing: -0.05em;
	line-height: 1;
	color: var(--ms-name);
}

/* Screenshots inside a case study. Empty placeholders stay hidden until an image is set. */
.ms-case__content .wp-block-image { margin: 0; }
.ms-case__content .wp-block-image img { display: block; width: 100%; height: auto; border-radius: 20px; border: 1px solid var(--ms-line-2); }
.ms-case__shot img,
.ms-case__content .wp-block-gallery .wp-block-image img { aspect-ratio: 16 / 9; object-fit: cover; }
.ms-case__content figcaption {
	margin-top: 12px;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 12px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ms-muted);
}
.ms-case__content .wp-block-image:has(img:not([src])) { display: none; }
.ms-case__content .ms-grid-2:not(:has(img[src])) { display: none; }

.ms-case__next { margin-top: 72px; padding-top: 28px; border-top: 1px solid var(--ms-line-2); }
.ms-case__next a { font-size: clamp(28px, 3vw, 40px); font-weight: 500; letter-spacing: -0.04em; text-decoration: none; }

@media (max-width: 860px) {
	.ms-case__meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ms-case__section { grid-template-columns: 1fr; gap: 16px; }
	.ms-case__body { font-size: 17px; }
}

/* Round focus rings on icon buttons */
.ms-menu-button, .ms-menu-close, .ms-theme-toggle, .ms-close, .ms-sound { border-radius: 50%; }

/* ---------- Contact page ---------- */
.ms-contact-page {
	min-height: 100svh;
	box-sizing: border-box;
	padding: calc(var(--ms-header-h) + 24px) var(--ms-gutter) 80px;
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	gap: 72px;
	align-items: center;
}
.ms-contact-page > * { margin: 0; }
.ms-contact-page__intro { display: flex; flex-direction: column; gap: 28px; }
.ms-contact-page__intro > * { margin: 0; }
.ms-contact-page__title { font-size: clamp(68px, 8vw, 112px); line-height: 0.92; }
.ms-contact-page__title::after {
	content: "";
	display: inline-block;
	width: 0.15em;
	height: 0.15em;
	margin-left: 0.05em;
	border-radius: 50%;
	background: var(--ms-name);
}
.ms-contact-page__text { max-width: 440px; font-size: 19px; line-height: 1.55; color: var(--ms-muted); }
.ms-contact-page__text a { color: var(--ms-text); text-decoration: underline; text-underline-offset: 3px; }

.ms-mail {
	border-radius: 20px;
	background: var(--ms-surface);
	border: 1px solid var(--ms-line-2);
	overflow: hidden;
	min-height: 560px;
	display: flex;
	flex-direction: column;
}
:root[data-theme="light"] .ms-mail { box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 12px 32px rgba(0, 0, 0, 0.05); }

.ms-mail__form { display: flex; flex-direction: column; flex-grow: 1; margin: 0; }
.ms-mail__form[hidden], .ms-mail__sent[hidden] { display: none; }

.ms-mail__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.ms-mail__row {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 18px 28px;
	border-bottom: 1px solid var(--ms-line-2);
}
.ms-mail__row--subject { flex-direction: column; align-items: stretch; gap: 14px; }
.ms-mail__line { display: flex; align-items: center; gap: 16px; }
.ms-mail__row--message { flex-direction: column; align-items: stretch; gap: 10px; flex-grow: 1; border-bottom: 0; }

.ms-mail__key {
	flex-shrink: 0;
	width: 84px;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 13px;
	color: var(--ms-muted);
}

.ms-mail__to { padding: 6px 12px; border-radius: 999px; background: var(--ms-bg); font-size: 16px; }

.ms-mail__input {
	flex-grow: 1;
	min-height: 32px;
	padding: 0;
	border: 0;
	outline: none;
	background: transparent;
	color: var(--ms-text);
	font-family: inherit;
	font-size: 17px;
}
.ms-mail__input::placeholder { color: var(--ms-muted); opacity: 0.8; }
.ms-mail__input:focus-visible { box-shadow: 0 2px 0 0 var(--ms-accent); }
.ms-mail__textarea { min-height: 180px; resize: vertical; line-height: 1.55; }

.ms-mail__chips { display: flex; flex-wrap: wrap; gap: 10px; padding-left: 100px; }
.ms-mail__chip {
	min-height: 44px;
	padding: 0 16px;
	border-radius: 999px;
	border: 1px solid var(--ms-line);
	background: transparent;
	color: var(--ms-text);
	font-family: inherit;
	font-size: 14px;
	cursor: pointer;
}
.ms-mail__chip[aria-pressed="true"] { background: var(--ms-text); border-color: var(--ms-text); color: var(--ms-bg); }

.ms-mail__foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 24px;
	padding: 18px 28px;
	border-top: 1px solid var(--ms-line-2);
}
.ms-mail__foot > p { margin: 0; }
.ms-mail__note { font-family: var(--wp--preset--font-family--mono); font-size: 12px; color: var(--ms-muted); }
.ms-mail__note a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.ms-mail__error { flex-basis: 100%; order: 3; font-size: 15px; color: #e5866f; }
.ms-mail__error:empty { display: none; }

.ms-mail__send {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	height: 48px;
	padding: 0 22px;
	border-radius: 999px;
	border: 0;
	background: var(--ms-text);
	color: var(--ms-bg);
	font-family: inherit;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
}
.ms-mail__send:disabled { opacity: 0.6; cursor: progress; }
.ms-mail__send-dot { width: 10px; height: 10px; border-radius: 50%; background: currentColor; }

.ms-mail__sent {
	flex-grow: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 22px;
	padding: 48px;
	text-align: center;
	outline: none;
}
.ms-mail__sent > p { margin: 0; }
.ms-mail__sent-glyphs { display: flex; align-items: center; gap: 10px; }
.ms-mail__sent-glyphs span { width: 18px; height: 18px; border-radius: 50%; background: var(--ms-line); }
.ms-mail__sent-glyphs span:nth-child(2) { background: var(--ms-muted); }
.ms-mail__sent-glyphs span:nth-child(3) { width: 56px; height: 56px; background: var(--ms-name); }
.ms-mail__sent-title { font-size: 56px; font-weight: 500; font-stretch: 92%; letter-spacing: -0.04em; line-height: 1; }
.ms-mail__sent-text { font-size: 18px; color: var(--ms-muted); }
.ms-mail__again {
	min-height: 44px;
	display: inline-flex;
	align-items: center;
	padding: 0 18px;
	border-radius: 999px;
	border: 1px solid var(--ms-line);
	text-decoration: none;
	font-size: 15px;
}

@media (max-width: 860px) {
	.ms-contact-page { grid-template-columns: 1fr; gap: 40px; align-items: start; }
	.ms-mail__row { padding: 16px 18px; }
	.ms-mail__key { width: 64px; }
	.ms-mail__chips { padding-left: 0; }
	.ms-mail__foot { padding: 16px 18px; }
}

/* Discipline tags are labels, not links */
.wp-block-post-terms a { pointer-events: none; color: inherit; text-decoration: none; }
