/* styles.css — Virtual Stylist
 *
 * Warm editorial neutrals so the generated flat-lays carry the colour, not the
 * chrome. No framework, no build step.
 */

:root {
  --paper: #f4f0ea;
  --card: #fffdfa;
  --ink: #1f1b16;
  --muted: #6b6259;
  --line: #e2dad0;
  --accent: #b4552d;
  --accent-ink: #fffdfa;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(31, 27, 22, 0.06), 0 8px 24px rgba(31, 27, 22, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

#app {
  max-width: 1120px;
  margin: 0 auto;
  padding: 48px 24px 96px;
}

/* --- masthead ------------------------------------------------------------ */

.masthead {
  margin-bottom: 40px;
}

.masthead h1 {
  margin: 0 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 400;
  letter-spacing: -0.02em;
}

.tagline {
  margin: 0;
  max-width: 46ch;
  color: var(--muted);
}

/* --- intake -------------------------------------------------------------- */

.intake {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  margin-bottom: 56px;
}

.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 260px;
  padding: 24px;
  background: var(--card);
  border: 1.5px dashed var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease;
}

.dropzone:hover,
.dropzone:focus-visible {
  border-color: var(--accent);
  outline: none;
}

.dropzone.is-dragging {
  border-color: var(--accent);
  background: #fbf6f1;
}

.dropzone-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.preview {
  max-width: 100%;
  max-height: 220px;
  border-radius: 8px;
  object-fit: contain;
}

/* An <img> with no src yet would otherwise render a broken-image glyph. */
.preview:not([src]),
.card-image:not([src]) {
  display: none;
}

.intake-controls {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

#item-note {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  resize: vertical;
}

#item-note:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.palette-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 44px;
  align-items: center;
}

.swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.swatch-chip {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid rgba(31, 27, 22, 0.12);
}

#generate-btn {
  align-self: flex-start;
  padding: 13px 26px;
  font: inherit;
  font-weight: 600;
  color: var(--accent-ink);
  background: var(--accent);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: opacity 120ms ease, transform 120ms ease;
}

#generate-btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

#generate-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.status {
  margin: 0;
  min-height: 1.4em;
  font-size: 0.9rem;
  color: var(--muted);
}

.error-banner {
  padding: 12px 14px;
  font-size: 0.9rem;
  color: #7a2318;
  background: #fbeae6;
  border: 1px solid #f0c9c0;
  border-radius: 10px;
}

/* --- outfit grid --------------------------------------------------------- */

.outfit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card-title {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.card-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 10px;
  background: #efe9e1;
}

.card-pieces {
  margin: 0;
  padding-left: 18px;
  font-size: 0.9rem;
  color: var(--muted);
}

.card-pieces li {
  margin-bottom: 4px;
}

.card-pieces li:first-child {
  color: var(--ink);
  font-weight: 600;
}

.card-palette {
  display: flex;
  gap: 6px;
  margin-top: auto;
}

.card-palette .swatch-chip {
  width: 26px;
  height: 26px;
  border-radius: 7px;
}

/* --- responsive ---------------------------------------------------------- */

@media (max-width: 860px) {
  .intake {
    grid-template-columns: minmax(0, 1fr);
  }

  .outfit-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
