/* bookr — master brand hub. Sistema de diseño heredado de BookrMD. */

:root {
  --paper: #f7f8f4;
  --paper2: #eff2ea;
  --ink: #0c1f1a;
  --ink-soft: rgba(12, 31, 26, 0.68);
  --line: #e3e7dc;

  /* Azul maestro bookr */
  --brand: #1d4ed8;
  --brand-deep: #1733a6;
  --brand-100: #e6ecff;

  /* Colores por vertical (fuente: imagen de marca) */
  --style: #7c3aed;   /* Barber, uñas, tattoo, belleza */
  --style-100: #ede9fe;
  --md: #2563eb;      /* Médicos, psicólogos */
  --md-100: #e2ebff;
  --fit: #16a34a;     /* Gyms, yoga, fitness */
  --fit-100: #dcf5e6;
  --vet: #ea580c;     /* Veterinarios, mascotas */
  --vet-100: #fde8d8;
  --legal: #6d28d9;   /* Abogados */
  --legal-100: #ede9fe;
  --tax: #dc2626;     /* Contadores */
  --tax-100: #fee2e2;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
::selection { background: var(--brand); color: #fff; }
body { text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }

/* --- type helpers --- */
.h-display { font-weight: 600; letter-spacing: -0.045em; line-height: 0.96; }
.h2 { font-weight: 600; letter-spacing: -0.035em; line-height: 1.05; font-size: clamp(1.9rem, 4.2vw, 3.1rem); }

.eyebrow {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--brand); display: inline-flex; align-items: center; gap: 0.6rem;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--brand); opacity: 0.55; }

.serif-accent { font-family: "Newsreader", Georgia, serif; font-style: italic; font-weight: 400; letter-spacing: -0.01em; }

/* --- buttons --- */
.btn-primary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--brand); color: #fff; font-weight: 600; font-size: 14px;
  padding: 0.72rem 1.25rem; border-radius: 0.75rem;
  transition: transform 0.35s cubic-bezier(0.16,1,0.3,1), background 0.2s, box-shadow 0.35s;
  box-shadow: 0 1px 0 rgba(12,31,26,0.08);
}
.btn-primary:hover { background: var(--brand-deep); transform: translateY(-1px); box-shadow: 0 10px 24px -12px rgba(29,78,216,0.5); }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 600; font-size: 14px;
  padding: 0.72rem 1.25rem; border-radius: 0.75rem; border: 1px solid var(--line);
  color: var(--ink); background: transparent; transition: border-color 0.2s, background 0.2s;
}
.btn-ghost:hover { border-color: var(--brand); background: var(--brand-100); }

/* --- nav --- */
.nav-link { padding: 0.5rem 0.75rem; border-radius: 0.6rem; transition: color 0.2s, background 0.2s; }
.nav-link:hover { color: var(--ink); background: var(--brand-100); }

/* --- chip --- */
.chip {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 11px; letter-spacing: 0.08em;
  padding: 0.3rem 0.7rem; border-radius: 999px; background: var(--brand-100); color: var(--brand-deep);
}
.chip.on-dark { background: rgba(255,255,255,0.1); color: #cdd8ff; }

/* --- brand-family connector (motivo maestro: 4 nodos de color en una línea) --- */
.familyline { width: 100%; overflow: visible; }
.familyline path { fill: none; stroke: rgba(12,31,26,0.16); stroke-width: 2; stroke-linecap: round; }
.familyline circle { stroke: #fff; stroke-width: 3; }
.js .familyline path { stroke-dasharray: 1200; stroke-dashoffset: 1200; }
.js .familyline.reveal-visible path, .familyline.play path { animation: fl-draw 1.8s cubic-bezier(0.4,0,0.2,1) forwards; }
@keyframes fl-draw { to { stroke-dashoffset: 0; } }
.pulse-dot { animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

/* --- vertical cards --- */
.vcard {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: 1.25rem;
  overflow: hidden;
  transition: transform 0.45s cubic-bezier(0.16,1,0.3,1), box-shadow 0.45s, border-color 0.3s;
}
.vcard::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--accent);
  transform: scaleX(0); transform-origin: left; transition: transform 0.45s cubic-bezier(0.16,1,0.3,1);
}
.vcard:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); box-shadow: 0 28px 56px -28px rgba(12,31,26,0.22); }
.vcard:hover::before { transform: scaleX(1); }
.vcard.soon { opacity: 0.96; }
.vcard.soon:hover { transform: translateY(-2px); }

.vicon { width: 3rem; height: 3rem; border-radius: 0.9rem; display: grid; place-items: center;
  background: var(--accent-100); color: var(--accent); }
.vsuffix { color: var(--accent); }

.status-live { display: inline-flex; align-items: center; gap: 0.4rem; font-family: "JetBrains Mono", monospace;
  font-size: 11px; letter-spacing: 0.06em; color: var(--accent); }
.status-live .dot { width: 7px; height: 7px; border-radius: 999px; background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.status-soon { font-family: "JetBrains Mono", monospace; font-size: 11px; letter-spacing: 0.06em;
  color: var(--ink-soft); border: 1px dashed var(--line); border-radius: 999px; padding: 0.25rem 0.6rem; }

/* --- pillars --- */
.pillar-ic { width: 2.5rem; height: 2.5rem; border-radius: 0.75rem; display: grid; place-items: center;
  background: #fff; border: 1px solid var(--line); color: var(--brand); }

/* --- scroll reveal (progressive enhancement: sólo se oculta si hay JS) --- */
.js .reveal { opacity: 0; transform: translateY(22px);
  transition: opacity 0.8s cubic-bezier(0.16,1,0.3,1), transform 0.8s cubic-bezier(0.16,1,0.3,1); }
.reveal-visible, .js .reveal-visible { opacity: 1; transform: translateY(0); }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }
.reveal[data-delay="4"] { transition-delay: 0.32s; }

/* --- textures --- */
.bg-grid {
  background-image:
    linear-gradient(rgba(29,78,216,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29,78,216,0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, black 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, black 40%, transparent 100%);
}
.grain::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.03 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.section-dark { background: var(--ink); color: var(--paper); }
.footer-link { transition: color 0.2s; }
.footer-link:hover { color: #fff; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .familyline path { animation: none; stroke-dashoffset: 0; }
  .familyline circle { opacity: 1; animation: none; }
  .pulse-dot { animation: none; }
}
