/* ==========================================================================
   Astrocami — sistema visual (v2)
   Tokens y estilos aprobados (ver CLAUDE.md). No modificar paleta ni
   tipografías sin aprobación.
   ========================================================================== */

:root {
  --bg: #205C5B;
  --bg-card: rgba(255, 255, 255, 0.07);
  --bg-card-hover: rgba(255, 255, 255, 0.11);
  --ink: #F4F0EB;
  --ink-soft: rgba(244, 240, 235, 0.65);
  --aqua: #93E1D8;
  --aqua-hover: #7DD4CA;
  --aqua-glow: rgba(147, 225, 216, 0.12);
  --blush: #FFA69E;
  --blush-soft: rgba(255, 166, 158, 0.15);
  --gold: #D4AF6A;
  --line: rgba(255, 255, 255, 0.1);

  /* Fallback sólido para elementos con glassmorphism que podrían dar
     problemas de rendimiento en mobile (ver punto 14 del brief). */
  --bg-solid: rgba(42, 122, 121, 0.95);

  --font-serif: "Fraunces", "Georgia", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --container: 1080px;
  --radius-lg: 18px;
  --radius-sm: 10px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }

body {
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 60% at 85% 20%, rgba(147, 225, 216, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 10% 80%, rgba(255, 166, 158, 0.05) 0%, transparent 60%);
  background-repeat: no-repeat;
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---- Tipografía ---- */
h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.15;
}

h1 {
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.01em;
}

h2 { font-size: clamp(26px, 4vw, 30px); }
h3 { font-size: clamp(18px, 2.5vw, 22px); }

em {
  font-style: italic;
  font-weight: 400;
  color: var(--blush);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--aqua);
}

.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--aqua);
}

.lede {
  color: var(--ink-soft);
  font-size: 16px;
}

.note, small {
  font-size: 12px;
  color: var(--ink-soft);
}

/* ---- Botones ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--aqua);
  color: var(--bg);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 14px;
  padding: 13px 24px;
  border-radius: 999px;
  border: none;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(147, 225, 216, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}

.btn:hover { background: var(--aqua-hover); box-shadow: 0 8px 24px rgba(147, 225, 216, 0.35); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; transform: none; }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: none;
}
.btn-ghost:hover { background: transparent; border-color: var(--aqua); box-shadow: none; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--aqua);
  transition: gap 0.15s ease;
}
.link-arrow:hover { gap: 10px; }

/* ---- Wordmark ---- */
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--ink);
}

.wm-astro { font-weight: 600; }
.wm-cami { font-weight: 400; font-style: italic; color: var(--aqua); }

.moon-svg {
  width: 19px;
  height: 19px;
  fill: var(--gold);
  transform: scaleX(-1);
  flex-shrink: 0;
}

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-solid);
  border-bottom: 1px solid var(--line);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.main-nav { display: flex; align-items: center; gap: 28px; }

.main-nav a {
  font-size: 13px;
  color: var(--ink-soft);
  transition: color 0.15s ease;
}

.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--ink); }

.main-nav a.nav-cta {
  color: var(--bg);
  background: var(--aqua);
  padding: 9px 18px;
  border-radius: 999px;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(147, 225, 216, 0.25);
  transition: background 0.15s ease, box-shadow 0.15s ease;
}
.main-nav a.nav-cta:hover { background: var(--aqua-hover); color: var(--bg); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
}
.nav-toggle svg { width: 18px; height: 18px; }

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .main-nav {
    position: fixed;
    inset: 68px 0 auto 0;
    background: var(--bg-solid);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 20px 20px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
  }
  .main-nav.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .main-nav a { width: 100%; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .main-nav a.nav-cta { border-bottom: none; text-align: center; justify-content: center; margin-top: 10px; }
}

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 96px;
  padding: 48px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 32px;
}

.footer-brand .wordmark { font-size: 18px; gap: 3px; margin-bottom: 10px; }
.footer-brand .moon-svg { width: 15px; height: 15px; }
.footer-brand p { color: var(--ink-soft); font-size: 13.5px; }

.footer-contact h4 {
  font-family: var(--font-sans);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  margin-bottom: 12px;
}
.footer-contact a {
  display: block;
  font-size: 14px;
  margin-bottom: 6px;
  color: var(--ink);
}
.footer-contact a:hover { color: var(--aqua); }

.footer-bottom {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-soft);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

/* ---- Secciones genéricas ---- */
section { padding: 72px 0; }
.section-head { max-width: 620px; margin-bottom: 40px; }
.section-head h2 { margin-top: 10px; }
.section-head .lede { margin-top: 12px; }

.divider {
  border: none;
  height: 1px;
  margin: 0;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}

/* ---- Hilo decorativo (motivo "hilo" en páginas internas) ---- */
.thread-decor {
  position: absolute;
  pointer-events: none;
  opacity: 0.55;
  z-index: 0;
}

/* ---- Hero ---- */
.hero {
  position: relative;
  padding: 64px 0 56px;
  overflow: hidden;
}

.hero-inner { position: relative; z-index: 1; max-width: 640px; }
.hero h1 { margin-top: 16px; }
.hero .lede { margin-top: 18px; max-width: 48ch; }

.hero-actions {
  margin-top: 30px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

/* Líneas decorativas del hero */
.hero-lines {
  position: absolute;
  right: -20px;
  top: -10px;
  width: 480px;
  height: 420px;
  pointer-events: none;
  z-index: 0;
}
.hero-lines path {
  fill: none;
  stroke-width: 1.5;
  stroke-dasharray: 640;
  stroke-dashoffset: 640;
  animation: draw-on 1.8s ease forwards;
}
.hero-lines .l1 { stroke: var(--aqua); opacity: 0.35; animation-delay: 0s; }
.hero-lines .l2 { stroke: var(--blush); opacity: 0.2; animation-delay: 0.15s; }
.hero-lines .l3 { stroke: var(--aqua); opacity: 0.2; animation-delay: 0.3s; }

@keyframes draw-on {
  to { stroke-dashoffset: 0; }
}

@media (max-width: 720px) {
  .hero-lines { display: none; }
}

/* ---- Cards de servicio (Inicio) ---- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.service-card {
  position: relative;
  overflow: hidden;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--aqua);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.service-card:hover {
  border-color: var(--aqua);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}
.service-card:hover::before { opacity: 1; }

.service-icon {
  width: 32px;
  height: 32px;
  background: var(--aqua-glow);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: var(--aqua);
}

.service-card h3 { margin-top: 2px; }
.service-card p { color: var(--ink-soft); font-size: 14.5px; }
.service-card .link-arrow { margin-top: auto; }

.price {
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--blush);
  font-size: 15px;
}
.price .price-unit {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 12px;
  color: var(--ink-soft);
}

@media (max-width: 860px) {
  .service-grid { grid-template-columns: 1fr; }
}

/* ---- Página Servicios ---- */
.service-detail {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 32px;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 24px;
}

.service-detail .badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--blush);
  background: var(--blush-soft);
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 14px;
}

.service-detail .service-icon { margin-bottom: 16px; }
.service-detail h3 { font-size: clamp(22px, 3vw, 27px); }
.service-detail-body { margin-top: 16px; display: flex; flex-direction: column; gap: 12px; }
.service-detail-body p { color: var(--ink-soft); font-size: 15px; }

.service-sidebar {
  border-left: 1px solid var(--line);
  padding-left: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar-row { display: flex; flex-direction: column; gap: 2px; }
.sidebar-row .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}
.sidebar-row .value { font-size: 15px; font-weight: 500; }
.sidebar-row .value.price {
  font-size: 20px;
}

.service-sidebar .btn { margin-top: 6px; width: 100%; }

@media (max-width: 780px) {
  .service-detail { grid-template-columns: 1fr; padding: 24px; }
  .service-sidebar { border-left: none; border-top: 1px solid var(--line); padding-left: 0; padding-top: 20px; }
}

/* ---- Página Sobre ella ---- */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.about-text p { color: var(--ink-soft); margin-top: 14px; font-size: 15.5px; }
.about-text h2 { margin-top: 10px; }

.about-photo {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.05), var(--bg-card));
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.about-photo .placeholder-label {
  color: var(--ink-soft);
  font-size: 13px;
  text-align: center;
  padding: 0 20px;
}

.about-photo img {
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
  display: block;
}

@media (max-width: 780px) {
  .about-grid { grid-template-columns: 1fr; gap: 28px; }
  .about-photo { order: -1; max-width: 340px; margin: 0 auto; }
}

/* ---- Página Reservas ---- */
.booking-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 28px;
  align-items: start;
}

.booking-panel, .summary-panel, .form-panel {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.booking-panel { margin-bottom: 20px; }

.field-label {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  margin-bottom: 12px;
  display: block;
}

/* Service pills */
.pill-group { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.pill {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 13.5px;
  font-weight: 500;
  transition: all 0.15s ease;
}
.pill:hover { border-color: var(--aqua); color: var(--ink); }
.pill[aria-pressed="true"] {
  background: var(--aqua);
  border-color: var(--aqua);
  color: var(--bg);
  font-weight: 600;
}

/* Modalidad toggle */
.toggle-group { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; margin-bottom: 28px; }
.toggle-group .pill { border: none; padding: 7px 16px; }
.toggle-group .pill[aria-pressed="true"] { background: var(--aqua); color: var(--bg); }

/* Calendar */
.calendar-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.calendar-nav .month-label { font-family: var(--font-serif); font-size: 17px; text-transform: capitalize; }
.calendar-nav button {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.calendar-nav button:hover:not(:disabled) { border-color: var(--aqua); }
.calendar-nav button:disabled { opacity: 0.3; cursor: not-allowed; }

.calendar-weekdays, .calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.calendar-weekdays { margin-bottom: 8px; }
.calendar-weekdays span {
  text-align: center;
  font-size: 11px;
  color: var(--ink-soft);
  text-transform: uppercase;
}

.day-cell {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: 10px;
  font-size: 13.5px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--ink-soft);
}
.day-cell.is-empty { visibility: hidden; }
.day-cell.is-available { color: var(--ink); cursor: pointer; }
.day-cell.is-available:hover { border-color: var(--aqua); background: rgba(147, 225, 216, 0.08); }
.day-cell.is-available .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--aqua); }
.day-cell.is-disabled { color: var(--ink-soft); opacity: 0.35; cursor: not-allowed; }
.day-cell[aria-pressed="true"] { background: var(--aqua); color: var(--bg); font-weight: 600; }
.day-cell[aria-pressed="true"] .dot { background: var(--bg); }

/* Slots */
.slots-wrap { margin-top: 24px; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 10px; }
.slot-btn {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  border-radius: 10px;
  padding: 11px 8px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
}
.slot-btn:hover { border-color: var(--aqua); }
.slot-btn[aria-pressed="true"] { background: var(--aqua); border-color: var(--aqua); color: var(--bg); font-weight: 600; }

.empty-hint { color: var(--ink-soft); font-size: 13.5px; }

/* Summary */
.summary-panel { margin-bottom: 20px; }
.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.summary-row:last-child { border-bottom: none; }
.summary-row .label { color: var(--ink-soft); }
.summary-row .value { font-weight: 500; text-align: right; }
.summary-row .value.is-empty { color: var(--ink-soft); font-weight: 400; }

/* Form */
.form-panel h3 { margin-bottom: 18px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-size: 13px; color: var(--ink-soft); }
.form-field label .req { color: var(--blush); }
.form-field input, .form-field textarea {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 13px;
  font-size: 14px;
  color: var(--ink);
}
.form-field input::placeholder, .form-field textarea::placeholder { color: rgba(244, 240, 235, 0.4); }
.form-field input:focus, .form-field textarea:focus { outline: none; border-color: var(--aqua); }
.form-field textarea { resize: vertical; min-height: 84px; }

.form-panel .btn { width: 100%; margin-top: 18px; }
.form-panel .note { display: block; text-align: center; margin-top: 12px; }

@media (max-width: 900px) {
  .booking-layout { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}

/* ---- CTA final / bridge ---- */
.cta-band {
  background: linear-gradient(135deg, var(--aqua-glow), var(--blush-soft));
  border-radius: var(--radius-lg);
  padding: 48px 32px;
  text-align: center;
  border: 1px solid var(--line);
}
.cta-band h2 { margin-bottom: 12px; }
.cta-band p { color: var(--ink-soft); max-width: 46ch; margin: 0 auto 24px; }

/* ---- Utilidades ---- */
.mt-0 { margin-top: 0; }
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
