:root {
  --blue: #29A9E0;
  --blue-dark: #1E8AC0;
  --blue-light: #EAF6FC;
  --magenta: #F24E7D;
  --magenta-dark: #DA3A66;
  --purple: #C73B82;
  --text: #1E293B;
  --text-mid: #475569;
  --text-light: #64748B;
  --bg: #ffffff;
  --bg-accent: #EEF2F8;
  --border: #d8dde3;
  --focus-ring: rgba(41, 169, 224, 0.22);
  --error: #b42318;
  --success: #217a46;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg-accent);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.5;
}

button,
input {
  font: inherit;
}

.page-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 18px;
}

.form-card {
  position: relative;
  width: min(100%, 760px);
  background: var(--bg);
  border: 1px solid #e8eef5;
  border-radius: 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  padding: 40px 44px 32px;
}

.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 28px;
}

.brand-logo {
  display: block;
  width: min(100%, 220px);
  height: auto;
}

.form-header {
  margin-bottom: 32px;
}

.step-counter {
  margin: 0 0 10px;
  color: var(--magenta-dark);
  font-weight: 800;
}

h1,
h2,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.18;
}

h2 {
  margin: 0 0 18px;
  font-size: 24px;
  line-height: 1.25;
}

.lead-text {
  margin: 16px 0 0;
  color: var(--text-mid);
  font-size: 20px;
}

.form-step[hidden] {
  display: none;
}

.contact-row {
  display: grid;
  gap: 10px;
  padding: 20px;
  border: 1px solid var(--border);
  background: #fff;
}

.contact-row span {
  font-weight: 800;
}

.contact-row input {
  width: 100%;
  min-height: 56px;
  border: 1px solid var(--border);
  padding: 13px 16px;
  color: var(--text);
}

.contact-row:focus-within,
.contact-row input:focus-visible {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px var(--focus-ring);
  outline: none;
}

.contact-help {
  margin: 14px 0 0;
  color: var(--text-mid);
}

.consent-row {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 14px;
  align-items: start;
  padding: 20px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
}

.consent-row input {
  width: 28px;
  height: 28px;
  margin: 2px 0 0;
  accent-color: var(--magenta);
}

.upload-zone {
  display: grid;
  gap: 8px;
  min-height: 180px;
  padding: 28px;
  border: 3px dashed var(--blue);
  background: var(--blue-light);
  color: var(--text);
  cursor: pointer;
}

.upload-zone:focus-within,
.consent-row:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.upload-title {
  font-size: 24px;
  font-weight: 800;
}

.upload-help {
  color: var(--text-mid);
}

.upload-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 10px 0 4px;
}

.upload-option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 72px;
  padding: 14px;
  border: 2px solid rgba(41, 169, 224, 0.28);
  background: #fff;
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
  text-align: center;
}

.upload-option-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--blue-light);
  color: var(--magenta);
}

.upload-option-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.upload-zone input {
  width: 100%;
  min-height: 56px;
  padding: 13px 0;
  color: var(--text);
}

.actions {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  margin-top: 28px;
}

.actions-split {
  justify-content: space-between;
}

.button {
  min-height: 64px;
  border: 0;
  border-radius: 999px;
  padding: 16px 32px;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  white-space: normal;
}

.button-submit {
  width: 280px;
  max-width: 100%;
}

.button-primary {
  color: #fff;
  background: var(--magenta);
}

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

.button-secondary {
  color: var(--text);
  background: #edf3f8;
}

.button-secondary:hover {
  background: #dce9f2;
}

.button:focus-visible,
.upload-zone input:focus-visible,
.consent-row input:focus-visible {
  outline: 4px solid var(--focus-ring);
  outline-offset: 3px;
}

.form-status {
  min-height: 58px;
  margin: 24px 0 0;
  color: var(--text-mid);
  font-weight: 700;
}

.completion-panel {
  display: grid;
  gap: 16px;
  padding: 24px;
  border: 1px solid #b7e4c9;
  background: #effaf4;
  color: var(--text);
}

.completion-panel[hidden] {
  display: none;
}

.completion-panel p {
  margin: 0;
  color: var(--text-mid);
  font-size: 20px;
}

.form-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(3px);
}

.form-overlay[hidden] {
  display: none;
}

.overlay-panel {
  display: grid;
  justify-items: center;
  gap: 12px;
  width: min(100%, 420px);
  padding: 28px;
  border: 1px solid #e8eef5;
  background: #fff;
  box-shadow: 0 18px 50px rgba(30, 41, 59, 0.14);
  text-align: center;
}

.overlay-panel strong {
  font-size: 24px;
  line-height: 1.25;
}

.overlay-panel span:last-child {
  color: var(--text-mid);
  font-weight: 700;
}

.overlay-spinner {
  width: 44px;
  height: 44px;
  border: 5px solid var(--blue-light);
  border-top-color: var(--magenta);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

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

.form-status.is-error {
  color: var(--error);
}

.form-status.is-success {
  color: var(--success);
}

@media (max-width: 640px) {
  .page-shell {
    align-items: start;
    padding: 16px;
  }

  .form-card {
    padding: 28px 20px 24px;
  }

  h1 {
    font-size: 28px;
  }

  h2,
  .upload-title {
    font-size: 22px;
  }

  .lead-text {
    font-size: 18px;
  }

  .actions,
  .actions-split {
    flex-direction: column-reverse;
  }

  .button,
  .button-submit {
    width: 100%;
  }

  .brand-logo {
    width: min(100%, 200px);
  }

  .upload-options {
    grid-template-columns: 1fr;
  }
}

