/* Colores: los pone app.js desde config.js */
:root {
  --primario: #1E5A4C;
  --acento: #E8694A;
  --fondo: #F3EFE7;
  --tinta: #15281F;
  --superficie: color-mix(in srgb, var(--fondo) 40%, #fff);
  --linea: color-mix(in srgb, var(--tinta) 12%, transparent);
  --suave: color-mix(in srgb, var(--tinta) 62%, var(--fondo));
  --primario-suave: color-mix(in srgb, var(--primario) 10%, var(--fondo));
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --texto: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 18px;
  --pad: 22px;
  --sombra: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px -12px rgba(0,0,0,.18);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fondo);
  color: var(--tinta);
  font: 16px/1.55 var(--texto);
  -webkit-font-smoothing: antialiased;
}
body.locked { overflow: hidden; }
img, svg { display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 500; letter-spacing: -.02em; line-height: 1.08; }
p { margin: 0; }
ul { list-style: none; margin: 0; padding: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--acento) 70%, transparent); outline-offset: 2px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; cursor: pointer; text-decoration: none;
  font-weight: 600; letter-spacing: -.005em; white-space: nowrap;
  transition: transform .15s ease, background-color .2s ease, opacity .2s;
}
.btn:active { transform: scale(.97); }
.btn-sm { padding: 9px 16px; font-size: 14px; }
.btn-lg { padding: 15px 24px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-accent { background: var(--acento); color: #fff; }
.btn-primary { background: var(--primario); color: #fff; }
.btn-ghost { background: transparent; color: var(--tinta); box-shadow: inset 0 0 0 1.5px var(--linea); }
.btn[disabled] { opacity: .35; pointer-events: none; }
.ico { width: 18px; height: 18px; fill: currentColor; }

/* ---------- Franja demo ---------- */
.demo-banner {
  background: var(--tinta); color: var(--fondo);
  font-size: 12px; letter-spacing: .06em; text-transform: uppercase; text-align: center;
  padding: 7px 12px;
}

/* ---------- Barra superior ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px var(--pad);
  background: color-mix(in srgb, var(--fondo) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.topbar.scrolled { border-bottom-color: var(--linea); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 11px;
  background: var(--primario); color: var(--fondo);
  display: grid; place-items: center;
  font: 600 18px/1 var(--display);
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.brand-name { font: 600 19px/1 var(--display); letter-spacing: -.02em; }
.brand-type { display: block; font: 500 11px/1.2 var(--texto); letter-spacing: .08em; text-transform: uppercase; color: var(--suave); margin-top: 3px; }

/* ---------- Hero ---------- */
.hero { padding: 28px var(--pad) 40px; position: relative; overflow: hidden; }
.hero::after {
  /* arco decorativo: sugiere movimiento / articulación */
  content: ""; position: absolute; right: -120px; top: -60px; width: 320px; height: 320px;
  border-radius: 50%;
  border: 46px solid color-mix(in srgb, var(--acento) 16%, transparent);
  pointer-events: none;
}
.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 10px; border-radius: 999px;
  background: var(--superficie); box-shadow: inset 0 0 0 1px var(--linea);
  font-size: 13px; font-weight: 500; position: relative; z-index: 1;
}
.status-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: #2E9E6A; box-shadow: 0 0 0 4px color-mix(in srgb, #2E9E6A 20%, transparent); }
.status-pill.closed .dot { background: #C2453A; box-shadow: 0 0 0 4px color-mix(in srgb, #C2453A 18%, transparent); }
.hero-title {
  font-size: clamp(44px, 13vw, 76px);
  margin: 22px 0 16px; position: relative; z-index: 1;
  font-variation-settings: "opsz" 144;
}
.hero-title em { font-style: italic; color: var(--primario); }
.hero-sub { font-size: 17px; color: var(--suave); max-width: 34ch; position: relative; z-index: 1; }
.hero-actions { display: flex; gap: 10px; margin-top: 26px; flex-wrap: wrap; }
.hero-actions .btn { flex: 1 1 140px; }
.trust {
  display: grid; grid-template-columns: repeat(3, 1fr);
  margin-top: 30px; border-top: 1px solid var(--linea);
}
.trust li { padding: 14px 8px 0 0; display: flex; flex-direction: column; gap: 2px; }
.trust li + li { padding-left: 12px; border-left: 1px solid var(--linea); }
.trust strong { font: 600 18px/1.1 var(--display); }
.trust span { font-size: 12.5px; line-height: 1.3; color: var(--suave); }

/* ---------- Secciones ---------- */
.section { padding: 48px var(--pad); }
.section-alt { background: var(--primario-suave); }
.section-dark { background: var(--primario); color: var(--fondo); }
.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--acento); margin-bottom: 10px;
}
.section-dark .eyebrow { color: color-mix(in srgb, var(--acento) 55%, #fff); }
.section-title { font-size: clamp(32px, 9vw, 48px); margin-bottom: 24px; }
.lead { color: var(--suave); font-size: 17px; margin: -8px 0 24px; max-width: 40ch; }
.note { margin-top: 18px; font-size: 14px; color: var(--suave); }

/* ---------- Servicios ---------- */
.services { display: grid; gap: 10px; }
.service {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: start;
  width: 100%; text-align: left; cursor: pointer;
  padding: 18px; border: 0; border-radius: var(--r);
  background: var(--superficie); box-shadow: inset 0 0 0 1px var(--linea);
  transition: box-shadow .2s, transform .15s;
}
.service:active { transform: scale(.99); }
.service:hover { box-shadow: inset 0 0 0 1.5px var(--primario); }
.service-name { font: 500 20px/1.2 var(--display); letter-spacing: -.01em; }
.service-price { font: 600 22px/1.1 var(--display); text-align: right; }
.service-desc { grid-column: 1 / -1; color: var(--suave); font-size: 14.5px; }
.service-meta { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
  background: var(--primario-suave); color: var(--primario);
}
.chip-accent { background: color-mix(in srgb, var(--acento) 14%, transparent); color: color-mix(in srgb, var(--acento) 80%, var(--tinta)); }
.service-cta { font-size: 14px; font-weight: 600; color: var(--acento); }

/* ---------- Horario ---------- */
.week { display: grid; gap: 6px; }
.week-scale, .week-row { display: grid; grid-template-columns: 44px 1fr; align-items: center; gap: 10px; }
.week-scale { font-size: 11px; color: var(--suave); }
.week-scale .ticks { position: relative; height: 14px; }
.week-scale .ticks span { position: absolute; transform: translateX(-50%); }
.week-row { padding: 8px 0; border-radius: 12px; }
.week-day { font-weight: 600; font-size: 14px; }
.week-row.today { background: var(--superficie); box-shadow: inset 0 0 0 1px var(--linea); padding: 8px 10px 8px 0; margin: 0 -10px 0 0; }
.week-row.today .week-day { color: var(--acento); }
.week-track { position: relative; height: 28px; border-radius: 8px; background: color-mix(in srgb, var(--tinta) 6%, transparent); }
.week-seg {
  position: absolute; top: 0; bottom: 0; border-radius: 8px; background: var(--primario);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  color: var(--fondo); font-size: 11px; font-weight: 600; white-space: nowrap;
}
.week-closed { position: absolute; inset: 0; display: flex; align-items: center; padding-left: 10px; font-size: 13px; color: var(--suave); }
.week-list { margin-top: 18px; font-size: 14px; color: var(--suave); }

/* ---------- Equipo ---------- */
.team { display: grid; gap: 12px; }
.member { display: grid; grid-template-columns: 64px 1fr; gap: 16px; align-items: center; }
.avatar {
  width: 64px; height: 64px; border-radius: 20px; overflow: hidden;
  display: grid; place-items: center;
  font: 500 22px/1 var(--display); color: var(--primario);
  background: var(--primario-suave); box-shadow: inset 0 0 0 1px var(--linea);
}
.member:nth-child(2) .avatar { color: var(--acento); background: color-mix(in srgb, var(--acento) 12%, var(--fondo)); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.member-name { font: 500 19px/1.2 var(--display); }
.member-role { font-size: 13px; font-weight: 600; color: var(--primario); }
.member-bio { font-size: 14px; color: var(--suave); margin-top: 2px; }

/* ---------- Reseñas ---------- */
.rating-big { display: flex; align-items: center; gap: 16px; margin-bottom: 26px; }
.rating-num { font: 500 72px/1 var(--display); letter-spacing: -.04em; }
.stars { display: flex; gap: 2px; color: #F4B740; }
.stars svg { width: 18px; height: 18px; fill: currentColor; }
.rating-count { font-size: 14px; opacity: .75; }
.reviews { display: grid; gap: 10px; }
.review {
  padding: 18px; border-radius: var(--r);
  background: color-mix(in srgb, #fff 8%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #fff 14%, transparent);
}
.review p { font-size: 15.5px; line-height: 1.5; margin: 10px 0 12px; }
.review-foot { display: flex; justify-content: space-between; font-size: 13px; opacity: .7; }
.review-foot strong { opacity: 1; font-weight: 600; }
.link-light { display: inline-block; margin-top: 18px; font-weight: 600; text-decoration: none; }

/* ---------- Ubicación ---------- */
.map-card {
  position: relative; border-radius: var(--r); overflow: hidden;
  background: var(--superficie); box-shadow: inset 0 0 0 1px var(--linea);
  color: var(--primario);
}
.map-art { width: 100%; height: 170px; }
.map-pin { position: absolute; left: 50%; top: 62px; transform: translate(-50%, -100%); }
.map-pin span {
  display: block; width: 30px; height: 30px; border-radius: 50% 50% 50% 0;
  background: var(--acento); transform: rotate(-45deg);
  box-shadow: 0 6px 14px -4px color-mix(in srgb, var(--acento) 70%, transparent);
}
.map-pin span::after { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: #fff; }
.map-info { display: grid; gap: 2px; padding: 16px 18px 18px; color: var(--tinta); }
.map-info strong { font: 500 19px/1.2 var(--display); }
.map-info span { color: var(--suave); font-size: 14px; margin-bottom: 12px; }
.map-info .btn { justify-self: start; }
.contact { margin-top: 14px; display: grid; }
.contact a { display: flex; justify-content: space-between; padding: 14px 2px; border-bottom: 1px solid var(--linea); text-decoration: none; font-size: 15px; }
.contact a span:last-child { color: var(--suave); }

/* ---------- Cierre y pie ---------- */
.cta-final { padding: 56px var(--pad); text-align: center; background: var(--primario-suave); }
.cta-final h2 { font-size: clamp(30px, 8.5vw, 44px); margin-bottom: 24px; }
.footer { padding: 28px var(--pad) 110px; font-size: 13px; color: var(--suave); display: grid; gap: 6px; }
.footer strong { color: var(--tinta); }

/* ---------- Botón flotante WhatsApp ---------- */
.fab-wa {
  position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 30;
  width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center;
  background: #25D366; color: #fff;
  box-shadow: 0 10px 24px -8px rgba(37, 211, 102, .7), 0 2px 6px rgba(0,0,0,.12);
  transition: transform .2s;
}
.fab-wa:active { transform: scale(.94); }
.fab-wa svg { width: 30px; height: 30px; fill: currentColor; }

/* ---------- Hoja de reserva ---------- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(10, 20, 15, .45); opacity: 0; transition: opacity .25s; }
.sheet-backdrop.open { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  max-height: 92vh; max-height: 92dvh;
  display: flex; flex-direction: column;
  background: var(--fondo); border-radius: 24px 24px 0 0;
  box-shadow: 0 -10px 40px -10px rgba(0,0,0,.3);
  transform: translateY(100%); transition: transform .32s cubic-bezier(.2,.8,.2,1);
}
.sheet.open { transform: translateY(0); }
.sheet-handle { width: 40px; height: 5px; border-radius: 3px; background: var(--linea); margin: 8px auto 0; }
.sheet-head { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; gap: 8px; padding: 8px 14px 10px; }
.sheet-titles { text-align: center; }
.sheet-step { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--suave); }
.sheet-head h3 { font-size: 22px; }
.icon-btn { width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; display: grid; place-items: center; cursor: pointer; }
.icon-btn:hover { background: var(--linea); }
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn.invisible { visibility: hidden; }
.progress { height: 3px; background: var(--linea); margin: 0 22px; border-radius: 2px; overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: var(--acento); transition: width .3s ease; }
.sheet-body { overflow-y: auto; padding: 20px 22px; flex: 1; overscroll-behavior: contain; }
.sheet-foot { padding: 12px 22px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--linea); }
.sheet-foot:empty { display: none; }

/* Paso 1: servicios */
.pick-list { display: grid; gap: 8px; }
.pick {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center;
  width: 100%; text-align: left; cursor: pointer; padding: 15px 16px;
  border: 0; border-radius: 14px; background: var(--superficie); box-shadow: inset 0 0 0 1px var(--linea);
}
.pick.selected { box-shadow: inset 0 0 0 2px var(--primario); background: var(--primario-suave); }
.pick strong { font-weight: 600; }
.pick small { color: var(--suave); font-size: 13px; }
.pick .price { font: 600 18px/1 var(--display); grid-row: span 2; }

/* Paso 2: días y horas */
.label { font-size: 13px; font-weight: 600; color: var(--suave); margin: 0 0 10px; }
.days { display: flex; gap: 8px; overflow-x: auto; padding: 2px 22px 10px; margin: 0 -22px 14px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.days::-webkit-scrollbar { display: none; }
.day {
  flex: 0 0 60px; scroll-snap-align: start;
  display: grid; justify-items: center; gap: 2px; padding: 10px 0;
  border: 0; border-radius: 14px; cursor: pointer;
  background: var(--superficie); box-shadow: inset 0 0 0 1px var(--linea);
}
.day .dw { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--suave); }
.day .dn { font: 500 22px/1.1 var(--display); }
.day .dm { font-size: 11px; color: var(--suave); }
.day.selected { background: var(--primario); color: var(--fondo); box-shadow: none; }
.day.selected .dw, .day.selected .dm { color: color-mix(in srgb, var(--fondo) 75%, transparent); }
.day:disabled { opacity: .35; cursor: default; }
.slot-group + .slot-group { margin-top: 16px; }
.slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.slot {
  padding: 11px 0; border: 0; border-radius: 12px; cursor: pointer;
  font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums;
  background: var(--superficie); box-shadow: inset 0 0 0 1px var(--linea);
}
.slot.taken { background: transparent; color: var(--suave); text-decoration: line-through; opacity: .5; cursor: default; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tinta) 6%, transparent); }
.slot.selected { background: var(--acento); color: #fff; box-shadow: none; }
.empty { padding: 26px 10px; text-align: center; color: var(--suave); font-size: 15px; }

/* Paso 3: datos */
.summary {
  display: grid; gap: 4px; padding: 14px 16px; border-radius: 14px; margin-bottom: 20px;
  background: var(--primario-suave);
}
.summary strong { font: 500 18px/1.25 var(--display); }
.summary span { font-size: 14px; color: var(--suave); }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 600; }
.field input {
  font: inherit; font-size: 16px; padding: 14px 14px; border-radius: 12px; border: 0;
  background: var(--superficie); box-shadow: inset 0 0 0 1px var(--linea); color: var(--tinta);
}
.field input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--primario); }
.fine { font-size: 12.5px; color: var(--suave); }

/* Paso 4: confirmación + simulación WhatsApp */
.done-head { text-align: center; margin-bottom: 18px; }
.done-check {
  width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 12px;
  display: grid; place-items: center; background: #2E9E6A; color: #fff;
  animation: pop .45s cubic-bezier(.2,1.4,.4,1) both;
}
.done-check svg { width: 30px; height: 30px; }
@keyframes pop { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.done-head h4 { font: 500 24px/1.15 var(--display); margin: 0 0 4px; }
.done-head p { color: var(--suave); font-size: 15px; }
.phone {
  border-radius: 22px; overflow: hidden;
  background: #EFE7DD; box-shadow: inset 0 0 0 1px var(--linea);
}
.phone-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #075E54; color: #fff; }
.phone-bar .brand-mark { width: 30px; height: 30px; border-radius: 50%; font-size: 15px; background: var(--fondo); color: var(--primario); }
.phone-bar strong { font-size: 15px; display: block; line-height: 1.1; }
.phone-bar small { font-size: 12px; opacity: .8; }
.chat { padding: 14px 12px 16px; display: grid; gap: 8px; }
.chat-date { justify-self: center; font-size: 11.5px; padding: 3px 10px; border-radius: 8px; background: #E1F2FB; color: #3B5A68; font-weight: 600; }
.bubble {
  justify-self: start; max-width: 88%;
  background: #fff; color: #111; border-radius: 4px 14px 14px 14px;
  padding: 8px 10px 6px; font-size: 14.5px; line-height: 1.4;
  box-shadow: 0 1px 1px rgba(0,0,0,.08);
  opacity: 0; transform: translateY(6px); animation: in .35s ease forwards;
}
.bubble.me { justify-self: end; background: #D9FDD3; border-radius: 14px 4px 14px 14px; }
.bubble time { display: block; text-align: right; font-size: 11px; color: #667; margin-top: 2px; }
.bubble-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 8px -10px -6px; border-top: 1px solid #eee; }
.bubble-actions span { text-align: center; padding: 9px 0; color: #0A8ED9; font-weight: 600; font-size: 14px; }
.bubble-actions span + span { border-left: 1px solid #eee; }
@keyframes in { to { opacity: 1; transform: none; } }
.done-actions { display: grid; gap: 8px; margin-top: 16px; }
.demo-note { margin-top: 14px; font-size: 12.5px; color: var(--suave); text-align: center; }

/* ---------- Aviso ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom)); z-index: 60;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  max-width: calc(100% - 40px); padding: 12px 16px; border-radius: 14px;
  background: var(--tinta); color: var(--fondo); font-size: 14px; text-align: center;
  transition: opacity .25s, transform .25s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Pantallas grandes: centrar como columna ---------- */
@media (min-width: 760px) {
  :root { --pad: 40px; }
  main, .topbar, .footer, .demo-banner { max-width: 760px; margin-left: auto; margin-right: auto; }
  .section, .cta-final { border-radius: 28px; margin: 0 0 12px; }
  .services { grid-template-columns: 1fr 1fr; }
  .team { grid-template-columns: 1fr; }
  .sheet { left: 50%; right: auto; width: 560px; transform: translate(-50%, 100%); }
  .sheet.open { transform: translate(-50%, 0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
