:root {
  color-scheme: light;
  --page-bg-top: #f7fbff;
  --page-bg-bottom: #eef4fb;
  --surface: #ffffff;
  --surface-muted: #f8f9fb;
  --surface-border: #d6dee9;
  --divider: #e4ebf3;
  --text: #111111;
  --text-soft: #2f3135;
  --text-muted: #737d8b;
  --accent: #2f5c9b;
  --accent-strong: #244a7e;
  --danger: #b13e32;
  --success: #2d7843;
  --shadow: 0 24px 60px rgba(22, 38, 62, 0.08);
  --card-radius: 15px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: "Lato", sans-serif;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88) 0%, rgba(255, 255, 255, 0.55) 22%, transparent 100%),
    linear-gradient(160deg, var(--page-bg-top) 0%, var(--page-bg-bottom) 100%);
  background-repeat: no-repeat;
  background-size: cover;
}

img {
  display: block;
  max-width: 100%;
}

input,
textarea,
button {
  font: inherit;
}

[hidden] {
  display: none !important;
}

.page-shell {
  width: min(1100px, calc(100% - 80px));
  margin: 0 auto;
  padding: 3rem 0 4.5rem;
}

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1.75rem;
}

.hero-copy {
  min-width: 0;
  max-width: 42rem;
}

.hero-logo {
  flex-shrink: 0;
  margin-left: auto;
  width: 108px;
}

.hero-logo img {
  width: 100%;
  height: auto;
}

.eyebrow,
.form-step:not([data-step="0"]) h2 {
  margin: 0 0 0.65rem;
  font-family: "Lato", sans-serif;
  font-size: 13px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--accent);
}

h1 {
  margin: 0;
  font-family: "Poppins", sans-serif;
  font-size: 36px;
  line-height: 1.04;
  color: #0d0d0d;
}

.intro {
  max-width: 38rem;
  margin: 1rem 0 0;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-soft);
}

.card {
  background: var(--surface);
  border: 1px solid rgba(214, 222, 233, 0.8);
  border-radius: var(--card-radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

#onboarding-form {
  min-width: 0;
  padding: 1.4rem 1.5rem 1.5rem;
}

.step-progress-panel,
.step-navigation,
.upload-panel,
.status-panel {
  border-top: 1px solid var(--divider);
}

.step-progress-panel {
  margin: -1.4rem -1.5rem 0;
  padding: 0;
  border-top: 0;
  background: linear-gradient(180deg, #f7f8fa 0%, #f3f5f8 100%);
  box-shadow: inset 0 -1px 0 rgba(214, 222, 233, 0.85), 0 10px 22px rgba(25, 39, 64, 0.04);
  border-radius: var(--card-radius) var(--card-radius) 0 0;
}

.step-progress-scroll {
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 0.75rem 1.5rem;
}

.step-progress-scroll::-webkit-scrollbar {
  display: none;
}

.step-tabs {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 1.1rem;
  min-width: 100%;
}

.step-tab {
  border: 0;
  background: transparent;
  padding: 0.35rem 0.7rem;
  font-family: "Lato", sans-serif;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0;
  color: #8c95a2;
  cursor: pointer;
  white-space: nowrap;
  border-radius: 999px;
  transition: color 180ms ease, background-color 180ms ease;
}

.step-tab:hover,
.step-tab:focus-visible {
  color: var(--accent);
  outline: none;
}

.step-tab.is-active {
  color: #ffffff;
  background: var(--accent);
}

.step-tab.is-complete {
  color: #576170;
}

.step-panels {
  margin-top: 1.4rem;
}

.form-step,
.completion-step {
  display: flex;
  flex-direction: column;
  padding-top: 20px;
  min-width: 0;
}

.form-step h2,
.completion-step h2 {
  margin: 0 0 0.9rem;
}

.form-step[data-step="0"] h2,
.completion-step h2 {
  font-family: "Poppins", sans-serif;
  font-size: clamp(2.2rem, 4.2vw, 3rem);
  line-height: 1.06;
  letter-spacing: 0;
  text-transform: none;
  color: #0d0d0d;
}

.field,
.field-full {
  width: 100%;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-bottom: 0;
}

.field > span,
.field-title {
  margin: 0;
  font-family: "Poppins", sans-serif;
  font-size: clamp(2rem, 3.4vw, 2.25rem);
  line-height: 1.12;
  font-weight: 600;
  color: #000000;
}

.field-secondary > span {
  font-size: 1.2rem;
  line-height: 1.25;
}

.step-zero-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem;
  margin-top: 2rem;
}

.step-zero-fields .field > span {
  font-family: "Lato", sans-serif;
  font-size: 0.95rem;
  line-height: 1.3;
  font-weight: 700;
  color: #1f2430;
}

.step-copy p,
.field-helper,
.status-message {
  margin: 0;
}

.step-copy p + p {
  margin-top: 0.9rem;
}

.field-helper {
  max-width: 52rem;
  color: #4b5563;
}

.field-helper + .textarea-shell,
.field-helper + textarea {
  margin-top: 10px;
}

.field input,
.field textarea,
.upload-input,
.file-summary,
.file-item,
.skipped-files-panel {
  border: 1px solid var(--surface-border);
}

.field input,
.field textarea {
  width: 100%;
  border-radius: 12px;
  background: var(--surface-muted);
  color: var(--text);
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.field input {
  min-height: 56px;
  padding: 0.95rem 1rem;
}

.field textarea {
  min-height: 220px;
  padding: 1rem 1rem 1.8rem;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(47, 92, 155, 0.12);
}

.field .input-error {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px rgba(177, 62, 50, 0.1);
}

.field-error {
  margin: 0.15rem 0 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--danger);
}

.textarea-shell {
  position: relative;
  margin-bottom: 0;
}

.textarea-count {
  position: absolute;
  right: 0.9rem;
  bottom: 0.75rem;
  margin: 0;
  font-family: "Roboto Mono", monospace;
  font-size: 10px;
  line-height: 1;
  color: #8b93a0;
  pointer-events: none;
}

.upload-panel.step-upload-panel {
  margin-top: 0.25rem;
  padding-top: 0;
  border-top: 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.upload-panel {
  margin-top: 1.8rem;
  padding-top: 1.4rem;
}

.media-step-heading {
  margin: 0 0 0.75rem;
  font-family: "Poppins", sans-serif;
  font-size: clamp(2rem, 3.4vw, 2.25rem);
  line-height: 1.12;
  font-weight: 600;
  color: #000000;
}

.upload-rules {
  font-family: "Roboto Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.5;
  color: #9a9b9c;
}

.media-notes-field {
  margin-top: 30px;
}

.upload-input {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: 1.1rem;
  padding: 0.95rem 1rem;
  border-radius: 12px;
  background: #fbfcfe;
  cursor: pointer;
  max-width: 100%;
}

.upload-input span {
  font-family: "Lato", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent);
}

.upload-input input {
  width: auto;
  max-width: 100%;
  min-width: 0;
  border: 0;
  padding: 0;
  background: transparent;
}

.file-summary {
  margin-top: 1rem;
  width: 100%;
  max-width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: #fbfcfe;
}

.skipped-files {
  margin-top: 0.75rem;
}

.skipped-files:empty {
  display: none;
}

.skipped-files-panel {
  padding: 0.9rem 1rem;
  border-radius: 12px;
  background: #fff7f5;
  color: var(--danger);
}

.skipped-files-panel strong {
  display: block;
  margin-bottom: 0.35rem;
}

.skipped-files-panel ul {
  margin: 0;
  padding-left: 1.1rem;
}

.skipped-files-panel li + li {
  margin-top: 0.25rem;
}

.file-list {
  margin: 0.9rem 0 0;
  width: 100%;
  min-width: 0;
  padding: 0;
  list-style: none;
}

.file-list li + li {
  margin-top: 0.65rem;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1rem;
  border-radius: 12px;
  background: #fbfcfe;
}

.file-item-text {
  min-width: 0;
}

.restore-note {
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: #6f7783;
}

.file-item-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  word-break: break-word;
}

.file-item-meta {
  font-size: 0.9rem;
}

.file-remove {
  flex-shrink: 0;
  width: 2.1rem;
  height: 2.1rem;
  border: 1px solid var(--surface-border);
  border-radius: 999px;
  background: #ffffff;
  color: #6f7783;
  cursor: pointer;
  transition: border-color 200ms ease, color 200ms ease, background-color 200ms ease;
}

.file-remove:hover,
.file-remove:focus-visible {
  outline: none;
  border-color: var(--accent);
  color: var(--accent);
}

.step-validation-message {
  min-height: 1.4rem;
  margin: 1rem 0 0;
  font-size: 0.95rem;
  color: var(--danger);
}

.step-validation-message:empty {
  display: none;
}

.step-navigation,
.status-panel {
  margin-top: 2rem;
  padding-top: 1.35rem;
}

.step-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.progress-block {
  display: block;
}

.progress-block span {
  display: block;
  margin-bottom: 0.7rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}

progress {
  width: 100%;
  height: 0.8rem;
  appearance: none;
}

progress::-webkit-progress-bar {
  background: #e7edf5;
  border-radius: 999px;
}

progress::-webkit-progress-value {
  background: linear-gradient(90deg, var(--accent) 0%, #6d8ebe 100%);
  border-radius: 999px;
}

progress::-moz-progress-bar {
  background: linear-gradient(90deg, var(--accent) 0%, #6d8ebe 100%);
  border-radius: 999px;
}

.submit-button,
.secondary-button {
  min-height: 52px;
  padding: 0.95rem 1.35rem;
  border-radius: 8px;
  font-family: "Lato", sans-serif;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 3px;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background-color 0.5s ease,
    color 0.5s ease,
    border-color 0.5s ease,
    box-shadow 0.5s ease;
}

.submit-button {
  border: 2px solid var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.submit-button:hover:not(:disabled),
.submit-button:focus-visible:not(:disabled) {
  outline: none;
  background: #ffffff;
  color: var(--accent);
  border-color: var(--accent);
}

.secondary-button {
  border: 1px solid #b6beca;
  background: #ffffff;
  color: #6c7582;
}

.secondary-button:hover:not(:disabled),
.secondary-button:focus-visible:not(:disabled) {
  outline: none;
  border-color: var(--accent);
  color: var(--accent);
}

.submit-button:disabled,
.secondary-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

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

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

.status-message:empty {
  display: none;
}

.completion-step {
  align-items: center;
  justify-content: center;
  min-height: auto;
  padding: 1rem 0 0.5rem;
  text-align: center;
}

.completion-check-image {
  width: 80px;
  height: auto;
  margin: 0 auto 0.9rem;
}

.completion-heading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.completion-heading h2 {
  margin: 0;
}

.completion-copy {
  max-width: 38rem;
}

.completion-contact {
  margin-top: 1.4rem;
}

.completion-contact p {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.7;
  color: #6f7783;
}

.completion-contact p + p {
  margin-top: 0.1rem;
}

#onboarding-form.is-complete .step-navigation,
#onboarding-form.is-complete .step-validation-message,
#onboarding-form.is-complete .status-panel,
#onboarding-form.is-complete .step-progress-panel {
  display: none !important;
}

@media (max-width: 900px) {
  .page-shell {
    width: min(1100px, calc(100% - 60px));
    padding-top: 1.4rem;
  }

  .field > span,
  .field-title {
    font-size: clamp(1.7rem, 6vw, 2.1rem);
  }

  h1 {
    font-size: 32px;
  }
}

@media (max-width: 720px) {
  #onboarding-form {
    padding: 1.1rem 1rem 1.2rem;
  }

  .step-progress-panel {
    margin-left: -1rem;
    margin-right: -1rem;
  }

  .step-progress-scroll {
    padding-left: 1rem;
    padding-right: 2.5rem;
  }

  .hero-logo {
    width: 78px;
  }

  .step-zero-fields {
    grid-template-columns: 1fr;
  }

  .step-tabs {
    gap: 0.9rem;
    padding-right: 1rem;
  }

  .step-navigation {
    flex-direction: column;
    align-items: stretch;
  }

  #next-button,
  #submit-button {
    order: 1;
  }

  #back-button {
    order: 2;
  }

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

  .upload-input {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    overflow: hidden;
  }

  .upload-panel.step-upload-panel,
  .media-notes-field,
  .textarea-shell,
  .file-summary,
  .file-list,
  .file-item {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  h1 {
    font-size: 28px;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: 100%;
    padding: 40px 20px;
  }
}

@media (min-width: 821px) {
  .step-progress-scroll {
    overflow: visible;
  }

  .step-tabs {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
  }
}
