@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap");

:root {
  --bg: #f8f5ef;
  --bg-accent: #efe8dd;
  --ink: #1d1a16;
  --muted: #5b554e;
  --accent: #e96a3b;
  --accent-dark: #c6532c;
  --card: #ffffff;
  --stroke: rgba(29, 26, 22, 0.12);
  --shadow: 0 20px 40px rgba(29, 26, 22, 0.12);
  --radius: 18px;
  --transition: 180ms ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Space Grotesk", "Helvetica Neue", sans-serif;
  color: var(--ink);
  background: linear-gradient(160deg, var(--bg), var(--bg-accent));
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(29, 26, 22, 0.08) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.3;
  pointer-events: none;
  z-index: 0;
}

.site-header {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.2rem;
  padding: 2rem 6vw 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.brand-text span {
  display: block;
  font-weight: 600;
  font-size: 1.05rem;
}

.brand-text small {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
}

.header-meta {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.85);
  font-size: 0.8rem;
  color: var(--muted);
}

.container {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin: 0 auto;
  padding: 1.5rem 6vw 4rem;
}

.intro {
  margin-bottom: 1.5rem;
  animation: fadeUp 500ms ease;
}

h1 {
  font-size: clamp(2rem, 3.8vw, 3rem);
  line-height: 1.1;
  margin-bottom: 0.6rem;
}

p {
  color: var(--muted);
  line-height: 1.6;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.6rem;
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  animation: fadeUp 600ms ease;
}

.drop-zone {
  border: 2px dashed rgba(29, 26, 22, 0.2);
  border-radius: 16px;
  padding: 1.4rem;
  display: grid;
  gap: 0.45rem;
  text-align: center;
  cursor: pointer;
  background: rgba(249, 247, 243, 0.9);
  transition: border-color var(--transition), background var(--transition);
}

.drop-zone.dragover {
  border-color: var(--accent);
  background: rgba(233, 106, 59, 0.12);
}

.drop-zone input {
  display: none;
}

.drop-icon {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-dark);
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin: 1.2rem 0;
}

.meta-label {
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--muted);
  display: block;
  margin-bottom: 0.35rem;
}

.progress {
  height: 10px;
  background: rgba(29, 26, 22, 0.08);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 1.1rem;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #f3a272);
  transition: width 200ms ease;
}

.button-row {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

button {
  border: none;
  padding: 0.8rem 1.3rem;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition),
    background var(--transition);
}

button:hover {
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
  box-shadow: none;
}

.solid {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 12px 24px rgba(233, 106, 59, 0.3);
}

.ghost {
  background: transparent;
  border: 1px solid var(--stroke);
  color: var(--ink);
}

.ghost.small {
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
}

.link-box {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}

.link-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.7rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: rgba(249, 247, 243, 0.9);
}

.link-pill code {
  font-family: "Space Grotesk", monospace;
  font-size: 0.85rem;
  color: var(--ink);
  word-break: break-all;
}

.status {
  color: var(--accent-dark);
  font-weight: 500;
}

.footer {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 6vw 2.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

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

@media (max-width: 900px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-meta {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .button-row {
    flex-direction: column;
  }

  .link-pill {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
