/* ═══════════════════════════════════════════════════════════════
   AppGestion — Design System v1
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* Brand */
  --primary:    #6366f1;
  --primary-d:  #4f46e5;
  --purple:     #a855f7;
  --pink:       #ec4899;
  --gradient:   linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
  --gradient-soft: linear-gradient(135deg, #eef2ff 0%, #faf5ff 50%, #fdf2f8 100%);

  /* Product accents */
  --barber:     #f59e0b;
  --barber-d:   #ea580c;
  --barber-grad: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  --clinic:     #14b8a6;
  --clinic-d:   #0d9488;
  --clinic-grad: linear-gradient(135deg, #14b8a6 0%, #4a6b58 100%);

  /* Neutrals */
  --bg:         #ffffff;
  --bg-soft:    #f8fafc;
  --bg-dark:    #0f172a;
  --text:       #0f172a;
  --text-soft:  #334155;
  --muted:      #64748b;
  --border:     #e2e8f0;
  --border-d:   #cbd5e1;

  /* Layout */
  --container: 1180px;
  --radius:    14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 3px rgba(15,23,42,0.06), 0 1px 2px rgba(15,23,42,0.04);
  --shadow:    0 10px 30px -10px rgba(15,23,42,0.18), 0 2px 6px rgba(15,23,42,0.05);
  --shadow-lg: 0 25px 50px -12px rgba(15,23,42,0.25);
  --shadow-color: 0 20px 40px -15px rgba(99,102,241,0.4);
}

*,*::before,*::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Inter', 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px; line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

/* ── Container ───────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.container-narrow { max-width: 820px; }

/* ── Typography ──────────────────────────────────────────── */
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.35rem; }
.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--primary);
  margin-bottom: 14px;
}
.lead { font-size: 1.18rem; color: var(--text-soft); max-width: 60ch; }
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ── Header / Nav ────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(15,23,42,0.06);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.nav-logo img { height: 32px; }
.nav-links { display: flex; gap: 30px; align-items: center; }
.nav-links a {
  font-size: 0.95rem; font-weight: 500; color: var(--text-soft);
  transition: color .15s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-cta {
  background: var(--gradient);
  color: #fff !important;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 600 !important;
  font-size: 0.9rem !important;
  transition: transform .15s, box-shadow .15s;
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: var(--shadow-color); }
.nav-toggle {
  display: none;
  background: transparent; border: none; padding: 6px;
  font-size: 24px; color: var(--text);
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 24px;
  border: none; border-radius: 11px;
  font-size: 0.97rem; font-weight: 600;
  cursor: pointer;
  transition: all .18s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--gradient); color: #fff;
  box-shadow: 0 8px 22px -8px rgba(99,102,241,0.55);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 32px -8px rgba(99,102,241,0.6); }
.btn-ghost {
  background: rgba(255,255,255,0.7);
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover { background: #fff; border-color: var(--border-d); }
.btn-dark { background: var(--bg-dark); color: #fff; }
.btn-dark:hover { background: #1e293b; }
.btn-lg { padding: 17px 32px; font-size: 1.05rem; }

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: 80px 0 120px;
  overflow: hidden;
  background: var(--gradient-soft);
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(99,102,241,0.18), transparent 40%),
    radial-gradient(circle at 85% 60%, rgba(236,72,153,0.15), transparent 45%),
    radial-gradient(circle at 50% 100%, rgba(168,85,247,0.12), transparent 50%);
  pointer-events: none;
}
.hero-inner { position: relative; text-align: center; max-width: 820px; margin: 0 auto; }
.hero h1 { margin-bottom: 22px; }
.hero p.lead { margin: 0 auto 36px; text-align: center; }
.hero-ctas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-stats {
  display: flex; gap: 50px; justify-content: center; flex-wrap: wrap;
  margin-top: 60px; padding-top: 40px;
  border-top: 1px solid rgba(15,23,42,0.06);
}
.hero-stats > div { text-align: center; }
.hero-stats strong {
  display: block; font-size: 2rem; font-weight: 700;
  background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-stats span { font-size: 0.85rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }

/* ── Section ─────────────────────────────────────────────── */
section.section { padding: 96px 0; }
section.section-soft { background: var(--bg-soft); }
section.section-dark { background: var(--bg-dark); color: #fff; }
section.section-dark h2, section.section-dark h3 { color: #fff; }
section.section-dark .lead { color: #cbd5e1; }
.section-header { text-align: center; max-width: 720px; margin: 0 auto 64px; }
.section-header .lead { margin-left: auto; margin-right: auto; }

/* ── Cards ───────────────────────────────────────────────── */
.cards { display: grid; gap: 28px; }
.cards-2 { grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); }
.cards-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.cards-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: transparent;
}
.card-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px;
  border-radius: 13px;
  background: var(--gradient-soft);
  font-size: 26px;
  margin-bottom: 18px;
}
.card h3 { margin-bottom: 10px; }
.card p { color: var(--text-soft); margin: 0; }

/* Product card */
.product-card {
  position: relative;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--border);
  background: #fff;
}
.product-card-banner {
  height: 200px;
  background: var(--gradient);
  position: relative;
  overflow: hidden;
}
.product-card-banner.barber { background: var(--barber-grad); }
.product-card-banner.clinic { background: var(--clinic-grad); }
.product-card-banner::after {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 80% 20%, rgba(255,255,255,0.25), transparent 50%),
    radial-gradient(circle at 20% 80%, rgba(255,255,255,0.15), transparent 50%);
}
.product-card-banner-icon {
  position: absolute; bottom: 24px; left: 24px;
  font-size: 60px; opacity: 0.85; line-height: 1;
}
.banner-illustration {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
}
.product-card-body { padding: 30px 32px; }
.product-card-tag {
  display: inline-block; font-size: 0.72rem; font-weight: 600;
  padding: 4px 10px; border-radius: 999px;
  background: var(--bg-soft); color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 14px;
}
.product-card h3 { font-size: 1.6rem; }
.product-card ul {
  list-style: none; padding: 0; margin: 18px 0 24px;
  display: grid; gap: 8px;
}
.product-card ul li {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 0.95rem; color: var(--text-soft);
}
.product-card ul li::before {
  content: '✓';
  flex-shrink: 0; width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--bg-soft); color: var(--primary);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 11px;
}
.product-card.barber ul li::before { color: var(--barber); }
.product-card.clinic ul li::before { color: var(--clinic-d); }

/* Screenshot placeholders */
.screenshot {
  background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  aspect-ratio: 16/10;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
  font-size: 0.85rem; text-align: center; padding: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.screenshot::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,0.7), rgba(255,255,255,0.3));
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.screenshot::after {
  content: '';
  position: absolute; top: 6px; left: 10px;
  width: 8px; height: 8px; border-radius: 50%;
  background: #cbd5e1;
  box-shadow: 14px 0 0 #cbd5e1, 28px 0 0 #cbd5e1;
}
.screenshot-label {
  position: relative;
  background: #fff;
  padding: 10px 16px; border-radius: 10px;
  border: 1px dashed var(--border-d);
  font-weight: 500;
}
.screenshot img { width: 100%; height: 100%; object-fit: cover; }

/* Feature grid */
.feat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.feat {
  padding: 24px;
  border-radius: var(--radius);
  background: var(--bg-soft);
  border: 1px solid transparent;
  transition: all .2s;
}
.feat:hover { background: #fff; border-color: var(--border); transform: translateY(-2px); }
.feat-icon { font-size: 28px; margin-bottom: 12px; display: block; }
.feat h4 { font-size: 1.05rem; margin: 0 0 6px; font-weight: 600; }
.feat p { color: var(--text-soft); font-size: 0.9rem; margin: 0; line-height: 1.55; }

/* ── Pricing ─────────────────────────────────────────────── */
.pricing-table {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
  margin-top: 40px;
}
.plan {
  background: #fff;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  position: relative;
  transition: transform .25s, box-shadow .25s;
}
.plan:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.plan.featured {
  border-color: var(--primary);
  background: linear-gradient(180deg, #fff 0%, #faf9ff 100%);
  box-shadow: var(--shadow-color);
  transform: scale(1.03);
}
.plan.featured:hover { transform: scale(1.03) translateY(-4px); }
.plan-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--gradient); color: #fff;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 14px; border-radius: 999px;
}
.plan-name { font-size: 0.9rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px; }
.plan-price { font-size: 2.6rem; font-weight: 700; line-height: 1; margin: 12px 0 4px; }
.plan-price small { font-size: 0.95rem; font-weight: 400; color: var(--muted); }
.plan-desc { color: var(--text-soft); font-size: 0.95rem; min-height: 48px; margin-bottom: 22px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 10px; }
.plan ul li { display: flex; gap: 9px; font-size: 0.92rem; color: var(--text-soft); }
.plan ul li::before { content: '✓'; color: var(--primary); font-weight: 700; flex-shrink: 0; }
.plan ul li.muted { color: var(--muted); }
.plan ul li.muted::before { content: '·'; color: var(--border-d); }
.plan .btn { width: 100%; justify-content: center; }

/* ── Contact form ────────────────────────────────────────── */
.form-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr 1fr;
}
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text-soft); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: inherit; font-size: 0.97rem;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}
.field textarea { min-height: 130px; resize: vertical; }
.form-msg {
  padding: 14px 16px; border-radius: 10px; font-size: 0.95rem;
  margin-bottom: 14px;
}
.form-msg.success { background: #ecfdf5; color: #065f46; border: 1px solid #6ee7b7; }
.form-msg.error { background: #fef2f2; color: #991b1b; border: 1px solid #fca5a5; }

/* ── FAQ ─────────────────────────────────────────────────── */
.faq details {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 22px;
  margin-bottom: 12px;
  transition: border-color .15s;
}
.faq details[open] { border-color: var(--primary); }
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 0;
  font-weight: 600;
  font-size: 1.02rem;
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  font-size: 26px; font-weight: 300; color: var(--primary);
  transition: transform .2s;
  line-height: 1;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 0 18px; color: var(--text-soft); line-height: 1.65; }

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
  background: var(--bg-dark);
  color: #cbd5e1;
  padding: 70px 0 30px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 50px;
  margin-bottom: 50px;
}
.footer-brand img { height: 30px; filter: brightness(0) invert(1); }
.footer-brand p { margin: 16px 0 0; color: #94a3b8; font-size: 0.92rem; line-height: 1.6; }
.footer-col h4 { color: #fff; font-size: 0.92rem; margin: 0 0 16px; font-weight: 600; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.footer-col a { color: #94a3b8; font-size: 0.92rem; transition: color .15s; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px;
  padding-top: 26px; border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 0.85rem; color: #64748b;
}

/* ── Animations ──────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
.floating { animation: float 6s ease-in-out infinite; }

/* ── CTA banner ──────────────────────────────────────────── */
.cta-banner {
  background: var(--gradient);
  border-radius: var(--radius-lg);
  padding: 60px;
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 80% 20%, rgba(255,255,255,0.2), transparent 40%),
    radial-gradient(circle at 20% 80%, rgba(0,0,0,0.15), transparent 40%);
  pointer-events: none;
}
.cta-banner h2, .cta-banner p { position: relative; color: #fff; }
.cta-banner h2 { margin-bottom: 16px; }
.cta-banner p { font-size: 1.1rem; opacity: 0.95; max-width: 540px; margin: 0 auto 28px; }
.cta-banner .btn { position: relative; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 860px) {
  .nav-links { display: none; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; gap: 0; background: #fff; padding: 12px 0; box-shadow: 0 12px 24px -8px rgba(15,23,42,0.12); border-bottom: 1px solid var(--border); }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 24px; width: 100%; }
  .nav-links a.nav-cta { margin: 12px 24px; width: calc(100% - 48px); justify-content: center; }
  .nav-toggle { display: block; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .footer-brand { grid-column: 1 / -1; }
  .hero { padding: 50px 0 80px; }
  section.section { padding: 64px 0; }
  .cta-banner { padding: 40px 24px; }
  .pricing-table .plan.featured { transform: none; }
  .form-grid { grid-template-columns: 1fr; }
}

/* ═══ Lightbox para capturas ═══ */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.93);
  display: none;
  align-items: center; justify-content: center;
  z-index: 9999;
  padding: 30px;
  cursor: zoom-out;
  animation: lb-fade .2s ease-out;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 95vw;
  max-height: 92vh;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  animation: lb-zoom .25s ease-out;
  cursor: default;
}
.lightbox-close {
  position: absolute;
  top: 18px; right: 22px;
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: none;
  font-size: 22px; font-weight: 700;
  width: 44px; height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, transform .15s;
}
.lightbox-close:hover { background: rgba(255,255,255,0.32); transform: scale(1.08); }
@keyframes lb-fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes lb-zoom { from { transform: scale(0.94); opacity: 0 } to { transform: scale(1); opacity: 1 } }

/* Indica que las capturas son ampliables */
.screenshot.real img,
.mobile-frame img { cursor: zoom-in; transition: transform .2s; }
.screenshot.real:hover img { transform: scale(1.01); }

body.lb-open { overflow: hidden; }

/* ═══ Botón flotante de WhatsApp ═══ */
.wa-fab {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px -6px rgba(37, 211, 102, 0.55), 0 4px 12px rgba(0,0,0,0.15);
  z-index: 998;
  text-decoration: none;
  transition: transform .2s, box-shadow .2s;
  animation: wa-pulse 2.4s ease-in-out infinite;
}
.wa-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 12px 32px -6px rgba(37, 211, 102, 0.7), 0 6px 16px rgba(0,0,0,0.18);
  animation: none;
}
.wa-fab svg { width: 32px; height: 32px; fill: #fff; }
.wa-fab-tooltip {
  position: absolute;
  right: 72px;
  background: #1a1a2e;
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.88rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  transform: translateX(8px);
}
.wa-fab-tooltip::after {
  content: '';
  position: absolute;
  right: -5px; top: 50%; transform: translateY(-50%);
  border: 5px solid transparent;
  border-left-color: #1a1a2e;
}
.wa-fab:hover .wa-fab-tooltip {
  opacity: 1;
  transform: translateX(0);
}
@keyframes wa-pulse {
  0%, 100% { box-shadow: 0 8px 24px -6px rgba(37, 211, 102, 0.55), 0 4px 12px rgba(0,0,0,0.15), 0 0 0 0 rgba(37, 211, 102, 0.5); }
  50%      { box-shadow: 0 8px 24px -6px rgba(37, 211, 102, 0.55), 0 4px 12px rgba(0,0,0,0.15), 0 0 0 14px rgba(37, 211, 102, 0); }
}
@media (max-width: 640px) {
  .wa-fab { width: 54px; height: 54px; bottom: 16px; right: 16px; }
  .wa-fab svg { width: 28px; height: 28px; }
  .wa-fab-tooltip { display: none; }
}
