/* ============================================================
   Sellfie — design system "etiqueta de preço"
   paper #FBFBF9 · ink #16222D · yellow #FFD23F · green #1F7A5C
   display: Bricolage Grotesque · body: Archivo · mono: IBM Plex Mono
   ============================================================ */

:root {
  --paper: #fbfbf9;
  --ink: #16222d;
  --ink-soft: #51606c;
  --line: #e3e5df;
  --yellow: #ffd23f;
  --yellow-deep: #eebc17;
  --green: #1f7a5c;
  --red: #c23d3d;
  --card: #ffffff;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(22, 34, 45, 0.09);
  --display: "Bricolage Grotesque", sans-serif;
  --body: "Archivo", sans-serif;
  --mono: "IBM Plex Mono", monospace;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
}

h1, h2, h3 { font-family: var(--display); line-height: 1.1; margin: 0; }

button { font-family: inherit; cursor: pointer; }

:focus-visible { outline: 3px solid var(--yellow-deep); outline-offset: 2px; }

/* ---------- Sticker: a assinatura visual ---------- */

.sticker {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: var(--yellow);
  color: var(--ink);
  font-family: var(--display);
  font-weight: 800;
  border-radius: 50%;
  transform: rotate(-8deg);
  box-shadow: 0 2px 0 rgba(22, 34, 45, 0.25);
  /* borda serrilhada de etiqueta */
  clip-path: polygon(
    50% 0%, 58% 6%, 67% 2%, 73% 10%, 82% 8%, 86% 17%, 95% 18%, 96% 27%,
    100% 32% , 98% 41%, 100% 50%, 98% 59%, 100% 68%, 96% 73%, 95% 82%,
    86% 83%, 82% 92%, 73% 90%, 67% 98%, 58% 94%, 50% 100%, 42% 94%,
    33% 98%, 27% 90%, 18% 92%, 14% 83%, 5% 82%, 4% 73%, 0% 68%, 2% 59%,
    0% 50%, 2% 41%, 0% 32%, 4% 27%, 5% 18%, 14% 17%, 18% 8%, 27% 10%,
    33% 2%, 42% 6%
  );
}

.sticker--brand { font-size: 1.2rem; }

.sticker--credits {
  width: 38px;
  height: 38px;
  font-size: 1rem;
  transform: rotate(8deg);
}

.sticker--price {
  position: absolute;
  right: 12px;
  bottom: -14px;
  width: 74px;
  height: 74px;
  font-size: 1.05rem;
  transform: rotate(-10deg);
  text-align: center;
  line-height: 1.05;
  padding: 6px;
}

.sticker--ghost {
  background: var(--line);
  box-shadow: none;
  width: 64px;
  height: 64px;
  font-size: 1.6rem;
  color: var(--ink-soft);
}

.sticker--spin {
  width: 64px;
  height: 64px;
  font-size: 1.6rem;
  animation: spin 1.4s ease-in-out infinite;
}

@keyframes spin {
  0% { transform: rotate(-8deg) scale(1); }
  50% { transform: rotate(352deg) scale(1.06); }
  100% { transform: rotate(712deg) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .sticker--spin { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Topbar ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px clamp(16px, 5vw, 48px);
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px);
  z-index: 10;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}

.brand-name { font-family: var(--display); font-weight: 800; font-size: 1.25rem; }

.topbar-actions { display: flex; align-items: center; gap: 10px; }

.nav-user { display: flex; align-items: center; gap: 12px; }

.nav-email { color: var(--ink-soft); font-size: 0.9rem; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Buttons ---------- */

.btn {
  border: none;
  border-radius: 999px;
  padding: 10px 20px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.btn--primary {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 2px 0 var(--yellow-deep);
}

.btn--primary:hover { transform: translateY(-1px); box-shadow: 0 4px 0 var(--yellow-deep); }
.btn--primary:active { transform: translateY(1px); box-shadow: 0 1px 0 var(--yellow-deep); }
.btn--primary:disabled { opacity: 0.55; transform: none; cursor: wait; }

.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: rgba(22, 34, 45, 0.06); }

.btn--link { background: none; color: var(--ink-soft); text-decoration: underline; font-weight: 500; }

.btn--lg { padding: 14px 28px; font-size: 1.05rem; }
.btn--block { width: 100%; }

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

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
  padding: clamp(40px, 8vh, 96px) clamp(16px, 5vw, 48px);
  max-width: 1120px;
  margin: 0 auto;
}

.eyebrow {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  background: var(--yellow);
  padding: 4px 10px;
  border-radius: 4px;
  transform: rotate(-1.5deg);
  margin: 0 0 18px;
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.lede {
  font-size: 1.15rem;
  color: var(--ink-soft);
  margin: 18px 0 28px;
  max-width: 44ch;
}

.hero-note { font-size: 0.85rem; color: var(--ink-soft); margin-top: 12px; }

/* ---------- Listing card (demo + resultado) ---------- */

.listing-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: visible;
  max-width: 420px;
  width: 100%;
}

.listing-card--demo { transform: rotate(1.2deg); margin-left: auto; }

.listing-photo {
  position: relative;
  background: linear-gradient(135deg, #eef0ea, #dfe3da);
  border-radius: var(--radius) var(--radius) 0 0;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  overflow: visible;
}

.listing-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius) var(--radius) 0 0;
}

.photo-placeholder { font-size: 2.4rem; opacity: 0.5; }

.listing-body { padding: 22px 20px 16px; }

.listing-title { font-size: 1.15rem; font-weight: 700; margin-bottom: 8px; }

.listing-desc { color: var(--ink-soft); font-size: 0.95rem; white-space: pre-line; }

.listing-highlights {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  font-size: 0.9rem;
}

.listing-highlights li { padding-left: 20px; position: relative; margin-bottom: 4px; }

.listing-highlights li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 700;
}

.listing-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  margin: 14px 0 0;
}

.listing-tags li {
  font-family: var(--mono);
  font-size: 0.75rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 3px 8px;
}

.listing-tags li::before { content: "#"; opacity: 0.5; }

.listing-meta {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-soft);
  padding: 0 20px 16px;
}

.listing-actions {
  display: flex;
  gap: 10px;
  padding: 4px 20px 20px;
}

/* ---------- Steps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px clamp(16px, 5vw, 48px) 80px;
}

.step {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}

.step-tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green);
}

.step h3 { margin: 8px 0 6px; font-size: 1.15rem; }

.step p { margin: 0; color: var(--ink-soft); font-size: 0.93rem; }

/* ---------- Modal auth ---------- */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(22, 34, 45, 0.45);
  display: grid;
  place-items: center;
  padding: 16px;
  z-index: 50;
}

.modal-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: min(400px, 100%);
  padding: 28px;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--ink-soft);
  line-height: 1;
}

.modal-sub { color: var(--ink-soft); font-size: 0.92rem; margin: 6px 0 18px; }

/* ---------- Forms ---------- */

.field { margin-bottom: 14px; }

.field label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 6px;
}

.field .opt { font-weight: 400; color: var(--ink-soft); }

.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  padding: 11px 12px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  resize: vertical;
}

.field input:focus,
.field textarea:focus { border-color: var(--ink); outline: none; }

.form-error {
  color: var(--red);
  font-size: 0.88rem;
  background: color-mix(in srgb, var(--red) 8%, transparent);
  border-radius: 8px;
  padding: 8px 10px;
  margin: 0 0 12px;
}

/* ---------- App workbench ---------- */

.workbench {
  display: grid;
  grid-template-columns: minmax(300px, 420px) 1fr;
  gap: clamp(20px, 4vw, 48px);
  max-width: 1120px;
  margin: 0 auto;
  padding: 40px clamp(16px, 5vw, 48px) 80px;
  align-items: start;
}

.composer {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}

.composer h2 { font-size: 1.3rem; margin-bottom: 18px; }

.dropzone {
  display: grid;
  place-items: center;
  min-height: 140px;
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  color: var(--ink-soft);
  font-size: 0.92rem;
  text-align: center;
  padding: 12px;
  margin-bottom: 16px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  overflow: hidden;
}

.dropzone:hover,
.dropzone.is-drag { border-color: var(--yellow-deep); background: color-mix(in srgb, var(--yellow) 10%, transparent); }

.dropzone img { max-width: 100%; max-height: 220px; border-radius: 8px; }

.result { display: grid; place-items: start center; min-height: 320px; }

.result-empty,
.result-loading {
  display: grid;
  place-items: center;
  gap: 16px;
  text-align: center;
  color: var(--ink-soft);
  padding: 60px 20px;
}

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

.footer {
  display: flex;
  justify-content: space-between;
  padding: 20px clamp(16px, 5vw, 48px);
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.footer-dim { font-family: var(--mono); font-size: 0.75rem; }

/* ---------- Responsivo ---------- */

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 32px; }
  .listing-card--demo { margin: 0 auto; transform: rotate(0.8deg); }
  .steps { grid-template-columns: 1fr; }
  .workbench { grid-template-columns: 1fr; }
  .nav-email { display: none; }
}

/* ---------- Seletor de idioma ---------- */

.lang-select {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.78rem;
  border-radius: 999px;
  padding: 6px 10px;
  cursor: pointer;
}

.lang-select:hover { border-color: var(--ink); }
