/* ════════════════════════════════════════════════
   OBJETOS DE PAPEL — hojas de cuaderno (.notes) y comanda (.comanda)
   Portados de "notebook testimonials" y "handwritten receipt":
   mismas construcciones, en CSS plano (los originales eran SCSS:
   los comentarios // se comían el mask y las líneas), scopeados,
   y con la tinta en la paleta MGZ. El papel y el corcho se quedan
   como están: son el objeto, no la interfaz.
   ════════════════════════════════════════════════ */

/* ── Hojas de cuaderno: los papelitos de hoy ── */
.notes {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  padding: 24px 0 8px;
  font-family: "Special Elite", var(--font-mono);
  color: var(--casi-negro);
}

.note-wrap {
  flex-shrink: 0;
  width: 320px;
  aspect-ratio: 5 / 4;
  margin-inline: -8px;
  filter: drop-shadow(2px 2px 10px rgba(43, 26, 32, 0.14));
}

.note {
  --row-size: 36px;
  width: 100%;
  height: 100%;
  padding: 25% 10% 0 15%;
  position: relative;
  background-color: #f1efeb;
  transition: rotate 0.3s, translate 0.3s;
  /* agujeros del anillado */
  mask:
    linear-gradient(#000, #000) no-repeat center / 100% 100%,
    radial-gradient(circle, #000 40%, transparent 0) repeat-y 12px 8px / 18px 36px;
  mask-composite: subtract;
  -webkit-mask:
    linear-gradient(#000, #000) no-repeat center / 100% 100%,
    radial-gradient(circle, #000 40%, transparent 0) repeat-y 12px 8px / 18px 36px;
  -webkit-mask-composite: source-out;
}

/* renglones */
.note::before {
  content: "";
  position: absolute;
  inset: 0;
  margin-top: auto;
  margin-bottom: 10%;
  height: 70%;
  background-image: repeating-linear-gradient(
    transparent 0 calc(var(--row-size) - 1px),
    rgba(43, 26, 32, 0.14) 0 var(--row-size)
  );
  background-size: 100% calc(var(--row-size) * 9);
  background-position: 60% 30%;
  background-repeat: no-repeat;
  z-index: 0;
}

.note > * {
  position: relative;
  z-index: 1;
}

.note-wrap:nth-child(1) .note { rotate: -4deg; }
.note-wrap:nth-child(2) .note { rotate: 2deg; }
.note-wrap:nth-child(3) .note { rotate: -5deg; }

.note-wrap:nth-child(1) .note-tag { color: var(--cherry); }
.note-wrap:nth-child(2) .note-tag { color: var(--vino-tinta); }
.note-wrap:nth-child(3) .note-tag { color: var(--gris-texto); }

.note-wrap:hover .note {
  rotate: 0deg;
  translate: 0 -10%;
}

.note .content {
  font-family: "Caveat", cursive;
  font-weight: 500;
  font-size: 24px;
  line-height: var(--row-size);
  text-wrap: pretty;
  color: var(--casi-negro);
}

.note .content s {
  text-decoration-thickness: 2px;
}

.note .note-tag {
  position: absolute;
  top: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  align-items: end;
  gap: 4px;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.note .date {
  position: absolute;
  bottom: 12px;
  right: 24px;
  font-size: 12px;
  opacity: 0.8;
}

/* ── Comanda: el pedido que deja el agente ── */
.comanda-wrap {
  position: relative;
  width: fit-content;
  margin: 40px auto 0;
  color: var(--vino-tinta);
}

.comanda-wrap .filters {
  width: 0;
  height: 0;
  position: absolute;
}

.board-cork {
  flex-shrink: 0;
  padding: 24px;
  padding-top: 20px;
  border-radius: 12px;
  box-shadow: 2px 2px 16px rgba(43, 26, 32, 0.2);
  overflow: hidden;
  position: relative;
  isolation: isolate;
}

/* textura de corcho */
.board-cork::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: #66350a;
  filter: url(#corkboard);
  z-index: -1;
}

.receipt {
  --corner-size: 50px;
  width: 300px;
  aspect-ratio: 3 / 4;
  padding: 24px;
  position: relative;
  z-index: 1;
  overflow: hidden;
  background-color: #fff;
  box-shadow: 2px 2px 16px rgba(0, 0, 0, 0.2);
  rotate: 1.5deg;
  corner-shape: bevel;
  border-bottom-right-radius: var(--corner-size);
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-family: "Special Elite", var(--font-mono);
}

/* textura de papel */
.receipt::before {
  content: "";
  position: absolute;
  inset: 0;
  filter: url(#paper);
  z-index: -1;
  pointer-events: none;
}

/* doblez de la esquina */
.receipt::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: var(--corner-size);
  height: var(--corner-size);
  background-color: #ccc;
  pointer-events: none;
}

.receipt .receipt-title {
  font-size: 1.35em;
  text-align: center;
  line-height: 1.2;
}

.receipt .info {
  line-height: 1;
  font-size: 15px;
}

/* .rcp-line en vez de .title: .title es el H1 del hero en styles.css */
.receipt .rcp-line {
  font-family: "Special Elite", var(--font-mono);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0;
  text-transform: none;
  color: var(--vino-tinta);
}

.receipt .info .handwritten {
  display: inline-block;
  vertical-align: middle;
  line-height: 0.7;
  font-family: "Caveat", cursive;
  font-size: 2em;
  transform-origin: left;
  rotate: -3deg;
}

.receipt .handwritten {
  position: relative;
  font-family: "Caveat", cursive;
  color: var(--casi-negro);
  filter: url(#crayon);
}

.receipt .handwritten.underline::before {
  content: "-";
  position: absolute;
  left: 70%;
  top: 60%;
  transform: rotate(-6deg) translateX(-50%) scaleX(8);
  padding-right: 10%;
  transition: --mask-progress 0.3s ease-out;
  transition-delay: 0.5s;
  mask-image: linear-gradient(90deg, #000 var(--mask-progress), #0000 0);
}

@starting-style {
  .receipt .handwritten.underline::before {
    --mask-progress: 0%;
  }
}

.receipt .order {
  flex: 1;
  font-size: 1.45em;
}

.receipt .order .row {
  padding-right: 12%;
  line-height: 1.35;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.receipt .order .row.crossed .item::before {
  content: "-";
  position: absolute;
  left: 50%;
  transform: rotate(-4deg) translateX(-50%) scaleX(15);
}

.receipt .order .item {
  position: relative;
  white-space: nowrap;
}

.receipt .order .price {
  width: 50px;
  text-align: center;
  font-size: 1.1em;
  line-height: 1;
  font-family: "Caveat", cursive;
}

.clip {
  --handle-size: 40px;
  --line-w: calc(var(--handle-size) * 0.4);
  position: absolute;
  bottom: 92%;
  left: 0;
  right: 0;
  width: fit-content;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  rotate: 2deg;
  z-index: 2;
}

.clip div {
  background-color: #4d3e29;
}

.clip .handle {
  width: var(--handle-size);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
}

.clip .bridge {
  width: var(--line-w);
  height: var(--handle-size);
  margin-block: -14px;
}

.clip .end {
  width: 90px;
  height: 30px;
  border-radius: 8px 8px 2px 2px;
}

@property --mask-progress {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 100%;
}

/* ── Layout de la sección "qué hace": pasos + comanda ── */
.what-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 40px;
  align-items: start;
}

.what-layout .what-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.what-layout .comanda-wrap {
  margin: 48px 24px 0;
}

@media (max-width: 1100px) {
  .what-layout {
    grid-template-columns: 1fr;
  }

  .what-layout .comanda-wrap {
    margin: 56px auto 0;
  }
}

@media (max-width: 540px) {
  .note-wrap {
    width: min(320px, 100%);
    margin-inline: 0;
    margin-bottom: -24px;
  }

  .what-layout .what-grid {
    grid-template-columns: 1fr;
  }
}
