/* =========================================================================
   LensMotion — main.css
   Mobile-first. The Customizer injects :root overrides for the design tokens
   below via inc/customizer-css.php; the values here are sensible dark defaults.
   ========================================================================= */

/* -------------------------------------------------------------------------
   1. Design Tokens (CSS Custom Properties)
   ------------------------------------------------------------------------- */
:root {
	/* Color system — unified token set (Background / Surface / Text / Accent). */
	--lm-color-bg: #0a0a0a;
	--lm-color-surface: #141414;
	--lm-color-surface-2: #1e1e1e;
	--lm-color-text: #f4f4f5;
	--lm-color-muted: #a1a1aa;
	--lm-color-accent: #e11d48;
	--lm-color-accent-contrast: #ffffff;
	--lm-color-border: rgba(255, 255, 255, 0.08);

	/* Derived helpers. */
	--lm-overlay: rgba(0, 0, 0, 0.72);
	--lm-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);

	/* Typography. */
	--lm-font-heading: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--lm-font-body: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--lm-font-base-size: 18px;
	--lm-line-height: 1.65;

	/* Fluid type scale (clamp: min, preferred, max). */
	--lm-step--1: clamp(0.83rem, 0.78rem + 0.22vw, 0.94rem);
	--lm-step-0: clamp(1rem, 0.95rem + 0.25vw, 1.13rem);
	--lm-step-1: clamp(1.2rem, 1.1rem + 0.5vw, 1.5rem);
	--lm-step-2: clamp(1.44rem, 1.28rem + 0.8vw, 2rem);
	--lm-step-3: clamp(1.73rem, 1.48rem + 1.25vw, 2.66rem);
	--lm-step-4: clamp(2.07rem, 1.7rem + 1.85vw, 3.55rem);
	--lm-step-5: clamp(2.49rem, 1.95rem + 2.7vw, 4.74rem);

	/* Spacing & layout. */
	--lm-space-xs: 0.5rem;
	--lm-space-sm: 0.875rem;
	--lm-space-md: 1.5rem;
	--lm-space-lg: 2.5rem;
	--lm-space-xl: 4rem;
	--lm-container: 1280px;
	--lm-radius: 12px;
	--lm-header-height: 72px;

	/* Motion. */
	--lm-transition: 220ms ease;
}

/* -------------------------------------------------------------------------
   2. Modern reset (mobile-first)
   ------------------------------------------------------------------------- */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
	}
}

body {
	margin: 0;
	min-height: 100vh;
	background-color: var(--lm-color-bg);
	color: var(--lm-color-text);
	font-family: var(--lm-font-body);
	font-size: var(--lm-step-0);
	line-height: var(--lm-line-height);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

img,
picture,
video,
canvas,
svg {
	display: block;
	max-width: 100%;
	height: auto;
}

input,
button,
textarea,
select {
	font: inherit;
	color: inherit;
}

button {
	cursor: pointer;
}

a {
	color: var(--lm-color-accent);
	text-decoration: none;
	transition: color var(--lm-transition);
}

a:hover,
a:focus-visible {
	color: var(--lm-color-text);
}

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

h1, h2, h3, h4, h5, h6 {
	margin: 0 0 var(--lm-space-sm);
	font-family: var(--lm-font-heading);
	line-height: 1.15;
	font-weight: 700;
	letter-spacing: -0.01em;
}

h1 { font-size: var(--lm-step-4); }
h2 { font-size: var(--lm-step-3); }
h3 { font-size: var(--lm-step-2); }
h4 { font-size: var(--lm-step-1); }

p { margin: 0 0 var(--lm-space-md); }

ul, ol { margin: 0 0 var(--lm-space-md); padding-left: 1.25rem; }

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

.skip-link {
	position: absolute;
	left: -999px;
	top: 0;
	z-index: 1000;
	padding: var(--lm-space-sm) var(--lm-space-md);
	background: var(--lm-color-accent);
	color: var(--lm-color-accent-contrast);
	border-radius: 0 0 var(--lm-radius) 0;
}

.skip-link:focus {
	left: 0;
}

/* -------------------------------------------------------------------------
   4. Layout primitives
   ------------------------------------------------------------------------- */
.container {
	width: 100%;
	max-width: var(--lm-container);
	margin-inline: auto;
	padding-inline: var(--lm-space-md);
}

.site-main {
	padding-block: var(--lm-space-xl);
}

.section {
	padding-block: var(--lm-space-xl);
}

.section__title {
	font-size: var(--lm-step-3);
	margin-bottom: var(--lm-space-lg);
}

/* -------------------------------------------------------------------------
   5. Buttons
   ------------------------------------------------------------------------- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--lm-space-xs);
	padding: 0.85em 1.6em;
	border: 1px solid transparent;
	border-radius: var(--lm-radius);
	background: var(--lm-color-accent);
	color: var(--lm-color-accent-contrast);
	font-family: var(--lm-font-heading);
	font-weight: 600;
	letter-spacing: 0.02em;
	transition: transform var(--lm-transition), background var(--lm-transition), opacity var(--lm-transition);
}

.btn:hover,
.btn:focus-visible {
	color: var(--lm-color-accent-contrast);
	transform: translateY(-2px);
	opacity: 0.92;
}

.btn--ghost {
	background: transparent;
	border-color: var(--lm-color-border);
	color: var(--lm-color-text);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
	border-color: var(--lm-color-accent);
	color: var(--lm-color-text);
}

/* -------------------------------------------------------------------------
   6. Site Header  (Phase 3)
   ------------------------------------------------------------------------- */
.site-header {
	width: 100%;
	background: color-mix(in srgb, var(--lm-color-bg) 88%, transparent);
	backdrop-filter: saturate(140%) blur(10px);
	border-bottom: 1px solid var(--lm-color-border);
	z-index: 100;
}

.has-sticky-header .site-header {
	position: sticky;
	top: 0;
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--lm-space-md);
	min-height: var(--lm-header-height);
}

.site-branding {
	display: flex;
	align-items: center;
	gap: var(--lm-space-sm);
}

.site-title {
	margin: 0;
	font-size: var(--lm-step-1);
}

.site-title a {
	color: var(--lm-color-text);
}

.custom-logo {
	max-height: 48px;
	width: auto;
}

/* Primary nav */
.primary-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: var(--lm-space-md);
}

.primary-nav a {
	color: var(--lm-color-text);
	font-family: var(--lm-font-heading);
	font-weight: 500;
	padding-block: var(--lm-space-xs);
	position: relative;
}

.primary-nav a::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 0;
	height: 2px;
	background: var(--lm-color-accent);
	transition: width var(--lm-transition);
}

.primary-nav a:hover::after,
.primary-nav .current-menu-item > a::after {
	width: 100%;
}

/* Hamburger toggle */
.menu-toggle {
	display: inline-flex;
	flex-direction: column;
	gap: 5px;
	width: 44px;
	height: 44px;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: 1px solid var(--lm-color-border);
	border-radius: var(--lm-radius);
}

.menu-toggle span {
	display: block;
	width: 22px;
	height: 2px;
	background: var(--lm-color-text);
	transition: transform var(--lm-transition), opacity var(--lm-transition);
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}
.menu-toggle[aria-expanded="true"] span:nth-child(2) {
	opacity: 0;
}
.menu-toggle[aria-expanded="true"] span:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

/* Mobile-first: nav hidden behind toggle */
.menu-toggle {
	display: inline-flex;
}

.primary-nav {
	position: fixed;
	inset: var(--lm-header-height) 0 auto 0;
	background: var(--lm-color-surface);
	border-bottom: 1px solid var(--lm-color-border);
	transform: translateY(-120%);
	transition: transform var(--lm-transition);
	max-height: calc(100vh - var(--lm-header-height));
	overflow-y: auto;
}

.primary-nav.is-open {
	transform: translateY(0);
}

.primary-nav ul {
	flex-direction: column;
	padding: var(--lm-space-md);
	gap: var(--lm-space-sm);
}

/* Submenu / dropdown (category list under Portfolio).
   Mobile-first: rendered inline & indented beneath the parent. */
.primary-nav .sub-menu {
	list-style: none;
	margin: var(--lm-space-xs) 0 0;
	padding: 0 0 0 var(--lm-space-md);
	display: flex;
	flex-direction: column;
	gap: var(--lm-space-xs);
	border-left: 2px solid var(--lm-color-border);
}

.primary-nav .sub-menu a {
	color: var(--lm-color-muted);
	font-weight: 400;
}

.primary-nav .sub-menu a:hover {
	color: var(--lm-color-text);
}

/* -------------------------------------------------------------------------
   7. Footer  (Phase 3)
   ------------------------------------------------------------------------- */
.site-footer {
	background: var(--lm-color-surface);
	border-top: 1px solid var(--lm-color-border);
	padding-block: var(--lm-space-xl) var(--lm-space-lg);
	margin-top: var(--lm-space-xl);
}

.site-footer__inner {
	display: grid;
	gap: var(--lm-space-lg);
	text-align: center;
}

.social-links {
	display: flex;
	gap: var(--lm-space-md);
	justify-content: center;
	list-style: none;
	margin: 0;
	padding: 0;
}

.social-links a {
	display: inline-flex;
	width: 44px;
	height: 44px;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--lm-color-border);
	border-radius: 50%;
	color: var(--lm-color-text);
	transition: border-color var(--lm-transition), color var(--lm-transition), transform var(--lm-transition);
}

.social-links a:hover {
	border-color: var(--lm-color-accent);
	color: var(--lm-color-accent);
	transform: translateY(-2px);
}

.social-links svg {
	width: 20px;
	height: 20px;
	fill: currentColor;
}

.site-footer__copy {
	color: var(--lm-color-muted);
	font-size: var(--lm-step--1);
}

/* -------------------------------------------------------------------------
   8. Hero  (Phase 3 — front-page)
   ------------------------------------------------------------------------- */
.hero {
	position: relative;
	min-height: calc(100svh - var(--lm-header-height));
	display: grid;
	place-items: center;
	text-align: center;
	overflow: hidden;
	isolation: isolate;
}

.hero__media,
.hero__media video,
.hero__media img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	z-index: -2;
}

.hero::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0,0,0,0.35), rgba(0,0,0,0.75));
	z-index: -1;
}

.hero__content {
	position: relative;
	padding: var(--lm-space-lg);
	max-width: 820px;
}

/* Optional decorative sketch. Absolutely positioned in the empty space above
   the title so it never pushes the text down. */
.hero__sketch {
	position: absolute;
	left: 50%;
	bottom: 100%;
	transform: translateX(-50%);
	width: clamp(140px, 26vw, 300px);
	margin-bottom: var(--lm-space-sm);
	pointer-events: none;
	line-height: 0;
}

.hero__sketch img,
.hero__sketch svg {
	width: 100%;
	height: auto;
	display: block;
}

.hero__title {
	font-size: var(--lm-step-5);
	margin-bottom: var(--lm-space-md);
}

.hero__subtitle {
	font-size: var(--lm-step-1);
	color: var(--lm-color-muted);
	margin-bottom: var(--lm-space-lg);
}

/* Homepage category buttons. */
.hero__cats {
	display: flex;
	flex-wrap: wrap;
	gap: var(--lm-space-sm);
	justify-content: center;
}

.hero__cat {
	background: var(--lm-hero-cat-bg, transparent);
	border-color: var(--lm-hero-cat-bg, var(--lm-color-border));
	color: var(--lm-hero-cat-text, var(--lm-color-text));
	backdrop-filter: blur(4px);
}

.hero__cat:hover,
.hero__cat:focus-visible {
	background: var(--lm-hero-cat-bg, transparent);
	border-color: var(--lm-color-accent);
	color: var(--lm-hero-cat-text, var(--lm-color-text));
	opacity: 0.92;
}

/* -------------------------------------------------------------------------
   9. Portfolio  (Phase 4)
   ------------------------------------------------------------------------- */
.portfolio-filters {
	display: flex;
	flex-wrap: wrap;
	gap: var(--lm-space-sm);
	justify-content: center;
	margin-bottom: var(--lm-space-lg);
}

.filter-btn {
	padding: 0.5em 1.1em;
	background: var(--lm-color-surface);
	border: 1px solid var(--lm-color-border);
	border-radius: 999px;
	color: var(--lm-color-muted);
	font-family: var(--lm-font-heading);
	font-size: var(--lm-step--1);
	transition: all var(--lm-transition);
}

.filter-btn:hover {
	color: var(--lm-color-text);
	border-color: var(--lm-color-accent);
}

.filter-btn.is-active {
	background: var(--lm-color-accent);
	border-color: var(--lm-color-accent);
	color: var(--lm-color-accent-contrast);
}

/* Grouped portfolio sections (one per category). */
.portfolio-group {
	margin-bottom: var(--lm-space-xl);
	scroll-margin-top: calc(var(--lm-header-height) + var(--lm-space-md));
}

.portfolio-group.is-hidden {
	display: none;
}

.portfolio-group__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--lm-space-md);
	margin-bottom: var(--lm-space-md);
	padding-bottom: var(--lm-space-sm);
	border-bottom: 1px solid var(--lm-color-border);
}

.portfolio-group__title {
	margin: 0;
	font-size: var(--lm-step-2);
}

.portfolio-group__link {
	flex: 0 0 auto;
	font-family: var(--lm-font-heading);
	font-size: var(--lm-step--1);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--lm-color-muted);
}

.portfolio-group__link:hover {
	color: var(--lm-color-accent);
}

.portfolio-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--lm-space-md);
}

.video-card {
	position: relative;
	background: var(--lm-color-surface);
	border-radius: 0;
	overflow: hidden;
	transition: transform var(--lm-transition), box-shadow var(--lm-transition);
}

.video-card.is-hidden {
	display: none;
}

.video-card:hover,
.video-card:focus-within {
	transform: translateY(-4px);
	box-shadow: var(--lm-shadow);
}

/* The clickable thumbnail (button) that plays the video in place. */
.video-card__trigger {
	display: block;
	width: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	cursor: pointer;
}

/* An explicit display value overrides the HTML [hidden] attribute, so the
   trigger/player must opt back in to being hidden when swapped by the player JS. */
.video-card__trigger[hidden],
.video-card__player[hidden] {
	display: none;
}

.video-card__media {
	display: block;
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: var(--lm-color-surface-2);
	overflow: hidden;
}

/* Height fallback for browsers without aspect-ratio support. */
.video-card__media::after {
	content: "";
	display: block;
	padding-top: 56.25%;
}

@supports (aspect-ratio: 16 / 9) {
	.video-card__media::after {
		display: none;
	}
}

.video-card__media img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Orientation-aware shapes (Instagram/Reels portrait, square, default 16:9).
   Vertical/square clips are centred and width-capped so they stay tidy in the
   2-column grid. */
.video-card--portrait .video-card__media,
.video-card--portrait .video-card__player {
	max-width: 360px;
	margin-inline: auto;
}

.video-card--portrait .video-card__media {
	aspect-ratio: 9 / 16;
}

.video-card--portrait .video-card__media::after {
	padding-top: 177.78%;
}

.video-card--square .video-card__media,
.video-card--square .video-card__player {
	max-width: 480px;
	margin-inline: auto;
}

.video-card--square .video-card__media {
	aspect-ratio: 1 / 1;
}

.video-card--square .video-card__media::after {
	padding-top: 100%;
}

.video-card__play {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: grid;
	place-items: center;
	background: linear-gradient(0deg, rgba(0,0,0,0.45), rgba(0,0,0,0.05));
	opacity: 0.85;
	transition: opacity var(--lm-transition);
}

.video-card__trigger:hover .video-card__play,
.video-card__trigger:focus-visible .video-card__play {
	opacity: 1;
}

.video-card__play svg {
	transition: transform var(--lm-transition);
}

.video-card__trigger:hover .video-card__play svg {
	transform: scale(1.1);
}

.video-card__play svg {
	width: 56px;
	height: 56px;
	fill: var(--lm-color-accent-contrast);
	filter: drop-shadow(0 2px 8px rgba(0,0,0,0.6));
}

/* The in-place player container (revealed on click). */
.video-card__player {
	width: 100%;
}

.video-card__body {
	padding: var(--lm-space-md);
}

.video-card__title {
	font-size: var(--lm-step-1);
	margin: 0 0 0.25rem;
}

.video-card__cat {
	color: var(--lm-color-muted);
	font-size: var(--lm-step--1);
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.portfolio-empty {
	text-align: center;
	color: var(--lm-color-muted);
	padding-block: var(--lm-space-xl);
}

/* -------------------------------------------------------------------------
   10. Video Modal  (Phase 5)
   ------------------------------------------------------------------------- */
.lm-modal {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: none;
	align-items: center;
	justify-content: center;
	padding: var(--lm-space-md);
	background: var(--lm-overlay);
}

.lm-modal.is-open {
	display: flex;
}

.lm-modal__dialog {
	position: relative;
	width: min(1100px, 100%);
	max-height: 90vh;
	overflow-y: auto;
	background: var(--lm-color-surface);
	border-radius: var(--lm-radius);
	box-shadow: var(--lm-shadow);
}

.lm-video {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #000;
	overflow: hidden;
}

/* Height fallback for browsers/WebViews without aspect-ratio support, so the
   video never collapses to zero height (which would play audio but show no
   picture). Disabled where aspect-ratio is supported. */
.lm-video::before {
	content: "";
	display: block;
	padding-top: 56.25%;
}

@supports (aspect-ratio: 16 / 9) {
	.lm-video::before {
		display: none;
	}
}

/* Player shapes that mirror the card orientation. */
.lm-video--portrait {
	aspect-ratio: 9 / 16;
}

.lm-video--portrait::before {
	padding-top: 177.78%;
}

.lm-video--square {
	aspect-ratio: 1 / 1;
}

.lm-video--square::before {
	padding-top: 100%;
}

.lm-video__frame,
.lm-video > iframe,
.lm-video > video {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: 0;
	object-fit: contain;
	background: #000;
}

.lm-modal__body {
	padding: var(--lm-space-lg);
}

.lm-modal__title {
	font-size: var(--lm-step-2);
	margin-bottom: var(--lm-space-sm);
}

.lm-modal__story {
	color: var(--lm-color-muted);
}

.lm-modal__close {
	position: absolute;
	top: var(--lm-space-sm);
	right: var(--lm-space-sm);
	z-index: 2;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 0;
	background: rgba(0, 0, 0, 0.6);
	color: #fff;
	font-size: 1.5rem;
	line-height: 1;
}

.lm-modal__close:hover {
	background: var(--lm-color-accent);
}

/* -------------------------------------------------------------------------
   11. Forms / Contact  (Phase 3 + 5)
   ------------------------------------------------------------------------- */
.contact-layout {
	display: grid;
	gap: var(--lm-space-xl);
}

.form-field {
	margin-bottom: var(--lm-space-md);
}

.form-field label {
	display: block;
	margin-bottom: var(--lm-space-xs);
	font-family: var(--lm-font-heading);
	font-weight: 500;
}

.form-field input,
.form-field textarea {
	width: 100%;
	padding: 0.8em 1em;
	background: var(--lm-color-surface);
	border: 1px solid var(--lm-color-border);
	border-radius: var(--lm-radius);
	transition: border-color var(--lm-transition);
}

.form-field input:focus,
.form-field textarea:focus {
	border-color: var(--lm-color-accent);
	outline: none;
}

.form-field textarea {
	min-height: 140px;
	resize: vertical;
}

.form-field.has-error input,
.form-field.has-error textarea {
	border-color: #f87171;
}

.field-error {
	display: block;
	margin-top: var(--lm-space-xs);
	color: #f87171;
	font-size: var(--lm-step--1);
	min-height: 1.2em;
}

.form-status {
	margin-top: var(--lm-space-md);
	padding: var(--lm-space-sm) var(--lm-space-md);
	border-radius: var(--lm-radius);
	display: none;
}

.form-status.is-success {
	display: block;
	background: rgba(34, 197, 94, 0.12);
	color: #4ade80;
}

.form-status.is-error {
	display: block;
	background: rgba(248, 113, 113, 0.12);
	color: #f87171;
}

.contact-details {
	display: grid;
	gap: var(--lm-space-md);
	align-content: start;
}

.contact-details__photo img {
	border-radius: var(--lm-radius);
	width: 100%;
}

.contact-detail {
	display: flex;
	align-items: center;
	gap: var(--lm-space-sm);
	color: var(--lm-color-text);
}

.contact-detail svg {
	width: 22px;
	height: 22px;
	fill: var(--lm-color-accent);
	flex: 0 0 auto;
}

/* -------------------------------------------------------------------------
   12. About page  (Phase 3)
   ------------------------------------------------------------------------- */
.about-layout {
	display: grid;
	gap: var(--lm-space-lg);
	align-items: center;
}

.about-layout__media img {
	border-radius: var(--lm-radius);
	width: 100%;
}

/* Post list (index/archive) */
.post-list {
	display: grid;
	gap: var(--lm-space-lg);
}

.post-card__media img {
	border-radius: var(--lm-radius);
}

.page-header {
	margin-bottom: var(--lm-space-lg);
}

/* No-JS fallback: show nav inline if JS is disabled */
.no-js .primary-nav {
	position: static;
	transform: none;
	background: transparent;
	border: 0;
}

.no-js .menu-toggle {
	display: none;
}

/* =========================================================================
   13. Responsive — progressive enhancement upward (mobile-first)
   ========================================================================= */
@media (min-width: 680px) {
	.portfolio-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: var(--lm-space-lg);
	}
}

@media (min-width: 768px) {
	.about-layout {
		grid-template-columns: 1fr 1fr;
	}

	.contact-layout {
		grid-template-columns: 3fr 2fr;
	}

	.site-footer__inner {
		gap: var(--lm-space-md);
	}
}

@media (min-width: 1024px) {
	/* Desktop nav: reveal inline, hide hamburger. */
	.menu-toggle {
		display: none;
	}

	.primary-nav {
		position: static;
		transform: none;
		background: transparent;
		border: 0;
		max-height: none;
		overflow: visible;
	}

	.primary-nav ul {
		flex-direction: row;
		padding: 0;
		gap: var(--lm-space-md);
	}

	/* Desktop dropdown: absolutely positioned, revealed on hover/focus. */
	.primary-nav .menu-item-has-children {
		position: relative;
	}

	.primary-nav .sub-menu {
		position: absolute;
		top: 100%;
		left: 0;
		min-width: 220px;
		margin: 0;
		padding: var(--lm-space-sm);
		background: var(--lm-color-surface);
		border: 1px solid var(--lm-color-border);
		border-radius: var(--lm-radius);
		box-shadow: var(--lm-shadow);
		opacity: 0;
		visibility: hidden;
		transform: translateY(8px);
		transition: opacity var(--lm-transition), transform var(--lm-transition), visibility var(--lm-transition);
		z-index: 120;
	}

	/* Bridge the gap so the menu doesn't close between trigger and dropdown. */
	.primary-nav .menu-item-has-children::after {
		content: "";
		position: absolute;
		top: 100%;
		left: 0;
		width: 100%;
		height: var(--lm-space-sm);
	}

	.primary-nav .menu-item-has-children:hover > .sub-menu,
	.primary-nav .menu-item-has-children:focus-within > .sub-menu {
		opacity: 1;
		visibility: visible;
		transform: translateY(4px);
	}

	.primary-nav .sub-menu a::after {
		display: none; /* No underline animation inside the dropdown. */
	}
}
