/* ============================================================
   SW Advisory — Document Upload page
   Reuses tokens & nav/footer from style.css
   ============================================================ */

/* nav forced solid (no hero behind it) */
nav.solid {
  background: rgba(245, 242, 236, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
}

/* ---------- hero ---------- */
.upload-hero {
  padding: 150px 48px 50px;
  max-width: 1100px;
}
.upload-title {
  font-size: clamp(40px, 6.5vw, 84px);
  color: var(--ink);
  margin: 18px 0 28px;
}
.upload-lead {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.8;
  color: var(--ink-soft);
  max-width: 620px;
  font-weight: 300;
}

/* ---------- form shell ---------- */
.upload-section {
  padding: 20px 48px 130px;
  max-width: 880px;
}
.upload-form { display: flex; flex-direction: column; gap: 8px; }

.form-block {
  background: var(--bg-white);
  border: 1px solid var(--line);
  padding: 40px;
  margin-bottom: 24px;
}
.form-block-head {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.form-block-num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 22px;
  color: var(--blue);
}
.form-block-head h3 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.form-hint {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--muted);
  margin: -16px 0 20px;
}

/* ---------- fields ---------- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 28px;
}
.field { display: flex; flex-direction: column; gap: 9px; }
.field:last-child:nth-child(odd) { grid-column: 1 / -1; }

.field label {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink);
}
.req { color: var(--blue); }

.field input,
.field textarea {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 300;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 13px 16px;
  transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
  width: 100%;
  resize: vertical;
}
.field input::placeholder,
.field textarea::placeholder { color: #A9A498; }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--blue);
  background: var(--bg-white);
  box-shadow: 0 0 0 3px rgba(61, 110, 148, 0.10);
}
.field input.invalid,
.field textarea.invalid { border-color: #C0563E; background: #FBF1EE; }

/* ---------- checkboxes ---------- */
.check-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 20px;
}
.check {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 300;
  color: var(--ink-soft);
  padding: 13px 16px;
  border: 1px solid var(--line);
  background: var(--bg);
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}
.check:hover { border-color: var(--blue-soft); }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check::before {
  content: '';
  width: 18px; height: 18px;
  flex-shrink: 0;
  border: 1.5px solid var(--blue-soft);
  background: var(--bg-white);
  transition: all 0.2s;
}
.check:has(input:checked) {
  border-color: var(--blue);
  background: var(--blue-pale);
  color: var(--ink);
}
.check:has(input:checked)::before {
  background: var(--blue);
  border-color: var(--blue);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FDFCF7' stroke-width='3'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
  background-size: 14px;
  background-repeat: no-repeat;
  background-position: center;
}
.check:focus-within { box-shadow: 0 0 0 3px rgba(61, 110, 148, 0.10); }

/* ---------- dropzone ---------- */
.dropzone {
  border: 1.5px dashed var(--blue-soft);
  background: var(--bg);
  padding: 48px 32px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.dropzone:hover,
.dropzone:focus-visible { border-color: var(--blue); background: var(--bg-cream); outline: none; }
.dropzone.dragover {
  border-color: var(--blue);
  background: var(--blue-pale);
  transform: scale(1.005);
}
.dz-icon { width: 42px; height: 42px; color: var(--blue); }
.dz-text {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--ink-soft);
  font-weight: 300;
}
.dz-text strong { font-weight: 500; color: var(--ink); }
.dz-browse { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.dz-sub {
  font-family: var(--font-body);
  font-size: 12.5px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* ---------- file list ---------- */
.file-list { list-style: none; margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.file-item {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  animation: fileIn 0.3s ease;
}
@keyframes fileIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.file-item.too-big { border-color: #C0563E; background: #FBF1EE; }
.file-ic {
  width: 34px; height: 34px; flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--blue-pale); color: var(--blue-deep);
  font-family: var(--font-mono); font-size: 10px; font-weight: 500;
  letter-spacing: 0.03em; text-transform: uppercase;
}
.file-meta { flex: 1; min-width: 0; }
.file-name {
  font-family: var(--font-body);
  font-size: 14.5px; color: var(--ink); font-weight: 400;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.file-size { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.file-item.too-big .file-size { color: #C0563E; }
.file-remove {
  flex-shrink: 0;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  background: var(--bg-white);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 16px; line-height: 1;
}
.file-remove:hover { border-color: #C0563E; color: #C0563E; }
.file-total {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  margin-top: 14px;
  text-align: right;
}
.file-total.over { color: #C0563E; }

/* ---------- file notice (replaces dropzone) ---------- */
.file-notice .notice-lead {
  font-family: var(--font-body);
  font-size: 15.5px;
  line-height: 1.85;
  color: var(--ink-soft);
  font-weight: 300;
  margin-bottom: 22px;
  max-width: 620px;
}
.notice-email {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 22px;
  background: var(--blue-pale);
  border: 1px solid var(--blue-soft);
  color: var(--blue-deep);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 14.5px;
  letter-spacing: 0.02em;
  transition: all 0.25s;
  margin-bottom: 14px;
}
.notice-email:hover {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--bg-cream);
  transform: translateX(3px);
}
.notice-email svg { width: 18px; height: 18px; flex-shrink: 0; }
.notice-sub {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.01em;
  margin-top: 4px;
}

/* ---------- status & submit ---------- */
.form-status {
  font-family: var(--font-body);
  font-size: 14.5px;
  padding: 14px 18px;
  margin-bottom: 6px;
  border: 1px solid;
}
.form-status.error { color: #9A3F2B; background: #FBF1EE; border-color: #E0BBB0; }
.form-status.info  { color: var(--blue-deep); background: var(--blue-pale); border-color: var(--blue-soft); }

.form-submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.privacy-note {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--muted);
  max-width: 460px;
  line-height: 1.6;
}
.privacy-note svg { width: 18px; height: 18px; color: var(--blue); flex-shrink: 0; }

.submit-btn {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 17px 36px;
  background: var(--ink);
  color: var(--bg-cream);
  border: none;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s;
}
.submit-btn:hover:not(:disabled) { background: var(--blue); transform: translateX(4px); }
.submit-btn:hover:not(:disabled) .arrow { transform: translateX(4px); }
.submit-btn .arrow { transition: transform 0.3s; }
.submit-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.submit-btn.loading { color: transparent; position: relative; }
.submit-btn.loading::after {
  content: '';
  position: absolute; inset: 0; margin: auto;
  width: 18px; height: 18px;
  border: 2px solid rgba(251, 248, 242, 0.4);
  border-top-color: var(--bg-cream);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- success ---------- */
.success-panel {
  background: var(--bg-white);
  border: 1px solid var(--line);
  padding: 70px 48px;
  text-align: center;
  animation: fadeUp 0.6s ease;
}
.success-icon {
  width: 76px; height: 76px; margin: 0 auto 28px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--blue-pale);
  color: var(--blue-deep);
}
.success-icon svg { width: 34px; height: 34px; }
.success-panel h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}
.success-panel p {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--ink-soft);
  max-width: 480px;
  margin: 0 auto 32px;
  line-height: 1.8;
}
.success-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.ghost-btn {
  padding: 13px 28px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s;
}
.ghost-btn:hover { background: var(--blue); color: var(--bg-cream); border-color: var(--blue); }

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  .upload-hero { padding: 120px 22px 30px; }
  .upload-section { padding: 10px 22px 90px; }
  .form-block { padding: 28px 22px; }
  .form-grid { grid-template-columns: 1fr; gap: 18px; }
  .check-grid { grid-template-columns: 1fr; }
  .dropzone { padding: 36px 20px; }
  .form-submit { flex-direction: column; align-items: stretch; }
  .submit-btn { justify-content: center; }
  .success-panel { padding: 50px 24px; }
}
