/* Plantilla 40 · Kraft. Papel kraft con fibras, letra de máquina de escribir, papel crema para todo lo que se lee, cordel,
   sellos de tinta del color de la marca y etiquetas colgadas que se mecen. */
:root {
  color-scheme: light;
  --surface: #f7f0e2; --surface-2: #ecdfc6; --ink: #2a1c0e; --ink-2: #4a3520; --muted: #4c3722; --line: rgb(42 28 14 / .2);
  --sheet: #f7f0e2; --field: #fffaf0; --r-card: 4px; --r-field: 6px; --r-sheet: 14px; --top-h: 60px;
  --ok: #2f6b3f; --err: #9b1c1c; --err-line: #b42318; --toast-bg: #2a1c0e; --toast-ink: #f7f0e2; --scrim: rgb(42 28 14 / .45); --chip-dark: rgb(42 28 14 / .85);
  --twine: #7e5f36;
}
main { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.bg-layer::after { background: none; }
.top { background: var(--surface); border-bottom: 2px dashed color-mix(in srgb, var(--ink) 30%, transparent); box-shadow: 0 6px 14px -10px rgb(42 28 14 / .5); backdrop-filter: none; }
.top-brand { font-family: var(--font-display); font-weight: 400; font-size: 1.05rem; }
.top-logo { border-radius: 50%; }
.btn { border-radius: 4px; font-family: var(--font-display); font-weight: 400; letter-spacing: .02em; }
.btn-main { box-shadow: 0 3px 0 color-mix(in srgb, var(--accent) 60%, #000); outline: 1.5px dashed color-mix(in srgb, var(--on-accent) 55%, transparent); outline-offset: -6px; }
.btn-main:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); backdrop-filter: none; }

/* Portada: etiqueta de papel colgada de un cordel; el nombre se escribe a máquina y un sello cae al final */
.hero { display: grid; justify-items: center; padding: 50px 0 8px; }
.tag { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; gap: 14px; width: min(100%, 560px); padding: 50px 22px 26px;
  background: var(--surface); border-radius: 6px; box-shadow: 0 1px 0 rgb(42 28 14 / .08), 0 26px 32px -22px rgb(42 28 14 / .65); transform: rotate(-1.2deg); transform-origin: 50% 0; }
/* Sin logo, el nombre queda arriba: se baja para no chocar con el sello de la esquina */
.tag:has(.stamp):not(:has(.hero-logo)) { padding-top: 104px; }
.tag::before { content: ""; position: absolute; left: 50%; bottom: calc(100% - 22px); width: 2px; height: 66px; margin-left: -1px; z-index: -1;
  background: repeating-linear-gradient(var(--twine) 0 5px, color-mix(in srgb, var(--twine) 60%, var(--surface)) 5px 7px); }
.tag { overflow-x: clip; }   /* el sello girado y su golpe de entrada no ensanchan la página */
.tag-hole { position: absolute; top: 14px; left: 50%; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: var(--bg);
  box-shadow: inset 0 1px 2px rgb(0 0 0 / .35), 0 0 0 5px color-mix(in srgb, var(--surface) 65%, var(--twine)); }
.stamp { position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 78px; height: 78px; padding: 10px; border-radius: 50%; text-align: center;
  color: var(--accent-text); border: 2.5px solid currentColor; box-shadow: inset 0 0 0 3px var(--surface), inset 0 0 0 4.5px currentColor; transform: rotate(-14deg); opacity: .9;
  font: 400 .6rem/1.15 var(--font-display); text-transform: uppercase; letter-spacing: .05em; overflow-wrap: anywhere; }
.hero-logo .logo-img { width: 90px; height: 90px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 4px var(--surface), 0 0 0 6px color-mix(in srgb, var(--ink) 35%, transparent); }
.hero-name { font-weight: 400; font-size: calc(clamp(2.5rem, 11.8vw, 5.4rem) * min(var(--ns, 1), var(--ws, 1))); line-height: 1.08; max-width: 13ch; color: var(--ink); }
.hero-name .w { display: inline-block; white-space: nowrap; }
.hero-name .ch { display: inline-block; }
.hero-slogan { color: var(--ink-2); font-size: clamp(1.02rem, 4vw, 1.22rem); max-width: 30ch; }
.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 4px; }
.js .tag { animation: hang-in 1.1s cubic-bezier(.3, 1.25, .5, 1) both; }
@keyframes hang-in { from { opacity: 0; transform: translateY(-26px) rotate(5deg); } to { transform: rotate(-1.2deg); } }
/* A máquina: cada letra aparece de golpe tras la anterior (con un tope para que los nombres largos no tarden) */
.js .hero-name .ch { animation: type .01s steps(1) both; animation-delay: calc(.4s + min(var(--i), 28) * 45ms); }
@keyframes type { from { opacity: 0; } }
.js .tag > .hero-slogan, .js .tag > .hero-cta { animation: fade-up .7s var(--ease-out) both; animation-delay: .9s; }
.js .tag > .hero-cta { animation-delay: 1s; }
@keyframes fade-up { from { opacity: 0; transform: translateY(8px); } }
.js .stamp { animation: thud .5s cubic-bezier(.2, 1.6, .4, 1) 1.2s both; }
@keyframes thud { from { opacity: 0; transform: rotate(-14deg) scale(1.25); } }   /* 1.6 sacaba el sello 11px de la pantalla y ensanchaba la página */
.cf-card { border-radius: 4px; border: 7px solid var(--surface); border-bottom-width: 20px; box-shadow: 0 22px 30px -18px rgb(42 28 14 / .7); }
.cf-meta { margin: 0 auto; width: fit-content; max-width: 100%; padding: 8px 16px; border-radius: 4px; background: var(--surface); box-shadow: 0 10px 18px -12px rgb(42 28 14 / .6); }
.cf-title { font-family: var(--font-display); font-weight: 400; font-size: 1.1rem; }
.cf-nav .btn-icon { background: var(--surface); box-shadow: 0 6px 14px -8px rgb(42 28 14 / .6); }

/* Catálogo: etiquetas colgadas (agujero e hilo) algo torcidas que caen a su lugar y se enderezan al pasar */
.shop { margin-top: 46px; }
.shop-head { display: inline-block; padding: 10px 20px; background: var(--surface); border-radius: 4px; box-shadow: 0 12px 20px -14px rgb(42 28 14 / .7); transform: rotate(-1deg); }
.shop-title { font-weight: 400; font-size: clamp(2rem, 8.6vw, 3.2rem); }
.tabs { margin-top: 14px; background: color-mix(in srgb, var(--surface) 92%, transparent); }
.tab { font-family: var(--font-display); }
.tab-ind { height: 3px; background: var(--ink); }
.grid { gap: 26px 14px; padding-top: 24px; }
.card-hit { position: relative; overflow: visible; padding-top: 22px; background: var(--surface); border-radius: 4px; box-shadow: 0 16px 22px -18px rgb(42 28 14 / .75);
  transform: rotate(var(--tilt, -1deg)); transform-origin: 50% 8px; }
.card:nth-child(2n) .card-hit { --tilt: 1.2deg; } .card:nth-child(3n) .card-hit { --tilt: -.4deg; }
.card-hit::before { content: ""; position: absolute; top: 7px; left: 50%; width: 9px; height: 9px; margin-left: -4.5px; border-radius: 50%; background: var(--bg);
  box-shadow: inset 0 1px 1px rgb(0 0 0 / .35), 0 0 0 3px color-mix(in srgb, var(--surface) 65%, var(--twine)); }
.card-hit::after { content: ""; position: absolute; bottom: calc(100% - 12px); left: 50%; width: 1.5px; height: 22px; margin-left: -.75px; background: var(--twine); }
@media (hover: hover) and (pointer: fine) { .card-hit:hover { transform: rotate(0deg) translateY(-3px); box-shadow: 0 22px 28px -18px rgb(42 28 14 / .8); } }
.card-media { margin: 0 8px; border-radius: 2px; }
.card-name { font-family: var(--font-display); font-weight: 400; font-size: 1rem; }
.js .card.reveal { transform: translateY(-14px) rotate(2deg); }
.js .card.reveal.is-in { transform: none; }
.extra { background: var(--surface); border-radius: 4px; box-shadow: 0 16px 22px -18px rgb(42 28 14 / .7); }
.foot { background: var(--surface); border-top: 2px dashed color-mix(in srgb, var(--ink) 30%, transparent); }
.foot-name { font-weight: 400; }

@media (min-width: 900px) {
  main { padding: 0 32px; }
  .hero { padding-top: 64px; }
  .tag { padding: 62px 56px 40px; }
  .stamp { width: 96px; height: 96px; top: 18px; right: 22px; font-size: .68rem; }
  .cf-wrap { --cf-card: clamp(220px, 20vw, 290px); }
  .tabs { margin: 14px -32px 0; padding: 8px 32px; }
  .cartbar { display: none; }
}
@media (prefers-reduced-motion: reduce) { .js .hero-name .ch { animation: none; } .js .card.reveal { transform: none; } }
