@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700&family=Newsreader:ital,opsz,wght@1,6..72,500&display=swap");

:root {
  --ink: #171815;
  --paper: #f1f0e9;
  --cream: #e8e5d9;
  --line: #c8c5b8;
  --acid: #d9ff43;
  --muted: #706f67;
  --danger: #b73522;
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    linear-gradient(90deg, transparent 49.9%, #1718150a 50%, transparent 50.1%),
    var(--paper);
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}

.site-header,
main,
footer {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 88px;
  border-bottom: 1px solid var(--ink);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--acid);
  font-family: "DM Mono", monospace;
}

.header-meta,
.kicker,
footer {
  font-family: "DM Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.11em;
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 9px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #71a924;
  box-shadow: 0 0 0 4px #71a9241c;
}

.hero {
  display: grid;
  grid-template-columns: 1.5fr 0.5fr;
  gap: 64px;
  align-items: end;
  min-height: 420px;
  padding: 82px 0 72px;
}

.kicker {
  margin: 0 0 18px;
  color: var(--muted);
}

.hero h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(64px, 10vw, 132px);
  font-weight: 600;
  line-height: 0.78;
  letter-spacing: -0.075em;
}

.hero h1 em {
  font-family: "Newsreader", serif;
  font-weight: 500;
}

.hero-copy {
  max-width: 300px;
  margin: 0;
  padding-bottom: 3px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.85;
}

.upload-panel {
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.drop-zone {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 28px;
  align-items: center;
  min-height: 184px;
  padding: 38px 42px;
  outline: none;
  transition: background 180ms ease;
}

.drop-zone:hover,
.drop-zone:focus-visible,
.drop-zone.is-dragging {
  background: var(--acid);
}

.drop-icon {
  position: relative;
  width: 64px;
  height: 64px;
  border: 1px solid var(--ink);
  border-radius: 50%;
}

.drop-icon span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 1px;
  background: var(--ink);
  transform: translate(-50%, -50%);
}

.drop-icon span:last-child {
  transform: translate(-50%, -50%) rotate(90deg);
}

.drop-zone h2 {
  margin: 0 0 7px;
  font-size: clamp(24px, 4vw, 38px);
  letter-spacing: -0.04em;
}

.drop-zone p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.primary-button,
.load-more {
  min-width: 126px;
  padding: 14px 20px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
}

.primary-button:hover {
  background: transparent;
  color: var(--ink);
}

.token-row {
  display: grid;
  grid-template-columns: auto minmax(180px, 320px) auto;
  gap: 14px;
  align-items: center;
  padding: 18px 42px;
  border-top: 1px solid var(--line);
  font-family: "DM Mono", monospace;
  font-size: 11px;
}

.token-row label {
  letter-spacing: 0.08em;
}

.token-row input {
  min-width: 0;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 0;
  outline: none;
  background: transparent;
}

.token-row input:focus {
  border-color: var(--ink);
}

.token-row button,
.text-button {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.upload-queue:not(:empty) {
  padding: 18px 42px;
  border-top: 1px solid var(--line);
}

.queue-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  margin: 8px 0;
  font-family: "DM Mono", monospace;
  font-size: 11px;
}

.queue-track {
  grid-column: 1 / -1;
  height: 2px;
  background: var(--line);
}

.queue-progress {
  width: 24%;
  height: 100%;
  background: var(--ink);
  animation: loading 1.1s ease-in-out infinite alternate;
}

@keyframes loading {
  to {
    width: 92%;
  }
}

.library {
  padding: 92px 0 120px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 34px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(38px, 6vw, 68px);
  letter-spacing: -0.055em;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 28px 18px;
}

.image-card {
  grid-column: span 4;
  min-width: 0;
  animation: reveal 420ms both;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

.image-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--cream);
}

.image-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 420ms cubic-bezier(0.2, 0.75, 0.25, 1);
}

.image-card:hover img {
  transform: scale(1.035);
}

.copy-overlay {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 10px 12px;
  border: 0;
  background: var(--acid);
  color: var(--ink);
  font-family: "DM Mono", monospace;
  font-size: 10px;
  cursor: pointer;
  opacity: 0;
  transform: translateY(6px);
  transition: 180ms ease;
}

.image-card:hover .copy-overlay,
.copy-overlay:focus-visible {
  opacity: 1;
  transform: none;
}

.image-meta {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding-top: 12px;
  font-family: "DM Mono", monospace;
  font-size: 10px;
}

.image-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-size {
  color: var(--muted);
}

.empty-state {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  padding: 72px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.empty-state span {
  font-family: "DM Mono", monospace;
  font-size: 11px;
}

.empty-state p {
  margin: 0;
  font-size: 20px;
  line-height: 1.55;
}

.load-more {
  display: block;
  margin: 48px auto 0;
}

footer {
  display: flex;
  justify-content: space-between;
  padding: 24px 0 40px;
  border-top: 1px solid var(--ink);
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 30;
  max-width: min(360px, calc(100vw - 48px));
  padding: 14px 18px;
  background: var(--ink);
  color: var(--paper);
  font-family: "DM Mono", monospace;
  font-size: 11px;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: none;
}

@media (max-width: 800px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 42px;
    min-height: auto;
  }

  .drop-zone {
    grid-template-columns: auto 1fr;
  }

  .primary-button {
    grid-column: 2;
    justify-self: start;
  }

  .image-card {
    grid-column: span 6;
  }
}

@media (max-width: 560px) {
  .site-header,
  main,
  footer {
    width: min(100% - 28px, 1180px);
  }

  .hero {
    padding: 64px 0 54px;
  }

  .hero h1 {
    font-size: 56px;
  }

  .drop-zone {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    padding: 30px 22px;
  }

  .primary-button {
    align-self: stretch;
  }

  .token-row {
    grid-template-columns: 1fr;
    padding: 18px 22px;
  }

  .image-card {
    grid-column: 1 / -1;
  }

  .copy-overlay {
    opacity: 1;
    transform: none;
  }
}
