@font-face {
  font-family: 'ArtesanoBold';
  src: url('ARTESANO-Bold.otf') format('opentype');
  font-display: swap;
}

@font-face {
  font-family: 'ArtesanoRegular';
  src: url('ARTESANO-Regular.otf') format('opentype');
  font-display: swap;
}

:root {
  --bg: #f5f3ef;
  --paper: rgba(255, 255, 255, 0.82);
  --paper-strong: rgba(255, 255, 255, 0.92);
  --text: #111111;
  --muted: rgba(17, 17, 17, 0.64);
  --line: rgba(17, 17, 17, 0.12);
  --line-strong: rgba(17, 17, 17, 0.18);
  --button: #111111;
  --button-text: #ffffff;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  color: var(--text);
  font-family: Arial, sans-serif;
  background-color: var(--bg);
  position: relative;
}

/* REEMPLAZA el nombre del archivo cuando me pases el PNG exacto */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url('ARTESANO NOTES_SITUMEMIRASLYRICS 2_ PNG.png');
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
  opacity: 0.3;
  pointer-events: none;
  z-index: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.wrap {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

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

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 18px;
  padding-bottom: 18px;
}

.brand {
  font-family: 'ArtesanoBold', Arial, sans-serif;
  font-size: 1.8rem;
  line-height: 1;
  letter-spacing: 0.02em;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.topnav a {
  font-family: 'ArtesanoRegular', Arial, sans-serif;
  font-size: 1.5rem;
  color: var(--text);
  opacity: 1;
}

.topnav a:hover {
  opacity: 1;
}

.main-shell {
  padding-top: 30px;
  padding-bottom: 48px;
}

.card,
.hero-card,
.pieces-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.hero-card {
  padding: 30px 32px;
  margin-bottom: 20px;
}

.eyebrow {
  margin: 0 0 12px 0;
  font-family: 'ArtesanoRegular', Arial, sans-serif;
  font-size: 1rem;
  color: var(--muted);
  letter-spacing: 0.09em;
}

.hero-title {
  margin: 0 0 12px 0;
  font-family: 'ArtesanoBold', Arial, sans-serif;
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 0.96;
  letter-spacing: 0.02em;
}

.hero-copy {
  max-width: 780px;
  margin: 0;
  font-family: 'ArtesanoRegular', Arial, sans-serif;
  font-size: 1.5rem;
  line-height: 1.6;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.pieces-card {
  padding: 28px 28px 12px 28px;
}

.pieces-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-title {
  margin: 0;
  font-family: 'ArtesanoBold', Arial, sans-serif;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1;
  letter-spacing: 0.02em;
}

.pieces-count {
  font-family: 'ArtesanoRegular', Arial, sans-serif;
  font-size: 3rem;
  color: var(--muted);
  white-space: nowrap;
}

.pieces-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.piece-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.piece-row:first-child {
  border-top: 0;
}

.piece-copy {
  min-width: 0;
}

.piece-title {
  margin: 0 0 8px 0;
  font-family: 'ArtesanoBold', sans-serif !important;
  font-size: 1.4rem;
  line-height: 1;
  letter-spacing: 0.01em;
  font-weight: normal;
}

.piece-title * {
  font-family: 'ArtesanoBold', sans-serif !important;
}

.piece-status {
  font-family: 'ArtesanoRegular', Arial, sans-serif;
  font-size: 1.3rem;
  margin-bottom: 14px;
}

.piece-status.unlocked {
  color: rgba(17, 17, 17, 0.72);
}

.piece-status.locked {
  color: rgba(17, 17, 17, 0.5);
}

.piece-link,
.btn,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid #111111;
  background: var(--button);
  color: var(--button-text);
  cursor: pointer;
  font-family: 'ArtesanoRegular', Arial, sans-serif;
  font-size: 1.2rem;
  font-weight: 400;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.piece-link:hover,
.btn:hover,
button:hover {
  transform: translateY(-1px);
  opacity: 0.92;
}

.piece-art {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.piece-img {
  display: block;
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.36);
  padding: 6px;
}

.is-locked .piece-img {
  opacity: 0.38;
}

label {
  display: block;
  margin: 10px 0 6px;
  font-family: 'ArtesanoRegular', Arial, sans-serif;
  color: var(--muted);
}

input,
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  outline: none;
}

.alert {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line-strong);
  padding: 12px 14px;
  border-radius: 16px;
  margin: 12px 0;
  color: var(--text);
}

.alert.success {
  border-color: rgba(17, 17, 17, 0.18);
}

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

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

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

.reward {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.6);
}

.reward-title {
  font-weight: 700;
  margin-bottom: 10px;
}

textarea {
  min-height: 120px;
}

@media (max-width: 820px) {
  .piece-row {
    grid-template-columns: minmax(0, 1fr) 64px;
    gap: 10px;
  }

  .piece-art {
    justify-content: flex-start;
  }

  .piece-img {
    width: 56px;
    height: 56px;
    padding: 4px;
  }

  .pieces-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .wrap {
    width: min(100% - 20px, 1120px);
  }

  .topbar-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-card,
  .pieces-card {
    padding-left: 18px;
    padding-right: 18px;
  }

  .piece-row {
    grid-template-columns: minmax(0, 1fr) 52px;
    gap: 8px;
    padding: 10px 0;
  }

  .piece-img {
    width: 46px;
    height: 46px;
    padding: 4px;
  }
}

/* LOGIN PAGE */

.card h1 {
  font-family: 'ArtesanoBold', Arial, sans-serif;
  letter-spacing: 0.02em;
}

.card p.muted {
  font-family: 'ArtesanoRegular', Arial, sans-serif;
  font-size: 1.6rem;
  letter-spacing: 0.05em;
}