:root {
  --ink: #10221f;
  --ink-soft: #3a524d;
  --paper: #f3f7f4;
  --brand: #0b3d3a;
  --brand-deep: #062826;
  --accent: #d97706;
  --accent-soft: #f59e0b;
  --line: rgba(16, 34, 31, 0.12);
  --ok: #1b7a4e;
  --danger: #b42318;
  --radius: 18px;
  --shadow: 0 24px 60px rgba(6, 40, 38, 0.18);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Manrope", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
  position: relative;
  overflow-x: hidden;
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(217, 119, 6, 0.22), transparent 55%),
    radial-gradient(900px 500px at 95% 0%, rgba(11, 61, 58, 0.35), transparent 50%),
    linear-gradient(165deg, #e8f1ec 0%, #d7e5df 42%, #c5d5cb 100%);
  animation: drift 18s ease-in-out infinite alternate;
}

@keyframes drift {
  from {
    filter: hue-rotate(0deg) saturate(1);
    transform: scale(1);
  }
  to {
    filter: hue-rotate(-8deg) saturate(1.05);
    transform: scale(1.03);
  }
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem clamp(1.25rem, 4vw, 3rem);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: inherit;
}

.brand-mark {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.85rem;
  background:
    linear-gradient(135deg, var(--brand) 0%, #14706a 55%, var(--accent) 120%);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.18);
  position: relative;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 28% 22% 28% 42%;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-left: 0;
  border-radius: 0 999px 999px 0;
  transform: skewX(-8deg);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-text small {
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tagline {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 500;
}

main {
  width: min(920px, calc(100% - 2rem));
  margin: 0 auto 3rem;
}

.hero {
  padding: 1rem 0 2rem;
  animation: rise 0.7s ease both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.hero h1 {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 7vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--brand-deep);
}

.lede {
  margin: 0 0 1.75rem;
  max-width: 36rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.dropzone {
  position: relative;
  display: grid;
  place-items: center;
  gap: 0.55rem;
  min-height: 280px;
  padding: 2rem 1.5rem;
  border: 1.5px dashed rgba(11, 61, 58, 0.35);
  border-radius: calc(var(--radius) + 6px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.28));
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.dropzone:hover,
.dropzone:focus-visible,
.dropzone.is-drag {
  outline: none;
  border-color: var(--accent);
  transform: translateY(-2px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 248, 235, 0.45));
}

.drop-visual {
  position: relative;
  width: 4.5rem;
  height: 4.5rem;
  margin-bottom: 0.35rem;
}

.orbit {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--brand);
  border-right-color: var(--accent-soft);
  animation: spin 3.2s linear infinite;
}

.orbit.delay {
  inset: 12%;
  animation-duration: 2.2s;
  animation-direction: reverse;
  opacity: 0.7;
}

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

.drop-title {
  margin: 0;
  font-weight: 700;
  font-size: 1.1rem;
}

.drop-hint {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.cta,
.ghost,
.file-actions button {
  font: inherit;
  cursor: pointer;
  border: 0;
}

.cta {
  margin-top: 0.75rem;
  padding: 0.85rem 1.35rem;
  border-radius: 999px;
  background: var(--brand);
  color: #f7fbf9;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: background 0.15s ease, transform 0.15s ease;
}

.cta:hover {
  background: #0f524e;
  transform: translateY(-1px);
}

.progress-wrap {
  margin-top: 1rem;
}

.progress-bar {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  width: 0%;
  transition: width 0.15s linear;
}

.progress-wrap p {
  margin: 0.45rem 0 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.toast {
  margin: 1rem 0 0;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: rgba(27, 122, 78, 0.12);
  color: var(--ok);
  font-weight: 600;
}

.toast.error {
  background: rgba(180, 35, 24, 0.1);
  color: var(--danger);
}

.files {
  margin-top: 0.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  animation: rise 0.85s ease both;
  animation-delay: 0.08s;
}

.files-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.files h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 560;
}

.ghost {
  background: transparent;
  color: var(--brand);
  font-weight: 600;
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
}

.ghost:hover {
  background: rgba(11, 61, 58, 0.08);
}

.file-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.file-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem 1rem;
  align-items: center;
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
}

.file-name {
  margin: 0;
  font-weight: 700;
  word-break: break-word;
}

.file-meta {
  margin: 0.2rem 0 0;
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.file-actions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.file-actions a,
.file-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.88rem;
}

.file-actions a {
  background: var(--brand);
  color: #f7fbf9;
}

.file-actions button {
  background: transparent;
  color: var(--danger);
  border: 1px solid rgba(180, 35, 24, 0.25);
}

.empty {
  margin: 0.5rem 0 0;
  color: var(--ink-soft);
}

.empty[hidden],
.progress-wrap[hidden],
.toast[hidden] {
  display: none !important;
}

footer {
  padding: 1.5rem clamp(1.25rem, 4vw, 3rem) 2.5rem;
  color: var(--ink-soft);
  font-size: 0.85rem;
  text-align: center;
}

@media (max-width: 640px) {
  .tagline {
    display: none;
  }

  .file-item {
    grid-template-columns: 1fr;
  }

  .file-actions {
    justify-content: stretch;
  }

  .file-actions a,
  .file-actions button {
    flex: 1;
  }
}
