@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700;800&display=swap');

:root {
  --color-navy: #4a2b5c;
  --color-navy-2: #3a2149;
  --color-accent: #4a2b5c;
  --color-accent-2: #8b6b9c;
  --color-white: #ffffff;
  --color-bg: #f2eaf7;
  --color-text: #1a1a1a;
  --color-muted: #5c5266;
  --color-border: rgba(74, 43, 92, 0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 12px 40px rgba(74, 43, 92, 0.1);
  --shadow-sm: 0 6px 20px rgba(74, 43, 92, 0.08);
  font-family: "Vazirmatn", Tahoma, sans-serif;
  color: var(--color-text);
  background: var(--color-white);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  padding: 36px 16px;
  background:
    radial-gradient(circle at 10% 0%, rgba(74, 43, 92, .08), transparent 28rem),
    var(--color-white);
}

button, input, textarea { font: inherit; }

.page {
  width: min(880px, 100%);
  margin: 0 auto;
}

.page-header { margin: 0 0 24px; }
.eyebrow {
  display: inline-block;
  color: var(--color-accent);
  background: #f2eaf7;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: .82rem;
  font-weight: 700;
}
.page-header h1 { margin: 12px 0 8px; font-size: clamp(1.7rem, 4vw, 2.25rem); }
.page-header p, .section-heading p { color: var(--color-muted); margin: 0; line-height: 1.9; }

form, .success-panel {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: clamp(18px, 4vw, 34px);
  box-shadow: 0 12px 40px rgba(74, 43, 92, .1);
}

.form-section + .form-section { border-top: 1px solid rgba(74, 43, 92, .10); margin-top: 28px; padding-top: 28px; }

.section-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.section-number {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 13px;
  color: var(--color-accent);
  background: #f2eaf7;
  font-weight: 800;
}
.section-heading h2 { margin: 0 0 3px; font-size: 1.12rem; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px; }
.field { min-width: 0; }
.field label, .choice-group legend { display: block; margin-bottom: 8px; font-weight: 600; font-size: .93rem; }
.field label span, .choice-group legend span { color: #dc3545; }

input[type="text"], input[type="tel"], textarea {
  display: block;
  width: 100%;
  border: 1px solid rgba(74, 43, 92, .20);
  border-radius: 11px;
  padding: 12px 13px;
  color: var(--color-text);
  background: #fff;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}
textarea { resize: vertical; min-height: 112px; line-height: 1.9; }
input:focus, textarea:focus { border-color: #8b6b9c; box-shadow: 0 0 0 3px rgba(74, 43, 92, .12); }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: #dc3545; }
.error { display: block; min-height: 18px; margin-top: 5px; color: #c62828; font-size: .78rem; }
.field-meta { display: flex; justify-content: space-between; gap: 10px; align-items: start; }
.counter { color: #7b6d83; font-size: .76rem; padding-top: 5px; white-space: nowrap; }

.choice-group { border: 0; padding: 0; margin: 0 0 22px; }
.choice-group:last-child { margin-bottom: 0; }
.choice-group legend { padding: 0; }
.choice {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 2px 8px 0 16px;
  cursor: pointer;
}
.choice input { accent-color: #4a2b5c; width: 17px; height: 17px; }

.form-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.submit-button, .reset-button {
  border: 0;
  border-radius: 11px;
  padding: 12px 20px;
  cursor: pointer;
  font-weight: 700;
  transition: transform .15s, background .15s;
}
.submit-button { color: #fff; background: var(--color-accent); }
.submit-button:hover { background: #1c48a8; transform: translateY(-1px); }
.reset-button { color: #4d4354; background: #f2eaf7; }
.reset-button:hover { background: #e8d8f0; }
.privacy-note { color: #7b6d83; font-size: .8rem; margin: 14px 0 0; }
.form-alert { margin-top: 18px; color: #b42318; font-size: .9rem; }
.full-width { grid-column: 1 / -1; }
.hidden { display: none !important; }

.success-panel { margin-top: 20px; text-align: center; }
.success-icon {
  width: 52px; height: 52px; margin: 0 auto 12px;
  display: grid; place-items: center; border-radius: 50%;
  color: #23764b; background: #e5f4eb; font-size: 1.6rem; font-weight: 800;
}
.success-panel h2 { margin: 0 0 8px; }
.success-panel p { color: var(--color-muted); line-height: 1.9; }

@media (max-width: 600px) {
  body { padding: 20px 10px; }
  .form-grid { grid-template-columns: 1fr; gap: 10px; }
  .full-width { grid-column: auto; }
  .choice { margin: 3px 0 0 12px; }
  .form-actions { flex-direction: column; }
  .submit-button, .reset-button { width: 100%; }
}
