:root {
  --bg-1: #f3e6d2;
  --bg-2: #a7c7d6;
  --ink: #0f2d35;
  --muted: #37545d;
  --accent: #f07a3f;
  --accent-dark: #ce5f2a;
  --panel: #fef8ef;
  --panel-shadow: rgba(15, 45, 53, 0.12);
  --stroke: rgba(15, 45, 53, 0.15);
}

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

body {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top, rgba(255, 255, 255, 0.7), transparent 60%),
    linear-gradient(135deg, var(--bg-1), var(--bg-2));
  min-height: 100vh;
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 48px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.hero {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 12px;
}

h1 {
  font-family: "Fraunces", serif;
  font-size: clamp(2.5rem, 4vw, 3.6rem);
  margin-bottom: 16px;
}

.lead {
  max-width: 520px;
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--muted);
}

.hero-card {
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: 20px;
  padding: 20px 24px;
  box-shadow: 0 14px 30px var(--panel-shadow);
  max-width: 260px;
  position: relative;
  overflow: hidden;
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: -40% auto auto -40%;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(240, 122, 63, 0.25), transparent 70%);
  pointer-events: none;
}

.hero-title {
  font-weight: 600;
  margin-bottom: 8px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.panel {
  background: var(--panel);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 16px 40px var(--panel-shadow);
  border: 1px solid var(--stroke);
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: rise 0.6s ease both;
}

.panel:nth-child(2) {
  animation-delay: 0.1s;
}

.panel:nth-child(3) {
  animation-delay: 0.2s;
}

h2 {
  font-size: 1.2rem;
  letter-spacing: 0.02em;
}

.sub {
  color: var(--muted);
  font-size: 0.95rem;
}

.upload-box {
  border: 2px dashed var(--stroke);
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.6);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.upload-box input[type="file"] {
  font-size: 0.95rem;
}

.upload-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--muted);
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 12px;
}

.preview-grid img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.style-message {
  font-size: 0.9rem;
  color: var(--muted);
}

.input-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--muted);
}

.input-block input {
  border-radius: 12px;
  border: 1px solid var(--stroke);
  padding: 10px 12px;
  font-size: 0.95rem;
}

.input-block select {
  border-radius: 12px;
  border: 1px solid var(--stroke);
  padding: 10px 12px;
  font-size: 0.95rem;
  background: #fff;
  color: var(--ink);
}

.primary {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 12px 18px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 12px 20px rgba(240, 122, 63, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 26px rgba(240, 122, 63, 0.35);
  background: var(--accent-dark);
}

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

.status {
  min-height: 20px;
  font-size: 0.9rem;
  color: var(--muted);
}

.result {
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--stroke);
  background: #faf4ea;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.result-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  padding: 12px;
}

.result-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
}

.result-card img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  border-radius: 12px;
}

.result-actions {
  display: flex;
  justify-content: flex-end;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: #f2efe9;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.85rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.download-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 45, 53, 0.15);
}

.footer {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--muted);
}

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

@media (max-width: 720px) {
  .hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer {
    flex-direction: column;
    gap: 8px;
  }
}
