/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --bg: #0a0e14;
  --bg-2: #0f1420;
  --card: #131926;
  --card-line: rgba(255,255,255,0.08);
  --ink: #f5f7fa;
  --ink-soft: rgba(245,247,250,0.72);
  --ink-mute: rgba(245,247,250,0.5);
  --cyan: #22d3ee;
  --magenta: #c026d3;
  --grad: linear-gradient(120deg, var(--cyan), var(--magenta));

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3 { text-wrap: balance; line-height: 1.05; letter-spacing: -0.02em; font-weight: 800; }
::selection { background: var(--magenta); color: #fff; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }

.skip-link { position: fixed; top: -100px; left: 1rem; z-index: 9999; padding: .6rem 1rem; background: var(--ink); color: var(--bg); border-radius: 8px; font-weight: 700; }
.skip-link:focus { top: 1rem; }

.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* =============================================================
   3. Nav
   ============================================================= */
.nav-wrap { position: sticky; top: 0; z-index: 100; }
.nav { max-width: 1180px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.2rem 1.4rem; transition: background .3s, padding .3s, border-color .3s; border-bottom: 1px solid transparent; }
.nav-wrap.is-scrolled .nav { background: rgba(10,14,20,0.75); backdrop-filter: blur(16px) saturate(160%); -webkit-backdrop-filter: blur(16px) saturate(160%); padding: .85rem 1.4rem; border-color: var(--card-line); }
.nav-logo { display: flex; align-items: center; gap: .5rem; font-weight: 800; font-size: 1.15rem; letter-spacing: -0.01em; }
.nav-links { display: none; gap: 2rem; font-size: .92rem; color: var(--ink-soft); font-weight: 500; }
.nav-links a { transition: color .2s; }
.nav-links a:hover { color: var(--ink); }
@media (min-width: 880px) { .nav-links { display: flex; } }

.nav-toggle { display: none; }

@media (max-width: 879px) {
  .nav { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; }
  .nav-toggle {
    display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
    width: 38px; height: 38px; grid-column: 1; justify-self: start; border-radius: 10px;
  }
  .nav-toggle:hover { background: rgba(255,255,255,0.06); }
  .nav-toggle-bar { display: block; width: 20px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .3s var(--ease-out), opacity .3s var(--ease-out); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav-logo { grid-column: 2; justify-self: center; }
  .nav .btn.nav-cta { display: none; }
}

/* =============================================================
   3b. Mobile menu (side panel)
   ============================================================= */
.mobile-menu-overlay {
  position: fixed; inset: 0; z-index: 290; background: rgba(6,7,10,0.6);
  opacity: 0; pointer-events: none; transition: opacity .35s var(--ease-out);
}
.mobile-menu-overlay.is-open { opacity: 1; pointer-events: auto; }

.mobile-menu {
  position: fixed; top: 0; left: 0; z-index: 300;
  width: min(78vw, 300px); height: 100dvh;
  background: var(--bg-2); border-right: 1px solid var(--card-line);
  padding: 1.3rem 1.3rem 2rem;
  display: flex; flex-direction: column;
  transform: translateX(-100%);
  transition: transform .4s var(--ease-out);
  overflow-y: auto;
}
.mobile-menu.is-open { transform: translateX(0); }
.mobile-menu-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--card-line); }
.mobile-menu-brand { display: flex; align-items: center; gap: .5rem; font-weight: 800; font-size: 1.02rem; }
.mobile-menu-close { width: 34px; height: 34px; border-radius: 50%; background: var(--card); color: var(--ink); display: flex; align-items: center; justify-content: center; }
.mobile-menu-link { padding: 1.05rem .4rem; font-size: 1.05rem; font-weight: 600; color: var(--ink-soft); border-bottom: 1px solid var(--card-line); transition: color .2s; }
.mobile-menu-link:hover, .mobile-menu-link:active { color: var(--ink); }
body.menu-open { overflow: hidden; }

@media (min-width: 880px) { .mobile-menu, .mobile-menu-overlay { display: none; } }

/* =============================================================
   4. Buttons
   ============================================================= */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; padding: .8rem 1.4rem; border-radius: 999px; font-weight: 700; font-size: .92rem; transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out), background .3s, color .3s, border-color .3s; white-space: nowrap; }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(34,211,238,0.18); }
.btn-ghost { border: 1.5px solid var(--card-line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); }
.btn-sm { padding: .6rem 1.1rem; font-size: .82rem; }
.btn-lg { padding: 1rem 1.9rem; font-size: 1rem; }
.btn-block { width: 100%; }

/* =============================================================
   5. Hero
   ============================================================= */
.hero { position: relative; min-height: 92svh; display: flex; align-items: center; overflow: clip; padding: 5rem 1.4rem; }
.hero-gradient {
  position: absolute; inset: -20%; z-index: -2;
  background:
    radial-gradient(circle 560px at var(--mx, 30%) var(--my, 35%), rgba(34,211,238,0.28), transparent 60%),
    radial-gradient(circle 620px at calc(100% - var(--mx, 30%)) calc(100% - var(--my, 35%)), rgba(192,38,211,0.26), transparent 60%),
    var(--bg);
  filter: blur(60px) saturate(140%);
  transition: background .4s ease;
}
.hero-bracket { position: absolute; right: -6%; top: 50%; transform: translateY(-50%); width: 46vw; max-width: 620px; color: rgba(255,255,255,0.05); z-index: -1; pointer-events: none; }
.hero-inner { max-width: 900px; margin: 0 auto; text-align: center; }
.eyebrow { font-size: .86rem; font-weight: 600; color: var(--cyan); margin-bottom: 1.3rem; letter-spacing: .01em; }
.hero-title { font-size: clamp(2.6rem, 7.4vw, 5.4rem); font-weight: 800; line-height: 1.2; }
.hero-title span { display: block; padding-bottom: 0.08em; }
.hero-sub { margin: 1.6rem auto 0; max-width: 54ch; font-size: 1.12rem; color: var(--ink-soft); }
.hero-actions { margin-top: 2.4rem; display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero-trust { margin-top: 1.4rem; font-size: .82rem; color: var(--ink-mute); }

/* =============================================================
   6. Insight statement
   ============================================================= */
.insight { max-width: 900px; margin: 0 auto; padding: 5rem 1.4rem; text-align: center; }
.insight-text { font-size: clamp(1.4rem, 2.8vw, 2rem); font-weight: 700; letter-spacing: -0.01em; line-height: 1.35; }
.insight-text em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.insight-sub { margin-top: 1.4rem; color: var(--ink-mute); font-size: .8rem; max-width: 56ch; margin-inline: auto; }
.insight-sub a { color: var(--ink-mute); text-decoration: underline; }
.insight-sub a:hover { color: var(--cyan); }

/* =============================================================
   7. Sections
   ============================================================= */
.section { max-width: 1180px; margin: 0 auto; padding: 5rem 1.4rem; }
.section-head { max-width: 680px; margin-bottom: 3rem; }
.section-head h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
.section-sub { margin-top: 1rem; color: var(--ink-mute); font-size: 1rem; max-width: 60ch; }
.section-dark { max-width: none; background: var(--bg-2); padding: 5.5rem 1.4rem; }
.section-dark .section-head { max-width: 680px; margin-inline: auto; text-align: center; }
.section-dark .section-sub { margin-inline: auto; }

/* =============================================================
   8. Feature grid
   ============================================================= */
.features-grid { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.feature-card { background: var(--card); border: 1px solid var(--card-line); border-radius: 20px; padding: 1.7rem; transition: transform .4s var(--ease-out), border-color .4s; }
.feature-card:hover { transform: translateY(-6px); border-color: rgba(34,211,238,0.35); }
.feature-icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; background: rgba(34,211,238,0.12); color: var(--cyan); margin-bottom: 1rem; }
.feature-card h3 { font-size: 1.05rem; margin-bottom: .4rem; }
.feature-card p { color: var(--ink-mute); font-size: .92rem; }

/* =============================================================
   9. Demos grid + browser mockup
   ============================================================= */
.demos-grid { display: grid; gap: 1.6rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); max-width: 1180px; margin: 0 auto; }
.demo-card { display: block; background: var(--card); border: 1px solid var(--card-line); border-radius: 18px; overflow: hidden; transition: transform .45s var(--ease-out), border-color .45s, box-shadow .45s var(--ease-out); }
.demo-card:hover { transform: translateY(-8px) rotateX(2deg); border-color: rgba(34,211,238,0.4); box-shadow: 0 30px 60px rgba(0,0,0,0.4); }

.demo-preview { position: relative; aspect-ratio: 16/11; padding: 1.6rem; display: flex; flex-direction: column; justify-content: center; gap: .8rem; overflow: hidden; }
.demo-preview-kicker { font-size: .68rem; font-weight: 700; letter-spacing: .03em; opacity: .85; }
.demo-preview-title { font-size: 1.3rem; font-weight: 800; line-height: 1.15; }
.demo-preview-italic { font-style: italic; font-weight: 600; font-family: Georgia, "Times New Roman", serif; }
.demo-preview-pill { align-self: flex-start; font-size: .68rem; font-weight: 700; padding: .4rem .8rem; border-radius: 999px; margin-top: .3rem; }

.demo-preview-dental { background: radial-gradient(circle at 30% 20%, rgba(20,184,166,0.5), transparent 55%), radial-gradient(circle at 80% 80%, rgba(56,189,248,0.4), transparent 55%), #0f2e2a; color: #eefaf8; }
.demo-preview-dental .demo-preview-kicker { color: #5eead4; }
.demo-preview-dental .demo-preview-pill { background: #eefaf8; color: #0f2e2a; }

.demo-preview-hotel { background: linear-gradient(160deg, #f0d3ad 0%, #dfa679 55%, #a6704a 100%); color: #241f18; }
.demo-preview-hotel .demo-preview-kicker { color: #4a3826; }
.demo-preview-hotel .demo-preview-pill { background: #241f18; color: #f6f0e4; }

.demo-preview-spa { background: radial-gradient(circle at 25% 25%, rgba(201,138,156,0.7), transparent 55%), radial-gradient(circle at 85% 75%, rgba(207,162,92,0.55), transparent 55%), #fdf3f1; color: #3a1620; }
.demo-preview-spa .demo-preview-kicker { color: #8a4f5f; }
.demo-preview-spa .demo-preview-pill { background: #4a1c28; color: #fdf3f1; }

.demo-caption { padding: 1.4rem 1.5rem 1.6rem; }
.demo-caption h3 { font-size: 1.1rem; margin-bottom: .4rem; }
.demo-caption p { color: var(--ink-mute); font-size: .88rem; margin-bottom: 1rem; }
.demo-cta { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; font-weight: 700; color: var(--cyan); }

/* =============================================================
   10. Plans
   ============================================================= */
.plans-section { max-width: 1180px; }
.plans-columns { display: grid; gap: 1.6rem; align-items: start; }
@media (min-width: 900px) { .plans-columns { grid-template-columns: 1fr 1fr; gap: 2rem; } }

.plan-col { position: relative; background: var(--card); border: 1px solid var(--card-line); border-radius: 24px; padding: 2.2rem; display: flex; flex-direction: column; }
.plan-col-featured { border-color: rgba(34,211,238,0.4); background: linear-gradient(165deg, rgba(34,211,238,0.08), rgba(192,38,211,0.06)), var(--card); }
.plan-badge { position: absolute; top: -12px; right: 1.8rem; background: var(--grad); color: #06070a; font-size: .72rem; font-weight: 800; padding: .3rem .8rem; border-radius: 999px; }

.plan-col-head { padding-bottom: 1.6rem; margin-bottom: 1.6rem; border-bottom: 1px solid var(--card-line); }
.plan-col-head h3 { font-size: 1.5rem; margin-bottom: .5rem; }
.plan-col-price { font-size: 2.2rem; font-weight: 800; margin-bottom: 1rem; }
.plan-col-price span { font-size: .9rem; font-weight: 600; color: var(--ink-mute); }
.plan-col-desc { color: var(--ink-soft); font-size: .95rem; max-width: 48ch; }

.plan-block { margin-bottom: 1.8rem; }
.plan-block h4 { font-size: .82rem; font-weight: 700; letter-spacing: .01em; color: var(--cyan); margin-bottom: 1rem; }
.plan-col-featured .plan-block h4 { color: var(--cyan); }

.plan-list { display: flex; flex-direction: column; gap: .85rem; }
.plan-list li { display: flex; align-items: flex-start; gap: .65rem; font-size: .92rem; color: var(--ink-soft); line-height: 1.5; }
.plan-list li svg { flex-shrink: 0; margin-top: .15rem; }
.plan-list .li-check { color: var(--cyan); }
.plan-list-no li { color: var(--ink-mute); }
.plan-list-no .li-no { color: var(--ink-mute); }

.plan-col .btn-block { margin-top: auto; }

.plans-shared { margin-top: 2rem; background: var(--card); border: 1px solid var(--card-line); border-radius: 24px; padding: 2rem 2.2rem; }
.plans-shared h4 { font-size: .95rem; font-weight: 700; margin-bottom: 1.3rem; }
.plans-shared-list { grid-template-columns: 1fr; }
@media (min-width: 760px) { .plans-shared-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.4rem 2rem; } }

/* =============================================================
   11. Process
   ============================================================= */
.process-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.process-num { display: block; font-size: 1.6rem; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: .8rem; }
.process-step h3 { font-size: 1.1rem; margin-bottom: .5rem; }
.process-step p { color: var(--ink-mute); font-size: .92rem; }

/* =============================================================
   12. CTA final
   ============================================================= */
.cta-final { position: relative; text-align: center; padding: 6rem 1.4rem; overflow: clip; }
.cta-gradient { position: absolute; inset: -20%; z-index: -1; background: radial-gradient(circle at 50% 40%, rgba(34,211,238,0.2), transparent 55%), radial-gradient(circle at 60% 60%, rgba(192,38,211,0.18), transparent 55%), var(--bg); filter: blur(60px); }
.cta-final h2 { font-size: clamp(2rem, 4.2vw, 2.8rem); margin-bottom: .9rem; }
.cta-final p { color: var(--ink-mute); margin-bottom: 2rem; max-width: 50ch; margin-inline: auto; }

/* =============================================================
   13. Footer
   ============================================================= */
.footer { max-width: 1180px; margin: 0 auto; padding: 3rem 1.4rem 3.5rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.2rem; border-top: 1px solid var(--card-line); }
.footer-logo { display: flex; align-items: center; gap: .5rem; font-weight: 800; }
.footer-copy { width: 100%; color: var(--ink-mute); font-size: .8rem; order: 3; }
@media (min-width: 700px) { .footer-copy { width: auto; order: 0; } }

/* =============================================================
   14. Floating WhatsApp button
   ============================================================= */
.whatsapp-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 200;
  width: 58px; height: 58px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #25d366; color: #06070a;
  box-shadow: 0 10px 28px rgba(0,0,0,0.35);
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out);
}
.whatsapp-float:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 16px 34px rgba(0,0,0,0.42); }
.whatsapp-float-ring { position: absolute; inset: 0; border-radius: 50%; background: #25d366; opacity: .55; animation: waPulse 2.4s ease-out infinite; }
@keyframes waPulse { 0% { transform: scale(1); opacity: .5; } 100% { transform: scale(1.7); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .whatsapp-float-ring { animation: none; display: none; } }
@media (max-width: 540px) { .whatsapp-float { right: 16px; bottom: 16px; width: 52px; height: 52px; } }

/* =============================================================
   15b. Mobile density
   ============================================================= */
@media (max-width: 640px) {
  .hero { min-height: auto; padding: 6.5rem 1.2rem 3.2rem; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }

  .insight { padding: 3.2rem 1.2rem; }
  .section, .section-dark, .plans-section { padding: 3.4rem 1.2rem; }
  .section-head { margin-bottom: 1.8rem; }

  .process-grid { gap: 1.6rem; }

  .cta-final { padding: 4rem 1.2rem; }

  .footer { padding: 2.2rem 1.2rem 2.6rem; }
}

/* Servicios, portafolio y planes: dos columnas desde tablet chica hacia abajo */
@media (max-width: 767px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); gap: .7rem; }
  .feature-card { padding: 1rem; }
  .feature-card:hover { transform: none; }
  .feature-icon { width: 34px; height: 34px; margin-bottom: .7rem; }
  .feature-icon svg { width: 17px; height: 17px; }
  .feature-card h3 { font-size: .92rem; }
  .feature-card p { font-size: .78rem; line-height: 1.45; }

  .demos-grid { grid-template-columns: repeat(2, 1fr); gap: .8rem; }
  .demo-card:nth-child(3) { grid-column: 1 / -1; max-width: calc(50% - .4rem); margin: 0 auto; }
  .demo-preview { padding: 1.1rem; }
  .demo-preview-title { font-size: 1rem; }
  .demo-caption { padding: 1rem 1.1rem 1.2rem; }
  .demo-caption h3 { font-size: .96rem; }
  .demo-caption p { font-size: .78rem; }

  .plans-columns { gap: 1.2rem; }
  .plan-col { padding: 1.5rem; }
  .plan-badge { top: -12px; right: 1.4rem; }
  .plan-block { margin-bottom: 1.4rem; }
  .plans-shared { padding: 1.6rem 1.4rem; margin-top: 1.2rem; }
}

/* =============================================================
   15. Reveal
   ============================================================= */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-split] { opacity: 1; transform: none; }
