/*
Theme Name: Memminger Schlüsseldienst
Theme URI: https://memminger-schluesseldienst.de
Author: Wallxer
Author URI: https://wallxer.com/
Description: Custom theme for Memminger Schlüsseldienst, a locksmith and 24-hour emergency key service in Memmingen, Germany. Provides the header, footer, design tokens and base styles. Page layouts are built in Elementor; custom widgets live in the Memminger Schlüsseldienst Core plugin.
Version: 0.9.0
Requires at least: 6.8
Tested up to: 7.1
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: memminger-schluesseldienst
Tags: one-column, custom-logo, custom-menu, translation-ready

Fonts: Bricolage Grotesque and Instrument Sans, SIL Open Font License 1.1 (see assets/fonts).
*/

/* ==========================================================================
   1. Fonts (self-hosted, variable)
   ========================================================================== */

@font-face {
	font-family: "Bricolage Grotesque";
	font-style: normal;
	font-weight: 500 800;
	font-stretch: 100%;
	font-display: swap;
	src: url("assets/fonts/bricolage-grotesque-latin.woff2") format("woff2");
}

@font-face {
	font-family: "Instrument Sans";
	font-style: normal;
	font-weight: 400 700;
	font-stretch: 100%;
	font-display: swap;
	src: url("assets/fonts/instrument-sans-latin.woff2") format("woff2");
}

/* ==========================================================================
   2. Design tokens (the only place they are defined)
   ========================================================================== */

:root {
	/* Colours */
	--msd-red: #9d2020;
	--msd-ink: #1e2a30;
	--msd-espresso: #281616;
	--msd-espresso-hover: #3e2323;
	--msd-cream: #f7f4ee;
	--msd-sand: #efe9df;
	--msd-white: #fff;
	--msd-line: #e6e0d5;
	--msd-line-strong: #d8d1c4;
	--msd-field-bg: #faf8f4;
	--msd-field-border: #8f8674;
	--msd-text: #1e2a30;
	--msd-text-muted: #4c565d;
	--msd-text-soft: #59636a;
	--msd-text-faint: #68727a;
	--msd-pink: #ff9b9b;
	--msd-pink-soft: #f6dede;
	--msd-pink-faint: #fbeeee;
	--msd-green: #15803d;
	--msd-green-bright: #22c55e;
	--msd-star: #b45f06;
	--msd-footer-text: #dfe5e8;
	--msd-footer-muted: #aab5bb;
	--msd-footer-faint: #8d9aa1;

	/* Typography */
	--msd-font-heading: "Bricolage Grotesque", system-ui, sans-serif;
	--msd-font-body: "Instrument Sans", system-ui, sans-serif;
	--msd-fs-h1: clamp(2.7rem, 6.4vw, 5.6rem);
	--msd-fs-h2: clamp(2.1rem, 4.4vw, 3.6rem);
	--msd-fs-h3: clamp(1.6rem, 2.6vw, 2.2rem);
	--msd-fs-h4: 1.3125rem;
	--msd-fs-lead: clamp(1.0625rem, 1.6vw, 1.25rem);
	--msd-fs-body: 1.125rem;
	--msd-fs-small: 0.9375rem;
	--msd-fs-eyebrow: 0.875rem;

	/* Layout */
	--msd-content: 1320px;
	--msd-gutter: clamp(16px, 4vw, 40px);
	--msd-section: clamp(80px, 11vw, 140px);
	--msd-header-h: 76px;

	/* Radii */
	--msd-r-pill: 999px;
	--msd-r-xl: 32px;
	--msd-r-lg: 28px;
	--msd-r-md: 22px;
	--msd-r-sm: 14px;
	--msd-r-xs: 8px;

	/* Shadows and motion */
	--msd-shadow-card: 0 30px 50px -30px rgba(30, 42, 48, 0.4);
	--msd-shadow-float: 0 24px 60px rgba(30, 42, 48, 0.18);
	--msd-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ==========================================================================
   3. Base
   ========================================================================== */

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

html {
	scroll-padding-top: calc(var(--msd-header-h) + 12px);
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--msd-cream);
	color: var(--msd-text);
	font-family: var(--msd-font-body);
	font-size: var(--msd-fs-body);
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	overflow-wrap: break-word;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0 0 0.5em;
	color: var(--msd-text);
	font-family: var(--msd-font-heading);
	font-weight: 800;
	line-height: 1.05;
	letter-spacing: -0.03em;
	text-wrap: balance;
}

h1 {
	font-size: var(--msd-fs-h1);
	line-height: 0.98;
	letter-spacing: -0.035em;
}

h2 {
	font-size: var(--msd-fs-h2);
	line-height: 1.02;
}

h3 {
	font-size: var(--msd-fs-h3);
	line-height: 1.1;
	letter-spacing: -0.02em;
}

h4,
h5,
h6 {
	font-size: var(--msd-fs-h4);
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.01em;
}

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

a {
	color: var(--msd-text);
	text-decoration: none;
}

a:hover {
	color: var(--msd-red);
}

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

button,
input,
select,
textarea {
	font-family: inherit;
	font-size: inherit;
}

/* Visible keyboard focus that works on light and dark backgrounds. */
:focus-visible {
	outline: 2px solid var(--msd-white);
	outline-offset: 0;
	box-shadow: 0 0 0 4px var(--msd-ink);
}

/* ==========================================================================
   4. Accessibility helpers and WordPress core classes
   ========================================================================== */

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

.skip-link:focus {
	top: 8px;
	left: 8px;
	z-index: 100000;
	width: auto;
	height: auto;
	margin: 0;
	padding: 14px 22px;
	clip: auto;
	clip-path: none;
	border-radius: var(--msd-r-pill);
	background: var(--msd-espresso);
	color: var(--msd-white);
	font-weight: 700;
}

.alignleft {
	float: left;
	margin: 0 1.5em 1em 0;
}

.alignright {
	float: right;
	margin: 0 0 1em 1.5em;
}

.aligncenter {
	display: block;
	margin-right: auto;
	margin-left: auto;
}

.wp-caption {
	max-width: 100%;
	margin-bottom: 1.5em;
}

.wp-caption-text,
.gallery-caption {
	margin-top: 0.5em;
	color: var(--msd-text-soft);
	font-size: var(--msd-fs-small);
}

.sticky,
.bypostauthor {
	display: block;
}

/* ==========================================================================
   5. Layout shell (used by the PHP templates; Elementor pages bring their own)
   ========================================================================== */

.msd-container {
	width: 100%;
	max-width: var(--msd-content);
	margin-right: auto;
	margin-left: auto;
	padding-right: var(--msd-gutter);
	padding-left: var(--msd-gutter);
}

.msd-page {
	padding-top: clamp(48px, 7vw, 96px);
	padding-bottom: var(--msd-section);
}

.msd-page__title {
	font-size: var(--msd-fs-h2);
}

.msd-entry {
	max-width: 820px;
}

.msd-entry + .msd-entry {
	margin-top: 48px;
	padding-top: 48px;
	border-top: 1px solid var(--msd-line);
}

.msd-entry__title {
	font-size: var(--msd-fs-h3);
}

.msd-entry__content a {
	color: var(--msd-red);
	text-decoration: underline;
}

.msd-entry__meta {
	color: var(--msd-text-soft);
	font-size: var(--msd-fs-small);
}

.msd-entry__image {
	margin-bottom: 32px;
	overflow: hidden;
	border-radius: var(--msd-r-xl);
}

.msd-entry__image img {
	display: block;
	width: 100%;
}

.msd-page__intro {
	max-width: 620px;
	color: var(--msd-text-muted);
	font-size: var(--msd-fs-lead);
}

.msd-404__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 32px 0 48px;
}

/* Search form */

.msd-search {
	max-width: 620px;
	margin-bottom: 48px;
}

.msd-search__label {
	display: block;
	margin-bottom: 6px;
	font-size: 0.875rem;
	font-weight: 600;
}

.msd-search__row {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.msd-search__input {
	flex: 1 1 220px;
	min-width: 0;
	height: 52px;
	padding: 0 16px;
	border: 1.5px solid var(--msd-field-border);
	border-radius: var(--msd-r-sm);
	background: var(--msd-white);
	color: var(--msd-text);
	font-size: 1rem;
}

.msd-search .msd-button {
	min-height: 52px;
	border: 0;
	cursor: pointer;
}

/* Pagination */

.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 48px;
}

.pagination .page-numbers {
	display: grid;
	min-width: 44px;
	height: 44px;
	padding: 0 12px;
	border: 1px solid var(--msd-line-strong);
	border-radius: var(--msd-r-pill);
	background: var(--msd-white);
	font-size: var(--msd-fs-small);
	font-weight: 600;
	place-items: center;
}

.pagination .page-numbers.current {
	border-color: var(--msd-espresso);
	background: var(--msd-espresso);
	color: var(--msd-white);
}

/* Comments */

.msd-comments {
	max-width: 820px;
	margin-top: 64px;
	padding-top: 48px;
	border-top: 1px solid var(--msd-line);
}

.msd-comments__title {
	font-size: var(--msd-fs-h3);
}

.msd-comments__list,
.msd-comments__list .children {
	margin: 0;
	padding: 0;
	list-style: none;
}

.msd-comments__list .children {
	padding-left: 24px;
}

.msd-comments__list .comment-body {
	margin-bottom: 16px;
	padding: 24px;
	border: 1px solid var(--msd-line);
	border-radius: var(--msd-r-md);
	background: var(--msd-white);
}

.msd-comments__list .avatar {
	float: left;
	margin-right: 14px;
	border-radius: 50%;
}

.comment-form label {
	display: block;
	margin-bottom: 6px;
	font-size: 0.875rem;
	font-weight: 600;
}

.comment-form input:not([type="checkbox"]):not([type="submit"]),
.comment-form textarea {
	width: 100%;
	padding: 14px 16px;
	border: 1.5px solid var(--msd-field-border);
	border-radius: var(--msd-r-sm);
	background: var(--msd-white);
	color: var(--msd-text);
}

.comment-form .submit {
	min-height: 52px;
	padding: 0 26px;
	border: 0;
	border-radius: var(--msd-r-pill);
	background: var(--msd-espresso);
	color: var(--msd-white);
	font-weight: 700;
	cursor: pointer;
}

/* ==========================================================================
   6. Fallback header and footer (shown only until Theme Builder templates exist)
   ========================================================================== */

.msd-header {
	position: sticky;
	top: 0;
	z-index: 50;
	border-bottom: 1px solid var(--msd-line);
	background: rgba(247, 244, 238, 0.96);
}

.msd-header__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 24px;
	min-height: var(--msd-header-h);
	padding-top: 12px;
	padding-bottom: 12px;
}

.msd-header__brand {
	color: var(--msd-text);
	font-family: var(--msd-font-heading);
	font-size: 1.25rem;
	font-weight: 800;
	letter-spacing: -0.02em;
}

.msd-header__brand .custom-logo {
	display: block;
	width: auto;
	height: 52px;
}

.msd-menu {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.msd-menu a {
	display: block;
	padding: 10px 14px;
	border-radius: var(--msd-r-pill);
	font-size: var(--msd-fs-small);
	font-weight: 500;
}

.msd-menu a:hover,
.msd-menu .current-menu-item > a {
	background: var(--msd-pink-soft);
	color: var(--msd-text);
}

.msd-menu .sub-menu {
	display: none;
}

.msd-button {
	display: inline-flex;
	align-items: center;
	min-height: 46px;
	padding: 0 22px;
	border-radius: var(--msd-r-pill);
	background: var(--msd-espresso);
	color: var(--msd-white);
	font-size: var(--msd-fs-small);
	font-weight: 700;
}

.msd-button:hover {
	background: var(--msd-espresso-hover);
	color: var(--msd-white);
}

.msd-button--outline {
	border: 1.5px solid var(--msd-ink);
	background: transparent;
	color: var(--msd-ink);
}

.msd-footer {
	padding: 56px 0 40px;
	background: var(--msd-ink);
	color: var(--msd-footer-muted);
	font-size: var(--msd-fs-small);
}

.msd-footer a {
	color: var(--msd-footer-text);
}

.msd-footer a:hover {
	color: var(--msd-pink);
}

.msd-footer__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px 32px;
}

.msd-footer .msd-menu a {
	padding: 6px 10px;
}

.msd-footer .msd-menu a:hover,
.msd-footer .msd-menu .current-menu-item > a {
	background: transparent;
	color: var(--msd-pink);
}

/* ==========================================================================
   6b. Utility classes for built-in Elementor widgets
       (enter them under Advanced → CSS Classes)
   ========================================================================== */

/* msd-arrow: adds the design's forward arrow after the text of a Button or Form button. */
.msd-arrow .elementor-button-content-wrapper {
	align-items: center;
	gap: 10px;
}

.msd-arrow .elementor-button-content-wrapper::after {
	flex: none;
	width: 20px;
	height: 20px;
	background-color: currentColor;
	content: "";
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3E%3Cpath d='M633.85-434.5H197.37q-19.15 0-32.33-13.17-13.17-13.18-13.17-32.33t13.17-32.33q13.18-13.17 32.33-13.17h436.48L447.17-712.17q-13.67-13.68-13.29-32.07.38-18.39 14.05-32.06 13.68-12.68 32.07-13.06 18.39-.38 32.07 13.29l264 264q6.71 6.72 9.81 14.92 3.1 8.19 3.1 17.15 0 8.96-3.1 17.15-3.1 8.2-9.81 14.92L511.83-183.7q-12.92 12.92-31.57 12.92t-32.33-12.92q-13.67-13.67-13.67-32.44 0-18.77 13.67-32.45L633.85-434.5Z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3E%3Cpath d='M633.85-434.5H197.37q-19.15 0-32.33-13.17-13.17-13.18-13.17-32.33t13.17-32.33q13.18-13.17 32.33-13.17h436.48L447.17-712.17q-13.67-13.68-13.29-32.07.38-18.39 14.05-32.06 13.68-12.68 32.07-13.06 18.39-.38 32.07 13.29l264 264q6.71 6.72 9.81 14.92 3.1 8.19 3.1 17.15 0 8.96-3.1 17.15-3.1 8.2-9.81 14.92L511.83-183.7q-12.92 12.92-31.57 12.92t-32.33-12.92q-13.67-13.67-13.67-32.44 0-18.77 13.67-32.45L633.85-434.5Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* msd-send: puts the design's paper-plane icon before the text of a Button or Form button. */
.msd-send .elementor-button-content-wrapper {
	align-items: center;
	justify-content: center;
	gap: 10px;
}

.msd-send .elementor-button-content-wrapper::before {
	flex: none;
	width: 22px;
	height: 22px;
	background-color: currentColor;
	content: "";
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3E%3Cpath d='M176.24-178.7q-22.87 9.44-43.26-3.85-20.39-13.3-20.39-38.17V-393.3l331-86.7-331-86.7v-172.58q0-24.87 20.39-38.17 20.39-13.29 43.26-3.85l613.61 259.28q28.11 12.43 28.11 42.02 0 29.59-28.11 42.02L176.24-178.7Z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3E%3Cpath d='M176.24-178.7q-22.87 9.44-43.26-3.85-20.39-13.3-20.39-38.17V-393.3l331-86.7-331-86.7v-172.58q0-24.87 20.39-38.17 20.39-13.29 43.26-3.85l613.61 259.28q28.11 12.43 28.11 42.02 0 29.59-28.11 42.02L176.24-178.7Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* msd-note: turns a Text Editor widget into the pink notice box with an info icon. */
.elementor-widget-text-editor.msd-note {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 16px;
	border-radius: 12px;
	background-color: var(--msd-pink-soft);
	color: var(--msd-ink);
	font-size: 14.5px;
	font-weight: 600;
	line-height: 1.5;
}

.elementor-widget-text-editor.msd-note::before {
	flex: none;
	width: 20px;
	height: 20px;
	background-color: var(--msd-red);
	content: "";
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3E%3Cpath d='M511.01-288.94q12.58-12.54 12.58-31.06v-156.41q0-18.53-12.58-31.06Q498.43-520 480-520t-31.01 12.53q-12.58 12.53-12.58 31.06V-320q0 18.52 12.58 31.06 12.58 12.53 31.01 12.53t31.01-12.53Zm.84-319.15q12.93-12.88 12.93-31.91t-12.87-31.91q-12.88-12.87-31.91-12.87t-31.91 12.87q-12.87 12.88-12.87 31.91t12.93 31.91q12.94 12.87 31.85 12.87 18.91 0 31.85-12.87ZM480-71.870q-84.91 0-159.34-32.12-74.44-32.12-129.5-87.17-55.05-55.06-87.17-129.5Q71.870-395.090 71.870-480t32.12-159.34q32.12-74.44 87.17-129.5 55.06-55.05 129.5-87.17 74.43-32.12 159.34-32.12t159.34 32.12q74.44 32.12 129.5 87.17 55.05 55.06 87.17 129.5 32.12 74.43 32.12 159.34t-32.12 159.34q-32.12 74.44-87.17 129.5-55.06 55.05-129.5 87.17Q564.91-71.870 480-71.870Z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3E%3Cpath d='M511.01-288.94q12.58-12.54 12.58-31.06v-156.41q0-18.53-12.58-31.06Q498.43-520 480-520t-31.01 12.53q-12.58 12.53-12.58 31.06V-320q0 18.52 12.58 31.06 12.58 12.53 31.01 12.53t31.01-12.53Zm.84-319.15q12.93-12.88 12.93-31.91t-12.87-31.91q-12.88-12.87-31.91-12.87t-31.91 12.87q-12.87 12.88-12.87 31.91t12.93 31.91q12.94 12.87 31.85 12.87 18.91 0 31.85-12.87ZM480-71.870q-84.91 0-159.34-32.12-74.44-32.12-129.5-87.17-55.05-55.06-87.17-129.5Q71.870-395.090 71.870-480t32.12-159.34q32.12-74.44 87.17-129.5 55.06-55.05 129.5-87.17 74.43-32.12 159.34-32.12t159.34 32.12q74.44 32.12 129.5 87.17 55.05 55.06 87.17 129.5 32.12 74.43 32.12 159.34t-32.12 159.34q-32.12 74.44-87.17 129.5-55.06 55.05-129.5 87.17Q564.91-71.870 480-71.870Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.elementor-widget-text-editor.msd-note p {
	margin: 0;
}

.elementor-widget-text-editor.msd-note a {
	color: var(--msd-red);
	font-weight: 800;
}

/*
 * msd-legal: a container becomes the white card of the legal pages, and the
 * Text Editor widgets inside it get the legal-text typography.
 * Text marked with the editor's highlight (<mark>) shows as a pink placeholder.
 */
.e-con.msd-legal {
	border: 1px solid var(--msd-line);
	border-radius: clamp(24px, 3vw, 32px);
	background-color: var(--msd-white);
}

.msd-legal .elementor-widget-text-editor {
	color: var(--msd-text-muted);
	font-size: 16.5px;
	line-height: 1.75;
}

.msd-legal .elementor-widget-text-editor h2 {
	margin: clamp(28px, 4vw, 40px) 0 14px;
	color: var(--msd-ink);
	font-size: clamp(1.35rem, 2.2vw, 1.7rem);
	line-height: 1.2;
	letter-spacing: -0.015em;
}

.msd-legal .elementor-widget-text-editor h2:first-child {
	margin-top: 0;
}

.msd-legal .elementor-widget-text-editor h3 {
	margin: 24px 0 10px;
	color: var(--msd-ink);
	font-size: 1.15rem;
	line-height: 1.3;
	letter-spacing: -0.01em;
}

.msd-legal .elementor-widget-text-editor p {
	margin: 0 0 14px;
	text-wrap: pretty;
}

.msd-legal .elementor-widget-text-editor p:last-child {
	margin-bottom: 0;
}

.msd-legal .elementor-widget-text-editor ul,
.msd-legal .elementor-widget-text-editor ol {
	margin: 0 0 14px;
	padding-left: 22px;
	line-height: 1.7;
}

.msd-legal .elementor-widget-text-editor li + li {
	margin-top: 6px;
}

.msd-legal .elementor-widget-text-editor a {
	color: var(--msd-red);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.msd-legal mark {
	padding: 1px 6px;
	border-radius: 4px;
	background-color: var(--msd-pink-soft);
	color: var(--msd-ink);
}

/*
 * msd-article: article typography for a Text Editor widget on service and
 * city pages (large section headings, bullet lists with red dots).
 */
.elementor-widget-text-editor.msd-article {
	color: var(--msd-text-muted);
	font-size: 17px;
	line-height: 1.75;
}

.msd-article h2 {
	margin: clamp(40px, 5vw, 56px) 0 20px;
	color: var(--msd-ink);
	font-size: clamp(1.75rem, 3vw, 2.35rem);
	line-height: 1.1;
	letter-spacing: -0.025em;
	/* A link to "#section" must not hide the heading under the sticky header. */
	scroll-margin-top: 110px;
}

.msd-article h2:first-child {
	margin-top: 0;
}

.msd-article h3 {
	margin: 32px 0 14px;
	color: var(--msd-ink);
	font-size: 1.35rem;
	line-height: 1.2;
	letter-spacing: -0.015em;
}

.msd-article p {
	margin: 0 0 20px;
}

.msd-article ul {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 0 0 20px;
	padding: 0;
	list-style: none;
}

.msd-article ul li {
	position: relative;
	padding-left: 22px;
	color: var(--msd-ink);
	line-height: 1.6;
}

.msd-article ul li::before {
	position: absolute;
	top: 0.62em;
	left: 0;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background-color: var(--msd-red);
	content: "";
}

.msd-article ol {
	margin: 0 0 20px;
	padding-left: 24px;
	color: var(--msd-ink);
}

.msd-article a {
	color: var(--msd-red);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.msd-article > :last-child,
.msd-article .elementor-widget-container > :last-child {
	margin-bottom: 0;
}

/* msd-article--section: a later text block in an article; adds the space above its heading. */
.msd-article--section h2:first-child {
	margin-top: clamp(20px, 3vw, 36px);
}

/* msd-photo-ultrawide: crops an Image widget to 21:9 with round corners (city page lead photo). */
.msd-photo-ultrawide,
.msd-photo-ultrawide .elementor-widget-container {
	width: 100%;
}

.elementor-widget-image.msd-photo-ultrawide img {
	display: block;
	width: 100%;
	border-radius: 20px;
	background-color: var(--msd-line);
	aspect-ratio: 21 / 9;
	object-fit: cover;
}

/* msd-photo-wide: crops an Image widget to 16:9 with round corners (article lead photo). */
.msd-photo-wide,
.msd-photo-wide .elementor-widget-container {
	width: 100%;
}

.elementor-widget-image.msd-photo-wide img {
	display: block;
	width: 100%;
	border-radius: 20px;
	background-color: var(--msd-line);
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

/* msd-sticky: a container (for example a sidebar) stays in view while its neighbour scrolls. Desktop only. */
@media (min-width: 980px) {

	.e-con.msd-sticky {
		position: sticky;
		top: 100px;
		align-self: flex-start;
	}
}

/* msd-form-card: the white rounded card around the contact form. */
.e-con.msd-form-card {
	border: 1px solid var(--msd-line);
	border-radius: clamp(24px, 3vw, 32px);
	background-color: var(--msd-white);
}

/* msd-photo-portrait: crops an Image widget to the design's 4:5 portrait with round corners. */
.msd-photo-portrait .elementor-widget-container,
.msd-photo-portrait {
	width: 100%;
}

.elementor-widget-image.msd-photo-portrait img {
	display: block;
	width: 100%;
	max-height: 680px;
	border-radius: var(--msd-r-xl);
	aspect-ratio: 4 / 5;
	object-fit: cover;
}

/* ==========================================================================
   7. Preloader (hidden unless the head script adds .msd-pre-on to <html>)
   ========================================================================== */

.msd-pre {
	display: none;
	position: fixed;
	z-index: 99999;
	inset: 0;
}

.msd-pre-on .msd-pre {
	display: block;
}

.msd-pre__door {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 50.5%;
	background: var(--msd-ink);
	transition: transform 0.7s cubic-bezier(0.77, 0, 0.18, 1);
}

.msd-pre__door--left {
	left: 0;
}

.msd-pre__door--right {
	right: 0;
}

.msd-pre.is-open {
	pointer-events: none;
}

.msd-pre.is-open .msd-pre__door--left {
	transform: translateX(-100%);
}

.msd-pre.is-open .msd-pre__door--right {
	transform: translateX(100%);
}

.msd-pre__center {
	display: flex;
	position: absolute;
	top: 50%;
	left: 50%;
	flex-direction: column;
	align-items: center;
	gap: 28px;
	transform: translate(-50%, -50%);
	transition: opacity 0.25s ease;
}

.msd-pre.is-open .msd-pre__center {
	opacity: 0;
}

.msd-pre__stage {
	position: relative;
	width: 260px;
	height: 120px;
}

.msd-pre .msd-pre__key {
	position: absolute;
	top: 40px;
	left: 36px;
	width: 150px;
	max-width: none;
	height: 40px;
	animation: msd-pre-in 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both, msd-pre-turn 0.32s 0.55s cubic-bezier(0.5, 0, 0.3, 1) forwards;
}

.msd-pre__plate {
	display: grid;
	position: absolute;
	top: 8px;
	left: 128px;
	width: 104px;
	height: 104px;
	border-radius: 50%;
	background: #26363e;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
	animation: msd-pre-glow 0.5s 0.85s ease-out forwards;
	place-items: center;
}

.msd-pre__hole {
	position: relative;
	width: 24px;
	height: 44px;
	animation: msd-pre-rotate 0.32s 0.55s cubic-bezier(0.5, 0, 0.3, 1) forwards;
}

.msd-pre__hole::before {
	position: absolute;
	top: 0;
	left: 0;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: #121a1e;
	content: "";
}

.msd-pre__hole::after {
	position: absolute;
	top: 16px;
	left: 4px;
	width: 16px;
	height: 28px;
	background: #121a1e;
	content: "";
	clip-path: polygon(30% 0, 70% 0, 100% 100%, 0 100%);
}

.msd-pre__text {
	color: var(--msd-footer-muted);
	font-family: var(--msd-font-heading);
	font-size: 13px;
	font-weight: 800;
	letter-spacing: 0.32em;
	text-transform: uppercase;
	white-space: nowrap;
	animation: msd-pre-text 0.5s 0.1s ease both;
}

.msd-pre__text b {
	color: var(--msd-pink);
}

@keyframes msd-pre-in {

	from {
		transform: translateX(-56px);
		opacity: 0;
	}

	to {
		transform: none;
		opacity: 1;
	}
}

@keyframes msd-pre-turn {

	to {
		transform: scaleY(0.22);
	}
}

@keyframes msd-pre-rotate {

	to {
		transform: rotate(90deg);
	}
}

@keyframes msd-pre-glow {

	0% {
		box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1), 0 0 0 0 rgba(255, 155, 155, 0.6);
	}

	100% {
		box-shadow: inset 0 0 0 2px #ff9b9b, 0 0 0 22px rgba(255, 155, 155, 0);
	}
}

@keyframes msd-pre-text {

	from {
		transform: translateY(6px);
		opacity: 0;
	}

	to {
		transform: none;
		opacity: 1;
	}
}

/* ==========================================================================
   8. Reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {

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