:root {
  --navy: #0f2a3f;
  --teal: #0ea5a0;
  --teal-deep: #0b8480;
  --teal-soft: #e6f7f5;
  --bg: #f7faf9;
  --card: #ffffff;
  --ink: #16232b;
  --ink-soft: #52636b;
  --muted: #8a9aa1;
  --line: #e1e8e7;
  --radius: 16px;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.01em; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--teal-deep); display: inline-flex; align-items: center; gap: 10px; margin-bottom: 16px;
}
.eyebrow::before { content: ''; width: 24px; height: 2px; background: var(--teal); border-radius: 2px; }

.demo-badge {
  position: fixed; bottom: 18px; right: 18px; z-index: 100;
  background: var(--navy); color: #fff; font-size: 13px; padding: 10px 16px;
  border-radius: 999px; display: inline-flex; align-items: center; gap: 8px;
  box-shadow: 0 8px 24px rgba(15,42,63,.28); transition: transform .2s ease;
}
.demo-badge:hover { transform: translateY(-2px); }
.demo-badge span.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); }

header.site { position: fixed; top: 0; left: 0; right: 0; z-index: 50; background: rgba(247,250,249,0.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
header.site .bar { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 800; color: var(--navy); }
.brand .mark { width: 34px; height: 34px; border-radius: 10px; background: var(--teal); display: flex; align-items: center; justify-content: center; color: #fff; }
nav.main { display: flex; align-items: center; gap: 34px; }
nav.main a { font-size: 14px; font-weight: 600; color: var(--ink-soft); transition: color .2s; }
nav.main a:hover { color: var(--navy); }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 12px; font-size: 14px; font-weight: 700; border: 1px solid transparent; cursor: pointer; transition: all .2s ease; }
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-deep); transform: translateY(-1px); }
.btn-outline { border-color: var(--line); color: var(--navy); background: #fff; }
.btn-outline:hover { border-color: var(--teal); }
.menu-toggle { display: none; background: none; border: none; color: var(--navy); font-size: 26px; cursor: pointer; }

.hero { padding: 168px 0 100px; position: relative; overflow: hidden; }
.hero .grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); line-height: 1.08; color: var(--navy); }
.hero h1 span { color: var(--teal); }
.hero p.lead { margin-top: 22px; max-width: 46ch; font-size: 17px; line-height: 1.7; color: var(--ink-soft); }
.hero .actions { margin-top: 34px; display: flex; gap: 14px; flex-wrap: wrap; }
.hero .stats { margin-top: 56px; display: flex; gap: 36px; flex-wrap: wrap; }
.hero .stats div strong { display: block; font-size: 26px; color: var(--navy); }
.hero .stats div span { font-size: 13px; color: var(--muted); }

.hero-visual { position: relative; aspect-ratio: 1/1; }
.blob { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 30% 30%, var(--teal-soft), transparent 70%); }
.hero-visual .ring { position: absolute; border-radius: 50%; border: 1.5px solid var(--line); }
.hero-visual .ring.r1 { inset: 8%; }
.hero-visual .ring.r2 { inset: 20%; border-color: rgba(14,165,160,0.35); }
.hero-visual .card-float {
  position: absolute; background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 18px; box-shadow: 0 16px 40px rgba(15,42,63,0.12); display: flex; align-items: center; gap: 12px;
}
.hero-visual .card-float.c1 { top: 8%; left: -4%; }
.hero-visual .card-float.c2 { bottom: 10%; right: -6%; }
.hero-visual .card-float .ic { width: 36px; height: 36px; border-radius: 10px; background: var(--teal-soft); color: var(--teal-deep); display: flex; align-items: center; justify-content: center; }
.hero-visual .card-float strong { display: block; font-size: 14px; color: var(--navy); }
.hero-visual .card-float span { font-size: 12px; color: var(--muted); }

section { padding: 100px 0; }
.section-head { max-width: 640px; margin: 0 auto 52px; text-align: center; }
.section-head h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); color: var(--navy); }
.section-head p { margin-top: 14px; color: var(--ink-soft); font-size: 16px; line-height: 1.7; }

.servicios-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.servicio-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; transition: border-color .2s, transform .2s; }
.servicio-card:hover { border-color: var(--teal); transform: translateY(-3px); }
.servicio-card .ic { width: 44px; height: 44px; border-radius: 12px; background: var(--teal-soft); color: var(--teal-deep); display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.servicio-card h3 { font-size: 17px; color: var(--navy); margin-bottom: 8px; }
.servicio-card p { margin: 0; font-size: 14px; color: var(--ink-soft); line-height: 1.6; }

.why { background: var(--navy); color: #fff; }
.why .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.why .section-head { text-align: left; margin: 0 0 8px; max-width: none; }
.why .section-head p { color: #a9bdc7; }
.why-list { display: flex; flex-direction: column; gap: 22px; margin-top: 28px; }
.why-item { display: flex; gap: 16px; }
.why-item .num { width: 34px; height: 34px; border-radius: 50%; background: rgba(14,165,160,0.18); color: var(--teal); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex-shrink: 0; }
.why-item h4 { font-size: 15px; margin: 0 0 4px; }
.why-item p { margin: 0; font-size: 14px; color: #a9bdc7; line-height: 1.6; }
.testi-stack { display: flex; flex-direction: column; gap: 18px; }
.testi-card { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12); border-radius: 14px; padding: 24px; }
.testi-card p { margin: 0; font-size: 15px; line-height: 1.65; color: #e7eef0; }
.testi-card .who { margin-top: 14px; display: flex; align-items: center; gap: 10px; font-size: 13px; color: #a9bdc7; }
.testi-card .avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--teal); display: flex; align-items: center; justify-content: center; font-weight: 700; color: #fff; font-size: 12px; }
.stars { color: #ffb648; font-size: 13px; letter-spacing: 2px; }

.cita { background: var(--bg); }
.cita .grid { display: grid; grid-template-columns: 1fr 0.85fr; gap: 60px; align-items: start; }
.form-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 36px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-soft); }
.field input, .field select {
  border: 1px solid var(--line); background: #fbfdfd; border-radius: 10px; padding: 12px 14px; font-size: 15px; font-family: var(--sans); color: var(--ink);
}
.form-card .btn-primary { width: 100%; justify-content: center; margin-top: 8px; }
.form-note { margin-top: 14px; font-size: 13px; color: var(--muted); text-align: center; }

.info-card { background: var(--navy); color: #fff; border-radius: var(--radius); padding: 32px; }
.info-card h4 { font-size: 16px; margin: 0 0 20px; }
.info-item { display: flex; gap: 14px; margin-bottom: 20px; }
.info-item .ic { width: 36px; height: 36px; border-radius: 10px; background: rgba(255,255,255,0.1); color: var(--teal); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.info-item strong { display: block; font-size: 14px; }
.info-item span { font-size: 13px; color: #a9bdc7; }

footer.site { background: #fff; border-top: 1px solid var(--line); padding: 56px 0 28px; }
footer.site .top { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 40px; padding-bottom: 36px; }
footer.site .cols { display: flex; gap: 60px; flex-wrap: wrap; }
footer.site h5 { color: var(--navy); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; margin: 0 0 14px; }
footer.site ul li { margin-bottom: 10px; font-size: 14px; color: var(--ink-soft); }
footer.site ul a:hover { color: var(--navy); }
.bottom-bar { display: flex; justify-content: space-between; align-items: center; padding-top: 24px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); flex-wrap: wrap; gap: 12px; }
.bottom-bar a { color: var(--teal-deep); font-weight: 700; }

/* ─────────────────────────────────────────────
   Animación: scroll-reveal + stagger
───────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

.reveal-group > *:nth-child(1) { transition-delay: 0ms; }
.reveal-group > *:nth-child(2) { transition-delay: 100ms; }
.reveal-group > *:nth-child(3) { transition-delay: 200ms; }
.reveal-group > *:nth-child(4) { transition-delay: 300ms; }
.reveal-group > *:nth-child(5) { transition-delay: 400ms; }
.reveal-group > *:nth-child(6) { transition-delay: 500ms; }

/* Header dinámico */
header.site { transition: box-shadow .35s ease; }
header.site .bar { transition: height .35s var(--ease); }
header.site.scrolled { box-shadow: 0 12px 32px rgba(15,42,63,.12); }
header.site.scrolled .bar { height: 64px; }

/* Hero visual: anillos girando + tarjetas flotando */
.blob { animation: pulse 6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.06); opacity: .85; } }
.hero-visual .ring { animation: spin 40s linear infinite; }
.hero-visual .ring.r2 { animation-duration: 55s; animation-direction: reverse; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.hero-visual .card-float { animation: bob 5s ease-in-out infinite; opacity: 0; transform: translateY(20px); animation-fill-mode: forwards; }
.hero-visual.loaded .card-float { animation: floatIn .8s var(--ease) forwards, bob 5s ease-in-out 0.8s infinite; }
.hero-visual .card-float.c1 { animation-delay: .3s; }
.hero-visual.loaded .card-float.c1 { animation-delay: .3s, 1.1s; }
.hero-visual .card-float.c2 { animation-delay: .5s; }
.hero-visual.loaded .card-float.c2 { animation-delay: .5s, 1.3s; }
@keyframes floatIn { from { opacity: 0; transform: translateY(24px) scale(.94); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* Botones: brillo + magnetismo */
.btn { position: relative; overflow: hidden; }
.btn-primary::after {
  content: ''; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,.45), transparent);
  transform: skewX(-20deg); transition: left .7s ease;
}
.btn-primary:hover::after { left: 130%; }
.btn.magnetic { transition: transform .25s var(--ease); }

/* Tarjetas de servicio */
.servicio-card .ic { transition: transform .4s var(--ease), background-color .3s ease, color .3s ease; }
.servicio-card:hover .ic { transform: scale(1.15) rotate(-6deg); background: var(--teal); color: #fff; }

/* Testimonios: entrada lateral */
.testi-card { opacity: 0; transform: translateX(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.testi-card.is-visible { opacity: 1; transform: translateX(0); }
.testi-stack .testi-card:nth-child(1) { transition-delay: 0ms; }
.testi-stack .testi-card:nth-child(2) { transition-delay: 120ms; }
.testi-stack .testi-card:nth-child(3) { transition-delay: 240ms; }

/* Contador de estadísticas */
.hero .stats strong { display: inline-block; }

/* Formulario */
.field input, .field select { transition: border-color .25s ease, box-shadow .25s ease; }
.field input:focus, .field select:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(14,165,160,0.15); }
.info-item .ic { transition: transform .35s var(--ease); }
.info-card:hover .info-item .ic { transform: none; }
.info-item:hover .ic { transform: scale(1.12); }

/* ── Barra de progreso de scroll ──────────────── */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%; z-index: 200;
  background: linear-gradient(90deg, var(--teal), var(--navy)); transition: width .1s linear;
}

/* ── Nav con subrayado animado ────────────────── */
nav.main a { position: relative; }
nav.main a::after { content: ''; position: absolute; left: 0; bottom: -6px; width: 0; height: 2px; background: var(--teal); border-radius: 2px; transition: width .3s var(--ease); }
nav.main a:hover::after { width: 100%; }

/* ── Tarjetas con inclinación 3D + spotlight de cursor ── */
.servicio-card, .testi-card, .cat-card, .cita .form-card {
  --mx: 50%; --my: 50%;
  transform-style: preserve-3d;
  transition: border-color .2s, transform .15s ease, box-shadow .3s ease;
  position: relative;
}
.servicio-card::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0;
  background: radial-gradient(220px circle at var(--mx) var(--my), rgba(14,165,160,0.14), transparent 70%);
  transition: opacity .3s ease;
}
.servicio-card:hover::before { opacity: 1; }

/* ── Iconos de servicio: trazo animado al entrar en vista ── */
.servicio-card .ic svg path,
.servicio-card .ic svg circle { stroke-dasharray: var(--len, 60); stroke-dashoffset: var(--len, 60); transition: stroke-dashoffset 1s var(--ease); }
.servicio-card.is-visible .ic svg path,
.servicio-card.is-visible .ic svg circle { stroke-dashoffset: 0; }

/* ── Parallax suave del hero al hacer scroll ──── */
.hero-visual { will-change: transform; }

@media (prefers-reduced-motion: reduce) {
  .blob, .hero-visual .ring, .hero-visual .card-float { animation: none !important; opacity: 1 !important; transform: none !important; }
  .reveal, .testi-card { transition: opacity .3s ease; transform: none !important; }
  .btn.magnetic { transform: none !important; }
  .servicio-card .ic svg path, .servicio-card .ic svg circle { stroke-dashoffset: 0 !important; transition: none !important; }
  .scroll-progress { display: none; }
}

@media (max-width: 900px) {
  nav.main, .hero .actions .btn-outline { display: none; }
  .menu-toggle { display: block; }
  .hero .grid, .why .grid, .cita .grid { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .servicios-grid { grid-template-columns: 1fr 1fr; }
  .field-row { grid-template-columns: 1fr; }
  section { padding: 68px 0; }
  .hero { padding: 140px 0 60px; }
}
@media (max-width: 560px) {
  .servicios-grid { grid-template-columns: 1fr; }
}
