:root {
  --black: #000000;
  --surface-1: #0d0d0d;
  --surface-2: #161616;
  --surface-3: #222222;
  --line: #333333;
  --text: #F5F5F5;
  --muted: #B8B8B8;
  --danger: #FF8C8C;
  --gold-dark: #A97B46;
  --gold: #CC9D60;
  --gold-champagne: #E5C084;
  --gold-light: #F2D7A1;
  --gold-highlight: #F9E6BB;
  --metal: linear-gradient(135deg, #A97B46 0%, #E5C084 50%, #CC9D60 100%);
  --metal-line: linear-gradient(90deg, #7F552C 0%, #E5C084 50%, #7F552C 100%);
  --header-h: 64px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  padding-top: calc(var(--header-h) + env(safe-area-inset-top));
  background: var(--black);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

h1,
h2,
h3,
h4,
legend,
.brand {
  font-family: Baskerville, "Baskerville Old Face", Georgia, serif;
  font-weight: 400;
  line-height: 1.2;
}

h1 {
  margin: 0.5rem 0 0.2rem;
  font-size: 2rem;
  letter-spacing: 0.18em;
  color: var(--gold-champagne);
}

h2 {
  margin: 0 0 0.5rem;
  font-size: 1.7rem;
  color: var(--gold-champagne);
}

h3 {
  margin: 0 0 0.4rem;
  font-size: 1.3rem;
  color: var(--gold-light);
}

h4 {
  margin: 0 0 0.3rem;
  font-size: 1.15rem;
  color: var(--gold-light);
}

a {
  color: var(--gold-champagne);
}

/* Encabezado fijo ARRIBA */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding-top: env(safe-area-inset-top);
  background: #000000;
  box-shadow: 0 1px 0 var(--gold-dark);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  max-width: 1080px;
  height: var(--header-h);
  margin: 0 auto;
  padding: 0 0.8rem;
}

.brand {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--gold-champagne);
  font-size: 1.05rem;
  letter-spacing: 0.14em;
  text-decoration: none;
  white-space: nowrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 1.4rem;
  background: var(--metal);
  color: #000000;
  border: 1px solid var(--gold-light);
  border-radius: 999px;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover {
  filter: brightness(1.08);
}

.btn-small {
  padding: 0 1rem;
  white-space: nowrap;
}

.btn-outline {
  background: transparent;
  color: var(--gold-champagne);
  border: 1px solid var(--gold);
}

.menu-toggle,
.menu-close {
  min-height: 48px;
  padding: 0 1rem;
  background: var(--surface-2);
  color: var(--gold-champagne);
  border: 1px solid var(--gold-dark);
  border-radius: 999px;
  font: inherit;
  font-size: 16px;
  cursor: pointer;
}

/* Menu movil: panel a pantalla completa, se abre con la clase is-open */
.menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 60;
  flex-direction: column;
  gap: 1rem;
  padding: calc(1rem + env(safe-area-inset-top)) 1rem 1rem;
  background: #000000;
  overflow-y: auto;
}

.menu.is-open {
  display: flex;
}

.menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu li a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 0.5rem;
  color: var(--gold-light);
  font-family: Baskerville, "Baskerville Old Face", Georgia, serif;
  font-size: 1.3rem;
  text-decoration: none;
  border-top: 1px solid var(--line);
}

.menu-close {
  align-self: flex-end;
}

/* Contenido */
main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1rem;
}

.hero {
  padding: 1.2rem 0 1.5rem;
  text-align: center;
  scroll-margin-top: calc(var(--header-h) + 8px);
}

.demo-notice {
  margin: 0 0 1.2rem;
  padding: 0.8rem 1rem;
  background: var(--surface-2);
  color: var(--gold-light);
  border: 1px solid var(--gold-dark);
  border-radius: 12px;
  font-size: 0.95rem;
  text-align: left;
}

.hero-logo {
  display: block;
  width: min(78vw, 340px);
  height: auto;
  margin: 0 auto;
  border-radius: 12px;
}

.tagline {
  margin: 0 0 1.2rem;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
}

.how {
  display: grid;
  gap: 0.6rem;
  max-width: 560px;
  margin: 1.5rem auto 0;
  padding: 0;
  list-style: none;
  counter-reset: paso;
  text-align: left;
}

.how li {
  counter-increment: paso;
  padding: 0.8rem 1rem 0.8rem 3rem;
  position: relative;
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.how li::before {
  content: counter(paso);
  position: absolute;
  left: 0.9rem;
  top: 0.7rem;
  width: 1.7rem;
  height: 1.7rem;
  display: grid;
  place-items: center;
  background: var(--metal);
  color: #000000;
  border-radius: 50%;
  font-weight: 700;
}

.block {
  padding: 2rem 0 1rem;
  scroll-margin-top: calc(var(--header-h) + 8px);
}

.block > h2::after {
  content: "";
  display: block;
  height: 2px;
  margin-top: 0.5rem;
  background: var(--metal-line);
}

.lead {
  color: var(--muted);
}

.hint {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Formularios */
.field {
  margin: 0 0 1rem;
}

label,
.field-label,
.filter-title {
  display: block;
  margin: 0 0 0.35rem;
  color: var(--gold-light);
  font-weight: 600;
}

.filter-title {
  margin-top: 1rem;
}

input,
select,
textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.9rem;
  background: var(--surface-1);
  color: var(--text);
  border: 1px solid var(--gold-dark);
  border-radius: 10px;
  font: inherit;
  font-size: 16px;
}

textarea {
  resize: vertical;
}

[aria-invalid="true"] {
  border-color: var(--danger);
}

.error {
  margin: 0.3rem 0 0;
  color: var(--danger);
  font-weight: 600;
}

.error:empty {
  display: none;
}

.field.check {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 0.2rem 0.7rem;
  align-items: start;
}

.field.check input {
  width: 28px;
  min-height: 28px;
  height: 28px;
  margin-top: 0.1rem;
  accent-color: #CC9D60;
}

.field.check label {
  margin: 0;
  font-weight: 400;
  color: var(--text);
}

.field.check .error {
  grid-column: 1 / -1;
}

/* Catalogo */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 1rem;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 999px;
  font: inherit;
  font-size: 16px;
  cursor: pointer;
}

.chip[aria-pressed="true"] {
  background: var(--metal);
  color: #000000;
  border-color: var(--gold-light);
  font-weight: 700;
}

.count {
  margin: 1rem 0 0.6rem;
  color: var(--gold-light);
  font-weight: 600;
}

.empty {
  padding: 1.2rem;
  background: var(--surface-1);
  border: 1px dashed var(--gold-dark);
  border-radius: 12px;
  color: var(--muted);
}

.cards {
  display: grid;
  gap: 0.9rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem;
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.card p {
  margin: 0;
}

.card .btn,
.card button {
  margin-top: auto;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tag {
  padding: 0.15rem 0.7rem;
  background: var(--surface-3);
  color: var(--gold-light);
  border: 1px solid var(--gold-dark);
  border-radius: 999px;
  font-size: 0.9rem;
}

.detail {
  margin-top: 1.2rem;
  padding: 1.2rem;
  background: var(--surface-2);
  border: 1px solid var(--gold-dark);
  border-radius: 16px;
}

.photo-slot {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 140px;
  margin: 0;
  padding: 1rem;
  background: var(--surface-1);
  border: 1px dashed var(--gold-dark);
  border-radius: 14px;
  text-align: center;
}

.photo-tag {
  color: var(--gold-champagne);
  font-weight: 600;
}

.photo-slot figcaption {
  color: var(--muted);
  font-size: 0.95rem;
}

/* Asistente */
.wizard {
  max-width: 640px;
}

.step-label {
  margin: 0 0 0.4rem;
  color: var(--gold-light);
  font-weight: 600;
}

.progress {
  height: 10px;
  margin-bottom: 1.2rem;
  background: var(--surface-3);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar {
  display: block;
  width: 25%;
  height: 100%;
  background: var(--metal);
  transition: width 0.3s ease;
}

.step {
  min-width: 0;
  margin: 0 0 1rem;
  padding: 1rem;
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: 14px;
}

legend {
  padding: 0 0.4rem;
  color: var(--gold-champagne);
  font-size: 1.25rem;
}

.kind-intro {
  margin: 0 0 1rem;
  color: var(--muted);
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 0.5rem;
}

.option {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin: 0;
  padding: 0.4rem 0.5rem;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-weight: 400;
  text-align: center;
  cursor: pointer;
}

.option input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  opacity: 0;
}

.option:has(input:checked),
.option.is-selected {
  background: var(--metal);
  color: #000000;
  border-color: var(--gold-light);
  font-weight: 700;
}

.option:has(input:focus-visible) {
  outline: 3px solid var(--gold-light);
  outline-offset: 2px;
}

.option.is-closed {
  color: var(--muted);
  background: var(--black);
  cursor: not-allowed;
}

.summary {
  margin: 0 0 1rem;
}

.summary div {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.2rem 1rem;
  padding: 0.6rem 0;
  border-top: 1px solid var(--line);
}

.summary dt {
  color: var(--muted);
}

.summary dd {
  margin: 0;
  color: var(--text);
  font-weight: 600;
}

.step-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.step-actions .btn {
  flex: 1 1 140px;
}

.result {
  margin-top: 1rem;
  color: var(--gold-light);
}

.result:not(:empty) {
  padding: 1rem;
  background: var(--surface-2);
  border: 1px solid var(--gold);
  border-radius: 12px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.7rem;
}

.photo-main {
  grid-column: 1 / -1;
  min-height: 200px;
}

.contact {
  display: grid;
  gap: 0.6rem;
  margin: 0 0 1.2rem;
  padding: 0;
  list-style: none;
}

.contact li {
  padding: 0.8rem 1rem;
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.site-footer {
  margin-top: 2rem;
  padding: 1.5rem 1rem calc(1.5rem + env(safe-area-inset-bottom));
  background: var(--black);
  border-top: 1px solid var(--gold-dark);
  color: var(--muted);
  text-align: center;
}

.site-footer p {
  max-width: 640px;
  margin: 0 auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--gold-light);
  outline-offset: 2px;
}

@media (min-width: 640px) {
  h1 {
    font-size: 2.6rem;
  }

  .cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery {
    grid-template-columns: repeat(4, 1fr);
  }

  .photo-main {
    grid-column: 1 / -1;
  }

  .how {
    grid-template-columns: repeat(3, 1fr);
    max-width: none;
  }

  .how li {
    padding: 3rem 1rem 1rem;
  }

  .how li::before {
    left: 1rem;
    top: 0.9rem;
  }
}

@media (min-width: 960px) {
  .cards {
    grid-template-columns: repeat(3, 1fr);
  }

  .menu-toggle,
  .menu-close {
    display: none;
  }

  .menu,
  .menu.is-open {
    display: block;
    position: static;
    padding: 0;
    background: transparent;
    overflow: visible;
  }

  .menu ul {
    display: flex;
    gap: 0.2rem;
  }

  .menu li a {
    padding: 0 0.8rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 16px;
    border-top: 0;
  }

  .brand {
    flex: 0 0 auto;
  }

  .header-inner {
    justify-content: space-between;
  }

  .btn-small {
    order: 3;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition: none !important;
    animation: none !important;
  }
}

/* Correccion manual (revision a 390 px): el nombre del salon no debe quedar tapado por "Agenda tu cita". */
@media (max-width: 430px) {
  .brand {
    font-size: 0.9rem;
    letter-spacing: 0.06em;
  }
}

/* ---- E1: varios servicios por visita y resumen visible de fecha y hora ---- */
.service-cart {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 8px 12px;
  border: 1px solid var(--gold-dark);
  border-radius: 12px;
  background: var(--surface-2);
}

.selection-summary {
  margin: 12px 0 0;
  padding: 12px 14px;
  border-left: 3px solid var(--gold);
  background: var(--surface-1);
  color: var(--gold-light);
  font-weight: 600;
}

.option.is-selected {
  box-shadow: 0 0 0 2px var(--gold-light);
}

.option.is-closed {
  opacity: 0.55;
  text-decoration: line-through;
  border-style: dashed;
}

/* ---- E1.1: telefono de Mexico con prefijo visible ---- */
.phone-field {
  display: flex;
  align-items: stretch;
}

.phone-prefix {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 12px;
  border: 1px solid var(--gold-dark);
  border-right: 0;
  border-radius: 12px 0 0 12px;
  background: var(--surface-2);
  color: var(--gold-light);
  font-size: 16px;
  font-weight: 700;
}

.phone-field input {
  flex: 1 1 auto;
  min-width: 0;
  border-radius: 0 12px 12px 0;
}

/* ---- E1.1: confirmacion visible al agregar o quitar servicios ---- */
.service-toast {
  margin: 8px 0 0;
  min-height: 0;
}

.service-toast.is-visible {
  padding: 10px 14px;
  border: 1px solid var(--gold);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--gold-highlight);
  font-weight: 700;
}

#service-count {
  color: var(--gold-highlight);
}

@media (prefers-reduced-motion: no-preference) {
  .service-toast.is-visible {
    animation: toast-in 0.2s ease-out;
  }

  @keyframes toast-in {
    from {
      opacity: 0;
      transform: translateY(-4px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
}

/* ---- E1.1: fotos publicadas por el salon ---- */
.hero-photo,
.photo-figure,
.service-photo {
  margin: 12px 0 0;
}

.hero-photo img,
.photo-figure img,
.service-photo img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--gold-dark);
  border-radius: 12px;
}

.hero-photo figcaption,
.photo-figure figcaption,
.service-photo figcaption {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
}
