:root {
  --color-accent: #e8ac28;
  --color-accent-hover: #ba8a20;
  --color-text: #1a1a1a;
  --color-text-muted: #5c5c5c;
  --color-border: #d5d5d5;
  --color-bg: #f4f4f5;
  --color-surface: #ffffff;
  --color-success: #1b6b3a;
  --color-error: #b42318;
  --font-family: "Montserrat", system-ui, sans-serif;
  --radius: 8px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  --max-width: 640px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-family);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100vh;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.header {
  padding: 1.5rem 1.25rem 0;
  text-align: center;
}

.logo-link {
  display: inline-block;
}

.logo {
  max-width: min(280px, 85vw);
  height: auto;
}

.main {
  flex: 1;
  width: 100%;
  max-width: calc(var(--max-width) + 4rem);
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

.hero {
  text-align: center;
  margin-bottom: 2rem;
}

.hero__title {
  margin: 0 0 1rem;
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.hero__subtitle {
  margin: 0;
  font-size: clamp(0.95rem, 2.5vw, 1.05rem);
  color: var(--color-text-muted);
  font-weight: 400;
  line-height: 1.65;
}

.upload-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.upload-panel,
.progress-panel,
.result-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem 1.5rem;
}

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 220px;
  padding: 2rem 1.5rem;
  background: var(--color-surface);
  border: 2px dashed var(--color-border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.dropzone:hover,
.dropzone:focus-visible {
  border-color: var(--color-accent);
  background: #fffdf8;
  outline: none;
  box-shadow: 0 0 0 3px rgba(232, 172, 40, 0.15);
}

.dropzone.is-dragover {
  border-color: var(--color-accent);
  background: #fffdf8;
  border-style: solid;
}

.dropzone.is-disabled {
  pointer-events: none;
  opacity: 0.55;
}

.upload-panel.has-file .dropzone {
  display: none;
}

.upload-panel.has-file .formats {
  display: none;
}

.dropzone__icon {
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}

.dropzone__primary {
  font-weight: 600;
  font-size: 1.05rem;
}

.dropzone__or {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.dropzone__secondary {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.formats {
  margin: 1rem 0 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.formats__confidential {
  display: block;
  margin-top: 0.25rem;
}

.file-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.25rem;
  padding: 0.85rem 1rem;
  background: #fafafa;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.file-preview__info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.file-preview__icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.file-preview__meta {
  min-width: 0;
}

.file-preview__name {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-preview__size {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.file-preview__remove {
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  padding: 0.25rem;
}

.file-preview__remove:hover {
  color: var(--color-text);
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-top: 1.5rem;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.consent__input {
  margin-top: 0.2rem;
  width: 1rem;
  height: 1rem;
  accent-color: var(--color-accent);
  flex-shrink: 0;
}

.consent__label a {
  color: var(--color-text);
  font-weight: 500;
}

.submit-btn {
  display: block;
  width: 100%;
  margin-top: 1.25rem;
  padding: 0.9rem 1.5rem;
  border: none;
  border-radius: var(--radius);
  background: var(--color-accent);
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.submit-btn:hover:not(:disabled) {
  background: var(--color-accent-hover);
}

.submit-btn:active:not(:disabled) {
  transform: translateY(1px);
}

.submit-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.submit-btn--secondary {
  background: transparent;
  color: var(--color-accent);
  border: 1px solid var(--color-accent);
}

.submit-btn--secondary:hover:not(:disabled) {
  background: var(--color-accent);
  color: #fff;
}

.form-error {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
  color: var(--color-error);
  text-align: center;
}

.progress-panel__title {
  margin: 0 0 1.25rem;
  font-weight: 600;
  text-align: center;
}

.progress-bar {
  height: 6px;
  background: #eee;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 1.75rem;
}

.progress-bar__fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--color-accent-hover), var(--color-accent));
  border-radius: 999px;
  transition: width 0.5s ease;
}

.progress-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.progress-step {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  transition: color 0.3s;
}

.progress-step__indicator {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.1rem;
  border: 2px solid var(--color-border);
  border-radius: 50%;
  position: relative;
  transition: border-color 0.3s, background 0.3s;
}

.progress-step.is-active {
  color: var(--color-text);
  font-weight: 500;
}

.progress-step.is-active .progress-step__indicator {
  border-color: var(--color-accent);
}

.progress-step.is-active .progress-step__indicator::after {
  content: "";
  position: absolute;
  inset: 3px;
  background: var(--color-accent);
  border-radius: 50%;
  animation: pulse 1.2s ease infinite;
}

.progress-step.is-done {
  color: var(--color-text);
}

.progress-step.is-done .progress-step__indicator {
  border-color: var(--color-success);
  background: var(--color-success);
}

.progress-step.is-done .progress-step__indicator::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.result-panel {
  text-align: center;
}

.result-panel__icon {
  width: 3rem;
  height: 3rem;
  margin: 0 auto 1rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  font-weight: 700;
}

.result-panel--success .result-panel__icon {
  background: #e8f5ec;
  color: var(--color-success);
}

.result-panel--error .result-panel__icon {
  background: #fdecea;
  color: var(--color-error);
}

.result-panel__title {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
}

.result-panel__text {
  margin: 0 0 1.25rem;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.privacy {
  padding: 1.25rem 1.5rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.privacy__title {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
}

.privacy__text {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.privacy__links {
  margin: 0;
  font-size: 0.8rem;
}

.privacy__links a {
  color: var(--color-text);
  font-weight: 500;
}

.footer {
  padding: 1.5rem 1.25rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
}

.footer p {
  margin: 0;
}

@media (min-width: 600px) {
  .header {
    padding-top: 2.5rem;
  }

  .main {
    padding-top: 2.5rem;
  }

  .upload-panel,
  .progress-panel,
  .result-panel {
    padding: 2rem 2.25rem;
  }

  .dropzone {
    min-height: 260px;
  }
}
