@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:wght@600;700&display=swap");

:root {
  --navy: #071a2b;
  --navy-light: #102d45;
  --blue: #1f6b9d;
  --blue-hover: #2b82b5;
  --blue-light: #eaf1f4;
  --ink: #17212b;
  --muted: #61707c;
  --paper: #f7f8f8;
  --white: #ffffff;
  --line: #dce3e7;
  --danger: #b42318;
  --font-body: "DM Sans", Arial, sans-serif;
  --font-display: "Playfair Display", Georgia, serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  padding: 48px 20px;
  display: flex;
  justify-content: center;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(7, 26, 43, 0.95), rgba(16, 45, 69, 0.94)),
    repeating-linear-gradient(
      125deg,
      transparent 0 74px,
      rgba(255, 255, 255, 0.025) 75px 76px
    );
}

#surveyForm {
  width: 100%;
  max-width: 760px;
  padding: 48px;
  background: var(--white);
  border: 1px solid rgba(220, 227, 231, 0.9);
  border-radius: 8px;
  box-shadow: 0 24px 55px rgba(1, 14, 24, 0.28);
}

.form-intro {
  padding-bottom: 26px;
  margin-bottom: 30px;
  text-align: center;
  border-bottom: 1px solid var(--line);
}

.form-intro h1 {
  margin-bottom: 12px;
  color: var(--navy);
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.7rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.form-intro p {
  max-width: 600px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.65;
}

.progress-container {
  margin-bottom: 38px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 11px;
  color: var(--navy);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.progress-bar {
  width: 100%;
  height: 9px;
  overflow: hidden;
  background: #dce7ec;
  border-radius: 99px;
}

.progress {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--blue), #58a7d4);
  border-radius: inherit;
  transition: width 0.35s ease;
}

.step {
  display: none;
  animation: fadeIn 0.3s ease;
}

.step.active {
  display: block;
}

h2 {
  margin-bottom: 10px;
  color: var(--navy);
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4vw, 2.25rem);
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.step-description {
  margin-bottom: 25px;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.6;
}

label {
  display: block;
  margin-top: 22px;
  margin-bottom: 8px;
  color: #344b5a;
  font-size: 0.92rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  padding: 14px 15px;
  color: var(--ink);
  background: #fbfcfc;
  border: 1px solid #cfdce2;
  border-radius: 4px;
  outline: none;
  font: inherit;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

input::placeholder,
textarea::placeholder {
  color: #8a9aa4;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #aebfc8;
}

input:focus,
select:focus,
textarea:focus {
  background: var(--white);
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(31, 107, 157, 0.15);
}

textarea {
  min-height: 125px;
  resize: vertical;
}

select {
  cursor: pointer;
}

.error {
  background: #fffafa !important;
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 4px rgba(180, 35, 24, 0.12) !important;
}

.button-group {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.button-group button {
  min-width: 145px;
  padding: 14px 22px;
  border-radius: 3px;
  cursor: pointer;
  font: 700 0.93rem var(--font-body);
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.button-group button:hover {
  transform: translateY(-2px);
}

.back-btn {
  color: var(--navy);
  background: transparent;
  border: 1px solid var(--navy);
}

.back-btn:hover {
  color: var(--white);
  background: var(--navy);
}

.next-btn {
  margin-left: auto;
  color: var(--white);
  background: var(--blue);
  border: 1px solid var(--blue);
}

.next-btn:hover {
  background: var(--blue-hover);
  border-color: var(--blue-hover);
}

.submit-btn {
  background: #1f6b9d;
  border-color: #1f6b9d;
}

.submit-btn:hover {
  background: #2b82b5;
  border-color: #2b82b5;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 600px) {
  body {
    padding: 20px 12px;
  }

  #surveyForm {
    padding: 28px 22px;
    border-radius: 6px;
  }

  .form-intro {
    margin-bottom: 25px;
  }

  .button-group {
    flex-direction: column-reverse;
    align-items: stretch;
    margin-top: 32px;
  }

  .button-group button,
  .next-btn {
    width: 100%;
    margin-left: 0;
  }
}
/* Status message shown when the server sends the visitor back */
.form-status {
  margin: 0 0 20px;
  padding: 14px 16px;
  border-radius: 8px;
  background: #fdecec;
  border: 1px solid #f5b5b5;
  color: #8a1f1f;
  font-size: 15px;
  line-height: 1.5;
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}
