/* =========================================================
   K506 Videojuegos · Agenda tu servicio
   Mobile first → tablet (≥ 768px) → computadora (≥ 1024px)
   ========================================================= */

:root {
  /* Marca */
  --brand: #c59bb2;          /* encabezado */
  --accent: #79516a;         /* iconos, radios, selección */
  --accent-soft: #f0e4eb;    /* fondo tarjeta seleccionada */
  --accent-line: #a77d97;    /* borde tarjeta seleccionada */
  --badge-bg: #eee5ea;
  --badge-text: #725669;

  /* Neutros */
  --bg: #faf8f9;
  --surface: #ffffff;
  --panel: #f0eaee;
  --ink: #29212b;
  --ink-2: #443945;
  --muted: #786772;
  --placeholder: #877d85;
  --line: #ded7dd;
  --line-soft: #e5dee3;

  /* Éxito / CTA */
  --ok: #5cb05c;
  --ok-ink: #142b17;
  --ok-soft: #e6f2e4;
  --ok-text: #285b2a;
  --error: #c0392b;

  --radius: 12px;
  --radius-sm: 10px;
  --gutter: 24px;
  --shadow: 0 1px 2px rgba(41, 33, 43, .04), 0 6px 20px rgba(41, 33, 43, .06);
  --ease: cubic-bezier(.2, .7, .2, 1);

  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100dvh; background: var(--bg); }
img, svg { display: block; }
button, input, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* ---------- Encabezado ---------- */
.hero { background: var(--brand); color: var(--ink); }
.hero__inner { padding: 28px var(--gutter) 32px; max-width: 1120px; margin: 0 auto; }
.hero__top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 36px; }
.hero__logo { height: 52px; width: auto; }
.pill {
  font-size: 10px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  padding: 8px 14px; border-radius: 999px;
  border: 1px solid rgba(41, 33, 43, .35); background: rgba(255, 255, 255, .12);
}
.hero__title { font-size: 32px; line-height: 1.05; letter-spacing: -.02em; font-weight: 600; margin: 0 0 14px; }
.hero__subtitle { margin: 0; font-size: 13px; color: var(--ink-2); }

/* ---------- Layout ---------- */
.layout { max-width: 1120px; margin: 0 auto; }
.booking { padding: 8px var(--gutter) 32px; }

/* ---------- Pasos ---------- */
.step { padding-top: 32px; }
.step.is-entering { animation: stepIn .45s var(--ease) both; }
@keyframes stepIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}
.step__title {
  display: flex; align-items: center; gap: 12px;
  font-size: 16px; font-weight: 600; margin: 0 0 18px; line-height: 1.25;
}
.step__num {
  flex: none; display: inline-grid; place-items: center;
  width: 29px; height: 29px; border-radius: 8px;
  background: var(--badge-bg); color: var(--badge-text);
  font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.step__help { margin: -8px 0 16px; font-size: 13px; color: var(--muted); line-height: 1.45; }

/* ---------- Opciones ---------- */
.options { display: grid; gap: 10px; }
.options--2 { grid-template-columns: 1fr 1fr; }
.options--list { grid-template-columns: 1fr; }

/* Tarjeta grande (sistema / consola-control) */
.card {
  position: relative; display: flex; flex-direction: column;
  min-height: 142px; padding: 16px 15px 15px;
  background: var(--surface); border: 1.5px solid var(--line-soft); border-radius: var(--radius);
  cursor: pointer; transition: border-color .2s, background .2s, transform .15s;
  -webkit-tap-highlight-color: transparent;
}
.card:active { transform: scale(.985); }
.card input, .choice input { position: absolute; opacity: 0; pointer-events: none; }
.card__icon { flex: 1; display: grid; place-items: center; min-height: 52px; color: var(--accent); margin-bottom: 10px; }
.card__icon img { width: auto; }
.card__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card__label { font-size: 14px; font-weight: 600; line-height: 1.2; }
.card__hint { margin-top: 10px; font-size: 10px; color: var(--muted); }
.card__radio {
  flex: none; width: 16px; height: 16px; border-radius: 50%;
  border: 1.5px solid #bfb5bc; background: #fff; transition: all .2s;
}
.card:has(input:checked) { background: var(--accent-soft); border-color: var(--accent-line); }
.card:has(input:checked) .card__radio { border: 5px solid var(--accent); }
.card:has(input:focus-visible), .choice:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Opción compacta (sí/no, personalización) */
.choice {
  position: relative; display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 52px; padding: 12px 14px;
  background: var(--surface); border: 1.5px solid var(--line-soft); border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500; line-height: 1.3; color: var(--ink-2);
  cursor: pointer; transition: border-color .2s, background .2s, color .2s;
  -webkit-tap-highlight-color: transparent;
}
.choice:has(input:checked) { background: var(--accent-soft); border-color: var(--accent-line); color: var(--ink); font-weight: 600; }

.choice--check { justify-content: flex-start; text-align: left; gap: 14px; padding: 14px 16px; }
.choice--check::before {
  content: ""; flex: none; width: 20px; height: 20px; border-radius: 6px;
  border: 1.5px solid #bfb5bc; background: #fff center / 12px no-repeat;
  transition: all .2s;
}
.choice--check:has(input:checked)::before {
  background-color: var(--accent); border-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4 10.5l4 4 8-9' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.choice--check span { display: flex; flex-direction: column; gap: 3px; }
.choice--check strong { font-size: 14px; font-weight: 600; color: var(--ink); }
.choice--check small { font-size: 12px; font-weight: 400; color: var(--muted); }

/* ---------- Servicio resultante ---------- */
.service {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 16px; border-radius: var(--radius);
  background: var(--accent-soft); border: 1.5px solid var(--accent-line);
}
.service__check {
  flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent); color: #fff;
}
.service__name { margin: 2px 0 4px; font-size: 15px; font-weight: 600; }
.service__desc { margin: 0; font-size: 12px; line-height: 1.45; color: var(--muted); }

/* Aviso: control en buen estado */
.info {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 16px; border-radius: var(--radius);
  background: var(--ok-soft); border: 1.5px solid #b9dcb5;
}
.info__icon {
  flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--ok); color: #fff;
}
.info__title { margin: 2px 0 4px; font-size: 15px; font-weight: 600; color: var(--ok-text); }
.info__text { margin: 0; font-size: 12px; line-height: 1.45; color: var(--ink-2); }

/* ---------- Campos ---------- */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 12px; font-weight: 500; color: var(--ink-2); margin-bottom: 9px; }
.field input, .field textarea {
  width: 100%; padding: 15px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--line);
  font-size: 16px; /* evita zoom en iOS */
  transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none; appearance: none;
}
.field input { height: 50px; }
.field textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
.field input::placeholder, .field textarea::placeholder { color: var(--placeholder); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent-line); box-shadow: 0 0 0 3px rgba(121, 81, 106, .14); }
.field__error { display: none; margin: 6px 0 0; font-size: 12px; color: var(--error); }
.field.has-error input { border-color: var(--error); }
.field.has-error .field__error { display: block; }
.field__count { margin: 6px 0 0; font-size: 11px; text-align: right; color: var(--muted); }
.field--problem { margin-top: 26px; }
.muted { color: var(--placeholder); font-weight: 400; }

/* ---------- Calendario ---------- */
.calendar {
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: 14px;
  padding: 18px 14px 14px;
}
.calendar__head { display: flex; align-items: center; justify-content: space-between; padding: 0 4px 14px; }
.calendar__month { margin: 0; font-size: 14px; font-weight: 600; text-transform: capitalize; }
.calendar__nav { display: flex; gap: 6px; }
.icon-btn {
  width: 34px; height: 34px; border: 0; border-radius: 9px; background: var(--badge-bg);
  font-size: 18px; line-height: 1; cursor: pointer; color: var(--ink-2);
}
.icon-btn:disabled { opacity: .35; cursor: default; }
.calendar__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.calendar__dow span { text-align: center; font-size: 11px; color: var(--muted); padding: 6px 0 8px; }
.day {
  width: 100%; min-width: 0; padding: 0; height: 38px; border: 0; border-radius: 9px; background: transparent;
  font-size: 12px; font-variant-numeric: tabular-nums; cursor: pointer; color: var(--ink);
  transition: background .15s;
}
.day:hover:not(:disabled):not([aria-pressed="true"]) { background: var(--badge-bg); }
.day:disabled { color: #c6bec3; cursor: default; }
.day.is-outside { color: #d2cbd0; }
.day.is-closed { text-decoration: line-through; color: #d2cbd0; }
.day.is-today { box-shadow: inset 0 0 0 1px var(--line); }
.day[aria-pressed="true"] { background: var(--brand); font-weight: 700; }

.note { display: flex; align-items: center; gap: 8px; margin: 18px 0 0; font-size: 12px; color: var(--muted); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.subhead { margin: 22px 0 12px; font-size: 12px; font-weight: 500; color: var(--ink-2); }

/* ---------- Horarios ---------- */
.slots { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.slot {
  grid-column: span 2; height: 44px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--line); cursor: pointer;
  font-size: 13px; color: var(--ink-2); transition: all .15s;
}
.slot:nth-child(4), .slot:nth-child(5) { grid-column: span 3; }
.slot[aria-checked="true"] { background: var(--ok-soft); border: 1.5px solid var(--ok); color: var(--ok-text); font-weight: 600; }
.slot:disabled { color: #c6bec3; text-decoration: line-through; cursor: default; }
.slots__empty { font-size: 12px; color: var(--muted); }

/* ---------- Resumen ---------- */
.summary { background: var(--panel); }
.summary__inner { padding: 24px var(--gutter) calc(24px + env(safe-area-inset-bottom)); }
.summary__eyebrow { margin: 0 0 6px; font-size: 9px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.summary__line { margin: 0; font-size: 13px; font-weight: 500; }
.summary__service { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.summary__service:empty { display: none; }
.cta {
  width: 100%; height: 50px; margin-top: 18px; border: 0; border-radius: var(--radius-sm);
  background: var(--ok); color: var(--ok-ink); font-size: 16px; font-weight: 600; cursor: pointer;
  transition: filter .15s, opacity .2s, transform .1s;
}
.cta:hover:not(:disabled) { filter: brightness(1.04); }
.cta:active:not(:disabled) { transform: scale(.99); }
.cta:disabled { opacity: .45; cursor: not-allowed; }
.summary__legal { margin: 16px 0 0; font-size: 10px; text-align: center; color: var(--muted); }

/* ---------- Modal ---------- */
.modal {
  width: min(92vw, 380px); border: 0; border-radius: 18px; padding: 28px 24px 24px;
  text-align: center; box-shadow: var(--shadow);
}
.modal::backdrop { background: rgba(41, 33, 43, .45); }
.modal__icon { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 50%; background: var(--ok-soft); color: var(--ok-text); }
.modal__title { margin: 0 0 8px; font-size: 20px; }
.modal__text { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink-2); }

/* =========================================================
   TABLET ≥ 768px
   ========================================================= */
@media (min-width: 768px) {
  :root { --gutter: 40px; }
  .hero__inner { padding: 36px var(--gutter) 44px; }
  .hero__logo { height: 64px; }
  .hero__title { font-size: 44px; }
  .hero__subtitle { font-size: 15px; }
  .booking, .summary__inner { max-width: 640px; margin: 0 auto; }
  .step__title { font-size: 18px; }
  .card { min-height: 160px; padding: 20px; }
  .card__label { font-size: 16px; }
  .card__hint { font-size: 12px; }
  .choice { font-size: 14px; }
  .options--list { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
  .choice--check { flex-direction: column; align-items: flex-start; }
  .slots { grid-template-columns: repeat(5, 1fr); }
  .slot, .slot:nth-child(4), .slot:nth-child(5) { grid-column: auto; }
  .summary__inner { border-radius: 16px; }
  .summary { background: transparent; padding: 0 var(--gutter) 40px; }
  .summary__inner { background: var(--panel); padding: 28px; }
}

/* =========================================================
   COMPUTADORA ≥ 1024px: formulario + resumen fijo a la derecha
   ========================================================= */
@media (min-width: 1024px) {
  .hero__title br { display: none; }
  .layout {
    display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 48px; align-items: start;
    padding: 0 var(--gutter);
  }
  .booking { max-width: none; margin: 0; padding: 8px 0 64px; }
  .summary { position: sticky; top: 24px; margin-top: 40px; padding: 0; }
  .summary__inner { max-width: none; box-shadow: var(--shadow); }
}

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

/*Ocultar honeypot*/
.hp { position: absolute; left: -9999px; }