/* ========== Global (Light Theme) ========== */
@font-face {
	font-family: 'Inter';
	src: url('../fonts/Inter-Regular.ttf') format('truetype');
	font-display: swap;
	font-weight: 400;
}
@font-face {
	font-family: 'Inter';
	src: url('../fonts/Inter-Bold.ttf') format('truetype');
	font-display: swap;
	font-weight: 700;
}
@font-face {
	font-family: 'Playfair Display';
	src: url('../fonts/PlayfairDisplay-Regular.ttf') format('truetype');
	font-display: swap;
	font-weight: 400;
}
@font-face {
	font-family: 'Playfair Display';
	src: url('../fonts/PlayfairDisplay-SemiBold.ttf') format('truetype');
	font-display: swap;
	font-weight: 600;
}

:root {
	--bg: #ffffff;
	--bg-soft: #faf8f6;
	--ink: #1b2124;
	--muted: #5f6b73;
	--brand: #c7965a; /* warm champagne gold */
	--brand-600: #b58245;
	--brand-200: #ead8c3;
	--line: #e7e2dc;
	--shadow: 0 12px 30px rgba(27, 33, 36, 0.08);
	--radius: 18px;
	--radius-sm: 12px;
	--maxw: 1200px;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html,
body {
	height: 100%;
}

body {
	margin: 0;
	font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, Arial,
		sans-serif;
	color: var(--ink);
	background: var(--bg);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

img {
	display: block;
	height: auto;
	max-width: 100%;
}

/* Accessibility helpers */
.skip-link {
	position: absolute;
	left: -9999px;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
}
.skip-link:focus {
	left: 12px;
	top: 12px;
	width: auto;
	height: auto;
	padding: 8px 12px;
	background: #000;
	color: #fff;
	border-radius: 8px;
}

/* Layout */
.site-header {
	position: fixed;
	width: 100%;
	top: 0;
	z-index: 50;
	background: color-mix(in oklab, var(--bg) 85%, var(--bg-soft));
	border-bottom: 1px solid var(--line);
	backdrop-filter: saturate(1.2) blur(8px);
}
.header-inner {
	max-width: var(--maxw);
	margin: 0 auto;
	padding: 12px 20px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}
.brand img {
	width: 132px;
}

.site-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: 16px;
}
.site-nav a {
	display: inline-block;
	padding: 10px 12px;
	border-radius: 12px;
	text-decoration: none;
	color: var(--ink);
	font-weight: 600;
	transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease,
		box-shadow 0.2s ease;
}
.site-nav a:hover {
	background: var(--bg-soft);
	transform: translateY(-1px);
}
.site-nav a.is-active {
	color: var(--brand-600);
}

.site-main {
	min-height: 60vh;
}

/* ===== Footer (TuneForge-style layout, adapted for Caratline) ===== */
.footer {
	background: var(--bg-soft);
	border-top: 1px solid var(--line);
}
.footer .container.footer-container {
	max-width: var(--maxw);
	margin: 0 auto;
	padding: 28px 20px;
	display: grid;
	grid-template-columns: 1.2fr 0.8fr 0.6fr;
	gap: 16px;
	align-items: start;
}
.footer-column a {
	color: var(--ink);
	text-decoration: none;
}
.footer-column a:hover {
	color: var(--brand-600);
	text-decoration: underline;
}

.footer-brand {
	font-family: 'Playfair Display', serif;
	font-weight: 600;
	font-size: clamp(18px, 2.2vw, 22px);
	margin: 0 0 6px;
}

/* Back to Top внутри футера — статичная кнопка */
.footer .back-to-top {
	position: static; /* переопределяем глобальный fixed */
	padding: 10px 14px;
	border-radius: 999px;
	border: 1px solid var(--line);
	background: #fff;
	cursor: pointer;
	box-shadow: var(--shadow);
	opacity: 1 !important; /* игнорируем .is-visible из глобальных правил */
	transform: none !important;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.footer .back-to-top:hover {
	transform: translateY(-2px);
	box-shadow: 0 16px 36px rgba(27, 33, 36, 0.12);
}

/* Responsive */
@media (max-width: 900px) {
	.footer .container.footer-container {
		grid-template-columns: 1fr 1fr;
	}
}
@media (max-width: 560px) {
	.footer .container.footer-container {
		grid-template-columns: 1fr;
	}
}

/* Buttons */
.btn {
	--btn-pad: 12px 18px;
	display: inline-block;
	padding: var(--btn-pad);
	border-radius: 999px;
	text-decoration: none;
	font-weight: 700;
	transition: transform 0.2s ease, box-shadow 0.2s ease,
		background-position 0.6s ease;
	will-change: transform;
}
.btn-primary {
	color: #fff;
	background: linear-gradient(
		110deg,
		var(--brand) 0%,
		#e1bd8f 60%,
		var(--brand) 100%
	);
	background-size: 200% 100%;
	box-shadow: 0 10px 24px rgba(199, 150, 90, 0.25);
}
.btn-primary:hover {
	transform: translateY(-2px);
	background-position: 100% 0;
}
.btn-ghost {
	border: 1px solid var(--line);
	color: var(--ink);
	background: #fff;
}
.btn-ghost:hover {
	transform: translateY(-2px);
	box-shadow: var(--shadow);
}

/* Back to top */
.back-to-top {
	position: fixed;
	right: 16px;
	bottom: 16px;
	padding: 10px 12px;
	border-radius: 999px;
	border: 1px solid var(--line);
	background: #fff;
	cursor: pointer;
	box-shadow: var(--shadow);
	opacity: 0;
	transform: translateY(16px);
	transition: 0.25s ease;
}
.back-to-top.is-visible {
	opacity: 1;
	transform: translateY(0);
}

/* Reveal on scroll */
[data-reveal] {
	opacity: 0;
	transform: translateY(16px) scale(0.98);
	transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-reveal].is-in {
	opacity: 1;
	transform: none;
}

/* Utility */
.visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	border: 0;
	padding: 0;
	white-space: nowrap;
	clip-path: inset(100%);
	clip: rect(0 0 0 0);
	overflow: hidden;
}

/* Responsive (global) */
@media (max-width: 992px) {
	.site-footer .f-grid {
		grid-template-columns: 1fr 1fr;
	}
}
@media (max-width: 640px) {
	.header-inner {
		padding: 10px 14px;
	}
	.brand img {
		width: 118px;
	}
	.site-nav ul {
		gap: 6px;
	}
	.site-nav a {
		padding: 8px 10px;
		border-radius: 10px;
	}
	.site-footer .f-grid {
		grid-template-columns: 1fr;
	}
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
	* {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition: none !important;
	}
}
