@font-face {
  font-family: "Playfair Display";
  src: url("/static/fonts/PlayfairDisplaywght.ttf") format("truetype");
  font-weight: 400 900;
  font-display: swap;
}
@font-face {
  font-family: "Golos Text";
  src: url("/static/fonts/GolosTextwght.ttf") format("truetype");
  font-weight: 400 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --accent: #7A1018;
  --black: #0e0b0b;
  --velvet-shadow: #4f0606;
  --velvet-light: #a5222f;
  --gold: #c9a25a;
  --gold-light: #e8c478;
  --cream: #f6efe3;
  --ink: #1d1614;
  --muted: #5e524c;
  --line: #cdbfa8;
  --error: #a5222f;
  font-synthesis: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html {
  -webkit-text-size-adjust: 100%;
  min-height: 100%;
  background-color: var(--black);
  background-image:
    radial-gradient(120% 60% at 50% -10%, rgba(165, 34, 47, .5), transparent 60%),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .10) 0 30px, rgba(255, 255, 255, .02) 30px 60px),
    linear-gradient(180deg, var(--accent) 0%, var(--velvet-shadow) 50%, var(--black) 100%);
}
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  font-family: "Golos Text", system-ui, sans-serif; font-size: 18px; line-height: 1.5; color: var(--ink);
  padding: max(24px, env(safe-area-inset-top)) 16px max(32px, env(safe-area-inset-bottom));
  display: flex; justify-content: center; align-items: flex-start;
}
.card {
  width: 100%; max-width: 560px; min-width: 0; margin-top: 8px;
  background: var(--cream); border-radius: 14px; padding: 32px 22px 28px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .6), 0 0 0 1px rgba(201, 162, 90, .5);
  position: relative;
}
.card::before {
  content: ""; position: absolute; inset: 8px; border: 1px solid rgba(201, 162, 90, .55);
  border-radius: 9px; pointer-events: none;
}
h1 {
  font-family: "Playfair Display", Georgia, serif; font-weight: 700; font-variant-numeric: lining-nums;
  font-size: 40px; line-height: 1.08; margin: 0 0 12px; text-wrap: balance; color: var(--black);
  overflow-wrap: anywhere;
}
.intro { font-size: 19px; color: var(--muted); margin: 0 0 26px; text-wrap: pretty; overflow-wrap: anywhere; }
.gold-line { height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); margin: 0 0 24px; }
.field { margin: 0 0 20px; min-width: 0; }
.field > label:not(.consent), legend {
  display: block; font-weight: 600; font-size: 18px; margin: 0 0 8px; color: var(--black); padding: 0;
}
input[type="text"], input[type="email"], input[type="tel"] {
  width: 100%; height: 58px; padding: 0 16px; font: inherit; font-size: 19px; color: var(--ink);
  background: #fffaf2; border: 1.5px solid var(--line); border-radius: 10px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input::placeholder { color: #a39686; opacity: 1; }
input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(201, 162, 90, .28); }
fieldset { border: 0; margin: 0 0 20px; padding: 0; }
.choices { display: grid; gap: 10px; }
.choice {
  display: flex; align-items: center; gap: 14px; min-height: 58px; padding: 12px 16px; cursor: pointer;
  background: #fffaf2; border: 1.5px solid var(--line); border-radius: 10px; font-size: 18px; line-height: 1.3;
  transition: border-color .15s ease, background-color .15s ease;
}
.choice > span:last-child, .consent > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.choice input, .consent input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.radio-mark {
  flex: none; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line);
  display: grid; place-items: center; transition: border-color .15s ease;
}
.radio-mark::after {
  content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--accent);
  transform: scale(0); transition: transform .15s ease;
}
.choice:has(input:checked) { border-color: var(--accent); background: #fff3ef; }
.choice input:checked + .radio-mark { border-color: var(--accent); }
.choice input:checked + .radio-mark::after { transform: scale(1); }
.choice:has(input:focus-visible) { box-shadow: 0 0 0 4px rgba(201, 162, 90, .35); }
.consent {
  display: flex; gap: 14px; align-items: flex-start; font-size: 16px; line-height: 1.45;
  color: var(--muted); margin: 4px 0 0; cursor: pointer;
}
.consent-field { margin-bottom: 24px; }
.checkbox-mark {
  flex: none; width: 26px; height: 26px; margin-top: 1px; border: 2px solid var(--line); border-radius: 6px;
  background: #fffaf2; display: grid; place-items: center;
}
.checkbox-mark::after {
  content: ""; width: 12px; height: 7px; border: solid var(--cream); border-width: 0 0 3px 3px;
  transform: rotate(-45deg) translate(1px, -2px) scale(0); transition: transform .12s ease;
}
.consent input:checked + .checkbox-mark { background: var(--accent); border-color: var(--accent); }
.consent input:checked + .checkbox-mark::after { transform: rotate(-45deg) translate(1px, -2px) scale(1); }
.consent input:focus-visible + .checkbox-mark { box-shadow: 0 0 0 4px rgba(201, 162, 90, .35); }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.button {
  display: grid; place-items: center; width: 100%; min-height: 62px; padding: 12px 16px;
  border: 0; border-radius: 12px; cursor: pointer; text-align: center; text-decoration: none;
  font: inherit; font-size: 20px; font-weight: 600; letter-spacing: .01em; color: var(--cream);
  background: linear-gradient(180deg, var(--velvet-light), var(--accent));
  box-shadow: inset 0 0 0 1.5px rgba(232, 196, 120, .65), 0 10px 22px -10px rgba(79, 6, 6, .8);
  transition: transform .12s ease, filter .15s ease; overflow-wrap: anywhere;
}
.button:hover:enabled, a.button:hover { filter: brightness(1.08); }
.button:active { transform: scale(.985); }
.button:focus-visible { outline: 3px solid var(--gold-light); outline-offset: 3px; }
.button:disabled { cursor: default; opacity: .65; }
.field-error { color: var(--error); font-size: 16px; margin: 6px 0 0; font-weight: 500; }
input[aria-invalid="true"], .choice:has(input[aria-invalid="true"]), .consent input[aria-invalid="true"] + .checkbox-mark { border-color: var(--error); }
.consent-field .field-error { margin-left: 40px; }
.notice { padding: 12px 14px; border-left: 3px solid var(--error); font-size: 16px; line-height: 1.5; }
#spasibo-screen { text-align: center; padding: 12px 4px 4px; animation: appear .5s ease both; }
.thanks-mark {
  width: 84px; height: 84px; margin: 6px auto 22px; border-radius: 50%; border: 1.5px solid var(--gold);
  display: grid; place-items: center; font-size: 30px; color: var(--accent);
}
#spasibo-screen h1 { font-size: 38px; }
#spasibo-screen .button { margin-top: 8px; }
.visually-hidden, .trap { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.policy h1 { font-size: 28px; }
.policy p { line-height: 1.65; overflow-wrap: anywhere; }
@keyframes appear { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (min-width: 700px) {
  body { padding-top: 72px; padding-bottom: 72px; }
  .card { padding: 48px 48px 40px; }
  h1 { font-size: 50px; }
  #spasibo-screen h1 { font-size: 46px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
