/* ---------------------------------------------------------------------------
   Direction: a sheet of die-cut vinyl stickers. Deep grape backdrop, waxy
   backing-paper panel, mint and sun as the two pops. The 3x3 sheet is the
   hero, the upload control and the progress indicator all at once.
   --------------------------------------------------------------------------- */

:root {
  --grape:      #241546;
  --grape-deep: #180D31;
  --grape-soft: #362261;
  --paper:      #FFFBF0;
  --mint:       #6FE3BE;
  --sun:        #FFC93C;
  --coral:      #FF7A6B;
  --ink:        #140E26;
  --muted:      #B8A9D6;

  --r-cell: 18px;
  --r-btn: 999px;
  --sheet-gap: clamp(6px, 1.6vw, 12px);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--grape);
  color: var(--paper);
  font-family: "Instrument Sans", system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  /* faint perforation dots, like sticker backing paper */
  background-image: radial-gradient(circle, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 22px 22px;
}

main { max-width: 620px; margin: 0 auto; padding: 0 20px 72px; }

/* --- Bar ------------------------------------------------------------------ */

.bar {
  max-width: 620px;
  margin: 0 auto;
  padding: 22px 20px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wordmark {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -.02em;
}

.wordmark-accent { color: var(--mint); }

.tag {
  font-family: "Space Mono", monospace;
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--grape-soft);
  border-radius: var(--r-btn);
  padding: 4px 11px;
}

/* --- Hero ----------------------------------------------------------------- */

.hero { padding: 26px 0 22px; }

h1 {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 800;
  font-size: clamp(40px, 12vw, 60px);
  line-height: .95;
  letter-spacing: -.035em;
  margin: 0 0 18px;
}

h1 em {
  font-style: normal;
  color: var(--mint);
  /* the display line gets the one flourish on the page */
  text-shadow: 3px 3px 0 var(--grape-deep);
}

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

/* --- The sheet ------------------------------------------------------------ */

.sheet-wrap { margin: 8px 0 26px; }

.sheet {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sheet-gap);
  padding: var(--sheet-gap);
  background: var(--grape-deep);
  border-radius: calc(var(--r-cell) + 8px);
  border: 1px solid var(--grape-soft);
}

.cell {
  aspect-ratio: 1;
  border-radius: var(--r-cell);
  border: 0;
  padding: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
  background: var(--grape-soft);
  color: inherit;
  font: inherit;
}

/* Placeholder stickers before anything has been made.
   Same cream tile the finished stickers land on, dimmed so they read as a
   preview rather than a result — what you get should look like what you see. */
.cell-ghost {
  background: var(--paper);
}

/* Dimmed so the examples read as "what you'll get", not "your result". */
.cell-ghost img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: .82;
}

/* Upload cell */
.cell-drop {
  cursor: pointer;
  background: var(--paper);
  color: var(--ink);
  outline: 2px dashed rgba(36, 21, 70, .35);
  outline-offset: -8px;
  transition: transform .16s ease, outline-color .16s ease;
}

.cell-drop:hover,
.cell-drop.dragging { outline-color: var(--coral); transform: scale(1.03); }

.cell-drop:focus-visible { outline: 3px solid var(--sun); outline-offset: -4px; }

.drop-inner {
  display: grid;
  place-items: center;
  gap: 2px;
  text-align: center;
  padding: 6px;
}

.plus {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 800;
  font-size: 30px;
  line-height: 1;
  color: var(--coral);
}

.drop-label { font-size: 11px; font-weight: 600; line-height: 1.2; }

#preview { width: 100%; height: 100%; object-fit: cover; }

.cell-drop.has-photo { outline: none; }
.cell-drop.has-photo .drop-inner {
  position: absolute;
  inset: auto 0 0 0;
  background: rgba(20, 14, 38, .78);
  color: var(--paper);
  padding: 5px;
}
.cell-drop.has-photo .plus { display: none; }

/* Finished stickers */
.cell-done { background: var(--paper); }
.cell-done img { width: 100%; height: 100%; object-fit: contain; }

/* Working state — a slow sweep, nothing frantic */
.cell-working {
  background: linear-gradient(100deg, var(--grape-soft) 30%, #4A2F82 50%, var(--grape-soft) 70%);
  background-size: 300% 100%;
  animation: sweep 1.6s ease-in-out infinite;
}

@keyframes sweep {
  from { background-position: 130% 0; }
  to   { background-position: -30% 0; }
}

/* Pop-in when a sticker lands */
.cell-pop { animation: pop .34s cubic-bezier(.34, 1.56, .64, 1) both; }

@keyframes pop {
  from { transform: scale(.55); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

.hint {
  margin: 12px 2px 0;
  font-size: 13px;
  color: var(--muted);
}

.hint.error { color: var(--coral); font-weight: 600; }

/* --- Action --------------------------------------------------------------- */

.action { text-align: center; }

.cta {
  width: 100%;
  border: 0;
  border-radius: var(--r-btn);
  padding: 18px 24px;
  background: var(--mint);
  color: var(--ink);
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -.01em;
  cursor: pointer;
  box-shadow: 0 4px 0 #3FB694;
  transition: transform .12s ease, box-shadow .12s ease;
}

.cta:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 6px 0 #3FB694; }
.cta:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 2px 0 #3FB694; }
.cta:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; }

.cta:disabled {
  background: var(--grape-soft);
  color: var(--muted);
  box-shadow: none;
  cursor: not-allowed;
}

.cta.is-download { background: var(--sun); box-shadow: 0 4px 0 #D9A312; }
.cta.is-download:hover { box-shadow: 0 6px 0 #D9A312; }

.status {
  min-height: 22px;
  margin: 14px 0 0;
  font-family: "Space Mono", monospace;
  font-size: 13px;
  color: var(--mint);
}

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

.fineprint {
  margin: 14px 0 0;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
}

/* --- Steps ---------------------------------------------------------------- */
/* Numbered because this genuinely is a sequence — order carries meaning here. */

.steps { margin: 52px 0 0; }

.steps ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }

.steps li {
  display: grid;
  grid-template-columns: 34px 1fr;
  grid-template-areas: "n t" "n d";
  gap: 0 14px;
  align-items: baseline;
  padding: 16px 0;
  border-top: 1px solid var(--grape-soft);
}

.step-n {
  grid-area: n;
  font-family: "Space Mono", monospace;
  font-size: 13px;
  color: var(--sun);
}

.step-t { grid-area: t; font-weight: 600; }
.step-d { grid-area: d; color: var(--muted); font-size: 15px; }

/* --- FAQ ------------------------------------------------------------------ */

.faq { margin: 48px 0 0; }

.faq h2 {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -.02em;
  margin: 0 0 6px;
}

.faq dl { margin: 0; }
.faq dt { font-weight: 600; margin-top: 22px; }
.faq dd { margin: 5px 0 0; color: var(--muted); font-size: 15.5px; }

/* --- Footer --------------------------------------------------------------- */

footer {
  border-top: 1px solid var(--grape-soft);
  padding: 22px 20px 40px;
  text-align: center;
}

footer p {
  max-width: 620px;
  margin: 0 auto;
  font-size: 12.5px;
  color: var(--muted);
}

/* --- Preferences ---------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
  .cta, .cell-drop { transition: none; }
  .cell-working { background: var(--grape-soft); }
}
