:root {
  --bg: #0e1210;
  --bg-2: #151b18;
  --ink: #e8f0ea;
  --muted: #8a9a8e;
  --line: rgba(232, 240, 234, 0.12);
  --accent: #3dffa8;
  --accent-ink: #04140c;
  --danger: #ff6b5a;
  --font-display: "Syne", sans-serif;
  --font-body: "DM Sans", sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(61, 255, 168, 0.14), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(40, 80, 60, 0.35), transparent 50%),
    var(--bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

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

.top,
.hero,
.foot {
  position: relative;
  z-index: 1;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--line);
}

.brand {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 1rem;
}

.hero {
  flex: 1;
  width: min(640px, 100%);
  margin: 0 auto;
  padding: 3.5rem 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  animation: rise 0.7s ease both;
}

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

.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.8rem, 10vw, 4.5rem);
  letter-spacing: -0.05em;
  line-height: 0.95;
  margin: 0 0 0.75rem;
}

.tag {
  margin: 0 0 2rem;
  color: var(--muted);
  font-size: 1.1rem;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.drop {
  border: 1px dashed var(--line);
  background: var(--bg-2);
  padding: 2rem 1.25rem;
  text-align: center;
  cursor: pointer;
  color: var(--muted);
  transition: border-color 0.2s, color 0.2s;
}

.drop:hover,
.drop.drag {
  border-color: var(--accent);
  color: var(--ink);
}

.url {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font: inherit;
  padding: 0.75rem 0;
  outline: none;
}

.url:focus {
  border-bottom-color: var(--accent);
}

.cta {
  margin-top: 0.5rem;
  border: none;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  padding: 0.95rem 1.25rem;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.cta:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.cta:disabled {
  opacity: 0.55;
  cursor: wait;
}

.status {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.status.error {
  color: var(--danger);
}

.preview {
  margin-top: 2rem;
  gap: 1rem;
  animation: rise 0.5s ease both;
}

.preview:not([hidden]) {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 560px) {
  .preview:not([hidden]) {
    grid-template-columns: 1fr;
  }
}

figure {
  margin: 0;
}

figcaption {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.preview img {
  width: 100%;
  display: block;
  max-height: 280px;
  object-fit: contain;
  background: var(--bg-2);
}

.checker {
  background-image:
    linear-gradient(45deg, #1a221d 25%, transparent 25%),
    linear-gradient(-45deg, #1a221d 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #1a221d 75%),
    linear-gradient(-45deg, transparent 75%, #1a221d 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-color: #101612;
}

.download {
  margin-top: 1.25rem;
  color: var(--accent-ink);
  background: var(--accent);
  font-family: var(--font-display);
  font-weight: 700;
  padding: 0.75rem 1.1rem;
  text-decoration: none;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.download:not([hidden]) {
  display: inline-block;
}

.download:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

[hidden] {
  display: none !important;
}

.foot {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8rem;
}
