:root {
	--gold: #e9c27a;
	--ink: #1d1a16;
	--paper: #fbf8f2;
	--muted: #6f675c;
	--line: #ddd4c4;
	--accent: #b8862f;
	--error: #b3261e;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
	font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	color: #fff;
	background: #120f0b;
	-webkit-font-smoothing: antialiased;
}
body.modal-open { overflow: hidden; }

/* ---------- Главный экран ---------- */
.hero {
	position: relative;
	min-height: 100vh;
	min-height: 100svh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 48px 16px;
	background: #120f0b var(--hero) center 60% / cover no-repeat;
	isolation: isolate;
}
.hero::before {
	content: "";
	position: absolute; inset: 0; z-index: -1;
	background:
		radial-gradient(ellipse at 50% 45%, rgba(10,8,5,.28), rgba(10,8,5,0) 60%),
		linear-gradient(180deg, rgba(10,8,5,.25) 0%, rgba(10,8,5,.05) 45%, rgba(10,8,5,.5) 100%);
}
.hero__inner {
	width: 100%;
	max-width: 1040px;
	text-align: center;
	animation: rise .9s ease-out both;
}
.hero__title { margin: 0 0 clamp(36px, 7vh, 72px); font-weight: 500; line-height: 1; }
.hero__t1 {
	display: block;
	font-family: "Cormorant Garamond", Georgia, serif;
	font-size: clamp(42px, 8.5vw, 104px);
	letter-spacing: .01em;
	text-shadow: 0 2px 30px rgba(0,0,0,.45);
}
.hero__t2 {
	display: inline-flex;
	align-items: center;
	gap: 18px;
	margin-top: 18px;
	font-size: clamp(13px, 1.6vw, 18px);
	font-weight: 500;
	letter-spacing: .42em;
	text-transform: uppercase;
	color: var(--gold);
	padding-left: .42em; /* компенсирует letter-spacing справа */
}
.hero__t2::before, .hero__t2::after {
	content: ""; width: clamp(24px, 5vw, 60px); height: 1px; background: currentColor; opacity: .7;
}

/* ---------- Флаги ---------- */
.flags {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: clamp(12px, 2.4vw, 28px);
	max-width: 860px;
	margin: 0 auto;
}
.flag {
	appearance: none;
	border: 1px solid rgba(255,255,255,.28);
	background: rgba(20,16,10,.35);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	border-radius: 18px;
	padding: 18px 14px 16px;
	color: #fff;
	cursor: pointer;
	font: inherit;
	display: flex; flex-direction: column; align-items: center; gap: 14px;
	transition: transform .25s ease, background .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.flag:hover, .flag:focus-visible {
	transform: translateY(-4px);
	background: rgba(20,16,10,.55);
	border-color: var(--gold);
	box-shadow: 0 14px 40px rgba(0,0,0,.35);
	outline: none;
}
.flag__img {
	display: block;
	width: 100%;
	aspect-ratio: 3 / 2;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 4px 14px rgba(0,0,0,.35), inset 0 0 0 1px rgba(0,0,0,.08);
}
.flag__img svg { display: block; width: 100%; height: 100%; }
.flag__name { font-size: 15px; font-weight: 500; letter-spacing: .04em; }

@media (max-width: 640px) {
	.flags { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 380px; }
	.flag { padding: 14px 12px 12px; border-radius: 14px; gap: 10px; }
}

/* ---------- Окно с формой ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(10,8,5,.6); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); animation: fade .2s ease-out; }
.modal__box {
	position: relative;
	width: 100%; max-width: 480px;
	max-height: calc(100vh - 32px); overflow-y: auto;
	background: var(--paper);
	color: var(--ink);
	border-radius: 20px;
	padding: 36px 32px 32px;
	box-shadow: 0 30px 80px rgba(0,0,0,.45);
	animation: pop .25s ease-out;
}
.modal__close {
	position: absolute; top: 10px; right: 12px;
	width: 40px; height: 40px;
	border: 0; background: none; border-radius: 50%;
	font-size: 28px; line-height: 1; color: var(--muted); cursor: pointer;
}
.modal__close:hover { background: rgba(0,0,0,.06); color: var(--ink); }
.modal__flag { width: 54px; aspect-ratio: 3 / 2; border-radius: 5px; overflow: hidden; margin-bottom: 18px; box-shadow: 0 2px 8px rgba(0,0,0,.18); }
.modal__flag svg { display: block; width: 100%; height: 100%; }
.modal__title { margin: 0 0 6px; font-family: "Cormorant Garamond", Georgia, serif; font-size: 34px; font-weight: 600; line-height: 1.1; }
.modal__lead { margin: 0 0 24px; color: var(--muted); font-size: 15px; line-height: 1.5; }

.form { display: grid; gap: 14px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 440px) { .form__row { grid-template-columns: 1fr; } .modal__box { padding: 32px 20px 24px; } }
.field { display: grid; gap: 6px; font-size: 13px; font-weight: 500; color: var(--muted); }
.field input {
	width: 100%;
	font: inherit; font-size: 16px; font-weight: 400; color: var(--ink);
	padding: 12px 14px;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 10px;
	transition: border-color .15s, box-shadow .15s;
}
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(184,134,47,.18); }
.field input[aria-invalid="true"] { border-color: var(--error); }
.form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__msg { margin: 0; min-height: 1.4em; font-size: 14px; color: var(--error); }
.form__msg.is-ok { color: #2e7d32; }
.form__btn {
	margin-top: 2px;
	padding: 14px 20px;
	font: inherit; font-size: 16px; font-weight: 600; letter-spacing: .02em;
	color: #fff;
	background: var(--ink);
	border: 0; border-radius: 12px;
	cursor: pointer;
	transition: background .2s, transform .1s;
}
.form__btn:hover { background: var(--accent); }
.form__btn:active { transform: translateY(1px); }
.form__btn:disabled { opacity: .6; cursor: wait; }

@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
