/* Formulario de pedido de turno de Itatí Estilista.
   Diseño basado en el modelo de Stitch (tarjetas de vidrio, vino y rosa), hecho primero para celular.
   Sin librerías ni recursos de terceros: todo se sirve desde este mismo sitio.
   Las tipografías del modelo (Caveat, Playfair Display y Plus Jakarta Sans) se activan con fuentes.css cuando estén en la carpeta fuentes/;
   mientras tanto se usan las del sistema, con el mismo estilo (manuscrita, con serif y sin serif). */
:root {
  --vino: #78233e;
  --vino-oscuro: #56162a;
  --vino-claro: #943150;
  --rubor: #fdf6f7;
  --borde-rosa: #ebd6dc;
  --acento: #d4889c;
  --fondo: #faf5f6;
  --texto: #2d2427;
  --suave: #5f5559;
  --linea: #ddd2d5;
  --error: #a3231f;
  --exito: #1f6b3a;
  --fuente-script: "Caveat", "Segoe Script", "Brush Script MT", "Apple Chancery", cursive;
  --fuente-titulo: "Playfair Display", Georgia, "Times New Roman", serif;
  --fuente-texto: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { font-size: 17px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--fondo); color: var(--texto);
  font-family: var(--fuente-texto); line-height: 1.5; -webkit-font-smoothing: antialiased;
}
::selection { background: var(--borde-rosa); }

/* Fondo: manchas suaves de rosa y vino. Si hay una foto propia (config.js → fondo), se muestra difuminada y desvanecida encima. */
.fondo { position: fixed; inset: 0; z-index: -2; pointer-events: none; background:
  radial-gradient(60% 38% at 12% 6%, rgba(212, 136, 156, .38), transparent 70%),
  radial-gradient(55% 34% at 92% 26%, rgba(120, 35, 62, .16), transparent 70%),
  radial-gradient(65% 40% at 14% 62%, rgba(235, 214, 220, .85), transparent 70%),
  radial-gradient(60% 38% at 88% 92%, rgba(212, 136, 156, .30), transparent 70%),
  linear-gradient(#fcf8f9, #faf5f6); }
.fondo-foto { position: fixed; inset: -20px; z-index: -1; pointer-events: none; background-size: cover; background-position: center top;
  filter: blur(1.5px); opacity: .5; transform: scale(1.04); }

.pagina { max-width: 480px; margin: 0 auto; padding: 28px 16px 56px; }

/* ---------- Encabezado ---------- */
/* Sin tapa: el fondo se ve a través. Las letras van oscuras y con un halo blanco finito para que se lean sobre las caras. */
.encabezado { text-align: center; margin-bottom: 26px; }
.encabezado .marca, .encabezado h1, .encabezado .bajada {
  text-shadow: 0 0 2px rgba(255, 255, 255, .95), 0 0 8px rgba(255, 255, 255, .9), 0 0 18px rgba(255, 255, 255, .7); }
.etiqueta { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 10px; padding: 5px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, .72); border: 1px solid rgba(235, 214, 220, .8); color: var(--vino);
  font-size: .72rem; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; backdrop-filter: blur(8px); }
.punto { width: 8px; height: 8px; border-radius: 50%; background: #10b981; animation: latido 2s ease-in-out infinite; }
@keyframes latido { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .punto { animation: none; } }
/* Tamaño pensado para la tipografía manuscrita de reserva (más ancha); con Caveat instalada, fuentes.css lo agranda. */
.marca { margin: 0; font-family: var(--fuente-script); font-size: clamp(1.7rem, 8vw, 2.5rem); font-weight: 700; line-height: 1.1; color: var(--vino); user-select: none; }
h1 { margin: 0 0 8px; font-family: var(--fuente-titulo); font-size: 1.9rem; font-weight: 700; letter-spacing: -.01em; line-height: 1.2; color: #262021; }
.encabezado .marca { font-size: clamp(2.4rem, 12.5vw, 3.6rem); margin-bottom: 2px; }
.bajada { margin: 0 auto; max-width: 320px; color: #231c1f; font-size: .95rem; font-weight: 500; line-height: 1.55; }
.bajada strong { color: #170f12; font-weight: 700; }
.bajada .chica { font-size: .82rem; color: #2d2427; }
.boton-wsp { display: inline-flex; align-items: center; justify-content: center; gap: 9px; margin-top: 16px; padding: 12px 18px; min-height: 48px;
  border: 1px solid rgba(120, 35, 62, .3); border-radius: 14px; background: rgba(255, 255, 255, .65); color: var(--vino);
  font-size: .88rem; font-weight: 600; text-decoration: none; box-shadow: 0 1px 2px rgba(0, 0, 0, .06); transition: background .15s, color .15s, transform .1s; }
.boton-wsp svg { width: 20px; height: 20px; color: #059669; flex: none; }
.boton-wsp:hover { background: var(--vino); color: #fff; }
.boton-wsp:hover svg { color: #fff; }
.boton-wsp:active { transform: scale(.97); }

/* ---------- Tarjetas de vidrio ---------- */
.tarjeta, fieldset.tarjeta {
  border: 1px solid rgba(255, 255, 255, .75); margin: 0 0 16px; padding: 18px 16px 14px; border-radius: 18px;
  background: rgba(255, 255, 255, .88); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px -10px rgba(120, 35, 62, .10), 0 4px 12px rgba(0, 0, 0, .03);
}
legend { float: left; width: 100%; padding: 0; margin: 0 0 4px; font-size: 1.05rem; font-weight: 700; line-height: 1.25; }
legend + * { clear: both; }
.numero { display: inline-grid; place-items: center; width: 1.65rem; height: 1.65rem; margin-right: 9px; border-radius: 50%;
  background: var(--vino); color: #fff; font-size: .85rem; font-weight: 700; vertical-align: middle; box-shadow: 0 1px 3px rgba(0, 0, 0, .15); }
.sub { margin: 0 0 12px 36px; color: #766b70; font-size: .85rem; font-weight: 300; }

label { display: block; margin: 14px 0 6px; font-size: .88rem; font-weight: 600; color: #3a3135; }
.opcional { font-weight: 400; color: #8a7f84; }
.obligatorio { color: var(--vino); }
input[type="text"], input[type="tel"], input[type="email"], select, textarea {
  width: 100%; min-height: 50px; padding: 12px 14px; font: inherit; font-size: 1rem; color: var(--texto);
  background: rgba(255, 255, 255, .85); border: 1px solid var(--linea); border-radius: 13px; transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: #9a8f94; }
textarea { min-height: 104px; resize: vertical; }
select { appearance: auto; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--vino); box-shadow: 0 0 0 3px rgba(120, 35, 62, .18); }
button:focus-visible, a:focus-visible, .opcion input:focus-visible + span, .pastilla input:focus-visible + span, .consentimiento input:focus-visible {
  outline: 3px solid #1a5fb4; outline-offset: 2px; }
[aria-invalid="true"] { border-color: var(--error); }

.ayuda { margin: 6px 0 4px; color: #766b70; font-size: .84rem; }
.aviso-suave { margin: 0 0 12px; padding: 11px 13px; border: 1px solid rgba(235, 214, 220, .9); border-radius: 13px;
  background: rgba(253, 246, 247, .9); color: var(--vino); font-size: .88rem; line-height: 1.4; }
.subtitulo { margin: 14px 0 7px; font-size: .88rem; font-weight: 600; color: #3a3135; }
.error { margin: 6px 0 4px; color: var(--error); font-size: .88rem; font-weight: 600; }

/* ---------- Servicios y pastillas ---------- */
.opciones { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 4px 0 10px; }
.opciones > :last-child:nth-child(odd) { grid-column: span 2; }
.opcion, .pastilla { display: block; margin: 0; cursor: pointer; font-weight: 500; }
.opcion input, .pastilla input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opcion span.texto, .pastilla span {
  display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 52px; padding: 10px 13px;
  border: 1px solid #e3d9dc; border-radius: 14px; background: rgba(255, 255, 255, .7); color: #3a3135; font-size: .92rem; font-weight: 500;
  line-height: 1.25; user-select: none; transition: border-color .15s, background-color .15s, color .15s, box-shadow .15s, transform .1s;
}
.opcion:hover span.texto, .pastilla:hover span { border-color: rgba(120, 35, 62, .5); }
.opcion input:checked + span.texto, .pastilla input:checked + span {
  border-color: var(--vino); background: var(--vino); color: #fff; box-shadow: 0 4px 14px rgba(120, 35, 62, .25); }
.opcion:active span.texto, .pastilla:active span { transform: scale(.98); }
.opciones-fila { grid-template-columns: repeat(3, 1fr); }
.opciones-fila > :last-child:nth-child(odd) { grid-column: auto; }
.pastilla span { justify-content: center; text-align: center; min-height: 46px; padding: 8px 6px; }

/* ---------- Calendario y horarios ---------- */
/* Casillas cerradas (parecen un campo más); al tocarlas se despliega el calendario o los horarios. */
.campo-selector { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 50px; padding: 12px 14px;
  font: inherit; font-size: 1rem; text-align: left; color: var(--texto); background: rgba(255, 255, 255, .85); border: 1px solid var(--linea);
  border-radius: 13px; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.campo-selector:hover:not([disabled]) { border-color: rgba(120, 35, 62, .5); }
.campo-selector[aria-expanded="true"] { border-color: var(--vino); box-shadow: 0 0 0 3px rgba(120, 35, 62, .18); }
.campo-selector[disabled] { opacity: .6; cursor: default; }
.campo-texto.vacio { color: #9a8f94; }
.campo-flecha { flex: none; width: 20px; height: 20px; color: var(--vino); transition: transform .2s; }
.campo-selector[aria-expanded="true"] .campo-flecha { transform: rotate(180deg); }
.calendario { margin-top: 8px; padding: 10px 8px 8px; border: 1px solid #e3d9dc; border-radius: 16px; background: rgba(255, 255, 255, .7); }
.cal-cabecera { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.cal-titulo { font-weight: 700; font-size: 1rem; color: var(--texto); }
.cal-flecha { width: 44px; height: 44px; border: 1px solid #e3d9dc; border-radius: 50%; background: rgba(255, 255, 255, .85); color: var(--vino);
  font-size: 1.5rem; line-height: 1; cursor: pointer; }
.cal-flecha:hover:not([disabled]) { background: var(--vino); color: #fff; }
.cal-flecha[disabled] { opacity: .3; cursor: default; }
.cal-semana, .cal-dias { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-semana { margin-bottom: 4px; text-align: center; font-size: .78rem; font-weight: 700; color: var(--suave); }
.cal-vacio { min-height: 44px; }
.cal-dia { min-height: 44px; padding: 0; border: 1px solid #e3d9dc; border-radius: 12px; background: rgba(255, 255, 255, .9); color: var(--texto);
  font: inherit; font-size: .98rem; font-weight: 600; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s, transform .1s; }
.cal-dia:hover:not([disabled]) { border-color: var(--vino); }
.cal-dia:active:not([disabled]) { transform: scale(.95); }
.cal-dia.elegido { border-color: var(--vino); background: var(--vino); color: #fff; box-shadow: 0 4px 12px rgba(120, 35, 62, .25); }
.cal-dia.apagado { border-color: transparent; background: transparent; color: #b3a8ad; font-weight: 400; cursor: default; }
.cal-dia.lleno { border-color: #e3d9dc; background: rgba(238, 232, 234, .8); color: #8a7f84; text-decoration: line-through; cursor: default; }
.panel-horas { margin-top: 8px; padding: 4px 10px 6px; border: 1px solid #e3d9dc; border-radius: 16px; background: rgba(255, 255, 255, .7); }
.horas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin: 2px 0 6px; }
.hora-celda { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 52px; padding: 4px 2px;
  border: 1px solid #e3d9dc; border-radius: 12px; background: rgba(255, 255, 255, .9); color: var(--texto); font: inherit; font-size: .95rem;
  font-weight: 600; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s, transform .1s; }
.hora-celda:hover:not([disabled]) { border-color: var(--vino); }
.hora-celda:active:not([disabled]) { transform: scale(.95); }
.hora-celda.elegida { border-color: var(--vino); background: var(--vino); color: #fff; box-shadow: 0 4px 12px rgba(120, 35, 62, .25); }
.hora-celda.ocupada { background: rgba(238, 232, 234, .85); color: #7a6f74; cursor: default; }
.hora-celda.ocupada .hora-num { text-decoration: line-through; font-weight: 500; }
.hora-etq { font-size: .68rem; font-weight: 600; letter-spacing: .02em; }
.cal-dia[disabled], .hora-celda[disabled] { pointer-events: none; }
@media (max-width: 340px) { .horas { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Consentimiento y envío ---------- */
.consentimiento { display: flex; gap: 12px; align-items: flex-start; margin: 2px 0 12px; font-size: .88rem; font-weight: 400; color: var(--suave); line-height: 1.5; cursor: pointer; }
.consentimiento input { flex: none; width: 1.35rem; height: 1.35rem; margin-top: 2px; accent-color: var(--vino); }
.consentimiento strong { color: var(--texto); }
.consentimiento a { color: var(--vino); font-weight: 500; }
.verificacion { margin: 8px 0 6px; min-height: 65px; }
.boton { display: block; width: 100%; min-height: 54px; padding: 14px 18px; font: inherit; font-weight: 600; text-align: center; text-decoration: none;
  border: 1px solid var(--vino); border-radius: 14px; cursor: pointer; }
.boton-principal { display: flex; align-items: center; justify-content: center; gap: 9px; background: var(--vino); color: #fff; font-size: 1rem;
  box-shadow: 0 8px 20px -6px rgba(120, 35, 62, .4); transition: background .15s, transform .1s; }
.boton-principal svg { width: 18px; height: 18px; }
.boton-principal:hover { background: var(--vino-oscuro); }
.boton-principal:active { transform: scale(.98); }
.boton-principal[disabled] { opacity: .65; cursor: wait; }
.boton-secundario { background: #fff; color: var(--vino); }
.pie { margin: 12px 0 2px; text-align: center; color: #766b70; font-size: .82rem; font-weight: 300; }

.pie-pagina { margin-top: 30px; text-align: center; color: #766b70; font-size: .8rem; }
.pie-pagina .marca { font-size: 2.1rem; font-weight: 600; opacity: .85; margin-bottom: 2px; }

/* ---------- Avisos ---------- */
.aviso { margin: 0 0 16px; padding: 12px 14px; border-radius: 13px; background: rgba(253, 246, 247, .95); border: 1px solid var(--borde-rosa); }
.aviso-error { background: #fdeceb; color: var(--error); border: 2px solid var(--error); font-weight: 600; }
.aviso-error .boton { margin-top: 10px; }
.tarjeta-exito { padding: 28px 18px; border: 2px solid var(--exito); border-radius: 18px; background: rgba(255, 255, 255, .92); text-align: center;
  box-shadow: 0 10px 30px -10px rgba(31, 107, 58, .2); }
.tarjeta-exito h2 { margin: 0 0 10px; font-family: var(--fuente-titulo); color: var(--exito); }
.tarjeta-exito p { margin: 0 0 10px; }

/* El campo trampa queda fuera de la pantalla (no con display:none, que algunos robots detectan) */
.trampa { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
[hidden] { display: none !important; }

/* ---------- Páginas de texto (privacidad) ---------- */
.texto h2 { margin-top: 28px; font-size: 1.15rem; }
.texto .borrador { background: #fff4d6; border: 2px solid #b58900; padding: 12px 14px; border-radius: 12px; font-weight: 600; }
.texto .marca { text-align: center; }
.texto h1 { text-align: center; }
.texto a { color: var(--vino); }
