:root {
  --bg: #0b1a33;
  --card: #12264a;
  --line: #2a4573;
  --text: #eef2fa;
  --muted: #a9b8d4;
  --gold: #f2c46d;
  --gold-dark: #d9a441;
  --error: #ff9b8f;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--gold); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(30px, 5vw, 50px); }
h2 { font-size: clamp(24px, 3.5vw, 34px); }

.hero {
  min-height: min(640px, 90vh);
  display: flex;
  align-items: center;
  padding: 48px max(16px, 6vw);
  background: linear-gradient(90deg, var(--bg) 25%, rgba(11, 26, 51, .2) 60%, transparent), url(/static/hero.jpg) right center / cover no-repeat;
}
@media (max-width: 640px) {
  .hero {
    align-items: flex-end;
    background: linear-gradient(180deg, rgba(11, 26, 51, .35), rgba(11, 26, 51, .85) 55%, var(--bg)), url(/static/hero.jpg) 70% top / cover no-repeat;
  }
}
.hero-text { max-width: 520px; }
.hero-text p { color: var(--muted); font-size: 19px; }
.brand { color: var(--gold) !important; letter-spacing: .08em; text-transform: uppercase; font-size: 14px !important; }

.button {
  display: inline-block;
  border: 0;
  border-radius: 999px;
  padding: 14px 28px;
  background: linear-gradient(180deg, var(--gold), var(--gold-dark));
  color: #1b1405;
  font-family: inherit;
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.button:disabled { opacity: .6; cursor: progress; }

main { max-width: 920px; margin: 0 auto; padding: 0 16px 48px; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 40px 0; }
.steps div { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.steps b { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--gold); color: #1b1405; margin-bottom: 10px; }
.steps p { color: var(--muted); margin: 0; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: clamp(18px, 4vw, 36px); }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.full { grid-column: 1 / -1; }
@media (max-width: 640px) { .grid { grid-template-columns: 1fr; } }

label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 15px; }
input, select, textarea {
  width: 100%;
  font-family: inherit;
  font-size: 16px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.check { flex-direction: row; align-items: flex-start; font-weight: 400; }
.check input { width: auto; margin-top: 4px; }
/* Поля, не прошедшие проверку при отправке формы */
[aria-invalid="true"] { border-color: var(--error); box-shadow: 0 0 0 1px var(--error); }
.check input[aria-invalid="true"] { outline: 2px solid var(--error); outline-offset: 2px; }
.check:has([aria-invalid="true"]) { color: var(--error); }

fieldset { border: 1px solid var(--line); border-radius: 14px; margin: 24px 0; padding: 16px; }
legend { font-weight: 700; padding: 0 6px; }
.hint { color: var(--muted); font-size: 15px; margin: 0 0 12px; }

.photos { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.photos figure { margin: 0; width: 110px; }
.photos img, .photos .stub { width: 110px; height: 110px; object-fit: cover; border-radius: 10px; background: var(--bg); display: grid; place-items: center; font-size: 13px; color: var(--muted); }
.photos figcaption { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.error { color: var(--error); font-weight: 600; }

.faq { margin-top: 40px; }
details { border-bottom: 1px solid var(--line); padding: 12px 0; }
summary { cursor: pointer; font-weight: 600; }
details p { color: var(--muted); }
footer { text-align: center; padding: 24px 16px 40px; color: var(--muted); font-size: 14px; }

.status { max-width: 760px; margin: 48px auto; }
.status video { width: 100%; border-radius: 14px; background: #000; margin: 16px 0; }
.spinner { width: 36px; height: 36px; border: 4px solid var(--line); border-top-color: var(--gold); border-radius: 50%; animation: spin 1s linear infinite; margin: 16px 0; }
@keyframes spin { to { transform: rotate(360deg); } }
