/* =========================
   Loopline — Global Styles
   ========================= */

/* Local fonts (TTF from Google Fonts) */
@font-face {
	font-family: 'Inter';
	src: url('../fonts/Inter-Regular.ttf') format('truetype');
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'Inter';
	src: url('../fonts/Inter-Bold.ttf') format('truetype');
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'Prata';
	src: url('../fonts/Prata-Regular.ttf') format('truetype');
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

/* CSS Reset (короткий) */
* {
	box-sizing: border-box;
}
html,
body {
	margin: 0;
	padding: 0;
}
img {
	display: block;
	height: auto;
}

/* Palette & tokens */
:root {
	--bg: #0f1012;
	--ink: #f4f6f7;
	--muted: #b8c0c2;
	--accent: #56d0b5; /* мята — свежесть */
	--accent-2: #f4a261; /* тёплая охра — ремесло */
	--surface: #17191c;
	--shadow: 0 10px 30px rgba(0, 0, 0, 0.35);

	--radius: 16px;
	--space-1: 0.5rem;
	--space-2: 1rem;
	--space-3: 1.5rem;
	--space-4: 2rem;
	--space-5: 3rem;

	--maxw: 1200px;
}

/* Base */
html {
	scroll-behavior: smooth;
}
body {
	font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial,
		sans-serif;
	line-height: 1.6;
	color: var(--ink);
	background: var(--bg);
}

/* Глобальное ограничение изображений ≤ 350px */
img {
	max-width: 280px;
	width: 100%;
	border-radius: 12px;
}

/* Utilities */
.container {
	width: min(100% - 2rem, var(--maxw));
	margin-inline: auto;
}
.muted {
	color: var(--muted);
}

/* Header (fixed) */
.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: color-mix(in srgb, var(--bg) 85%, transparent);
	backdrop-filter: saturate(120%) blur(8px);
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
	transition: box-shadow 0.3s ease;
}
.site-header.is-scrolled {
	box-shadow: var(--shadow);
}
.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-2);
	padding: 0.9rem 1rem;
}
.brand {
	font-family: 'Prata', serif;
	font-size: 1.3rem;
	text-decoration: none;
	color: var(--ink);
	letter-spacing: 0.04em;
}
.main-nav .nav-list {
	list-style: none;
	display: flex;
	gap: clamp(0.5rem, 2vw, 1.5rem);
	margin: 0;
	padding: 0;
}
.nav-link {
	position: relative;
	color: var(--ink);
	text-decoration: none;
	font-weight: 600;
	padding: 0.25rem 0;
}
.nav-link:is(:hover, :focus-visible) {
	color: var(--accent);
}
.nav-link::after {
	content: '';
	position: absolute;
	left: 0;
	bottom: -2px;
	width: 0;
	height: 2px;
	background: var(--accent);
	transition: width 0.25s ease;
}
.nav-link:is(:hover, :focus-visible)::after {
	width: 100%;
}
.nav-link.is-active {
	color: var(--accent);
}

/* Main/footer */
.site-main {
	display: block;
}
/* ===== Footer (3-column layout) ===== */
.footer {
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	background: var(--surface);
	margin-top: var(--space-5);
	padding: var(--space-4) 0;
}
.footer-container {
	display: grid;
	grid-template-columns: 1.2fr 0.8fr auto;
	gap: clamp(0.8rem, 2vw, 1.6rem);
	align-items: start;
}
.footer-column {
	display: grid;
	gap: 0.35rem;
}
.footer-brand {
	font-family: 'Prata', serif;
	font-size: 1.1rem;
	margin: 0 0 0.1rem 0;
}
.footer a {
	color: var(--ink);
	text-decoration: none;
	border-bottom: 1px dashed transparent;
	transition: color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}
.footer a:hover {
	color: var(--accent);
	border-color: var(--accent);
}
.footer-links {
	align-content: start;
}
.footer-links a {
	display: inline-block;
	margin-right: 0.9rem;
}
.footer-top {
	justify-items: end;
}

.back-to-top {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.6rem 1rem;
	border-radius: 999px;
	background: var(--accent);
	color: #0b0c0d;
	font-weight: 700;
	border: 1px solid rgba(0, 0, 0, 0.12);
	box-shadow: var(--shadow);
	cursor: pointer;
	transform: translateY(0);
	transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease,
		opacity 0.2s ease;
}
.back-to-top:hover {
	transform: translateY(-2px);
}
.back-to-top:active {
	transform: translateY(0);
}
.back-to-top:focus-visible {
	outline: 2px dashed var(--ink);
	outline-offset: 3px;
}

/* Responsive footer */
@media (max-width: 900px) {
	.footer-container {
		grid-template-columns: 1fr 1fr;
	}
	.footer-top {
		justify-items: start;
	}
}
@media (max-width: 560px) {
	.footer-container {
		grid-template-columns: 1fr;
	}
	.footer-links a {
		margin-right: 0.6rem;
	}
}

/* Buttons */
.btn {
	--btn-bg: var(--accent);
	--btn-ink: #0b0c0d;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.7rem 1rem;
	border-radius: 999px;
	background: var(--btn-bg);
	color: var(--btn-ink);
	text-decoration: none;
	font-weight: 700;
	border: 1px solid rgba(0, 0, 0, 0.12);
	transform: translateY(0);
	transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:hover {
	transform: translateY(-2px);
	box-shadow: var(--shadow);
}
.btn:active {
	transform: translateY(0);
}
.btn-ghost {
	--btn-bg: transparent;
	--btn-ink: var(--ink);
	border: 1px dashed rgba(255, 255, 255, 0.25);
}
.btn-ghost:hover {
	background: color-mix(in srgb, var(--ink) 10%, transparent);
}

/* Reveal animation (добавляется через JS) */
[data-reveal] {
	opacity: 0;
	transform: translateY(14px);
	transition: opacity 0.6s ease, transform 0.6s ease;
}
.is-in {
	opacity: 1 !important;
	transform: translateY(0) !important;
}

/* Адаптив (сразу под все устройства) */
@media (max-width: 1024px) {
	.header-inner {
		padding: 0.8rem 0.9rem;
	}
}
@media (max-width: 768px) {
	.nav-link {
		font-size: 0.95rem;
	}
}
@media (max-width: 600px) {
	.header-inner {
		gap: 0.75rem;
	}
	.nav-list {
		gap: 0.75rem;
	}
}
@media (max-width: 480px) {
	.brand {
		font-size: 1.15rem;
	}
	.btn {
		padding: 0.6rem 0.9rem;
	}
}
@media (max-width: 360px) {
	.nav-list {
		gap: 0.5rem;
	}
	.btn {
		font-size: 0.95rem;
	}
}

/* Уважение к prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
	* {
		animation: none !important;
		transition: none !important;
	}
}
/* =========================
   Thank You page
   ========================= */
.thankyou-section {
	min-height: 100svh; /* на весь экран */
	display: grid;
	place-items: center;
	padding: clamp(1.2rem, 3vw, 2rem) 0;
	/* мягкий фон в стилистике сайта */
	background: radial-gradient(
			1200px 400px at 20% 0%,
			rgba(255, 255, 255, 0.06),
			transparent 60%
		),
		repeating-linear-gradient(
			0deg,
			rgba(255, 255, 255, 0.06) 0 1px,
			transparent 1px 24px
		),
		repeating-linear-gradient(
			90deg,
			rgba(255, 255, 255, 0.06) 0 1px,
			transparent 1px 24px
		),
		var(--bg, #0b0c0d);
}

.thankyou-container {
	width: min(100% - 2rem, 720px);
	background: linear-gradient(180deg, var(--surface, #121417), #0e0f11);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: var(--radius, 14px);
	box-shadow: var(--shadow, 0 18px 44px rgba(0, 0, 0, 0.5));
	padding: clamp(1rem, 3.6vw, 1.6rem);
	text-align: center;
	position: relative;
	isolation: isolate;
}

/* декоративный штрих сверху */
.thankyou-container::before {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: inherit;
	pointer-events: none;
	background: linear-gradient(
		180deg,
		rgba(255, 255, 255, 0.07),
		transparent 40%
	);
	mask: linear-gradient(180deg, #000 0 55%, transparent 55% 100%);
}

/* заголовок */
.thankyou-title {
	font-family: 'Prata', serif;
	font-size: clamp(1.35rem, 2.6vw, 2.15rem);
	margin: 0 0 0.5rem;
	letter-spacing: 0.01em;
}

/* основной текст */
.thankyou-message {
	margin: 0 auto 0.9rem;
	color: var(--muted, #b6c0c3);
	max-width: 60ch;
	text-wrap: pretty;
	line-height: 1.55;
}

/* кнопка (использует общий .cta-button) */
.thankyou-container .cta-button {
	margin-top: 0.4rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
}

/* адаптив */
@media (max-width: 520px) {
	.thankyou-container {
		padding: 1rem;
	}
	.thankyou-title::before {
		inline-size: 24px;
		block-size: 24px;
		vertical-align: -5px;
	}
}
/* Thank You — make content visible even without JS */
.thankyou-section [data-reveal] {
	opacity: 1 !important;
	transform: none !important;
	filter: none !important;
}

/* Ensure overlay never covers text */
.thankyou-container {
	position: relative;
}
.thankyou-container::before {
	z-index: 0;
}
.thankyou-container > * {
	position: relative;
	z-index: 1;
}

/* (опционально) Чуть ярче текст внутри карточки */
.thankyou-container {
	color: var(--ink, #e8eff0);
}
.thankyou-message {
	color: var(--muted, #b6c0c3);
}
/* --- Thank You: tidy badge + real button --- */

/* Заголовок с левым бейджем */
.thankyou-section .thankyou-title {
	position: relative;
	padding-left: 2.6rem; /* место под круг */
	display: block;
}

/* Круг */
.thankyou-section .thankyou-title::before {
	content: '';
	position: absolute;
	left: 0.6rem; /* смещение от края карточки */
	top: 50%;
	transform: translateY(-50%);
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--accent, #56d0b5);
	box-shadow: 0 0 0 4px rgba(86, 208, 181, 0.18);
}

/* Кнопка-ссылка */
.thankyou-section .cta-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 180px;
	padding: 0.66rem 1.1rem;
	border-radius: 999px;
	font-weight: 800;
	text-decoration: none; /* убираем подчёркивание */
	color: #0b0c0d;
	background: var(--accent, #56d0b5);
	border: 1px solid rgba(0, 0, 0, 0.12);
	box-shadow: var(--shadow, 0 18px 44px rgba(0, 0, 0, 0.5));
	transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
	margin-top: 0.4rem;
}

/* Hover/Focus */
.thankyou-section .cta-button:hover {
	transform: translateY(-2px);
	box-shadow: 0 22px 50px rgba(0, 0, 0, 0.55);
	filter: saturate(1.05);
}
.thankyou-section .cta-button:focus-visible {
	outline: 2px solid color-mix(in srgb, var(--accent) 60%, white);
	outline-offset: 3px;
}

/* Тёмная тема: если фон светлее акцента, делаем текст на кнопке чуть темнее для контраста */
@media (prefers-contrast: more) {
	.thankyou-section .cta-button {
		filter: saturate(1.1);
	}
}
