/* ============================================================
   Story of US - submission wizard + thanks page
   ============================================================ */

.submit-hero {
  padding-block: 3.5rem 1rem;
  text-align: center;
}

.submit-hero h1 {
  font-size: clamp(2rem, 4.2vw, 3.2rem);
  margin-bottom: 1.2rem;
}

.submit-hero p {
  margin-inline: auto;
  color: var(--ink-body);
}

.submit-section {
  padding-block: 2rem 5rem;
}

/* --- Wizard shell --- */

.wizard {
  background: var(--paper-raised);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: clamp(1.6rem, 4vw, 3rem);
}

.wizard-errors {
  background: rgba(163, 45, 45, 0.08);
  border: 1px solid var(--error);
  border-radius: var(--radius-input);
  color: var(--error);
  font-weight: 600;
  padding: 1rem 1.2rem;
  margin-bottom: 1.6rem;
}

.wizard-errors p {
  margin: 0;
}

/* --- Progress --- */

.wizard-progress {
  margin-bottom: 2.2rem;
}

.wizard-progress-text {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 0.7rem;
}

.wizard-progress-title {
  color: var(--red);
}

.wizard-progress-track {
  height: 4px;
  border-radius: var(--radius-pill);
  background: var(--ink-wash);
  overflow: hidden;
}

.wizard-progress-fill {
  height: 100%;
  width: 12.5%;
  border-radius: var(--radius-pill);
  background: var(--red);
  transition: width 400ms var(--ease-out);
}

/* --- Steps --- */

.wizard-step {
  border: 0;
  padding: 0;
  margin: 0 0 2.6rem;
  min-inline-size: 0;
}

.wizard-step legend {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.6rem;
  color: var(--ink);
  margin-bottom: 1rem;
  padding: 0;
}

.step-count {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.35rem;
}

.step-optional {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-muted);
}

.step-note {
  color: var(--ink-muted);
  font-size: 0.95rem;
  margin-bottom: 1.6rem;
}

/* JS wizard mode: one step at a time with directional slide */
html.js-enabled .wizard.is-wizard .wizard-step {
  display: none;
}

html.js-enabled .wizard.is-wizard .wizard-step.is-current {
  display: block;
}

html.js-enabled .wizard.is-wizard .wizard-step.is-current {
  animation: step-in 420ms var(--ease-out);
}

html.js-enabled .wizard.is-wizard .wizard-step.is-current.from-prev {
  animation: step-in-reverse 420ms var(--ease-out);
}

@keyframes step-in {
  from {
    opacity: 0;
    transform: translateX(36px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes step-in-reverse {
  from {
    opacity: 0;
    transform: translateX(-36px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* --- Fields --- */

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.choice-field .choice-label {
  display: block;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.7rem;
  font-size: 0.95rem;
}

.choice-field ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem 1.2rem;
}

.choice-field li label {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-weight: 400;
  color: var(--ink-body);
  font-size: 0.97rem;
  margin: 0;
  cursor: pointer;
}

.choice-field input[type="radio"],
.choice-field input[type="checkbox"],
.consent-option input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.2rem;
  accent-color: var(--red);
  flex: none;
}

.upload-field input[type="file"] {
  width: 100%;
  padding: 0.9rem 1rem;
  border: 1.5px dashed var(--hairline-strong);
  border-radius: var(--radius-input);
  background: var(--paper);
  font-size: 0.95rem;
  color: var(--ink-body);
  cursor: pointer;
}

.upload-field input[type="file"]::file-selector-button {
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: var(--on-ink);
  font: inherit;
  font-weight: 600;
  padding: 0.45rem 1.1rem;
  margin-right: 1rem;
  cursor: pointer;
}

.consent-field {
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-input);
  padding: 1rem 1.2rem;
}

.consent-option {
  display: flex;
  gap: 0.7rem;
  font-weight: 500;
  color: var(--ink-body);
  margin: 0;
  cursor: pointer;
}

.wizard-security {
  margin-top: 2rem;
}

/* --- Nav --- */

.wizard-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--hairline);
  padding-top: 1.8rem;
}

.wizard-nav [data-wizard-next] {
  margin-left: auto;
}

.wizard-submit {
  margin-left: auto;
}

.wizard-submit.is-sending {
  opacity: 0.7;
  pointer-events: none;
}

/* --- Thanks page --- */

.thanks-section {
  position: relative;
  min-height: 60vh;
  padding-block: 5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.thanks-burst {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.thanks-burst span {
  position: absolute;
  left: 50%;
  top: 42%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  will-change: transform;
}

.thanks-mark .brand-mark {
  width: 84px;
  height: 84px;
  margin-bottom: 1.6rem;
}

.thanks-section p {
  max-width: 52ch;
  margin-inline: auto;
}

.thanks-actions {
  margin-top: 2.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

@media (max-width: 640px) {
  .field-row,
  .choice-field ul {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html.js-enabled .wizard.is-wizard .wizard-step.is-current,
  html.js-enabled .wizard.is-wizard .wizard-step.is-current.from-prev {
    animation: none;
  }
}
