:root {
  --bg: #f5f7fb;
  --panel: rgba(255, 255, 255, 0.92);
  --card-border: rgba(148, 163, 184, 0.25);
  --text: #10213a;
  --muted: #5b6c85;
  --primary: #2e6df6;
  --primary-dark: #1f56d4;
  --accent: #ecf3ff;
  --success: #1f9d62;
  --success-soft: #eafaf2;
  --error: #d93d4b;
  --error-soft: #fff0f2;
  --shadow: 0 20px 45px rgba(16, 33, 58, 0.12);
  --radius: 22px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", sans-serif;
  background: radial-gradient(circle at top, #ffffff 0%, #edf4ff 28%, var(--bg) 100%);
  color: var(--text);
}

img { max-width: 100%; display: block; }

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button, input {
  font: inherit;
}

.page-shell {
  min-height: calc(100vh - 60px);
  display: grid;
  place-items: center;
  padding: 24px 16px 12px;
}

.card {
  width: min(100%, 540px);
  background: var(--panel);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  padding: clamp(20px, 4vw, 34px);
  backdrop-filter: blur(12px);
  animation: fadeUp 0.45s ease;
}

.brand {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), #4a8ef7);
  color: white;
  font-weight: 800;
  letter-spacing: 0.06em;
  box-shadow: 0 12px 25px rgba(46, 109, 246, 0.25);
}

.header-block {
  text-align: center;
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0 0 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--primary);
}

h1 {
  margin: 0;
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  line-height: 1.15;
}

.subtitle {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.98rem;
}

form {
  display: grid;
  gap: 18px;
}

.field-group,
.checkbox-group {
  display: grid;
  gap: 8px;
}

label {
  font-weight: 600;
  font-size: 0.96rem;
}

input[type="text"],
input[type="date"],
input[type="tel"],
input[type="email"] {
  width: 100%;
  border: 1.5px solid rgba(148, 163, 184, 0.55);
  border-radius: 14px;
  background: rgba(255,255,255,0.8);
  padding: 0.95rem 1rem;
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

input::placeholder {
  color: #8a9bb8;
}

input:focus {
  outline: none;
  border-color: rgba(46, 109, 246, 0.8);
  box-shadow: 0 0 0 4px rgba(46, 109, 246, 0.12);
}

input.invalid {
  border-color: var(--error);
  background: var(--error-soft);
}

.checkbox-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 14px;
  background: rgba(255,255,255,0.55);
  cursor: pointer;
}

.checkbox-item input {
  margin-top: 4px;
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.checkbox-item span {
  color: var(--text);
  line-height: 1.5;
  font-size: 0.96rem;
}

.primary-button,
.secondary-button {
  border: none;
  border-radius: 14px;
  padding: 0.95rem 1.2rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 14px 30px rgba(46, 109, 246, 0.24);
}

.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-1px);
}

.primary-button:disabled {
  opacity: 0.7;
  cursor: wait;
}

.secondary-button {
  background: rgba(46, 109, 246, 0.08);
  color: var(--primary-dark);
}

.error-message {
  min-height: 18px;
  color: var(--error);
  font-size: 0.78rem;
  line-height: 1.4;
  display: block;
}

.success-state {
  display: none;
  text-align: center;
  padding-top: 8px;
}

.success-state.visible {
  display: block;
}

.success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  background: var(--success-soft);
  color: var(--success);
  font-size: 2.1rem;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(31, 157, 98, 0.12);
}

.success-state h2 {
  margin: 0 0 10px;
  font-size: clamp(1.6rem, 4vw, 2.1rem);
}

.success-state p {
  margin: 0 0 20px;
  color: var(--muted);
  line-height: 1.6;
}

.hidden {
  display: none !important;
}

.page-footer {
  text-align: center;
  padding: 18px 12px 28px;
  color: var(--muted);
  font-size: 0.8rem;
}

.policy-page {
  padding-top: 44px;
}

.policy-card {
  width: min(100%, 760px);
}

.policy-copy {
  display: grid;
  gap: 14px;
  color: var(--muted);
  line-height: 1.75;
}

.back-link {
  display: inline-block;
  margin-top: 18px;
  font-weight: 600;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 420px) {
  .card {
    border-radius: 18px;
    padding: 18px 16px 20px;
  }

  .checkbox-item {
    padding: 10px 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
