:root {
  --bg: #dce2ea;
  --ink: #1a222c;
  --muted: #556171;
  --card: #eef2f6;
  --line: #b8c2ce;
  --field: #f5f7fa;
  --primary: #4d5a6a;
  --primary-hover: #3d4856;
  --primary-soft: #cfd7e1;
  --on-primary: #f4f7fb;
  --danger: #8f2d2d;
  --ok: #3f6b54;
  --shadow: 0 22px 48px rgba(24, 36, 52, 0.14), 0 1px 0 rgba(255, 255, 255, 0.75) inset;
  --radius: 28px;
  --control-radius: 16px;
  font-synthesis: none;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121417;
    --ink: #e8ecf1;
    --muted: #a7b0bb;
    --card: #1b1f24;
    --line: #3a414b;
    --field: #161a1f;
    --primary: #c5ccd6;
    --primary-hover: #dce2ea;
    --primary-soft: #2a3038;
    --on-primary: #1a1f26;
    --danger: #ffb4ab;
    --ok: #8fd5a6;
    --shadow: 0 22px 48px rgba(0, 0, 0, 0.4), 0 1px 0 rgba(255, 255, 255, 0.04) inset;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: Manrope, "Segoe UI", sans-serif;
  letter-spacing: -0.011em;
}

.shell {
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: 32px 20px;
}

.card {
  width: min(100%, 560px);
  padding: 40px 36px 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.kicker {
  margin: 0 0 18px;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.title-small {
  display: block;
  font-size: clamp(1.15rem, 3.2vw, 1.45rem);
  font-weight: 600;
  color: var(--muted);
  letter-spacing: -0.02em;
}

.title-big {
  display: block;
  margin-top: 4px;
  font-size: clamp(2.15rem, 6vw, 3.35rem);
  font-weight: 800;
}

.lead,
.copy,
.success p {
  line-height: 1.55;
}

.lead {
  margin: 16px 0 0;
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--ink);
}

.copy {
  margin: 14px 0 0;
  font-size: 1rem;
  color: var(--muted);
}

.form {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

.form.is-hidden {
  display: none;
}

.honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
}

.field {
  position: relative;
  display: block;
}

.field textarea {
  display: block;
  width: 100%;
  min-height: 148px;
  padding: 22px 18px 16px;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  background: var(--field);
  color: var(--ink);
  font: 500 1rem/1.5 Manrope, "Segoe UI", sans-serif;
  resize: vertical;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.field span {
  position: absolute;
  top: 18px;
  left: 16px;
  max-width: calc(100% - 32px);
  padding: 0 4px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  pointer-events: none;
  transform-origin: left center;
  transition: transform 0.16s ease, color 0.16s ease, top 0.16s ease, font-size 0.16s ease;
}

.field textarea:focus,
.field textarea:not(:placeholder-shown) {
  border-color: var(--primary);
}

.field textarea:focus {
  box-shadow: 0 0 0 4px var(--primary-soft);
}

.field textarea:focus + span,
.field textarea:not(:placeholder-shown) + span {
  top: -8px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--card);
}

button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  border: 0;
  border-radius: var(--control-radius);
  background: var(--primary);
  color: var(--on-primary);
  font: 700 1rem/1 Manrope, "Segoe UI", sans-serif;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease, opacity 0.18s ease;
}

button:hover {
  background: var(--primary-hover);
}

button:active {
  transform: scale(0.985);
}

button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.btn-spinner {
  display: none;
  width: 18px;
  height: 18px;
  margin-left: 10px;
  border: 2px solid color-mix(in srgb, var(--on-primary) 35%, transparent);
  border-top-color: var(--on-primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

button.is-busy .btn-spinner {
  display: block;
}

.status {
  min-height: 1.2em;
  margin: 0;
  color: var(--danger);
  font-size: 0.92rem;
  font-weight: 600;
}

.success {
  margin-top: 28px;
  text-align: center;
}

.success[hidden] {
  display: none;
}

.check {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 8px auto 16px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--ok);
}

.check svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.success h2 {
  margin: 0;
  font-size: 1.6rem;
  letter-spacing: -0.03em;
}

.success p {
  color: var(--muted);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 520px) {
  .card {
    padding: 28px 20px 22px;
    border-radius: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
