@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700&family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,600;1,6..72,500&display=swap');

:root {
  --bg: #f6efe3;
  --bg-alt: #efe2cd;
  --panel: #fffaf1;
  --ink: #201d19;
  --ink-soft: #52493f;
  --green: #26332a;
  --green-soft: #3c4a3d;
  --accent: #b5563a;
  --accent-dark: #8c3f28;
  --line: rgba(32, 29, 25, 0.14);
  --ok: #3f7a4c;
  --warn: #b5822b;
  --off: #8a7f72;
  --radius: 10px;
  --font-display: 'Newsreader', Georgia, serif;
  --font-body: 'Archivo', system-ui, -apple-system, sans-serif;

  /* firma: motivo de arco repetido, en dos variantes tonales */
  --arch-on-cream: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64'%3E%3Cpath d='M8 56V34C8 21 17 10 32 10C47 10 56 21 56 34V56' fill='none' stroke='%2326332a' stroke-width='1.4'/%3E%3C/svg%3E");
  --arch-on-green: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64'%3E%3Cpath d='M8 56V34C8 21 17 10 32 10C47 10 56 21 56 34V56' fill='none' stroke='%23f6efe3' stroke-width='1.4'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }

a { color: inherit; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 560;
  margin: 0;
  letter-spacing: -0.01em;
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.6rem;
  background: rgba(246, 239, 227, 0.86);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: 0.01em;
}

.brand-tag {
  display: none;
}

.nav-admin-link {
  font-size: 0.85rem;
  color: var(--ink-soft);
  text-decoration: none;
  border: 1px solid var(--line);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-admin-link:hover {
  border-color: var(--ink-soft);
  color: var(--ink);
  transform: translateY(-1px);
}

/* ---------- hero ---------- */

.hero-bleed {
  position: relative;
  overflow: hidden;
}

.hero-bleed::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--arch-on-cream);
  background-size: 72px 72px;
  opacity: 0.05;
  pointer-events: none;
}

.hero {
  position: relative;
  z-index: 1;
  padding: 4.5rem 1.6rem 3.5rem;
  max-width: 880px;
  margin: 0 auto;
  text-align: left;
}

.hero > * {
  opacity: 0;
  transform: translateY(14px);
  animation: hero-in 0.7s ease forwards;
}

.hero-eyebrow { animation-delay: 0.05s; }
.hero h1 { animation-delay: 0.16s; }
.hero p { animation-delay: 0.3s; }
.hero-cta { animation-delay: 0.44s; }

@keyframes hero-in {
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .hero > * { animation: none; opacity: 1; transform: none; }
}

.hero-eyebrow {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent-dark);
  margin-bottom: 0.9rem;
  display: block;
}

.hero h1 {
  font-size: clamp(2.2rem, 5.6vw, 3.6rem);
  line-height: 1.06;
  max-width: 14ch;
}

.hero p {
  margin-top: 1.4rem;
  max-width: 46ch;
  color: var(--ink-soft);
  font-size: 1.08rem;
}

.hero-cta {
  margin-top: 2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--green);
  color: var(--bg);
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.95rem;
  transition: transform 0.25s ease, background 0.25s ease;
}

.hero-cta:hover {
  background: var(--accent);
  transform: translateY(-2px);
}

/* ---------- reveal ---------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- section shell ---------- */

.section {
  max-width: 1040px;
  margin: 0 auto;
  padding: 3.2rem 1.6rem;
}

.section-head {
  margin-bottom: 2rem;
  max-width: 60ch;
}

.section-head .eyebrow {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-dark);
}

.section-head h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.2rem);
  margin-top: 0.5rem;
}

/* ---------- servicios ---------- */

.servicios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
}

.servicio-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.servicio-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 14px 30px -20px rgba(32, 29, 25, 0.35);
}

.servicio-card h3 {
  font-size: 1.1rem;
  font-weight: 500;
}

.servicio-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 0.9rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.servicio-precio {
  color: var(--accent-dark);
  font-weight: 600;
}

/* ---------- reserva ---------- */

.reserva-shell {
  background: var(--green);
  border-radius: 20px;
  color: var(--bg);
  padding: 2.6rem 1.8rem;
}

.section-mark {
  width: 26px;
  height: 26px;
  color: var(--accent);
  margin-bottom: 0.6rem;
  display: block;
}

.reserva-shell .section-head p {
  color: rgba(246, 239, 227, 0.75);
  margin-top: 0.6rem;
}

.section-head--plain h2 {
  max-width: 22ch;
}

.reserva-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
  margin-top: 1.6rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field.full { grid-column: 1 / -1; }

.field label {
  font-size: 0.85rem;
  color: rgba(246, 239, 227, 0.85);
}

.field input,
.field select {
  background: rgba(246, 239, 227, 0.08);
  border: 1px solid rgba(246, 239, 227, 0.28);
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  color: var(--bg);
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.field input::placeholder { color: rgba(246, 239, 227, 0.45); }

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
}

.field select option { color: var(--ink); }

.slots-wrap {
  grid-column: 1 / -1;
}

.slots-label {
  font-size: 0.85rem;
  color: rgba(246, 239, 227, 0.85);
  margin-bottom: 0.6rem;
  display: block;
}

.slots-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.slot-btn {
  border: 1px solid rgba(246, 239, 227, 0.28);
  background: transparent;
  color: var(--bg);
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-body);
}

.slot-btn:hover { border-color: var(--accent); }

.slot-btn.is-selected {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

.slots-empty {
  color: rgba(246, 239, 227, 0.6);
  font-size: 0.9rem;
}

.reserva-submit {
  grid-column: 1 / -1;
  margin-top: 0.4rem;
  background: var(--accent);
  color: var(--bg);
  border: none;
  padding: 0.9rem 1.4rem;
  border-radius: 999px;
  font-size: 0.98rem;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
  justify-self: start;
}

.reserva-submit:hover { background: var(--accent-dark); transform: translateY(-2px); }

.reserva-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.confirmacion {
  display: none;
  grid-column: 1 / -1;
  background: rgba(246, 239, 227, 0.08);
  border: 1px solid rgba(246, 239, 227, 0.28);
  border-radius: 12px;
  padding: 1.4rem;
}

.confirmacion.is-visible { display: block; }

.confirmacion h3 { font-size: 1.15rem; color: var(--bg); }

.confirmacion p { color: rgba(246, 239, 227, 0.8); margin: 0.4rem 0 0; }

.form-error {
  grid-column: 1 / -1;
  color: #e8b3a0;
  font-size: 0.88rem;
  display: none;
}

.form-error.is-visible { display: block; }

/* ---------- proceso ---------- */

.proceso-list {
  display: grid;
  gap: 1rem;
  counter-reset: paso;
}

.proceso-item {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  padding: 1.1rem 0;
  border-top: 1px solid var(--line);
}

.proceso-item:first-child { border-top: none; }

.proceso-num {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--accent-dark);
  min-width: 2ch;
}

.proceso-item h3 { font-size: 1.05rem; font-weight: 500; }

.proceso-item p { margin: 0.3rem 0 0; color: var(--ink-soft); font-size: 0.95rem; }

/* ---------- footer ---------- */

.site-footer {
  position: relative;
  overflow: hidden;
  background: var(--green-soft);
  color: var(--bg);
  padding: 2.4rem 1.6rem;
  margin-top: 2rem;
}

.site-footer::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--arch-on-green);
  background-size: 72px 72px;
  opacity: 0.07;
  pointer-events: none;
}

.footer-inner {
  position: relative;
  z-index: 1;
  max-width: 1040px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.9rem;
}

.footer-note {
  max-width: 40ch;
  color: rgba(246, 239, 227, 0.65);
  font-size: 0.82rem;
}

/* ============================================================
   Admin
   ============================================================ */

.admin-gate {
  min-height: calc(100vh - 70px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.2rem;
}

.admin-gate[hidden] {
  display: none;
}

.gate-card {
  width: 100%;
  max-width: 340px;
  text-align: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2.2rem 1.8rem;
}

.gate-card .brand-mark {
  width: 36px;
  height: 36px;
  color: var(--ink);
  margin: 0 auto 1rem;
}

.gate-card h1 {
  font-size: 1.35rem;
}

.gate-card p {
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin: 0.5rem 0 1.4rem;
}

.gate-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.65rem 0.8rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--bg);
  text-align: center;
}

.gate-input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.gate-hint {
  font-size: 0.78rem;
  color: var(--off);
  margin: 0.55rem 0 1.1rem !important;
}

.gate-error {
  font-size: 0.8rem;
  color: var(--accent-dark);
  margin: -0.6rem 0 0.9rem !important;
}

.gate-card .btn {
  width: 100%;
}

.admin-shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.4rem 1.6rem 4rem;
}

.admin-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.8rem;
}

.admin-head h1 { font-size: 1.7rem; }

.admin-head p { color: var(--ink-soft); margin: 0.3rem 0 0; font-size: 0.92rem; }

.admin-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.btn {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  padding: 0.6rem 1rem;
  border-radius: 10px;
  font-size: 0.85rem;
  cursor: pointer;
  font-family: var(--font-body);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.btn:hover { border-color: var(--ink-soft); transform: translateY(-1px); }

.btn.danger { color: var(--accent-dark); }

.btn.ghost { background: transparent; }

.btn.primary {
  background: var(--green);
  border-color: var(--green);
  color: var(--bg);
}

.btn.primary:hover {
  background: var(--accent);
  border-color: var(--accent);
}

/* ---------- tabs del panel ---------- */

.admin-tabs {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1.6rem;
  border-bottom: 1px solid var(--line);
}

.admin-tab {
  border: none;
  background: none;
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--ink-soft);
  padding: 0.7rem 0.2rem;
  margin-right: 1.4rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transform: translateY(1px);
}

.admin-tab:hover { color: var(--ink); }

.admin-tab.is-active {
  color: var(--ink);
  border-bottom-color: var(--accent);
  font-weight: 500;
}

.admin-panel[hidden] { display: none; }

/* ---------- contenido editable ---------- */

.content-block {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  margin-bottom: 1.2rem;
}

.content-block h2 {
  font-size: 1.05rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.2rem;
}

.content-grid .field.full { grid-column: 1 / -1; }

.content-block .field label {
  color: var(--ink-soft);
}

.content-block .field input,
.content-block .field textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  font-family: var(--font-body);
  font-size: 0.92rem;
  background: var(--bg);
  color: var(--ink);
  resize: vertical;
}

.content-block .field input:focus,
.content-block .field textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.servicios-editor {
  display: grid;
  gap: 0.7rem;
}

.servicio-editor-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 0.8rem;
  align-items: end;
}

.servicio-editor-row .field label {
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.servicio-editor-row .field input {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  background: var(--bg);
  color: var(--ink);
}

.servicio-editor-row .field input:focus {
  outline: none;
  border-color: var(--accent);
}

.content-actions {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin-top: 0.4rem;
}

.content-guardado {
  font-size: 0.85rem;
  color: var(--ok);
}

@media (max-width: 640px) {
  .content-grid { grid-template-columns: 1fr; }
  .servicio-editor-row { grid-template-columns: 1fr; }
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: flex-end;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem;
  margin-bottom: 1.4rem;
}

.admin-toolbar .field { min-width: 150px; }

.admin-toolbar .field label {
  color: var(--ink-soft);
}

.admin-toolbar input,
.admin-toolbar select {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  background: var(--bg);
}

.bloqueo-row {
  display: flex;
  gap: 0.6rem;
  align-items: flex-end;
  margin-left: auto;
}

.table-wrap {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th, td {
  text-align: left;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
}

th {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  background: var(--bg-alt);
}

tr:last-child td { border-bottom: none; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
}

.pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.pill.pendiente { background: rgba(181, 130, 43, 0.14); color: var(--warn); }
.pill.confirmada { background: rgba(63, 122, 76, 0.14); color: var(--ok); }
.pill.cancelada { background: rgba(138, 127, 114, 0.16); color: var(--off); }

.row-actions {
  display: flex;
  gap: 0.4rem;
}

.row-actions button {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 7px;
  padding: 0.35rem 0.6rem;
  font-size: 0.78rem;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.row-actions button:hover { border-color: var(--ink-soft); }

.btn-eliminar-fila {
  color: var(--accent-dark);
  font-size: 0.95rem !important;
  line-height: 1;
  padding: 0.3rem 0.55rem !important;
}

.btn-eliminar-fila:hover {
  background: rgba(181, 86, 58, 0.1);
  border-color: var(--accent) !important;
}

.empty-state {
  padding: 3rem 1rem;
  text-align: center;
  color: var(--ink-soft);
}

.bloqueos-list {
  margin-top: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.bloqueo-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-alt);
  border-radius: 999px;
  padding: 0.4rem 0.5rem 0.4rem 0.9rem;
  font-size: 0.82rem;
}

.bloqueo-chip button {
  border: none;
  background: none;
  cursor: pointer;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1;
}

/* ---------- aviso casual de sitio de ejemplo ---------- */

.ejemplo-toast {
  position: fixed;
  left: clamp(1.2rem, 3vw, 3rem);
  bottom: clamp(1.2rem, 3vw, 3rem);
  z-index: 40;
  width: clamp(320px, 30vw, 560px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  border-radius: 16px;
  box-shadow: 0 28px 60px -18px rgba(140, 63, 40, 0.45);
  padding: clamp(1.1rem, 2vw, 1.9rem) clamp(1.2rem, 2.2vw, 2.1rem) clamp(1.1rem, 2vw, 1.9rem) clamp(1.4rem, 2.4vw, 2.3rem);
  opacity: 0;
  transform: translateY(14px) scale(0.96);
  transition: opacity 0.4s cubic-bezier(.2,.9,.3,1.3), transform 0.4s cubic-bezier(.2,.9,.3,1.3);
}

@media (min-width: 1440px) {
  .ejemplo-toast { width: 560px; padding: 1.9rem 2.1rem 1.9rem 2.3rem; }
}

.ejemplo-toast.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.ejemplo-toast-dot {
  display: inline-block;
  width: clamp(9px, 1vw, 14px);
  height: clamp(9px, 1vw, 14px);
  border-radius: 50%;
  background: var(--accent);
  margin-bottom: 0.7rem;
  animation: toast-pulse 1.8s ease-in-out infinite;
}

@keyframes toast-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(181, 86, 58, 0.45); }
  50% { box-shadow: 0 0 0 6px rgba(181, 86, 58, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .ejemplo-toast-dot { animation: none; }
}

.ejemplo-toast p {
  margin: 0 1.6rem 0.8rem 0;
  font-size: clamp(0.95rem, 0.9vw + 0.55rem, 1.3rem);
  line-height: 1.45;
  color: var(--ink-soft);
}

.ejemplo-toast-link {
  font-size: clamp(0.92rem, 0.8vw + 0.5rem, 1.15rem);
  color: var(--accent-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ejemplo-toast-close {
  position: absolute;
  top: clamp(0.6rem, 0.8vw, 1rem);
  right: clamp(0.7rem, 1vw, 1.1rem);
  border: none;
  background: none;
  font-size: clamp(1.2rem, 1.2vw + 0.4rem, 1.6rem);
  line-height: 1;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 0.2rem;
}

@media (max-width: 480px) {
  .ejemplo-toast { left: 0.8rem; right: 0.8rem; width: auto; }
}

/* ---------- foco visible (accesibilidad, no solo el hover) ---------- */

.slot-btn:focus-visible,
.btn:focus-visible,
.hero-cta:focus-visible,
.reserva-submit:focus-visible,
.nav-admin-link:focus-visible,
.row-actions button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 720px) {
  .reserva-form { grid-template-columns: 1fr; }
  .table-wrap { overflow-x: auto; }
  table { min-width: 640px; }
  .bloqueo-row { margin-left: 0; }
}
