/* ════════════════════════════════════════════════════════════
   TúHaz · base.css
   Sistema de diseño compartido — tokens, tipografía, nav, footer,
   botones, utilidades. Tema claro, cálido y sereno.
   ════════════════════════════════════════════════════════════ */

/* ── Tokens ───────────────────────────────────────────────── */
/* Tema OSCURO cálido — pensado para fotosensibilidad:
   fondo noche cálido (no negro puro), texto crema apagado
   (no blanco puro), contraste cómodo y sin brillos agresivos. */
:root {
  /* superficie / noche fría azulada "Pizarra" */
  --paper:      #1B1E22;   /* fondo de página */
  --paper-2:    #242830;   /* tarjetas, superficies elevadas */
  --paper-3:    #2E333C;   /* bloques sutiles, hover */
  --sand:       #353B45;

  /* tinta = crema apagado (nunca blanco puro) */
  --ink:        #E6E8EC;   /* texto principal */
  --ink-2:      rgba(230,232,236,.68);
  --ink-3:      rgba(230,232,236,.46);
  --ink-4:      rgba(230,232,236,.28);
  --line:       rgba(230,232,236,.13);
  --line-2:     rgba(230,232,236,.07);

  /* secciones "destacadas" (antes oscuras) → verde profundo */
  --feature:      #1E2A2C;   /* footer, filosofía, bono, precio destacado */
  --feature-ink:  #E8EBEC;
  --feature-line: rgba(232,235,236,.14);

  /* acentos (un punto más luminosos para leer sobre oscuro) */
  --sage:       #7FA08C;   /* acento principal — calma */
  --sage-deep:  #648475;
  --sage-soft:  rgba(127,160,140,.16);
  --clay:       #D08755;   /* acento cálido — CTA, foco */
  --clay-deep:  #B86E3D;
  --clay-soft:  rgba(208,135,85,.16);

  /* disciplinas */
  --d-yoga:     #7FA08C;
  --d-pilates:  #D08755;
  --d-entreno:  #C99A4E;
  --d-espalda:  #74998E;

  /* estados */
  --ok:         #86AE72;
  --warn:       #CE9A4E;
  --err:        #D86A50;

  /* tipografía — sans con carácter, cero serif */
  --f-display:  'Bricolage Grotesque', 'Hanken Grotesk', system-ui, sans-serif;
  --f-sans:     'Hanken Grotesk', system-ui, -apple-system, sans-serif;
  --f-num:      'Hanken Grotesk', system-ui, sans-serif;  /* cifras: tabular */
  --f-mono:     'Hanken Grotesk', system-ui, sans-serif;  /* alias: ya no hay monospace */

  /* radios y sombra */
  --r-xs: 4px;
  --r-sm: 8px;
  --r:    12px;
  --r-lg: 20px;
  --r-xl: 28px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.25), 0 2px 8px rgba(0,0,0,.2);
  --shadow:    0 2px 6px rgba(0,0,0,.3), 0 12px 32px rgba(0,0,0,.32);
  --shadow-lg: 0 8px 24px rgba(0,0,0,.4), 0 24px 60px rgba(0,0,0,.45);

  /* layout */
  --maxw: 1180px;
  --nav-h: 70px;

  /* cristal del nav (se recolorea con la paleta) */
  --glass:        rgba(27,30,34,.8);
  --glass-strong: rgba(27,30,34,.92);
}

/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--f-sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
em { font-style: normal; color: var(--sage); font-weight: 600; }   /* acento, nunca cursiva */
::selection { background: var(--sage-soft); }

/* ── Tipografía ───────────────────────────────────────────── */
.display {
  font-family: var(--f-display);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -.025em;
  text-wrap: balance;
}
.display em { font-style: normal; color: var(--sage); }   /* acento por color, nunca cursiva */
h1, h2, h3 { font-family: var(--f-display); font-weight: 600; line-height: 1.05; letter-spacing: -.02em; }

/* etiqueta de apoyo — NO va encima de títulos como kicker; se usa
   solo en sitios funcionales (formularios, datos), nunca decorativa */
.tnum { font-family: var(--f-num); font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.lead { font-size: 1.14rem; color: var(--ink-2); line-height: 1.65; font-weight: 400; text-wrap: pretty; }

/* ── Layout ───────────────────────────────────────────────── */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 32px; }
.section { padding: clamp(4rem, 9vw, 8rem) 0; }
@media (max-width: 640px){ .wrap { padding: 0 20px; } }

/* ── Marca / logo ─────────────────────────────────────────── */
.brand { display: inline-flex; align-items: center; gap: .6rem; }
.brand__mark { height: 32px; width: auto; flex-shrink: 0; }
.brand__logo { height: 50px; width: auto; display: block; flex-shrink: 0; }
@media (max-width: 640px){ .brand__logo { height: 44px; } }
.brand__word {
  font-family: var(--f-display);
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: .005em;
  color: var(--ink);
}
.brand__word b { font-weight: 700; color: var(--sage); }

/* ── Nav ──────────────────────────────────────────────────── */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px;
  background: var(--glass);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.nav.is-scrolled { border-bottom-color: var(--line); background: var(--glass-strong); }
.nav__links { display: flex; align-items: center; gap: 2.2rem; }
.nav__links a:not(.btn) {
  font-size: .82rem; letter-spacing: .04em; color: var(--ink-2);
  transition: color .2s; position: relative; padding: .3rem 0; white-space: nowrap;
}
.nav__links a:not(.btn):hover { color: var(--ink); }
.nav__links a.is-active { color: var(--ink); }
.nav__links a.is-active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 1.5px; background: var(--sage);
}
@media (max-width: 880px){
  .nav { padding: 0 20px; }
  .nav__links { display: none; }
}

/* burger */
.burger { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.burger span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .25s, opacity .25s; }
.burger.is-open span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
.burger.is-open span:nth-child(2){ opacity: 0; }
.burger.is-open span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 880px){ .burger { display: flex; } }

.mobile-menu {
  position: fixed; inset: var(--nav-h) 0 auto 0; z-index: 99;
  background: var(--paper-2); border-bottom: 1px solid var(--line);
  display: none; flex-direction: column; padding: 1rem 20px 1.6rem;
  box-shadow: var(--shadow);
}
.mobile-menu.is-open { display: flex; }
.mobile-menu a {
  padding: 14px 4px; font-size: .98rem; color: var(--ink-2);
  border-bottom: 1px solid var(--line-2);
}
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu .btn { margin-top: 1rem; justify-content: center; }

/* ── Barra de navegación inferior (móvil) — sustituye al menú hamburguesa ── */
.tabbar { display: none; }
@media (max-width: 880px){
  .burger, .mobile-menu { display: none !important; }   /* fuera el hamburguesa */
  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 120;
    display: grid; grid-template-columns: repeat(5, 1fr);
    background: var(--glass-strong);
    backdrop-filter: blur(18px) saturate(1.2);
    -webkit-backdrop-filter: blur(18px) saturate(1.2);
    border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .tabbar a {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 4px; padding: .5rem .2rem .55rem; color: var(--ink-3);
    font-size: .6rem; letter-spacing: .01em; line-height: 1;
    transition: color .2s; position: relative;
  }
  .tabbar a svg { width: 22px; height: 22px; }
  .tabbar a.is-active { color: var(--sage); }
  .tabbar a.is-active::before {
    content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 26px; height: 2px; border-radius: 0 0 3px 3px; background: var(--sage);
  }
  /* pestaña destacada: Reservar (acción principal) */
  .tabbar a.cta { color: var(--clay); font-weight: 600; }
  .tabbar a.cta .fab {
    display: flex; align-items: center; justify-content: center;
    width: 46px; height: 46px; border-radius: 50%;
    background: var(--clay); color: #1B1810; margin-top: -20px; margin-bottom: 3px;
    box-shadow: 0 6px 16px rgba(208,135,85,.45), 0 0 0 4px var(--glass-strong);
  }
  .tabbar a.cta .fab svg { width: 24px; height: 24px; }
  .tabbar a.cta.is-active::before { display: none; }
  /* hueco para que el contenido no quede tapado por la barra fija */
  body { padding-bottom: calc(56px + env(safe-area-inset-bottom)); }
  /* el aviso/toast, por encima de la barra */
  .toast-host { bottom: calc(64px + env(safe-area-inset-bottom)); }
}

/* ── Botones ──────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font-family: var(--f-sans); font-size: .9rem; font-weight: 600;
  letter-spacing: .01em; line-height: 1;
  padding: .85rem 1.5rem; border-radius: 100px;
  transition: transform .2s, background .2s, box-shadow .2s, color .2s, border-color .2s;
  white-space: nowrap; cursor: pointer;
}
.btn svg { width: 1.05em; height: 1.05em; }
.btn--primary { background: var(--clay); color: #1B1810; box-shadow: 0 1px 0 var(--clay-deep); }
.btn--primary:hover { background: var(--clay-deep); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn--dark { background: var(--paper-3); color: var(--ink); border: 1px solid var(--line); }
.btn--dark:hover { transform: translateY(-1px); box-shadow: var(--shadow); border-color: var(--ink-3); }
.btn--sage { background: var(--sage); color: #181A10; }
.btn--sage:hover { background: var(--sage-deep); transform: translateY(-1px); }
.btn--ghost { background: transparent; border: 1px solid var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); background: var(--paper-2); }
.btn--block { width: 100%; }
.btn--lg { padding: 1.05rem 2rem; font-size: 1rem; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none !important; box-shadow: none; }
.btn .arrow { transition: transform .25s; }
.btn:hover .arrow { transform: translateX(3px); }

/* enlaces de texto */
.link {
  font-weight: 600; color: var(--ink); border-bottom: 1.5px solid var(--sage);
  padding-bottom: 1px; transition: color .2s, border-color .2s;
}
.link:hover { color: var(--sage); }

/* ── Chips / pills ────────────────────────────────────────── */
.pill {
  display: inline-flex; align-items: center; gap: .45em;
  font-family: var(--f-mono); font-size: .68rem; letter-spacing: .08em;
  text-transform: uppercase; padding: .35em .8em; border-radius: 100px;
  border: 1px solid var(--line); color: var(--ink-2);
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--sage); }

/* ── Tarjeta ──────────────────────────────────────────────── */
.card {
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 1.8rem;
}

/* ── Placeholder de imagen ────────────────────────────────── */
.ph {
  position: relative; overflow: hidden; border-radius: var(--r);
  background:
    repeating-linear-gradient(135deg, var(--paper-3) 0 12px, var(--sand) 12px 24px);
  display: flex; align-items: center; justify-content: center;
}
.ph::after {
  content: attr(data-label);
  font-family: var(--f-mono); font-size: .7rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-3);
  background: var(--paper-2); padding: .4em .9em; border-radius: 100px;
  border: 1px solid var(--line); text-align: center; max-width: 80%;
}

/* ── Anillos de respiración (motivo de marca) ─────────────── */
.breath { position: absolute; pointer-events: none; opacity: .5; }
.breath circle { fill: none; stroke: var(--sage); stroke-width: 1; }
@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: .5; }
  50%      { transform: scale(1.06); opacity: .8; }
}
.breath--anim { animation: breathe 7s ease-in-out infinite; transform-origin: center; }

/* ── Footer ───────────────────────────────────────────────── */
.footer { background: var(--feature); color: var(--feature-ink); padding: 4rem 0 2.2rem; }
.footer a { color: rgba(236,233,220,.6); transition: color .2s; }
.footer a:hover { color: var(--feature-ink); }
.footer__top {
  display: flex; justify-content: space-between; gap: 3rem; flex-wrap: wrap;
  padding-bottom: 2.5rem; border-bottom: 1px solid var(--feature-line);
}
.footer .brand__word { color: var(--feature-ink); }
.footer .brand__word b { color: var(--sage); }
.footer__cols { display: flex; gap: 4rem; flex-wrap: wrap; }
.footer__col h4 {
  font-family: var(--f-mono); font-size: .68rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--sage); margin-bottom: 1rem; font-weight: 400;
}
.footer__col a { display: block; padding: .3rem 0; font-size: .92rem; }
.footer__bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
  padding-top: 1.8rem; font-size: .78rem; color: rgba(236,233,220,.4);
  font-family: var(--f-mono); letter-spacing: .03em;
}
@media (max-width: 640px){
  .footer__cols { gap: 2.5rem; }
  .footer__bottom { flex-direction: column; }
}

/* ── Reveal en scroll ─────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(26px); }
.reveal.is-in { animation: revealIn .8s cubic-bezier(.2,.7,.2,1) forwards; }
@keyframes revealIn { to { opacity: 1; transform: none; } }
.reveal.d1 { animation-delay: .08s; }
.reveal.d2 { animation-delay: .16s; }
.reveal.d3 { animation-delay: .24s; }
.reveal.d4 { animation-delay: .32s; }
@media (prefers-reduced-motion: reduce){
  .reveal { opacity: 1; transform: none; animation: none; }
  .breath--anim { animation: none; }
}

/* ── Modal / drawer ───────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 250;
  background: rgba(37,41,31,.4); backdrop-filter: blur(3px);
  display: none; align-items: flex-end; justify-content: center;
  opacity: 0; transition: opacity .25s;
}
.modal-backdrop.is-open { display: flex; opacity: 1; }
@media (min-width: 640px){ .modal-backdrop { align-items: center; padding: 24px; } }
.modal {
  background: var(--paper-2); width: 100%; max-width: 460px; position: relative;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  box-shadow: var(--shadow-lg); padding: 1.8rem;
  transform: translateY(20px); transition: transform .3s cubic-bezier(.2,.7,.2,1);
  max-height: 92vh; overflow-y: auto;
}
.modal-backdrop.is-open .modal { transform: none; }
@media (min-width: 640px){ .modal { border-radius: var(--r-lg); } }
.modal__close {
  position: absolute; top: 1rem; right: 1rem; width: 34px; height: 34px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: var(--ink-2); font-size: 1.2rem; transition: background .2s; z-index: 2;
}
.modal__close:hover { background: var(--paper-3); }
.modal__head { position: relative; }

/* ── Campos de formulario ─────────────────────────────────── */
.field { margin-bottom: 1rem; }
.field label { display: block; font-family: var(--f-mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: .45rem; }
.field input, .field select, .field textarea {
  width: 100%; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: .8rem 1rem; font-size: .95rem;
  outline: none; transition: border-color .2s, box-shadow .2s; -webkit-appearance: none; font-family: var(--f-sans);
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--sage); box-shadow: 0 0 0 3px var(--sage-soft); }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-4); }
.field textarea { resize: vertical; min-height: 72px; }
.field.has-error input, .field.has-error select { border-color: var(--err); }
.field__err { font-size: .76rem; color: var(--err); margin-top: .3rem; display: none; }
.field.has-error .field__err { display: block; }

/* ── Toast ────────────────────────────────────────────────── */
.toast-host { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: .6rem; align-items: center; }
.toast {
  background: var(--paper-3); color: var(--ink); padding: .85rem 1.3rem;
  border-radius: 100px; font-size: .88rem; box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
  display: flex; align-items: center; gap: .6rem;
  animation: toastIn .3s cubic-bezier(.2,.7,.2,1);
}
.toast .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--sage); }
.toast.is-err .dot { background: #E2917F; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
