/* Joe Mostacho · sistema visual «fieltro y vidrio»
   Fieltro: el fondo mate del tablero de letras del mostrador. Vidrio: lo que flota encima.
   Mosaico: el amarillo del piso, solo para precios, la accion principal y lo elegido. */
:root {
  color-scheme: dark;
  --tinta-950: #0B0A09; --tinta-900: #12110F; --tinta-800: #1B1917; --tinta-700: #26231F;
  --cal: #FBF8F1; --cal-2: rgba(251, 248, 241, .74); --cal-3: rgba(251, 248, 241, .56); --linea: rgba(251, 248, 241, .11);
  --mosaico: #F2B233; --mosaico-claro: #F8CB6B; --mosaico-hondo: #D4952A;
  --bambu: #8FD19A;
  --azul: #A9C3FF; --azul-f: rgba(86, 130, 240, .24);
  --verde: #8AE3B0; --verde-f: rgba(46, 180, 110, .22);
  --rojo: #FFA9A2; --rojo-f: rgba(229, 72, 77, .24);
  --naranja: #FFC08F; --naranja-f: rgba(255, 139, 62, .22);
  --poste-rojo: #E5484D; --poste-azul: #3E63DD;
  --vidrio: rgba(22, 20, 17, .58); --vidrio-2: rgba(40, 37, 33, .62); --vidrio-claro: rgba(255, 255, 255, .08);
  --borde: rgba(255, 255, 255, .13);
  --brillo: inset 0 1px 0 rgba(255, 255, 255, .17), inset 0 0 0 1px rgba(255, 255, 255, .035);
  --sombra: 0 18px 50px rgba(0, 0, 0, .46);
  --r-s: 14px; --r-m: 22px; --r-l: 30px;
  --f-tablero: 'Barlow Condensed', 'Roboto Condensed', 'Avenir Next Condensed', 'DIN Condensed', 'Arial Narrow', system-ui, sans-serif;
  --f-texto: 'Barlow', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --f-cifra: 'Barlow Semi Condensed', 'Barlow', system-ui, sans-serif;
  /* movimiento: arranca rapido y aterriza suave; nada arranca lento */
  --salida: cubic-bezier(.23, 1, .32, 1); --vaiven: cubic-bezier(.77, 0, .175, 1); --hoja: cubic-bezier(.32, .72, 0, 1);
  --t-toque: 120ms; --t-micro: 160ms; --t-cont: 250ms; --t-pant: 350ms; --t-hoja: 500ms;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; }
body {
  background: var(--tinta-950); color: var(--cal);
  font-family: var(--f-texto); font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--mosaico-claro); outline-offset: 3px; }
.solo-lector { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* --- tipografia --- */
.tablero { font-family: var(--f-tablero); font-weight: 600; text-transform: uppercase; letter-spacing: .045em; line-height: 1.02; }
.cifra { font-family: var(--f-cifra); font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: 0; }
.ceja { font-family: var(--f-tablero); font-weight: 600; text-transform: uppercase; letter-spacing: .14em; font-size: 14px; line-height: 20px; color: var(--cal-3); }
.suave { color: var(--cal-2); }
.tenue { color: var(--cal-3); }
.corta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

/* --- materiales --- */
.vidrio { background: var(--vidrio); border: 1px solid var(--borde); box-shadow: var(--brillo); border-radius: var(--r-m); }
.flota {
  background: rgba(24, 22, 19, .64); border: 1px solid var(--borde); box-shadow: var(--brillo), var(--sombra);
  -webkit-backdrop-filter: blur(22px) saturate(1.7); backdrop-filter: blur(22px) saturate(1.7);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .flota { background: rgba(24, 22, 19, .95); } }
.fieltro { background-color: var(--tinta-900); background-image: repeating-linear-gradient(0deg, rgba(255, 255, 255, .03) 0 1px, transparent 1px 7px); }

/* --- controles: todo lo que se presiona responde al bajar el dedo --- */
.pulsa { transition: transform var(--t-toque) var(--salida); touch-action: manipulation; -webkit-user-select: none; user-select: none; }
.pulsa:active { transform: scale(.97); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 20px; border-radius: 16px;
  font-family: var(--f-cifra); font-weight: 600; font-size: 18px; line-height: 1; letter-spacing: .01em; text-decoration: none; white-space: nowrap;
  transition: transform var(--t-toque) var(--salida), background-color var(--t-micro) ease, opacity var(--t-micro) ease;
  touch-action: manipulation; -webkit-user-select: none; user-select: none;
}
.btn:active { transform: scale(.97); }
.btn--oro { background: var(--mosaico); color: var(--tinta-950); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 8px 24px rgba(242, 178, 51, .22); }
.btn--vidrio { background: var(--vidrio-claro); color: var(--cal); border: 1px solid var(--borde); box-shadow: var(--brillo); }
.btn--texto { min-height: 44px; padding: 0 12px; color: var(--cal-2); }
.btn--riesgo { color: var(--rojo); }
.btn--ancho { display: flex; width: 100%; }
.btn--chico { min-height: 44px; font-size: 16px; padding: 0 16px; border-radius: 14px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .42; pointer-events: none; }
@media (hover: hover) and (pointer: fine) {
  .btn--oro:hover { background: var(--mosaico-claro); }
  .btn--vidrio:hover { background: rgba(255, 255, 255, .13); }
}
.redondo {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 999px; flex: none;
  background: var(--vidrio-claro); border: 1px solid var(--borde); box-shadow: var(--brillo); color: var(--cal);
  transition: transform var(--t-toque) var(--salida), background-color var(--t-micro) ease;
}
.redondo:active { transform: scale(.94); }
.ico { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* pildora de precio: el gesto del tablero «CORTE $200» */
.precio {
  display: inline-flex; align-items: center; height: 30px; padding: 0 11px; border-radius: 999px; flex: none;
  background: var(--mosaico); color: var(--tinta-950); font-family: var(--f-cifra); font-weight: 600; font-size: 17px; font-variant-numeric: tabular-nums;
}
.precio--grande { height: 38px; font-size: 21px; padding: 0 14px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; flex: none; white-space: nowrap;
  font-size: 14px; font-weight: 600; line-height: 1; background: rgba(255, 255, 255, .1); color: var(--cal-2);
}
.chip--azul { background: var(--azul-f); color: var(--azul); }
.chip--verde { background: var(--verde-f); color: var(--verde); }
.chip--rojo { background: var(--rojo-f); color: var(--rojo); }
.chip--naranja { background: var(--naranja-f); color: var(--naranja); }
.chip--oro { background: transparent; color: var(--mosaico-claro); box-shadow: inset 0 0 0 1.5px var(--mosaico-hondo); }
.chip--vivo { background: var(--cal); color: var(--tinta-950); }

/* control segmentado: una lente de vidrio se desliza bajo la opcion elegida */
.seg { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; border-radius: 16px; background: rgba(0, 0, 0, .32); border: 1px solid var(--linea); }
.seg__lente { position: absolute; top: 4px; bottom: 4px; left: 4px; width: 0; border-radius: 12px; background: var(--mosaico); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45); transition: transform var(--t-cont) var(--salida), width var(--t-cont) var(--salida); will-change: transform; }
.seg button { position: relative; z-index: 1; min-height: 44px; padding: 0 8px; border-radius: 12px; font-family: var(--f-cifra); font-weight: 600; font-size: 16px; color: var(--cal-2); transition: color var(--t-micro) ease, transform var(--t-toque) var(--salida); white-space: nowrap; }
.seg button:active { transform: scale(.97); }
.seg button[aria-pressed="true"] { color: var(--tinta-950); }

/* campos */
.campo { display: grid; gap: 6px; min-width: 0; }
.campo label { font-weight: 600; font-size: 15px; color: var(--cal-2); }
.campo input, .campo textarea {
  width: 100%; min-height: 52px; padding: 0 16px; border-radius: 16px; font-size: 17px;
  background: rgba(0, 0, 0, .34); border: 1px solid var(--borde); color: var(--cal);
  transition: border-color var(--t-micro) ease, background-color var(--t-micro) ease;
}
.campo input::placeholder { color: var(--cal-3); }
.campo input:focus-visible { outline: none; border-color: var(--mosaico-claro); background: rgba(0, 0, 0, .46); }
.campo .ayuda { font-size: 14px; color: var(--cal-3); }
.campo .error { font-size: 14px; color: var(--rojo); }
.campo[data-error] input { border-color: var(--rojo); }

/* interruptor */
.interruptor { position: relative; width: 54px; height: 32px; border-radius: 999px; background: rgba(255, 255, 255, .16); flex: none; transition: background-color var(--t-cont) ease; }
.interruptor::after { content: ''; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 999px; background: var(--cal); box-shadow: 0 2px 6px rgba(0, 0, 0, .35); transition: transform var(--t-cont) var(--salida); }
.interruptor[aria-checked="true"] { background: var(--mosaico); }
.interruptor[aria-checked="true"]::after { transform: translateX(22px); }

/* franja del poste de barbero: solo se mueve mientras algo carga */
.poste { background-image: repeating-linear-gradient(135deg, var(--poste-rojo) 0 8px, var(--cal) 8px 16px, var(--poste-azul) 16px 24px, var(--cal) 24px 32px); background-size: 45.26px 100%; }
.poste--gira { animation: poste 700ms linear infinite; }
@keyframes poste { to { background-position: 45.26px 0; } }

/* --- velo, hoja y aviso --- */
.velo { position: fixed; inset: 0; z-index: 60; background: rgba(5, 4, 3, .6); opacity: 0; }
.hoja {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; max-height: 92%; display: flex; flex-direction: column;
  border-radius: 34px 34px 0 0; border: 1px solid var(--borde); border-bottom: 0;
  background: rgba(27, 25, 22, .86); box-shadow: var(--brillo), 0 -18px 60px rgba(0, 0, 0, .5);
  -webkit-backdrop-filter: blur(26px) saturate(1.6); backdrop-filter: blur(26px) saturate(1.6);
  transform: translateY(100%); will-change: transform; touch-action: none;
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .hoja { background: var(--tinta-800); } }
.hoja__asa { flex: none; display: flex; justify-content: center; padding: 10px 0 6px; cursor: grab; touch-action: none; }
.hoja__asa span { width: 40px; height: 5px; border-radius: 999px; background: rgba(255, 255, 255, .32); }
.hoja__cuerpo { flex: 1 1 auto; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; padding: 4px 20px calc(24px + env(safe-area-inset-bottom, 0px)); }
.aviso {
  position: fixed; left: 50%; bottom: 0; z-index: 90; width: min(420px, calc(100% - 24px)); border-radius: 20px; overflow: hidden;
  background: rgba(30, 27, 23, .88); visibility: hidden;
  transform: translate(-50%, 140%); transition: transform 400ms var(--salida), visibility 0s linear 400ms; will-change: transform;
}
.aviso[data-visible] { visibility: visible; transform: translate(-50%, calc(-1 * var(--aviso-alto, 24px))); transition-delay: 0s; }
.aviso__fila { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 8px 8px 16px; }
.aviso__texto { flex: 1 1 0; min-width: 0; }
.aviso__texto b { display: block; font-weight: 600; }
.aviso__texto span { display: block; font-size: 14px; color: var(--cal-2); }
.aviso__barra { height: 3px; background: rgba(255, 255, 255, .12); }
.aviso__barra i { display: block; height: 100%; background: var(--mosaico); transform-origin: left; }

/* quien pide menos movimiento recibe fundidos, no desplazamientos */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
  .pulsa:active, .btn:active, .redondo:active, .seg button:active { transform: none; }
  .poste--gira { animation: none; }
}
