:root {
  --color-primary: #0E4033;
  --color-primary-dark: #0B473A;
  --color-accent: #8FD299;
  --color-bg: #F9F3F0;
  --color-bg-alt: #F4E7E1;
  --color-ink: #161616;
  --color-white: #FFFFFF;
  --color-error: #B3261E;
  --font-heading: 'Vanitas', Georgia, 'Times New Roman', serif;
  --font-body: 'Jost', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius: 10px;
  --shadow-card: 0 10px 30px rgba(14, 64, 51, 0.08);
}

@font-face {
  font-family: 'Vanitas';
  src: url('../fonts/Vanitas Font Family/fonts/fonnts.com-Vanitas-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Vanitas';
  src: url('../fonts/Vanitas Font Family/fonts/fonnts.com-Vanitas-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Vanitas';
  src: url('../fonts/Vanitas Font Family/fonts/fonnts.com-Vanitas-Italic.otf') format('opentype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Vanitas';
  src: url('../fonts/Vanitas Font Family/fonts/fonnts.com-Vanitas-BoldItalic.otf') format('opentype');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--color-ink);
  background-color: var(--color-bg);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.site-header img {
  height: 84px;
}

@media (max-width: 600px) {
  .site-header img {
    height: 64px;
  }
}

.wizard {
  max-width: 720px;
  margin: 0 auto 64px;
  padding: 0 16px;
}

.wizard-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 32px;
  background-color: var(--color-white);
  background-repeat: no-repeat;
  background-image:
    url('../logos/woodhall-emblem-faint.png'),
    url('../logos/woodhall-emblem-faint.png'),
    url('../logos/woodhall-emblem-faint.png'),
    url('../logos/woodhall-emblem-faint.png');
  background-size: 90px auto, 90px auto, 90px auto, 90px auto;
  background-position:
    -18px -18px,
    calc(100% + 18px) -18px,
    -18px calc(100% + 18px),
    calc(100% + 18px) calc(100% + 18px);
}

@media (max-width: 600px) {
  .wizard-card {
    background-size: 60px auto, 60px auto, 60px auto, 60px auto;
    background-position:
      -12px -12px,
      calc(100% + 12px) -12px,
      -12px calc(100% + 12px),
      calc(100% + 12px) calc(100% + 12px);
  }
}

.draft-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-accent);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 20px;
  font-size: 14px;
  color: var(--color-primary);
}

.draft-banner button {
  background: transparent;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
  padding: 6px 14px;
  font-size: 13px;
  white-space: nowrap;
}

.progress {
  display: flex;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 8px;
}

.progress-step {
  flex: 1;
  text-align: center;
  padding: 10px 6px;
  border-radius: 999px;
  background: var(--color-bg-alt);
  color: var(--color-primary);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.progress-step.active {
  background: var(--color-primary);
  color: var(--color-white);
}

.progress-step.complete {
  background: var(--color-accent);
  color: var(--color-primary);
}

h1, h2, h3 {
  font-family: var(--font-heading);
  color: var(--color-primary);
  margin-top: 0;
}

.form-step {
  display: none;
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.form-step.active { display: block; }

.form-step.slide-out-left { opacity: 0; transform: translateX(-24px); }
.form-step.slide-out-right { opacity: 0; transform: translateX(24px); }
.form-step.slide-in-from-right { opacity: 0; transform: translateX(24px); }
.form-step.slide-in-from-left { opacity: 0; transform: translateX(-24px); }

@media (prefers-reduced-motion: reduce) {
  .form-step { transition: none; }
}

.field {
  margin-bottom: 20px;
}

.field label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="date"],
.field textarea,
.field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #D8CFC8;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 15px;
}

.field .error {
  color: var(--color-error);
  font-size: 13px;
  margin-top: 4px;
  display: none;
}

.field.has-error input,
.field.has-error textarea,
.field.has-error select {
  border-color: var(--color-error);
}

.field.has-error .error {
  display: block;
}

.document-row {
  border: 1px solid #E4DAD2;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 12px;
}

.document-row .file-input {
  margin-top: 10px;
  display: none;
}

.document-row.checked .file-input {
  display: block;
}

.actions {
  display: flex;
  justify-content: space-between;
  margin-top: 28px;
}

button {
  font-family: var(--font-body);
  font-weight: 600;
  border: none;
  border-radius: 999px;
  padding: 12px 28px;
  cursor: pointer;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
}

.btn-primary:hover:not(:disabled) { background: var(--color-primary-dark); }

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

.btn-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btn-spin 0.7s linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
  .btn-spinner { animation-duration: 1.4s; }
}

.confirmation {
  text-align: center;
  padding: 40px 16px;
}

.progress-mobile {
  display: none;
  margin-bottom: 24px;
}

.progress-mobile-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 8px;
}

.progress-mobile-track {
  height: 6px;
  background: var(--color-bg-alt);
  border-radius: 999px;
  overflow: hidden;
}

.progress-mobile-fill {
  height: 100%;
  background: var(--color-primary);
  border-radius: 999px;
  transition: width 0.2s ease;
}

@media (max-width: 600px) {
  .wizard-card { padding: 20px; }
  .progress { display: none; }
  .progress-mobile { display: block; }
}

.dev-prefill-button {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 100;
  background: #FFF3CD;
  color: #7A5B00;
  border: 1px dashed #7A5B00;
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 13px;
}
