/**
 * Salemnus main stylesheet.
 *
 * Colors and fonts come from --sal-* variables (printed inline by
 * inc/enqueue.php). Each one reads the matching Elementor global first.
 * Element defaults use :where() so they have zero specificity and any
 * Elementor style control always wins.
 */

/* ---------- Fallback tokens (overridden inline) ---------- */
:root {
	--sal-primary: #C9A86A;
	--sal-secondary: #3FB8A6;
	--sal-text: #E8ECF4;
	--sal-muted: #8C97AE;
	--sal-bg: #0A1020;
	--sal-surface: #111A2E;
	--sal-border: #22304D;
	--sal-on-primary: #0A1020;
	--sal-font-heading: Georgia, serif;
	--sal-font-body: system-ui, sans-serif;
	--sal-heading-weight: 600;
	--sal-heading-case: none;
	--sal-radius: 6px;
	--sal-container: 1320px;
	--sal-base: 17px;
	--sal-gutter: clamp(16px, 4vw, 40px);
	--sal-section: clamp(64px, 9vw, 128px);
	--sal-ease: cubic-bezier(.22, 1, .36, 1);
	--sal-header-h: 84px;
	color-scheme: dark;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--sal-header-h) + 16px); }
body {
	margin: 0;
	background: var(--sal-bg);
	color: var(--sal-text);
	font-family: var(--sal-font-body);
	font-size: var(--sal-base);
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
	overflow-x: hidden;
}
:where(img, svg, video, canvas, iframe) { max-width: 100%; height: auto; }
:where(img) { display: block; }
:where(figure) { margin: 0; }
:where(p, ul, ol, dl, blockquote, pre, table) { margin: 0 0 1.2em; }

/* ---------- Typography ---------- */
:where(h1, h2, h3, h4, h5, h6) {
	font-family: var(--sal-font-heading);
	font-weight: var(--sal-heading-weight);
	text-transform: var(--sal-heading-case);
	color: var(--sal-text);
	line-height: 1.08;
	letter-spacing: -.02em;
	margin: 0 0 .5em;
	text-wrap: balance;
}
:where(h1) { font-size: clamp(2.6rem, 6vw, 5rem); }
:where(h2) { font-size: clamp(2rem, 4.2vw, 3.4rem); }
:where(h3) { font-size: clamp(1.45rem, 2.6vw, 2.1rem); }
:where(h4) { font-size: 1.35rem; }
:where(h5) { font-size: 1.12rem; }
:where(h6) { font-size: 1rem; letter-spacing: 0; }
:where(a) { color: var(--sal-primary); text-underline-offset: .2em; text-decoration-thickness: 1px; transition: color .2s ease; }
:where(a:hover) { color: var(--sal-text); }
:where(strong, b) { font-weight: 600; }
:where(small) { font-size: .85em; }
:where(hr) { border: 0; border-top: 1px solid var(--sal-border); margin: 2.5em 0; }
:where(blockquote) {
	border-left: 2px solid var(--sal-primary);
	padding: .3em 0 .3em 1.4em;
	font-family: var(--sal-font-heading);
	font-size: 1.35em;
	line-height: 1.4;
	color: var(--sal-text);
}
:where(code, kbd, pre) { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: .9em; }
:where(pre) { background: var(--sal-surface); border: 1px solid var(--sal-border); border-radius: var(--sal-radius); padding: 1.2em; overflow-x: auto; }
:where(:not(pre) > code) { background: var(--sal-surface); padding: .15em .4em; border-radius: 4px; }
:where(table) { width: 100%; border-collapse: collapse; }
:where(th, td) { padding: .8em 1em; border-bottom: 1px solid var(--sal-border); text-align: left; }
:where(th) { font-weight: 600; color: var(--sal-text); }
::selection { background: var(--sal-primary); color: var(--sal-on-primary); }

:focus-visible { outline: 2px solid var(--sal-primary); outline-offset: 3px; }
[hidden] { display: none !important; }

.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;
}
.sal-skip-link {
	position: absolute; left: 16px; top: -100px; z-index: 1000;
	background: var(--sal-primary); color: var(--sal-on-primary);
	padding: 10px 16px; border-radius: var(--sal-radius); font-weight: 600; text-decoration: none;
}
.sal-skip-link:focus { top: 16px; }

/* ---------- Layout helpers ---------- */
.sal-container {
	width: 100%;
	max-width: calc(var(--sal-container) + var(--sal-gutter) * 2);
	margin-inline: auto;
	padding-inline: var(--sal-gutter);
}
.sal-section { padding-block: var(--sal-section); }
.sal-eyebrow {
	display: inline-block;
	font-family: var(--sal-font-body);
	font-size: .78rem;
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--sal-primary);
	margin: 0 0 1em;
}

.sal-layout { display: grid; gap: clamp(32px, 5vw, 64px); }
.sal-layout.has-sidebar { grid-template-columns: minmax(0, 1fr) 320px; }
.sal-layout.has-sidebar.sidebar-left { grid-template-columns: 300px minmax(0, 1fr); }
.sal-layout.sidebar-left .sal-sidebar { order: -1; }
.sal-layout__main { min-width: 0; }

/* ---------- Buttons & forms ---------- */
.sal-btn,
:where(button[type="submit"], input[type="submit"], .wp-element-button, .wp-block-button__link) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .5em;
	font-family: var(--sal-font-body);
	font-size: .95rem;
	font-weight: 600;
	line-height: 1;
	padding: 1em 1.6em;
	border-radius: var(--sal-radius);
	border: 1px solid transparent;
	background: var(--sal-primary);
	color: var(--sal-on-primary);
	text-decoration: none;
	cursor: pointer;
	transition: transform .3s var(--sal-ease), background-color .2s ease, color .2s ease, border-color .2s ease;
}
.sal-btn:hover,
:where(button[type="submit"], input[type="submit"], .wp-element-button, .wp-block-button__link):hover {
	transform: translateY(-2px);
	color: var(--sal-on-primary);
	background: color-mix(in srgb, var(--sal-primary) 85%, #fff);
}
.sal-btn--ghost { background: transparent; color: var(--sal-text); border-color: var(--sal-border); }
.sal-btn--ghost:hover { background: transparent; color: var(--sal-text); border-color: var(--sal-text); }

:where(input:not([type="checkbox"], [type="radio"], [type="submit"], [type="button"], [type="range"]), select, textarea) {
	width: 100%;
	font: inherit;
	font-size: 1rem;
	color: var(--sal-text);
	background: var(--sal-surface);
	border: 1px solid var(--sal-border);
	border-radius: var(--sal-radius);
	padding: .85em 1em;
	transition: border-color .2s ease, box-shadow .2s ease;
}
:where(input, select, textarea):focus { outline: none; border-color: var(--sal-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sal-primary) 25%, transparent); }
:where(textarea) { min-height: 140px; resize: vertical; }
:where(label) { display: inline-block; font-size: .9rem; font-weight: 500; margin-bottom: .4em; }
::placeholder { color: var(--sal-muted); opacity: 1; }
:where(input[type="checkbox"], input[type="radio"]) { accent-color: var(--sal-primary); }

.sal-search-form { display: flex; gap: 8px; max-width: 560px; }
.sal-search-form__input { flex: 1; min-width: 0; }

.sal-icon-btn {
	position: relative;
	display: inline-grid;
	place-items: center;
	width: 42px;
	height: 42px;
	padding: 0;
	border-radius: 50%;
	border: 1px solid var(--sal-border);
	background: transparent;
	color: var(--sal-text);
	cursor: pointer;
	transition: border-color .2s ease, background-color .2s ease;
}
.sal-icon-btn:hover { border-color: var(--sal-text); color: var(--sal-text); transform: none; background: transparent; }
.sal-icon { display: block; }

.sal-link-arrow {
	display: inline-flex; align-items: center; gap: .5em;
	font-weight: 600; font-size: .92rem; text-decoration: none; color: var(--sal-text);
}
.sal-link-arrow .sal-icon { transition: transform .3s var(--sal-ease); width: 18px; }
.sal-link-arrow:hover { color: var(--sal-primary); }
.sal-link-arrow:hover .sal-icon { transform: translateX(4px); }

/* ---------- Header ---------- */
.sal-header {
	position: relative;
	z-index: 100;
	padding: 16px var(--sal-gutter);
	transition: padding .4s var(--sal-ease), background-color .3s ease;
}
.sal-header-overlay .sal-header { position: absolute; inset: 0 0 auto; }
.sal-header.is-sticky { position: sticky; top: 0; }
.sal-header-overlay .sal-header.is-sticky { position: fixed; }
.admin-bar .sal-header.is-sticky { top: 32px; }
@media (max-width: 782px) { .admin-bar .sal-header.is-sticky { top: 46px; } }

.sal-header__bar {
	max-width: var(--sal-container);
	margin-inline: auto;
	display: flex;
	align-items: center;
	gap: 24px;
	min-height: 64px;
	transition: all .4s var(--sal-ease);
}

/* Floating pill style */
.sal-header-floating .sal-header__bar {
	padding: 10px 10px 10px 24px;
	border-radius: 999px;
	border: 1px solid color-mix(in srgb, var(--sal-border) 80%, transparent);
	background: color-mix(in srgb, var(--sal-surface) 72%, transparent);
	-webkit-backdrop-filter: blur(16px) saturate(1.4);
	backdrop-filter: blur(16px) saturate(1.4);
}
.sal-header-floating .sal-header.is-scrolled .sal-header__bar { max-width: min(var(--sal-container), 1080px); box-shadow: 0 18px 50px -24px rgba(0, 0, 0, .7); }

/* Classic style */
.sal-header-classic .sal-header { border-bottom: 1px solid var(--sal-border); }
.sal-header-classic .sal-header.is-scrolled { background: color-mix(in srgb, var(--sal-bg) 88%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); padding-block: 6px; }

/* Centered logo style */
.sal-header-centered .sal-header__bar { display: grid; grid-template-columns: 1fr auto 1fr; }
.sal-header-centered .sal-brand { grid-column: 2; grid-row: 1; justify-self: center; }
.sal-header-centered .sal-nav { grid-column: 1; grid-row: 1; }
.sal-header-centered .sal-header__actions { grid-column: 3; grid-row: 1; justify-self: end; }
.sal-header-centered .sal-header.is-scrolled { background: color-mix(in srgb, var(--sal-bg) 88%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }

.sal-brand { flex: none; display: flex; align-items: center; }
.sal-brand img, .sal-brand .custom-logo { max-height: 44px; width: auto; }
.sal-brand__name {
	font-family: var(--sal-font-heading);
	font-weight: var(--sal-heading-weight);
	text-transform: var(--sal-heading-case);
	font-size: 1.35rem;
	letter-spacing: -.02em;
	color: var(--sal-text);
	text-decoration: none;
}

.sal-nav { flex: 1; display: flex; justify-content: center; }
.sal-menu { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; }
.sal-menu li { position: relative; margin: 0; }
.sal-menu a {
	display: flex; align-items: center; gap: 4px;
	padding: 10px 14px;
	font-size: .93rem; font-weight: 500;
	color: var(--sal-muted);
	text-decoration: none;
	border-radius: 999px;
	transition: color .2s ease, background-color .2s ease;
}
.sal-menu a:hover,
.sal-menu .current-menu-item > a,
.sal-menu .current-menu-ancestor > a { color: var(--sal-text); }
.sal-menu .current-menu-item > a { background: color-mix(in srgb, var(--sal-text) 7%, transparent); }
.sal-menu .menu-item-has-children > a::after {
	content: ""; width: 6px; height: 6px; margin-left: 4px;
	border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
	transform: translateY(-2px) rotate(45deg);
}

/* Dropdowns */
.sal-menu .sub-menu {
	position: absolute; top: calc(100% + 10px); left: 0;
	min-width: 230px;
	list-style: none; margin: 0; padding: 8px;
	background: var(--sal-surface);
	border: 1px solid var(--sal-border);
	border-radius: max(10px, min(var(--sal-radius), 18px));
	box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .75);
	opacity: 0; visibility: hidden; transform: translateY(8px);
	transition: opacity .25s ease, transform .3s var(--sal-ease), visibility .25s;
}
.sal-menu .sub-menu::before { content: ""; position: absolute; inset: -12px 0 auto; height: 12px; }
.sal-menu .sub-menu .sub-menu { top: -8px; left: calc(100% + 8px); }
.sal-menu .sub-menu a { border-radius: 8px; padding: 10px 12px; }
.sal-menu .sub-menu a:hover { background: color-mix(in srgb, var(--sal-text) 6%, transparent); }
.sal-menu li:hover > .sub-menu,
.sal-menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }

.sal-header__actions { flex: none; display: flex; align-items: center; gap: 8px; margin-left: auto; }
.sal-header__cta { padding: .85em 1.3em; }
.sal-header-floating .sal-header__cta { border-radius: 999px; }
.sal-nav__cta-mobile { display: none; }

.sal-cart-count {
	position: absolute; top: -4px; right: -4px;
	min-width: 18px; height: 18px; padding: 0 5px;
	border-radius: 999px;
	background: var(--sal-primary); color: var(--sal-on-primary);
	font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}
.sal-cart-count[data-count="0"] { display: none; }

.sal-burger {
	display: none;
	width: 44px; height: 44px; padding: 0;
	border-radius: 50%;
	border: 1px solid var(--sal-border);
	background: transparent;
	cursor: pointer;
	position: relative;
}
.sal-burger:hover { transform: none; background: transparent; }
.sal-burger span {
	position: absolute; left: 13px; right: 13px; height: 1.5px;
	background: var(--sal-text);
	transition: transform .35s var(--sal-ease), top .35s var(--sal-ease);
}
.sal-burger span:first-child { top: 17px; }
.sal-burger span:last-child { top: 25px; }
.sal-burger[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.sal-burger[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }

@media (max-width: 1024px) {
	.sal-burger { display: inline-block; }
	.sal-header__cta { display: none; }
	.sal-header-centered .sal-header__bar { display: flex; }
	.sal-nav {
		position: fixed; inset: 0; z-index: -1;
		display: flex; flex-direction: column; justify-content: flex-start; gap: 24px;
		padding: calc(var(--sal-header-h) + 40px) var(--sal-gutter) 40px;
		background: var(--sal-bg);
		overflow-y: auto;
		opacity: 0; visibility: hidden;
		clip-path: inset(0 0 100% 0);
		transition: clip-path .6s var(--sal-ease), opacity .3s ease, visibility .6s;
	}
	.sal-nav.is-open { opacity: 1; visibility: visible; clip-path: inset(0 0 0 0); }
	.sal-nav .sal-menu { flex-direction: column; align-items: stretch; gap: 0; }
	.sal-nav .sal-menu > li { border-bottom: 1px solid var(--sal-border); }
	.sal-nav .sal-menu > li > a {
		font-family: var(--sal-font-heading); font-weight: var(--sal-heading-weight); text-transform: var(--sal-heading-case);
		font-size: clamp(1.6rem, 6vw, 2.4rem); color: var(--sal-text);
		padding: 16px 0; border-radius: 0; background: none;
	}
	.sal-nav .sub-menu {
		position: static; opacity: 1; visibility: visible; transform: none;
		background: none; border: 0; box-shadow: none; padding: 0 0 12px 12px; display: none;
	}
	.sal-nav .sub-menu::before { display: none; }
	.sal-nav li.is-open > .sub-menu { display: block; }
	.sal-nav .sal-nav__cta-mobile { display: inline-flex; align-self: flex-start; }
	.sal-header-floating .sal-header__bar { padding-left: 18px; }
	body.sal-menu-open { overflow: hidden; }
}

/* Search overlay */
.sal-search-overlay {
	position: fixed; inset: 0; z-index: 200;
	display: grid; align-items: center;
	background: color-mix(in srgb, var(--sal-bg) 94%, transparent);
	-webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
	animation: sal-fade .3s ease;
}
.sal-search-overlay .sal-container { position: relative; display: grid; justify-items: center; }
.sal-search-overlay .sal-search-form { width: 100%; max-width: 720px; }
.sal-search-overlay .sal-search-form__input { font-size: 1.4rem; padding: 1em 1.2em; }
.sal-search-overlay__close { position: absolute; top: -80px; right: var(--sal-gutter); }
@keyframes sal-fade { from { opacity: 0; } }

/* ---------- Page hero (non-Elementor pages) ---------- */
.sal-page-hero {
	position: relative;
	padding: calc(var(--sal-header-h) + clamp(56px, 8vw, 110px)) 0 clamp(48px, 6vw, 80px);
	border-bottom: 1px solid var(--sal-border);
	background:
		radial-gradient(60% 120% at 85% 0%, color-mix(in srgb, var(--sal-primary) 14%, transparent), transparent 70%),
		var(--sal-bg);
	overflow: hidden;
}
.sal-page-hero__title { margin: 0; max-width: 18ch; font-size: clamp(2.6rem, 6.5vw, 5.4rem); }
.sal-page-hero__desc { color: var(--sal-muted); max-width: 60ch; margin-top: 1.2em; }
.sal-page-hero__desc p:last-child { margin: 0; }
.sal-breadcrumbs { display: flex; flex-wrap: wrap; gap: 10px; font-size: .85rem; color: var(--sal-muted); margin-bottom: 28px; }
.sal-breadcrumbs a { color: var(--sal-muted); text-decoration: none; }
.sal-breadcrumbs a:hover { color: var(--sal-text); }
.sal-breadcrumbs [aria-current] { color: var(--sal-text); }

/* Elementor pages: no hero, no theme padding. Overlay header sits on top. */
.sal-elementor-page .sal-main > .elementor { margin: 0; }

/* ---------- Posts ---------- */
.sal-posts { display: grid; gap: clamp(24px, 3vw, 36px); }
.sal-posts--grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.sal-no-sidebar .sal-posts--grid,
.sal-layout:not(.has-sidebar) .sal-posts--grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.sal-posts--list .sal-card { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); align-items: center; }
.sal-posts--list .sal-card__media { aspect-ratio: 4 / 3; }

.sal-card {
	display: flex; flex-direction: column;
	background: var(--sal-surface);
	border: 1px solid var(--sal-border);
	border-radius: max(var(--sal-radius), 0px);
	overflow: hidden;
	transition: border-color .3s ease, transform .5s var(--sal-ease);
}
.sal-card:hover { border-color: color-mix(in srgb, var(--sal-primary) 50%, var(--sal-border)); transform: translateY(-4px); }
.sal-card__media { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--sal-border); }
.sal-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--sal-ease); }
.sal-card:hover .sal-card__media img { transform: scale(1.05); }
.sal-card__body { padding: clamp(20px, 2.4vw, 30px); display: flex; flex-direction: column; gap: 12px; flex: 1; }
.sal-card__title { font-size: clamp(1.25rem, 1.8vw, 1.55rem); margin: 0; line-height: 1.2; }
.sal-card__title a { color: var(--sal-text); text-decoration: none; }
.sal-card__title a:hover { color: var(--sal-primary); }
.sal-card__excerpt { color: var(--sal-muted); font-size: .96rem; margin: 0; flex: 1; }
.sal-card.sticky { border-color: var(--sal-primary); }

.sal-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: .82rem; color: var(--sal-muted); }
.sal-meta a { color: inherit; text-decoration: none; }
.sal-meta__cat { color: var(--sal-primary) !important; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; font-size: .76rem; }
.sal-meta__dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .6; }

.sal-pagination { margin-top: 56px; }
.sal-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.sal-pagination .page-numbers {
	min-width: 46px; height: 46px; padding: 0 14px;
	display: inline-grid; place-items: center;
	border: 1px solid var(--sal-border); border-radius: var(--sal-radius);
	color: var(--sal-text); text-decoration: none; font-weight: 500;
}
.sal-pagination .page-numbers.current,
.sal-pagination .page-numbers:hover { background: var(--sal-primary); border-color: var(--sal-primary); color: var(--sal-on-primary); }

.sal-empty { padding: 48px; border: 1px dashed var(--sal-border); border-radius: var(--sal-radius); text-align: center; }
.sal-empty .sal-search-form { margin: 24px auto 0; }
.sal-search-again { padding-top: 40px; }

/* ---------- Single post ---------- */
.sal-single__head { padding-top: calc(var(--sal-header-h) + clamp(48px, 7vw, 100px)); padding-bottom: 40px; max-width: calc(900px + var(--sal-gutter) * 2); }
.sal-single__title { font-size: clamp(2.4rem, 5.5vw, 4.4rem); margin: 18px 0 20px; }
.sal-single__lede { font-size: 1.2rem; color: var(--sal-muted); max-width: 60ch; }
.sal-author { display: flex; align-items: center; gap: 12px; font-weight: 500; margin-top: 24px; }
.sal-author img { border-radius: 50%; }
.sal-single__media { margin-bottom: clamp(40px, 6vw, 72px); }
.sal-single__media img { width: 100%; border-radius: var(--sal-radius); aspect-ratio: 16 / 9; object-fit: cover; }
.sal-single__foot { max-width: calc(760px + var(--sal-gutter) * 2); padding-block: 40px 0; }

.sal-prose { max-width: calc(760px + var(--sal-gutter) * 2); font-size: 1.08rem; }
.sal-prose > * + h2 { margin-top: 1.8em; }
.sal-prose > * + h3 { margin-top: 1.5em; }
.sal-prose :where(h2) { font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
.sal-prose :where(h3) { font-size: clamp(1.3rem, 2vw, 1.6rem); }
.sal-prose :where(ul, ol) { padding-left: 1.3em; }
.sal-prose :where(li) { margin-bottom: .4em; }
.sal-prose :where(li)::marker { color: var(--sal-primary); }
.sal-prose :where(img) { border-radius: var(--sal-radius); }
.sal-prose .alignwide { max-width: 1100px; margin-inline: calc(50% - min(550px, 50vw - var(--sal-gutter))); width: auto; }
.sal-prose .alignfull { margin-inline: calc(50% - 50vw); max-width: 100vw; width: 100vw; }
.sal-prose :where(.wp-block-image figcaption, figcaption) { color: var(--sal-muted); font-size: .85rem; text-align: center; margin-top: .8em; }
.alignleft { float: left; margin: .4em 1.6em 1em 0; }
.alignright { float: right; margin: .4em 0 1em 1.6em; }
.aligncenter { margin-inline: auto; }

.sal-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.sal-tags a { padding: 6px 14px; border: 1px solid var(--sal-border); border-radius: 999px; font-size: .85rem; color: var(--sal-muted); text-decoration: none; }
.sal-tags a:hover { border-color: var(--sal-primary); color: var(--sal-text); }

.post-navigation .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; border-top: 1px solid var(--sal-border); padding-top: 32px; }
.post-navigation a { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--sal-text); font-family: var(--sal-font-heading); font-size: 1.15rem; line-height: 1.3; }
.post-navigation a .sal-eyebrow { margin: 0; }
.post-navigation .nav-next { text-align: right; }
.post-navigation .nav-next a { align-items: flex-end; }
.sal-related { border-top: 1px solid var(--sal-border); margin-top: var(--sal-section); }
.sal-related__title { margin-bottom: 40px; }

/* Comments */
.sal-comments-wrap { max-width: calc(760px + var(--sal-gutter) * 2); padding-bottom: var(--sal-section); }
.sal-comment-list, .sal-comment-list .children { list-style: none; padding: 0; margin: 0; }
.sal-comment-list .children { padding-left: clamp(16px, 4vw, 48px); }
.sal-comment-list .comment-body { padding: 24px 0; border-bottom: 1px solid var(--sal-border); }
.sal-comment-list .comment-author { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.sal-comment-list .avatar { border-radius: 50%; }
.sal-comment-list .comment-metadata { font-size: .8rem; margin: 4px 0 12px 56px; }
.sal-comment-list .comment-metadata a { color: var(--sal-muted); text-decoration: none; }
.sal-comment-list .comment-content { margin-left: 56px; }
.sal-comment-list .reply { margin-left: 56px; font-size: .88rem; }
.comment-respond { margin-top: 48px; }
.comment-form { display: grid; gap: 16px; }
.comment-form p { margin: 0; }

/* Sidebar & widgets */
.sal-sidebar { display: flex; flex-direction: column; gap: 32px; min-width: 0; }
.widget { padding: 28px; background: var(--sal-surface); border: 1px solid var(--sal-border); border-radius: var(--sal-radius); }
.widget-title, .widget .wp-block-heading { font-size: 1.1rem; margin-bottom: 1em; }
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget li { padding: 8px 0; border-bottom: 1px solid var(--sal-border); }
.widget li:last-child { border-bottom: 0; }
.widget a { color: var(--sal-text); text-decoration: none; }
.widget a:hover { color: var(--sal-primary); }

/* ---------- 404 ---------- */
.sal-404 { padding: calc(var(--sal-header-h) + 80px) 0 var(--sal-section); text-align: center; position: relative; overflow: hidden; }
.sal-404 .sal-container { display: grid; justify-items: center; gap: 12px; }
.sal-404__code {
	font-family: var(--sal-font-heading); font-weight: var(--sal-heading-weight);
	font-size: clamp(8rem, 30vw, 22rem); line-height: .8; margin: 0;
	color: transparent; -webkit-text-stroke: 1.5px color-mix(in srgb, var(--sal-primary) 70%, transparent);
	letter-spacing: -.04em; user-select: none;
}
.sal-404 h1 { font-size: clamp(2rem, 4vw, 3rem); margin: 8px 0 0; }
.sal-404 p { color: var(--sal-muted); max-width: 48ch; }
.sal-404__actions { margin: 12px 0 28px; }
.sal-404 .sal-search-form { width: 100%; }

/* ---------- Footer ---------- */
.sal-footer { border-top: 1px solid var(--sal-border); padding-top: clamp(64px, 9vw, 120px); background: var(--sal-bg); }
.sal-footer__cta {
	display: flex; align-items: center; justify-content: space-between; gap: 24px;
	padding-bottom: clamp(48px, 7vw, 96px);
	border-bottom: 1px solid var(--sal-border);
	text-decoration: none;
	color: var(--sal-text);
}
.sal-footer__cta span {
	font-family: var(--sal-font-heading); font-weight: var(--sal-heading-weight); text-transform: var(--sal-heading-case);
	font-size: clamp(2.6rem, 8vw, 7.5rem); line-height: .95; letter-spacing: -.035em;
	max-width: 14ch; text-wrap: balance;
	transition: color .4s ease;
}
.sal-footer__cta .sal-icon {
	flex: none; width: clamp(56px, 8vw, 110px); height: auto; padding: clamp(14px, 2vw, 26px);
	border-radius: 50%; background: var(--sal-primary); color: var(--sal-on-primary);
	transition: transform .6s var(--sal-ease);
}
.sal-footer__cta:hover { color: var(--sal-text); }
.sal-footer__cta:hover span { color: var(--sal-primary); }
.sal-footer__cta:hover .sal-icon { transform: rotate(-45deg); }
.sal-footer__widgets { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; padding-block: 64px; border-bottom: 1px solid var(--sal-border); }
.sal-footer__col .widget { padding: 0; background: none; border: 0; }
.sal-footer__col .widget li { border: 0; padding: 5px 0; }
.sal-footer__col .widget a { color: var(--sal-muted); }
.sal-footer__col .widget a:hover { color: var(--sal-text); }
.sal-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; padding-block: 28px; font-size: .88rem; color: var(--sal-muted); }
.sal-footer__bottom p { margin: 0; }
.sal-footer__menu { list-style: none; display: flex; flex-wrap: wrap; gap: 24px; margin: 0; padding: 0; }
.sal-footer__menu a { color: var(--sal-muted); text-decoration: none; }
.sal-footer__menu a:hover { color: var(--sal-text); }

.sal-to-top {
	position: fixed; right: 20px; bottom: 20px; z-index: 90;
	width: 48px; height: 48px; padding: 0;
	display: grid; place-items: center;
	border-radius: 50%; border: 1px solid var(--sal-border);
	background: var(--sal-surface); color: var(--sal-text);
	cursor: pointer;
	transition: transform .4s var(--sal-ease), opacity .3s ease, border-color .2s;
}
.sal-to-top:hover { border-color: var(--sal-primary); color: var(--sal-primary); background: var(--sal-surface); }
.sal-to-top[hidden] { display: grid !important; opacity: 0; transform: translateY(16px); pointer-events: none; }

/* ---------- Block editor content ---------- */
.wp-block-button.is-style-outline .wp-block-button__link { background: transparent; color: var(--sal-text); border-color: var(--sal-border); }
.wp-block-separator { border-color: var(--sal-border); }
.wp-block-quote cite { font-family: var(--sal-font-body); font-size: .8rem; color: var(--sal-muted); }
.wp-block-pullquote { border-color: var(--sal-primary); }
.has-text-align-center { text-align: center; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
	.sal-layout.has-sidebar,
	.sal-layout.has-sidebar.sidebar-left { grid-template-columns: minmax(0, 1fr); }
	.sal-layout.sidebar-left .sal-sidebar { order: 0; }
}
@media (max-width: 700px) {
	:root { --sal-header-h: 76px; }
	.sal-header { padding: 10px 12px; }
	.sal-posts--list .sal-card { grid-template-columns: 1fr; }
	.post-navigation .nav-links { grid-template-columns: 1fr; }
	.post-navigation .nav-next { text-align: left; }
	.post-navigation .nav-next a { align-items: flex-start; }
	.sal-search-form { flex-direction: column; }
	.sal-comment-list .comment-content,
	.sal-comment-list .comment-metadata,
	.sal-comment-list .reply { margin-left: 0; }
	.sal-header__actions .sal-icon-btn[data-sal-search-open] { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Elementor Site Settings compatibility ----------
 * Elementor's kit styles every link and button on the page with selectors
 * like ".elementor-kit-5 button" (specificity 0,1,1). Theme components
 * are re-asserted here at 0,2,0 so they keep their own look, while
 * Elementor's own Button widget still follows Site Settings. */
.sal-site .sal-btn { padding: 1em 1.6em; border-radius: var(--sal-radius); background: var(--sal-primary); color: var(--sal-on-primary); border: 1px solid transparent; font-family: var(--sal-font-body); font-size: .95rem; font-weight: 600; line-height: 1; text-transform: none; letter-spacing: 0; }
.sal-site .sal-btn:hover { color: var(--sal-on-primary); background: color-mix(in srgb, var(--sal-primary) 85%, #fff); }
.sal-site .sal-btn--ghost,
.sal-site .sal-btn--ghost:hover { background: transparent; color: var(--sal-text); border-color: var(--sal-border); }
.sal-site .sal-header__cta { padding: .85em 1.3em; }
.sal-header-floating .sal-site .sal-header__cta,
.sal-header-floating .sal-header .sal-header__cta { border-radius: 999px; }
.sal-site .sal-icon-btn,
.sal-site .sal-burger,
.sal-site .sal-to-top { padding: 0; background: transparent; color: var(--sal-text); border: 1px solid var(--sal-border); border-radius: 50%; font-size: 1rem; line-height: 1; }
.sal-site .sal-icon-btn:hover,
.sal-site .sal-burger:hover { background: transparent; border-color: var(--sal-text); color: var(--sal-text); }
.sal-to-top.sal-to-top { padding: 0; background: var(--sal-surface); color: var(--sal-text); border: 1px solid var(--sal-border); border-radius: 50%; }
.sal-site .sal-menu a { color: var(--sal-muted); }
.sal-site .sal-menu a:hover,
.sal-site .sal-menu .current-menu-item > a,
.sal-site .sal-menu .current-menu-ancestor > a { color: var(--sal-text); }
.sal-site .sal-brand__name,
.sal-site .sal-card__title a,
.sal-site .sal-link-arrow,
.sal-site .sal-footer__cta,
.sal-site .post-navigation a { color: var(--sal-text); }
.sal-site .sal-card__title a:hover,
.sal-site .sal-link-arrow:hover { color: var(--sal-primary); }
.sal-site .sal-breadcrumbs a,
.sal-site .sal-meta a,
.sal-site .sal-footer__menu a { color: var(--sal-muted); }
.sal-site .sal-meta .sal-meta__cat { color: var(--sal-primary); }
.sal-site .sal-search-overlay__close { padding: 0; }
.sal-site .sal-404__code { color: transparent; }

/* ---------- Day / night switch ---------- */
::view-transition-old(root),
::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { animation: sal-mode-reveal .8s cubic-bezier(.65, 0, .35, 1); }
@keyframes sal-mode-reveal {
	from { clip-path: circle(0 at var(--sal-vt-x, 50%) var(--sal-vt-y, 0)); }
	to { clip-path: circle(150vmax at var(--sal-vt-x, 50%) var(--sal-vt-y, 0)); }
}
/* Show an element only in one mode, e.g. a light and a dark logo. */
html:not([data-sal-mode="light"]) .sal-only-light,
html[data-sal-mode="light"] .sal-only-dark { display: none !important; }
html[data-sal-mode="light"] .sal-theme-deep { background-color: color-mix(in srgb, var(--sal-bg) 90%, var(--sal-text)); }

/* ---------- Projects (Salemnus Core) ---------- */
.sal-project-hero { padding-top: calc(var(--sal-header-h, 90px) + clamp(48px, 8vw, 120px)); padding-bottom: clamp(40px, 6vw, 80px); }
.sal-project-hero .sal-breadcrumbs { margin-bottom: 28px; }
.sal-project-hero__title {
	margin: 0 0 24px; max-width: 16ch;
	font-size: clamp(2.8rem, 8vw, 7.5rem); line-height: .95; letter-spacing: -.04em;
}
.sal-project-hero__lede { max-width: 56ch; margin: 0; color: var(--sal-muted); font-size: clamp(1.05rem, 1.4vw, 1.3rem); }
.sal-project-hero__details {
	display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 24px;
	margin: clamp(40px, 5vw, 72px) 0 0; padding-top: 28px; border-top: 1px solid var(--sal-border);
}
.sal-project-hero__details dt { margin-bottom: 6px; color: var(--sal-muted); font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.sal-project-hero__details dd { margin: 0; color: var(--sal-text); overflow-wrap: anywhere; }
.sal-project-cover { margin: 0; padding-inline: clamp(12px, 2vw, 32px); }
.sal-site .sal-project-cover img {
	width: 100%; height: min(86vh, 960px); object-fit: cover; display: block;
	border-radius: clamp(0px, var(--sal-radius), 28px);
}
.sal-project-body { padding-top: clamp(24px, 4vw, 48px); }

.sal-next-project {
	position: relative; display: block; overflow: hidden; isolation: isolate; margin-top: clamp(48px, 8vw, 120px);
	padding-block: clamp(80px, 14vw, 200px); border-top: 1px solid var(--sal-border);
	color: var(--sal-text); text-decoration: none;
}
.sal-next-project__media { position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .6s ease; }
.sal-next-project__media::after { content: ""; position: absolute; inset: 0; background: color-mix(in srgb, var(--sal-bg) 70%, transparent); }
.sal-site .sal-next-project__media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); transition: transform 1.4s var(--sal-ease); }
.sal-next-project:hover .sal-next-project__media { opacity: 1; }
.sal-next-project:hover .sal-next-project__media img { transform: scale(1); }
.sal-next-project__inner { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.sal-next-project__title {
	font-family: var(--sal-font-heading); font-weight: var(--sal-heading-weight); text-transform: var(--sal-heading-case);
	font-size: clamp(2.6rem, 9vw, 8.5rem); line-height: .95; letter-spacing: -.04em; transition: color .3s ease;
}
.sal-next-project .sal-icon { width: clamp(32px, 4vw, 56px); height: auto; transition: transform .5s var(--sal-ease); }
.sal-next-project:hover .sal-icon { transform: translateX(16px); }
.sal-next-project:hover { color: var(--sal-text); }

.sal-project-archive { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 3vw, 48px); }
@media (max-width: 767px) { .sal-project-archive { grid-template-columns: 1fr; } }
.sal-project-card a { display: flex; flex-direction: column; gap: 10px; color: var(--sal-text); text-decoration: none; }
.sal-project-card__media { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: clamp(0px, var(--sal-radius), 24px); background: var(--sal-surface); }
.sal-site .sal-project-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--sal-ease); }
.sal-project-card a:hover img { transform: scale(1.05); }
.sal-project-card__title { font-family: var(--sal-font-heading); font-size: clamp(1.3rem, 2vw, 1.7rem); }
.sal-project-card__meta { color: var(--sal-muted); font-size: .9rem; }

/* Studio preset: framed screenshots float on the dark background. */
.sal-preset-studio .sal-shot img { box-shadow: 0 40px 80px -36px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .06); }
