/* PUNTADA STUDIO · Demo gratis
   Una sola pantalla: el formulario y el cartel del negocio en directo.
   Cartel de los 90 dibujado a mano: tintas planas sobre papel, linóleo y plumilla.
   Tokens de la marca v7 (BRAND.md / DESIGN.md). */

@property --rot {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

:root {
  --azul: #2338F2;
  --naranja: #FF5A1F;
  --papel: #F3ECDF;
  --papel-claro: #FBF7EF;
  --rosa: #FF6EB4;
  --menta: #7FD9B9;
  --noche: #141A5C;
  --blanco: #FFFFFF;

  --f-display: 'Erica One', 'Archivo Black', sans-serif;
  --f-label: 'Archivo Black', 'Arial Black', sans-serif;
  --f-text: 'Fira Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-in-out: cubic-bezier(.77, 0, .175, 1);

  --pad: clamp(20px, 5vw, 72px);
  --maxw: 1320px;
  --ring: var(--noche);

  --z-sticky: 5;
  --z-float: 20;
  --z-drag: 40;
  --z-loader: 50;
  --z-roller: 60;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  font-family: var(--f-text);
  font-size: 18px;
  line-height: 1.5;
  color: var(--noche);
  background-color: var(--papel);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 400; }
ul, ol { margin: 0; padding: 0; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--ring); outline-offset: 3px; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 16px; top: 16px; z-index: 100;
  padding: 12px 18px; background: var(--papel); color: var(--noche);
  font-family: var(--f-label); font-size: 15px; text-transform: uppercase;
  border: 3px solid var(--noche); text-decoration: none;
  transform: translateY(-200%);
}
.skip:focus-visible { transform: none; }

.wrap { width: 100%; max-width: calc(var(--maxw) + var(--pad) * 2); margin-inline: auto; padding-inline: var(--pad); }

/* Papel arrugado multiplicado sobre la tinta */
.paper {
  background-image: url("../img/papel-arrugado.jpg");
  background-size: 1200px auto;
  background-blend-mode: multiply;
}
/* Papel de libreta: la mesa de trabajo */
.grid-paper {
  background-image:
    linear-gradient(rgba(20, 26, 92, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 26, 92, .07) 1px, transparent 1px),
    url("../img/papel-arrugado-claro.jpg");
  background-size: 28px 28px, 28px 28px, 1200px auto;
  background-blend-mode: normal, normal, multiply;
}

/* ---------- Tipografía ---------- */
.h2, .demo__title {
  font-family: var(--f-display);
  line-height: 1.04;
  color: var(--noche);
  text-shadow: .06em .06em 0 var(--naranja);
  text-wrap: balance;
}
.h2 { font-size: clamp(2.4rem, 5.2vw, 4.25rem); }
.lead {
  font-size: clamp(1.125rem, 1.5vw, 1.375rem);
  line-height: 1.45;
  font-weight: 500;
  max-width: 34em;
  text-wrap: pretty;
}
.opt {
  font-family: var(--f-text);
  font-size: 14px;
  font-weight: 500;
  opacity: .78;
  margin-left: 6px;
}

/* ---------- Botones ---------- */
.btn {
  --bg: var(--naranja);
  --fg: var(--noche);
  --sh: var(--noche);
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  font-family: var(--f-label);
  font-size: 16px;
  line-height: 1.1;
  letter-spacing: .02em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  color: var(--fg);
  background: var(--bg);
  border: 3px solid var(--noche);
  border-radius: 0;
  box-shadow: 6px 6px 0 var(--sh);
  transition: transform 160ms var(--ease-out), box-shadow 160ms var(--ease-out), background-color 160ms var(--ease-out);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.btn--big { min-height: 62px; padding: 0 32px; font-size: 18px; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--sh); }
}
.btn:active { transform: translate(4px, 4px); box-shadow: 2px 2px 0 var(--sh); }

.text-btn {
  display: inline-flex; align-items: center; min-height: 44px;
  padding: 0 4px;
  background: none; border: 0;
  font-family: var(--f-text); font-weight: 600; font-size: 16px;
  color: var(--noche);
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px;
  transition: text-decoration-color 160ms ease;
}
@media (hover: hover) { .text-btn:hover { text-decoration-color: var(--naranja); } }

/* ---------- Animaciones de la casa ---------- */
/* Línea viva: Punti tiembla a 8 fotogramas por segundo */
@keyframes boil {
  0% { transform: rotate(-1.6deg) translate(0, 0); }
  33% { transform: rotate(1.1deg) translate(3px, -2px); }
  66% { transform: rotate(-.4deg) translate(-2px, 3px); }
  100% { transform: rotate(-1.6deg) translate(0, 0); }
}
.boil { animation: boil .375s steps(1, end) infinite; }

/* Salto: entra a saltos, con registro desplazado, y se asienta */
@keyframes salto {
  0% { opacity: 0; transform: translate(-18px, 12px); }
  20% { opacity: 1; transform: translate(14px, -9px); }
  40% { transform: translate(-8px, 6px); }
  60% { transform: translate(4px, -3px); }
  80% { transform: translate(-1px, 1px); }
  100% { opacity: 1; transform: none; }
}

/* Sellazo: cae y rebota una vez */
@keyframes slam {
  0% { opacity: 0; transform: scale(1.8) rotate(-34deg); }
  55% { opacity: 1; transform: scale(.9) rotate(-8deg); }
  75% { transform: scale(1.05) rotate(-11deg); }
  100% { opacity: 1; transform: scale(1) rotate(-10deg); }
}
@keyframes thud {
  0%, 100% { translate: 0 0; }
  30% { translate: 0 5px; }
  60% { translate: 0 -2px; }
}

/* Pegar: la pegatina cae sobre el cartel y se asienta */
@keyframes pegar {
  0% { scale: 1.35; opacity: .4; }
  45% { scale: .94; opacity: 1; }
  75% { scale: 1.04; }
  100% { scale: 1; opacity: 1; }
}

/* Cinta: los servicios pasan en bucle */
@keyframes tick { to { transform: translateX(-50%); } }

/* Rayos: girar un par de rayos (15°) es igual que dar la vuelta entera y no acumula */
@keyframes rays { to { --rot: 15deg; } }

html.is-paused .loop { animation-play-state: paused; }

/* ---------- Pantalla de carga ---------- */
.loader, .roller { display: none; }
html.show-loader .loader {
  display: grid;
  position: fixed; inset: 0;
  z-index: var(--z-loader);
  place-items: center;
  background-color: var(--papel);
  clip-path: inset(0 0 0 var(--wipe, 0px));
  cursor: progress;
}
html.show-loader .roller { display: block; }
html.show-loader body { overflow: hidden; }
.loader__center { display: grid; justify-items: center; gap: 14px; text-align: center; padding: 24px; }
.loader__punti { width: clamp(120px, 16vw, 180px); height: auto; }
.loader__text { font-family: var(--f-label); font-size: 15px; letter-spacing: .04em; text-transform: uppercase; }
.loader__bar {
  width: min(280px, 70vw); height: 18px;
  border: 3px solid var(--noche);
  background: var(--papel-claro);
  overflow: hidden;
}
.loader__fill {
  display: block; height: 100%; width: 100%;
  background: repeating-linear-gradient(-45deg, var(--naranja) 0 10px, var(--noche) 10px 20px);
  transform-origin: left center;
  transform: scaleX(var(--p, 0));
}
.loader__count { font-family: var(--f-label); font-size: 14px; font-variant-numeric: tabular-nums; }

.roller {
  position: fixed; top: -6vh; bottom: -6vh; left: 0;
  width: clamp(70px, 7vw, 108px);
  z-index: var(--z-roller);
  pointer-events: none;
  transform: translateX(-300px);
  will-change: transform;
}
.roller__body {
  position: absolute; inset: 0;
  background-color: var(--azul);
  background-image: repeating-linear-gradient(180deg, transparent 0 26px, rgba(243, 236, 223, .22) 26px 32px);
  border: 6px solid var(--noche);
  border-radius: 999px;
  box-shadow: inset -10px 0 0 rgba(20, 26, 92, .35), inset 8px 0 0 rgba(243, 236, 223, .25);
  animation: roll .35s linear infinite;
}
@keyframes roll { to { background-position: 0 58px; } }
.roller__arm {
  position: absolute; top: calc(50% - 9px); right: 50%;
  width: clamp(120px, 16vw, 230px); height: 18px;
  background: var(--noche);
}
.roller__grip {
  position: absolute; top: calc(50% - 30px);
  right: calc(50% + clamp(120px, 16vw, 230px) - 6px);
  width: clamp(90px, 9vw, 130px); height: 60px;
  background: var(--naranja);
  border: 6px solid var(--noche);
  border-radius: 30px;
}

/* El contenido espera a que el rodillo lo entinte y entra a saltos */
html.js [data-salto] { opacity: 0; }
html.js.is-ready [data-salto] {
  animation: salto 600ms steps(1, end) both;
  animation-delay: calc(var(--i, 0) * 110ms);
}
.demo__kicker { --i: 0; }
.demo__title { --i: 1; }
.demo__intro .lead { --i: 2; }
.steps { --i: 3; }
.demo__main { --i: 4; }
.studio { --i: 5; }

/* ---------- Barra superior ---------- */
.topbar {
  position: relative; z-index: 3;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px var(--pad) 12px;
}
.topbar__logo { display: inline-flex; min-height: 44px; align-items: center; }
.topbar__logo img { height: clamp(34px, 3.4vw, 46px); width: auto; }
.topbar__tag {
  position: absolute; left: 50%; transform: translateX(-50%);
  font-family: var(--f-display); font-size: 22px; line-height: 1;
  color: var(--noche); text-shadow: .07em .07em 0 var(--naranja);
  white-space: nowrap;
}
.motion-toggle {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px;
  background: transparent;
  border: 3px solid var(--noche);
  color: var(--noche);
  transition: background-color 160ms ease, color 160ms ease, transform 160ms var(--ease-out);
}
.motion-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.motion-toggle__play { display: none; fill: currentColor !important; }
.motion-toggle[aria-pressed="true"] .motion-toggle__play { display: block; }
.motion-toggle[aria-pressed="true"] .motion-toggle__pause { display: none; }
@media (hover: hover) { .motion-toggle:hover { background: var(--noche); color: var(--papel); } }
.motion-toggle:active { transform: scale(.94); }

/* Cinta de servicios */
.cinta-wrap { overflow: hidden; padding-block: 8px; position: relative; z-index: 2; }
.cinta {
  position: relative;
  margin-inline: -2%;
  rotate: -1deg;
  background: var(--naranja);
  border-block: 3px solid var(--noche);
  overflow: hidden;
}
.cinta__track { display: flex; width: max-content; animation: tick 40s linear infinite; }
.cinta__track span {
  flex: none;
  padding: 9px 16px;
  font-family: var(--f-label);
  font-size: 15px;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--noche);
  white-space: nowrap;
}

/* ---------- La demo ---------- */
.demo { padding-block: clamp(28px, 4vh, 44px) clamp(72px, 10vh, 110px); }
.demo__head {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 28px 56px;
  align-items: end;
}
.demo__intro { display: grid; gap: 14px; justify-items: start; }
.demo__kicker {
  display: inline-block;
  font-family: var(--f-label);
  font-size: clamp(13px, 1.1vw, 15px);
  line-height: 1.3;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--papel);
  background: var(--noche);
  padding: 8px 14px;
  rotate: -1.5deg;
}
.demo__title { font-size: clamp(2.6rem, 5vw, 4.6rem); max-width: 12ch; }
.demo__dot {
  display: inline-block;
  width: auto; height: .84em;
  margin-left: .05em;
  vertical-align: -.05em;
}

.steps { list-style: none; display: grid; gap: 12px; }
.steps li { display: flex; align-items: center; gap: 14px; font-size: 17px; font-weight: 500; line-height: 1.35; }
.steps__n {
  flex: none;
  display: grid; place-items: center;
  width: 40px; height: 40px;
  font-family: var(--f-display); font-size: 22px;
  color: var(--papel); background: var(--azul);
  border: 3px solid var(--noche);
  border-radius: 50%;
  box-shadow: 3px 3px 0 var(--naranja);
}

.demo__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 56px;
  align-items: start;
  margin-top: 36px;
}
.demo__main { display: grid; gap: 22px; min-width: 0; }

/* Cinta de obra que se llena según rellenas, con Punti andando encima */
.progress {
  position: sticky; top: 10px; z-index: var(--z-sticky);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px;
  padding: 12px 16px;
  background: var(--papel-claro);
  border: 3px solid var(--noche);
  box-shadow: 5px 5px 0 var(--noche);
}
.progress__track { position: relative; padding-right: 40px; }
.progress__tape {
  height: 20px;
  border: 3px solid var(--noche);
  background: var(--blanco);
  overflow: hidden;
}
.progress__fill {
  display: block; height: 100%; width: 100%;
  background: repeating-linear-gradient(-45deg, var(--naranja) 0 10px, var(--noche) 10px 20px);
  transform-origin: left center;
  transform: scaleX(var(--p, 0));
  transition: transform 320ms var(--ease-out);
}
.progress__punti {
  position: absolute; top: 50%;
  left: calc(var(--p, 0) * (100% - 44px));
  width: 46px; height: auto;
  translate: 0 -58%;
  transition: left 320ms steps(4, end);
}
.progress.is-moving .progress__punti { animation: boil .375s steps(1, end) infinite; }
.progress__label {
  font-family: var(--f-label); font-size: 13px; letter-spacing: .03em; text-transform: uppercase;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.progress.is-done { background: var(--menta); }

/* ---------- Formulario ---------- */
.form { display: grid; gap: 28px; }
.fs {
  position: relative;
  margin: 0; padding: 30px clamp(18px, 2.4vw, 30px) 28px;
  border: 3px solid var(--noche);
  background: var(--papel-claro);
  box-shadow: 8px 9px 0 var(--noche);
  display: grid; gap: 22px;
  min-width: 0;
}
.fs__legend {
  float: left; width: 100%;
  display: flex; align-items: center; gap: 12px;
  padding: 0;
  font-family: var(--f-display);
  font-size: clamp(24px, 2.2vw, 30px);
  line-height: 1.1;
}
.fs__legend + * { clear: both; }
.fs__n {
  display: grid; place-items: center;
  width: 38px; height: 38px; flex: none;
  font-size: 21px;
  color: var(--noche); background: var(--naranja);
  border: 3px solid var(--noche);
  rotate: -4deg;
}

.field { display: grid; gap: 8px; min-width: 0; }
fieldset.field { border: 0; margin: 0; padding: 0; }
.field__label { padding: 0; font-weight: 600; font-size: 17px; line-height: 1.3; }
fieldset.field > .field__label { margin-bottom: 4px; float: left; width: 100%; }
fieldset.field > .field__label + * { clear: both; }
.input {
  width: 100%;
  min-height: 54px;
  padding: 12px 16px;
  font-family: var(--f-text); font-size: 18px; font-weight: 500; line-height: 1.35;
  color: var(--noche);
  background: var(--blanco);
  border: 3px solid var(--noche);
  border-radius: 0;
  outline: none;
  appearance: none;
  transition: box-shadow 160ms var(--ease-out), border-color 160ms ease;
}
.input::placeholder { color: rgba(20, 26, 92, .55); }
.input:focus { box-shadow: 5px 5px 0 var(--azul); }
.input:focus-visible { outline: 3px solid var(--azul); outline-offset: 2px; }
.input--area { min-height: 104px; resize: vertical; }
.input[aria-invalid="true"] { border-color: var(--naranja); box-shadow: 5px 5px 0 var(--naranja); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field__hint { font-size: 15px; margin-top: -10px; }
.field__error {
  display: flex; gap: 8px; align-items: baseline;
  font-size: 15px; font-weight: 600; line-height: 1.35;
  color: var(--noche);
}
.field__error::before { content: "✱"; color: var(--naranja); font-family: var(--f-label); flex: none; }
.field--sub { margin-top: 10px; max-width: 340px; }

.chips__list { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { position: relative; display: inline-flex; }
.chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.chip span {
  display: inline-flex; align-items: center;
  min-height: 44px;
  padding: 0 15px;
  font-size: 16px; font-weight: 600; line-height: 1.2;
  background: var(--blanco);
  border: 3px solid var(--noche);
  transition: background-color 150ms var(--ease-out), color 150ms var(--ease-out), transform 150ms var(--ease-out), box-shadow 150ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .chip:hover span { transform: translateY(-2px); box-shadow: 3px 3px 0 var(--noche); }
}
.chip input:active + span { transform: scale(.96); }
.chip input:checked + span { background: var(--azul); color: var(--papel); box-shadow: 3px 3px 0 var(--naranja); }
.chip input:focus-visible + span { outline: 3px solid var(--azul); outline-offset: 3px; }
.chips[aria-invalid="true"] .chip span { border-color: var(--naranja); }

.field--check { gap: 10px; }
.check { display: flex; align-items: flex-start; gap: 12px; }
.check__input {
  flex: none;
  appearance: none;
  width: 30px; height: 30px; margin: 0;
  border: 3px solid var(--noche);
  background: var(--blanco);
  display: grid; place-items: center;
  cursor: pointer;
  transition: background-color 150ms var(--ease-out);
}
.check__input::after {
  content: ""; width: 14px; height: 8px;
  border-left: 4px solid var(--papel); border-bottom: 4px solid var(--papel);
  transform: translateY(-2px) rotate(-45deg) scale(0);
  transition: transform 160ms var(--ease-out);
}
.check__input:checked { background: var(--azul); }
.check__input:checked::after { transform: translateY(-2px) rotate(-45deg) scale(1); }
.check__input[aria-invalid="true"] { border-color: var(--naranja); }
.check__label { font-size: 16px; font-weight: 500; line-height: 1.45; padding-top: 2px; cursor: pointer; }
.legal { font-size: 14px; line-height: 1.5; }
.legal summary {
  display: inline-flex; align-items: center; min-height: 44px;
  font-weight: 600; cursor: pointer;
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px;
}
.legal p { padding: 4px 0 6px; max-width: 60ch; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form__submit { display: grid; justify-items: start; gap: 14px; }
.btn--submit .btn__busy { display: none; }
.btn--submit[aria-busy="true"] { pointer-events: none; }
.btn--submit[aria-busy="true"] .btn__label { display: none; }
.btn--submit[aria-busy="true"] .btn__busy { display: inline-flex; align-items: center; gap: 10px; }
.btn--submit[aria-busy="true"] .btn__busy::before {
  content: ""; width: 54px; height: 12px;
  border: 2px solid var(--noche);
  background: repeating-linear-gradient(-45deg, var(--noche) 0 6px, transparent 6px 12px);
  background-size: 17px 12px;
  animation: obra .5s linear infinite;
}
@keyframes obra { to { background-position: 17px 0; } }
.form__note { font-size: 16px; font-weight: 500; max-width: 36em; }
.form__alert {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px; font-weight: 600; line-height: 1.45;
  background: var(--blanco);
  border: 3px solid var(--naranja);
  box-shadow: 5px 5px 0 var(--naranja);
}
.form__alert a { font-weight: 600; }

/* Éxito */
.success {
  display: grid; gap: 18px; justify-items: start;
  padding: clamp(26px, 3vw, 40px);
  border: 3px solid var(--noche);
  background: var(--papel-claro);
  box-shadow: 8px 9px 0 var(--noche);
  outline: none;
}
.success__title {
  font-family: var(--f-display);
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.05;
  text-shadow: .06em .06em 0 var(--naranja);
}
.success__text { font-size: 20px; font-weight: 500; max-width: 30em; }
.success__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.success__small { font-size: 15px; max-width: 40em; }

/* ---------- El estudio: cartel, rayos, color y pegatinas ---------- */
.studio {
  --ray: var(--azul);
  position: sticky; top: 24px;
  display: grid; justify-items: center; gap: 18px;
  min-width: 0;
}
.studio[data-color="azul"], .studio[data-color="papel"] { --ray: var(--naranja); }
.studio__label, .studio__sub {
  font-family: var(--f-label); font-size: 13px; letter-spacing: .04em; text-transform: uppercase;
}
.studio__label { justify-self: start; }
.studio__stage {
  position: relative;
  isolation: isolate;
  width: 100%;
  display: grid; place-items: center;
  padding: 28px 0 34px;
  overflow-x: clip;
  overflow-clip-margin: 24px;
}
/* Rayos de sol (plantilla «Rotating Sunburst Rays» de AnimatedWebs, en tintas de la marca y con borde limpio) */
.sunburst {
  position: absolute; z-index: -1;
  left: 50%; top: 50%;
  width: min(118%, 600px); aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  background: repeating-conic-gradient(from var(--rot) at 50% 50%, var(--ray) 0deg 7.5deg, transparent 7.5deg 15deg);
  clip-path: circle(50%);
  animation: rays 14s linear infinite;
  transition: opacity 300ms ease;
}
.studio.is-fast .sunburst { animation-duration: 3.5s; }
.studio.is-party .sunburst { animation-duration: .9s; }

.poster {
  --pbg: var(--naranja); --pfg: var(--noche); --psh: var(--papel); --pstrip: var(--noche); --pstripfg: var(--papel);
  container-type: inline-size;
  position: relative;
  width: 100%; max-width: 400px;
  aspect-ratio: 4 / 5;
  color: var(--pfg);
  background-color: var(--pbg);
  border: 3px solid var(--noche);
  box-shadow: 12px 14px 0 var(--noche);
  rotate: 1.2deg;
  overflow: hidden;
  transition: background-color 260ms var(--ease-out), color 260ms var(--ease-out);
}
.poster[data-color="azul"] { --pbg: var(--azul); --pfg: var(--papel); --psh: var(--naranja); --pstrip: var(--naranja); --pstripfg: var(--noche); }
.poster[data-color="rosa"] { --pbg: var(--rosa); --pfg: var(--noche); --psh: var(--papel); --pstrip: var(--noche); --pstripfg: var(--papel); }
.poster[data-color="menta"] { --pbg: var(--menta); --pfg: var(--noche); --psh: var(--papel); --pstrip: var(--azul); --pstripfg: var(--papel); }
.poster[data-color="papel"] { --pbg: var(--papel); --pfg: var(--noche); --psh: var(--naranja); --pstrip: var(--azul); --pstripfg: var(--papel); }
.poster__inner { height: 100%; display: flex; flex-direction: column; gap: 3.2cqw; padding: 7cqw 7cqw 0; }
.poster__top { display: flex; justify-content: space-between; align-items: center; gap: 4cqw; }
.poster__handle {
  font-family: var(--f-label); font-size: 4cqw; letter-spacing: .02em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.poster__star { font-family: var(--f-label); font-size: 7cqw; line-height: 1; color: var(--pfg); }
.poster__name {
  margin-top: 2cqw;
  font-family: var(--f-display);
  font-size: calc(var(--fit, 16) * 1cqw);
  line-height: 1.02;
  text-shadow: .055em .055em 0 var(--psh);
  overflow-wrap: anywhere;
  hyphens: auto;
  transition: font-size 160ms var(--ease-out);
}
.poster.is-empty .poster__name, .poster.is-empty .poster__handle { opacity: .55; }
.poster.is-empty .poster__strip { opacity: .8; }
.poster__strip {
  align-self: flex-start;
  padding: 1.6cqw 2.6cqw;
  font-family: var(--f-label); font-size: 4.4cqw; letter-spacing: .02em; text-transform: uppercase;
  color: var(--pstripfg); background: var(--pstrip);
  rotate: -2deg;
}
.poster__svcs { list-style: none; display: grid; gap: 1cqw; font-size: 4cqw; font-weight: 600; line-height: 1.2; max-width: 58cqw; }
.poster__svcs li::before { content: "✱ "; font-family: var(--f-label); }
.poster__town {
  position: absolute; left: 7cqw; bottom: 8cqw;
  max-width: 50cqw;
  padding: 1.6cqw 2.6cqw;
  font-family: var(--f-label); font-size: 3.8cqw; line-height: 1.15; letter-spacing: .03em; text-transform: uppercase;
  border: .8cqw solid currentColor;
  rotate: -7deg;
}
.poster__punti {
  position: absolute; right: -5cqw; bottom: -7cqw;
  width: 48cqw; height: auto;
}
.poster__punti.is-swapping { animation: salto 480ms steps(1, end) both; }
.poster.is-typing .poster__punti:not(.is-swapping) { animation: boil .375s steps(1, end) infinite; }

/* Lo que estás rellenando se marca en el cartel */
.poster[data-focus="name"] .poster__name,
.poster[data-focus="sector"] .poster__strip,
.poster[data-focus="town"] .poster__town,
.poster[data-focus="handle"] .poster__handle,
.poster[data-focus="svcs"] .poster__svcs {
  outline: .7cqw dashed currentColor;
  outline-offset: 1.6cqw;
}
.poster[data-focus="svcs"] .poster__svcs:empty { min-height: 6cqw; min-width: 30cqw; }

.poster__ok {
  position: absolute; left: 50%; top: 46%; z-index: 4;
  width: 78cqw; height: auto;
  margin: -16cqw 0 0 -39cqw;
  display: none;
  pointer-events: none;
}
.poster.is-stamped .poster__ok { display: block; animation: slam 560ms cubic-bezier(.2, .8, .2, 1) both; }
.poster.is-stamped { animation: thud 320ms 300ms ease-out; }

/* Pegatinas sobre el cartel */
.poster__stickers { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.placed {
  position: absolute;
  left: calc(var(--x) * 1%); top: calc(var(--y) * 1%);
  translate: -50% -50%;
  rotate: calc(var(--r) * 1deg);
  padding: 0; margin: 0;
  background: none; border: 0;
  pointer-events: auto;
  touch-action: none;
  cursor: grab;
  animation: pegar 420ms steps(4, end) both;
  -webkit-tap-highlight-color: transparent;
}
.placed:active { cursor: grabbing; }
.placed.is-dragging { animation: none; scale: 1.06; filter: drop-shadow(4px 5px 0 rgba(20, 26, 92, .5)); }
.placed:focus-visible { outline: 3px dashed var(--noche); outline-offset: 4px; }

/* Aspecto de las pegatinas (bandeja y cartel). Borde blanco de pegatina, como en el manual. */
.stk { display: grid; place-items: center; pointer-events: none; }
.stk img { width: 100%; height: auto; -webkit-user-drag: none; user-select: none; }
.stk--punti, .stk--sello { width: var(--sz, 56px); }
.stk--star { width: var(--sz, 44px); }
.stk--star svg { width: 100%; height: auto; fill: var(--naranja); stroke: var(--blanco); stroke-width: 2.6; stroke-linejoin: round; paint-order: stroke; filter: drop-shadow(2px 2px 0 var(--noche)); }
.stk--punti img { filter: drop-shadow(2px 2px 0 var(--blanco)) drop-shadow(-2px -2px 0 var(--blanco)); }
.stk--label {
  padding: .35em .6em;
  font-family: var(--f-label); font-size: var(--fs, 14px); line-height: 1; letter-spacing: .03em; text-transform: uppercase;
  color: var(--noche);
  border: .18em solid var(--blanco);
  box-shadow: .18em .2em 0 var(--noche);
  white-space: nowrap;
}
.stk--rosa { background: var(--rosa); }
.stk--menta { background: var(--menta); }
.placed .stk--punti, .placed .stk--sello { --sz: 24cqw; }
.placed .stk--star { --sz: 13cqw; }
.placed .stk--label { --fs: 5.2cqw; }

.swatches { display: flex; flex-wrap: wrap; justify-self: stretch; align-items: center; gap: 2px; border: 0; margin: 0; padding: 0; min-width: 0; }
.swatches .studio__sub { float: left; margin-right: 10px; }
.swatch { position: relative; display: grid; place-items: center; width: 44px; height: 44px; cursor: pointer; }
.swatch::before {
  content: ""; width: 28px; height: 28px; border-radius: 50%;
  background: var(--sw); border: 3px solid var(--noche);
  transition: transform 160ms var(--ease-out);
}
.swatch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.swatch:has(input:checked)::before { transform: scale(1.18); box-shadow: 0 0 0 3px var(--papel), 0 0 0 6px var(--noche); }
.swatch:has(input:focus-visible) { outline: 3px solid var(--ring); outline-offset: 0; }
@media (hover: hover) and (pointer: fine) { .swatch:hover::before { transform: scale(1.1); } }
.s-naranja { --sw: var(--naranja); }
.s-azul { --sw: var(--azul); }
.s-rosa { --sw: var(--rosa); }
.s-menta { --sw: var(--menta); }
.s-papel { --sw: var(--papel); }

.tray { display: grid; gap: 10px; justify-items: start; justify-self: stretch; }
.tray__list { display: flex; flex-wrap: wrap; gap: 10px; }
.tray__item {
  display: grid; place-items: center;
  min-width: 64px; height: 64px;
  padding: 4px 8px;
  background: var(--papel-claro);
  border: 3px dashed var(--noche);
  touch-action: none;
  cursor: grab;
  transition: transform 160ms var(--ease-out), background-color 160ms ease;
  -webkit-tap-highlight-color: transparent;
}
@media (hover: hover) and (pointer: fine) {
  .tray__item:hover { transform: translateY(-2px) rotate(-2deg); background: var(--blanco); }
}
.tray__item:active { transform: scale(.95); cursor: grabbing; }
.tray__item .stk--punti, .tray__item .stk--sello { --sz: 48px; }
.tray__item .stk--star { --sz: 36px; }
.tray__hint { font-size: 14px; }

/* Pegatina que viaja con el dedo o el ratón */
.ghost {
  position: fixed; left: 0; top: 0; z-index: var(--z-drag);
  pointer-events: none;
  translate: -50% -50%;
  rotate: -6deg;
  scale: 1.1;
  filter: drop-shadow(5px 6px 0 rgba(20, 26, 92, .45));
}
.ghost .stk--punti, .ghost .stk--sello { --sz: 84px; }
.ghost .stk--star { --sz: 56px; }
.ghost .stk--label { --fs: 18px; }
.studio__stage.is-target .poster { box-shadow: 12px 14px 0 var(--noche), 0 0 0 5px var(--papel), 0 0 0 9px var(--noche); }

/* Miniatura flotante en móvil: el cartel te sigue mientras escribes */
.mini {
  position: fixed; right: 14px; bottom: 14px; z-index: var(--z-float);
  display: none; align-items: center; gap: 10px;
  min-height: 52px; padding: 6px 14px 6px 6px;
  font-family: var(--f-label); font-size: 13px; letter-spacing: .03em; text-transform: uppercase;
  color: var(--noche); background: var(--papel-claro);
  border: 3px solid var(--noche);
  box-shadow: 5px 5px 0 var(--noche);
  text-decoration: none;
  transform: translateY(160%);
  visibility: hidden;
  transition: transform 240ms var(--ease-out), visibility 0s linear 240ms;
}
.mini.is-on { transform: none; visibility: visible; transition: transform 240ms var(--ease-out), visibility 0s; }
.mini__poster {
  display: grid; place-items: center;
  width: 36px; height: 45px;
  padding: 3px;
  overflow: hidden;
  font-family: var(--f-display); font-size: 9px; line-height: 1; text-transform: none; letter-spacing: 0;
  text-align: center;
  color: var(--pfg, var(--noche)); background: var(--pbg, var(--naranja));
  border: 2px solid var(--noche);
  overflow-wrap: anywhere;
}

/* ---------- Pie ---------- */
.footer {
  background-color: var(--noche);
  color: var(--papel);
  padding-block: 34px;
  --ring: var(--menta);
}
.footer__wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; }
.footer__claim { font-family: var(--f-display); font-size: 26px; line-height: 1.1; text-shadow: .06em .06em 0 var(--naranja); }
.footer__links { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 24px; }
.footer__links a {
  display: inline-flex; align-items: center; min-height: 44px;
  font-weight: 600; font-size: 16px;
  color: var(--papel);
  text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: rgba(243, 236, 223, .45); text-underline-offset: 5px;
  transition: text-decoration-color 160ms ease;
}
@media (hover: hover) { .footer__links a:hover { text-decoration-color: var(--naranja); } }
.footer__stamp { width: 150px; height: auto; rotate: -6deg; margin-right: 12px; }
.footer__legal { list-style: none; display: flex; flex-wrap: wrap; gap: 0 20px; width: 100%; order: 5; border-top: 2px solid rgba(243, 236, 223, .25); padding-top: 12px; }
.footer__legal a, .footer__btn {
  display: inline-flex; align-items: center; min-height: 44px;
  padding: 0; background: none; border: 0;
  font-family: var(--f-text); font-size: 15px; font-weight: 500;
  color: var(--papel);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px;
  cursor: pointer;
}
@media (hover: hover) { .footer__legal a:hover, .footer__btn:hover { text-decoration-color: var(--naranja); } }

/* Primera capa de información de privacidad */
.legal__list { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 6px 0 8px; }
.legal__list dt { font-weight: 600; }
.legal__list dd { margin: 0; }

/* ---------- Cookies: banner y configuración ---------- */
.cookies {
  position: fixed; left: 18px; bottom: 18px; z-index: 30;
  width: min(460px, calc(100% - 36px));
  display: grid; gap: 12px;
  padding: 20px 22px;
  background: var(--papel-claro);
  border: 3px solid var(--noche);
  box-shadow: 8px 9px 0 var(--noche);
}
.cookies__title { font-family: var(--f-display); font-size: 24px; line-height: 1.1; }
.cookies__text { font-size: 15px; line-height: 1.45; }
.cookies__text a { font-weight: 600; }
.cookies__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.cookies__more { margin-left: auto; }
/* Mismo botón para aceptar y para rechazar: ninguno destaca sobre el otro */
.cbtn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; min-width: 128px; padding: 0 18px;
  font-family: var(--f-label); font-size: 15px; letter-spacing: .02em; text-transform: uppercase;
  color: var(--papel); background: var(--noche);
  border: 3px solid var(--noche);
  box-shadow: 4px 4px 0 var(--naranja);
  transition: transform 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) { .cbtn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--naranja); } }
.cbtn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--naranja); }
html.has-cookie-banner .mini { display: none; }

.cookie-dialog {
  width: min(560px, calc(100% - 32px));
  padding: 0;
  color: var(--noche);
  background: var(--papel-claro);
  border: 3px solid var(--noche);
  box-shadow: 10px 11px 0 var(--noche);
}
.cookie-dialog::backdrop { background: rgba(20, 26, 92, .55); }
.cookie-dialog__form { display: grid; gap: 16px; padding: 26px 24px; }
.cookie-dialog__title { font-family: var(--f-display); font-size: 28px; line-height: 1.1; }
.cookie-cat { display: grid; gap: 6px; padding-top: 14px; border-top: 2px solid rgba(20, 26, 92, .15); }
.cookie-cat__name { font-weight: 600; }
.cookie-cat__text { font-size: 15px; }
.cookie-dialog__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-dialog__actions .cbtn { flex: 1 1 140px; }

/* Datos pendientes en los textos legales: se ven a propósito hasta que se rellenan */
.todo { background: var(--rosa); color: var(--noche); padding: 0 .2em; font-weight: 600; }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 8px 10px; border: 2px solid rgba(20, 26, 92, .2); }
.doc th { background: var(--papel-claro); }
.doc ul, .doc ol { padding-left: 1.2em; display: grid; gap: 6px; }
.doc li { font-size: 17px; }
.doc h3 { font-family: var(--f-label); font-size: 15px; text-transform: uppercase; letter-spacing: .03em; margin-top: 10px; }
.doc .modelo { padding: 16px 18px; border: 3px dashed var(--noche); background: var(--papel-claro); }
.doc .cbtn { justify-self: start; }

/* ---------- Páginas sencillas (gracias, error, 404, privacidad) ---------- */
.simple { min-height: 100svh; background-color: var(--papel); }
.simple__main {
  min-height: 100svh;
  display: grid; place-content: center; justify-items: center; gap: 22px;
  padding: 48px var(--pad);
  text-align: center;
}
.simple__main .lead { margin-inline: auto; }
.simple__main .h2 { max-width: 16ch; }
.simple__punti { width: 180px; height: auto; }
.simple__stamp { width: min(320px, 80vw); height: auto; rotate: -10deg; animation: slam 560ms cubic-bezier(.2, .8, .2, 1) both; }
.doc { max-width: 720px; margin-inline: auto; padding: 48px var(--pad) 80px; display: grid; gap: 16px; }
.doc .h2 { margin-top: 8px; }
.doc h2:not(.h2) { font-family: var(--f-display); font-size: 26px; line-height: 1.1; margin-top: 18px; }
.doc p { font-size: 17px; }
.doc a:not(.text-btn) { font-weight: 600; text-underline-offset: 3px; }
.doc .text-btn { justify-self: start; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .demo__head { grid-template-columns: 1fr; }
  .demo__grid { gap: 40px; }
}
@media (max-width: 860px) {
  .demo__grid { grid-template-columns: 1fr; }
  .studio { position: relative; top: 0; }
  .poster { max-width: min(340px, 86%); }
  .topbar__tag { display: none; }
  .mini { display: inline-flex; }
}
@media (max-width: 640px) {
  body { font-size: 17px; }
  html { scroll-padding-top: 80px; }
  .demo { padding-top: 32px; }
  .demo__title { font-size: clamp(2.3rem, 11vw, 3.2rem); }
  .steps { display: none; }
  .progress { grid-template-columns: 1fr; gap: 8px; padding: 10px 12px; top: 6px; }
  .progress__label { font-size: 12px; }
  .field-row { grid-template-columns: 1fr; }
  .form__submit .btn { width: 100%; }
  .success__actions .btn { width: 100%; }
  .footer__wrap { flex-direction: column; align-items: flex-start; }
  .topbar__tag { display: none; }
  .cookies { left: 10px; right: 10px; bottom: 10px; width: auto; padding: 16px; }
  .cookies__actions .cbtn { flex: 1 1 0; min-width: 0; }
  .cookies__more { margin-left: 0; }
}

/* Movimiento reducido: todo aparece quieto */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }
  .motion-toggle { display: none; }
}
