:root {
  --paper: #f5f0e8;
  --paper-2: #ece4d7;
  --card: #fbf8f3;
  --frame: #efece7;
  --ink: #2b2420;
  --muted: #6e625a;
  --clay: #b4532a;
  --clay-dark: #8e3c1b;
  --moss: #4f6239;
  --night: #241d19;
  --line: rgba(43, 36, 32, 0.13);
  --wa: #1fa855;
  --radius: 18px;
  --serif: "Fraunces", Georgia, serif;
  --sans: "DM Sans", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

[hidden] {
  display: none !important;
}

img {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.1;
  margin: 0;
  letter-spacing: -0.01em;
}

h1 em,
h2 em,
.logo em {
  font-style: italic;
  color: var(--clay);
}

p {
  margin: 0;
}

a {
  color: inherit;
}

.wrap {
  width: min(1180px, 100% - 40px);
  margin-inline: auto;
}

.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--clay);
  margin-bottom: 14px;
}

.eyebrow--light {
  color: #e9a37f;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 22px;
  border: 1.5px solid var(--clay);
  border-radius: 999px;
  background: var(--clay);
  color: #fff;
  font: 600 15px/1.2 var(--sans);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s, transform 0.2s, color 0.2s;
}

.btn:hover {
  background: var(--clay-dark);
  border-color: var(--clay-dark);
  transform: translateY(-1px);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn--big {
  padding: 16px 30px;
  font-size: 16px;
}

.btn--small {
  padding: 9px 18px;
  font-size: 14px;
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn--ghost:hover {
  background: var(--paper-2);
  border-color: var(--ink);
}

.btn--light {
  background: var(--paper);
  border-color: var(--paper);
  color: var(--night);
}

.btn--light:hover {
  background: #fff;
  border-color: #fff;
}

.btn--ghost-light {
  background: transparent;
  color: var(--paper);
  border-color: rgba(245, 240, 232, 0.3);
}

.btn--ghost-light:hover {
  background: rgba(245, 240, 232, 0.08);
  border-color: var(--paper);
}

.btn--whatsapp {
  background: var(--wa);
  border-color: var(--wa);
}

.btn--whatsapp:hover {
  background: #178a45;
  border-color: #178a45;
}

.btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linejoin: round;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(245, 240, 232, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 66px;
}

.logo {
  font-family: var(--serif);
  font-size: 24px;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.nav {
  display: flex;
  gap: 32px;
  font-size: 15px;
}

.nav a {
  text-decoration: none;
  color: var(--muted);
  transition: color 0.2s;
}

.nav a:hover {
  color: var(--ink);
}

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

.hero {
  padding: 64px 0 96px;
  background: radial-gradient(1000px 500px at 85% 10%, rgba(180, 83, 42, 0.1), transparent 60%);
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 64px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(48px, 6.4vw, 84px);
  font-weight: 350;
  margin-bottom: 26px;
}

.lead {
  font-size: 19px;
  color: var(--muted);
  max-width: 34em;
  margin-bottom: 34px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 30px;
}

.hero__perks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  padding: 0;
  margin: 0;
  list-style: none;
  font-size: 14px;
  color: var(--muted);
}

.hero__perks li::before {
  content: "✓";
  color: var(--moss);
  font-weight: 700;
  margin-right: 7px;
}

/* ---------- Piece card ---------- */

.piece {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 24px 50px -30px rgba(60, 35, 20, 0.35);
}

.piece--featured {
  padding: 26px;
  gap: 22px;
  box-shadow: 0 40px 80px -40px rgba(60, 35, 20, 0.45);
}

.piece__badge {
  align-self: flex-start;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--moss);
  background: rgba(79, 98, 57, 0.12);
  padding: 6px 12px;
  border-radius: 999px;
}

.piece__prompt {
  position: relative;
  padding: 14px 16px 14px 18px;
  border-left: 3px solid var(--clay);
  background: var(--paper);
  border-radius: 4px 12px 12px 4px;
}

.piece__label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.piece__prompt p {
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  line-height: 1.45;
}

.piece--featured .piece__prompt p {
  font-size: 18px;
}

.pair {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.pair__item {
  margin: 0;
}

.pair__zoom {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 12px;
  overflow: hidden;
  background: var(--frame);
  cursor: zoom-in;
  aspect-ratio: 1;
}

.pair__zoom img {
  width: 100%;
  height: 100%;
  transition: transform 0.5s ease;
}

.pair__zoom:hover img {
  transform: scale(1.04);
}

.pair__item figcaption {
  margin-top: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.pair__item--real figcaption {
  color: var(--clay);
}

.pair__arrow {
  position: absolute;
  left: 50%;
  top: calc(50% - 14px);
  translate: -50% -50%;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--clay);
  font-size: 18px;
  box-shadow: 0 6px 16px -6px rgba(60, 35, 20, 0.3);
  pointer-events: none;
}

.piece__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.piece__name {
  font-size: 22px;
}

.piece--featured .piece__name {
  font-size: 26px;
}

.piece__name span {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--muted);
  vertical-align: middle;
  margin-right: 4px;
}

.piece__price {
  font-weight: 600;
  font-size: 18px;
  margin-top: 2px;
}

.piece__price small {
  font-weight: 400;
  font-size: 13px;
  color: var(--muted);
}

.piece--sold .pair {
  filter: grayscale(0.6);
  opacity: 0.7;
}

.sold {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px dashed var(--line);
  padding: 8px 14px;
  border-radius: 999px;
}

/* ---------- Sections ---------- */

.section {
  padding: 110px 0;
}

.section--tinted {
  background: var(--paper-2);
}

.section__head {
  max-width: 640px;
  margin-bottom: 56px;
}

.section__head h2,
.create h2 {
  font-size: clamp(36px, 4.4vw, 54px);
  font-weight: 350;
}

.section__head--row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  max-width: none;
}

.section__note {
  max-width: 400px;
  color: var(--muted);
}

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

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  padding: 0;
  margin: 0;
  list-style: none;
  counter-reset: step;
}

.step {
  position: relative;
  padding: 30px 24px 0 0;
  border-top: 2px solid var(--ink);
}

.step__num {
  display: block;
  font-family: var(--serif);
  font-size: 64px;
  font-weight: 300;
  font-style: italic;
  line-height: 1;
  color: var(--clay);
  margin-bottom: 20px;
}

.step h3 {
  font-size: 26px;
  margin-bottom: 12px;
}

.step p {
  color: var(--muted);
}

.promise {
  display: flex;
  gap: 22px;
  align-items: flex-start;
  margin-top: 56px;
  padding: 28px 32px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.promise__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(79, 98, 57, 0.12);
  color: var(--moss);
}

.promise h3 {
  font-size: 24px;
  margin-bottom: 6px;
}

.promise p {
  color: var(--muted);
  max-width: 52em;
}

/* ---------- Shop ---------- */

.shop {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

/* ---------- Details ---------- */

.details {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.detail {
  padding: 30px 26px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
}

.detail svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: var(--clay);
  stroke-width: 1.5;
  stroke-linejoin: round;
  stroke-linecap: round;
  margin-bottom: 20px;
}

.detail h3 {
  font-size: 22px;
  margin-bottom: 8px;
}

.detail p {
  color: var(--muted);
  font-size: 15.5px;
}

.detail--link {
  transition: border-color 0.2s, transform 0.2s;
}

.detail--link:hover {
  border-color: var(--wa);
  transform: translateY(-2px);
}

.detail--link svg {
  stroke: var(--wa);
}

.detail--link strong {
  color: var(--ink);
  white-space: nowrap;
}

/* ---------- Create (final) ---------- */

.create {
  background:
    radial-gradient(900px 500px at 100% 0%, rgba(180, 83, 42, 0.28), transparent 60%),
    var(--night);
  color: var(--paper);
}

.create__grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 64px;
  align-items: center;
}

.create h2 {
  margin-bottom: 22px;
}

.create__copy > p:not(.eyebrow) {
  color: rgba(245, 240, 232, 0.75);
  font-size: 18px;
  max-width: 30em;
}

.create__copy .create__fine {
  margin-top: 22px;
  font-size: 15px;
  color: rgba(245, 240, 232, 0.55);
}

.creator {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(245, 240, 232, 0.12);
  border-radius: calc(var(--radius) + 6px);
}

.creator__form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.creator__label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(245, 240, 232, 0.6);
}

.creator textarea {
  width: 100%;
  min-height: 140px;
  resize: vertical;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(245, 240, 232, 0.18);
  background: rgba(0, 0, 0, 0.2);
  color: var(--paper);
  font: italic 17px/1.5 var(--serif);
}

.creator textarea::placeholder {
  color: rgba(245, 240, 232, 0.4);
}

.creator textarea:focus {
  outline: none;
  border-color: #e9a37f;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 7px 12px;
  border: 1px solid rgba(245, 240, 232, 0.18);
  border-radius: 999px;
  background: transparent;
  color: rgba(245, 240, 232, 0.8);
  font: 13px/1.3 var(--sans);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.chip:hover {
  border-color: #e9a37f;
  background: rgba(233, 163, 127, 0.08);
}

.creator__hint {
  min-height: 1.3em;
  font-size: 14px;
  color: #e9a37f;
}

.creator__form .btn {
  margin-top: auto;
}

.creator__result {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.creator__frame {
  position: relative;
  aspect-ratio: 1;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(245, 240, 232, 0.06);
  border: 1px dashed rgba(245, 240, 232, 0.2);
}

.creator__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s;
}

.creator__frame > div {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
  font-size: 14px;
  color: rgba(245, 240, 232, 0.6);
}

.creator__placeholder svg {
  width: 46px;
  height: 46px;
  fill: none;
  stroke: rgba(245, 240, 232, 0.35);
  stroke-width: 1.2;
}

[data-state="empty"] .creator__placeholder,
[data-state="loading"] .creator__loading,
[data-state="error"] .creator__error {
  display: flex;
}

[data-state="ready"] .creator__frame {
  border-style: solid;
}

[data-state="ready"] .creator__frame img {
  opacity: 1;
}

.spinner {
  width: 34px;
  height: 34px;
  border: 2px solid rgba(245, 240, 232, 0.15);
  border-top-color: #e9a37f;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.creator__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.footer {
  padding: 34px 0;
  background: var(--night);
  color: rgba(245, 240, 232, 0.55);
  border-top: 1px solid rgba(245, 240, 232, 0.1);
  font-size: 14px;
}

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

.footer .logo {
  color: var(--paper);
  font-size: 20px;
}

.footer a {
  text-decoration: none;
}

.footer a:hover {
  color: var(--paper);
}

/* ---------- WhatsApp float ---------- */

.wa-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--wa);
  color: #fff;
  box-shadow: 0 12px 28px -8px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s;
}

.wa-float:hover {
  transform: scale(1.06);
}

.wa-float svg {
  width: 30px;
  height: 30px;
}

/* ---------- Lightbox ---------- */

.lightbox {
  max-width: min(92vw, 900px);
  max-height: 92vh;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: var(--card);
  overflow: hidden;
}

.lightbox::backdrop {
  background: rgba(20, 15, 12, 0.8);
  backdrop-filter: blur(4px);
}

.lightbox img {
  max-height: calc(92vh - 52px);
  width: auto;
  margin-inline: auto;
}

.lightbox__caption {
  padding: 14px 20px;
  font-family: var(--serif);
  font-style: italic;
  color: var(--muted);
}

.lightbox__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(251, 248, 243, 0.92);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .details {
    grid-template-columns: repeat(2, 1fr);
  }

  .create__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 900px) {
  .hero {
    padding: 40px 0 72px;
  }

  .hero__grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .nav {
    display: none;
  }

  .steps,
  .shop {
    grid-template-columns: 1fr;
  }

  .step {
    padding: 26px 0 0;
  }

  .section {
    padding: 80px 0;
  }

  .section__head--row {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .creator {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 16px;
  }

  .wrap {
    width: calc(100% - 28px);
  }

  .hero__actions .btn {
    flex: 1 1 100%;
  }

  .details {
    grid-template-columns: 1fr;
  }

  .piece,
  .piece--featured {
    padding: 16px;
  }

  .piece__foot {
    flex-direction: column;
    align-items: stretch;
  }

  .piece__foot .btn {
    width: 100%;
  }

  .promise {
    flex-direction: column;
    padding: 24px;
  }

  .creator {
    padding: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition: none !important;
    animation: none !important;
  }
}
