/* ==========================================================
   Zuntia — estilos base
   Paleta tomada de los logos: índigo #2B2F7F, teal #14B8A6, coral #FF8A65
   ========================================================== */

:root {
  /* Marca */
  --indigo: #2B2F7F;
  --indigo-900: #1D2060;
  --indigo-700: #3A3F9A;
  --indigo-050: #EEEFFA;
  --teal: #14B8A6;
  --teal-ink: #0F766E;     /* teal con contraste suficiente para texto sobre blanco */
  --teal-soft: #5EEAD4;    /* teal legible sobre índigo */
  --coral: #FF8A65;

  /* Neutros (fríos, derivados del índigo) */
  --ink: #15173A;
  --muted: #565A7A;
  --line: #E3E5F0;
  --bg: #FFFFFF;
  --surface: #F6F7FB;

  /* Tipografía */
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* Radios: un solo sistema para todo */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;

  /* Elevación con sombras en capas */
  --shadow-sm: 0 1px 2px rgb(21 23 58 / 0.06), 0 1px 1px rgb(21 23 58 / 0.04);
  --shadow-md: 0 1px 2px rgb(21 23 58 / 0.05), 0 4px 12px rgb(21 23 58 / 0.06), 0 12px 32px rgb(21 23 58 / 0.06);
  --shadow-lg: 0 2px 4px rgb(21 23 58 / 0.06), 0 12px 24px rgb(21 23 58 / 0.08), 0 32px 64px rgb(21 23 58 / 0.10);

  --ease-out: cubic-bezier(0.2, 0, 0, 1);
  --header-h: 68px;
}

/* ---------- Reset mínimo ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; letter-spacing: -0.02em; line-height: 1.12; }
p { text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 100;
  background: var(--indigo); color: #fff; padding: 8px 14px; border-radius: var(--r-sm);
  text-decoration: none; transition: top 150ms var(--ease-out);
}
.skip-link:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 4px; }
.mono { font-family: var(--mono); font-size: 0.92em; }
[data-scroll] { cursor: pointer; user-select: none; }

.container { width: 100%; max-width: 1160px; margin-inline: auto; padding-inline: 24px; }
@media (max-width: 600px) { .container { padding-inline: 16px; } }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  font-weight: 600; font-size: 16px; text-decoration: none; white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 150ms var(--ease-out), color 150ms var(--ease-out),
              box-shadow 150ms var(--ease-out), transform 150ms var(--ease-out);
}
.btn:active:not(:disabled) { transform: scale(0.96); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 15px; border-radius: var(--r-sm); }
.btn-block { width: 100%; }

.btn-primary { background: var(--indigo); color: #fff; box-shadow: var(--shadow-sm); }
.btn-ghost { background: var(--bg); color: var(--indigo); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-sm); }
.btn-light { background: #fff; color: var(--indigo); }

@media (hover: hover) {
  .btn-primary:hover { background: var(--indigo-700); }
  .btn-ghost:hover { background: var(--indigo-050); }
  .btn-light:hover { background: var(--indigo-050); }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: rgb(255 255 255 / 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 150ms var(--ease-out);
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand img { height: 30px; width: auto; }

.nav-menu { display: flex; align-items: center; gap: 4px; }
.nav-menu a:not(.btn) {
  display: block; padding: 8px 12px; border-radius: var(--r-sm);
  color: var(--muted); font-size: 15px; font-weight: 500; text-decoration: none;
  transition: color 150ms var(--ease-out), background-color 150ms var(--ease-out);
}
@media (hover: hover) { .nav-menu a:not(.btn):hover { color: var(--ink); background: var(--surface); } }
.nav-login { margin-left: 8px; padding-left: 12px; border-left: 1px solid var(--line); }
.nav-menu .btn { margin-left: 8px; }

.nav-toggle {
  display: none; width: 44px; height: 44px; align-items: center; justify-content: center;
  background: transparent; border: 1px solid transparent; border-radius: var(--r-sm); color: var(--ink); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: inline; }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .nav-menu {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    padding: 12px 16px 20px;
    background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md);
    overscroll-behavior: contain;
    visibility: hidden; opacity: 0;
    transition: opacity 150ms var(--ease-out), visibility 0s linear 150ms;
  }
  .nav-menu.is-open { visibility: visible; opacity: 1; transition: opacity 150ms var(--ease-out); }
  .nav-menu a:not(.btn) { padding: 12px; font-size: 16px; }
  .nav-login { margin: 4px 0 0; padding: 4px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .nav-menu .btn { margin: 8px 0 0; min-height: 48px; }
}

/* ---------- Hero ---------- */
.hero { padding: 72px 0 96px; overflow: clip; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 64px; align-items: center; }
.hero h1 { font-size: clamp(40px, 6vw, 68px); font-weight: 700; color: var(--indigo-900); max-width: 14ch; }
.lead { margin-top: 24px; font-size: clamp(18px, 2vw, 20px); color: var(--muted); max-width: 52ch; }
.hero-actions { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { margin-top: 28px; font-size: 15px; color: var(--muted); max-width: 46ch; }

@media (max-width: 900px) {
  .hero { padding: 40px 0 72px; }
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
}

/* Teléfono / chat de ejemplo */
.phone {
  margin: 0; justify-self: center; width: 100%; max-width: 380px;
  padding: 12px;                                  /* radio externo = interno (16) + padding (12) */
  border-radius: var(--r-xl);
  background: var(--indigo);
  border: 1px solid transparent;
  box-shadow: var(--shadow-lg);
}
.phone-top {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px 14px; color: #fff;
}
.phone-top img { border-radius: 10px; box-shadow: 0 0 0 1px rgb(255 255 255 / 0.15); }
.phone-name { font-weight: 600; font-size: 15px; line-height: 1.2; }
.phone-status { font-size: 13px; color: var(--teal-soft); line-height: 1.3; }

.chat {
  display: flex; flex-direction: column; gap: 10px;
  padding: 18px 14px 20px; min-height: 360px;
  border-radius: 16px;
  background: var(--surface);
}
.msg {
  max-width: 85%; padding: 10px 14px;
  border-radius: 16px; font-size: 15px; line-height: 1.45;
}
.msg-out { align-self: flex-end; background: var(--indigo-050); color: var(--indigo-900); border-bottom-right-radius: 6px; }
.msg-in  { align-self: flex-start; background: #fff; color: var(--ink); border-bottom-left-radius: 6px; box-shadow: var(--shadow-sm); }
.msg-in strong { color: var(--teal-ink); }

/* ---------- Secciones ---------- */
.section { padding: 112px 0; }
.section-tint { background: var(--surface); }
.section-head { max-width: 640px; margin-bottom: 56px; }
.section-head h2 { font-size: clamp(30px, 4vw, 44px); font-weight: 700; color: var(--indigo-900); }
.section-head p { margin-top: 16px; color: var(--muted); font-size: 18px; }
@media (max-width: 600px) { .section { padding: 72px 0; } .section-head { margin-bottom: 40px; } }

/* Servicios: lista con puntos de la marca, sin tarjetas ni íconos en caja */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; border-top: 1px solid var(--line); padding-top: 40px; }
.service h3 { font-size: 21px; font-weight: 600; margin-top: 16px; }
.service p { margin-top: 10px; color: var(--muted); }
.dot { display: block; width: 12px; height: 12px; border-radius: 50%; }
.dot-teal { background: var(--teal); }
.dot-coral { background: var(--coral); }
@media (max-width: 800px) { .services { grid-template-columns: 1fr; gap: 36px; } }

/* Planes */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.plan {
  display: flex; flex-direction: column;
  padding: 32px 28px 28px;
  border-radius: var(--r-lg);
  background: var(--bg);
  border: 1px solid transparent;
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-sm);
}
.plan header { margin-bottom: 14px; }
.plan h3 { font-size: 26px; font-weight: 700; color: var(--indigo-900); }
.plan-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.plan-tag { margin-top: 4px; font-size: 15px; font-weight: 500; color: var(--teal-ink); }
.plan-desc { color: var(--muted); font-size: 16px; }
.plan .checklist { margin: 24px 0 32px; flex: 1; }
.plan-featured { box-shadow: inset 0 0 0 2px var(--indigo), var(--shadow-md); }
.badge {
  display: inline-flex; align-items: center; height: 26px; padding: 0 10px;
  border-radius: 999px; background: var(--indigo); color: #fff;
  font-size: 13px; font-weight: 600;
}

.checklist { display: grid; gap: 12px; }
.checklist li { position: relative; padding-left: 28px; font-size: 15.5px; line-height: 1.5; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 16px; height: 16px;
  background: var(--teal-ink);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E") center / contain no-repeat;
}
@media (max-width: 960px) {
  .plans { grid-template-columns: 1fr; max-width: 520px; }
  .plan-featured { order: -1; }
}

/* Proceso: línea con nodos, eco de la "Z" del logo */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; position: relative; }
.steps::before {
  content: ""; position: absolute; top: 7px; left: 8px; right: 8px; height: 2px;
  background: var(--line);
}
.step { position: relative; padding-top: 36px; }
.step::before {
  content: ""; position: absolute; top: 0; left: 0;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--teal); box-shadow: 0 0 0 4px var(--bg);
}
.step:last-child::before { background: var(--coral); }
.step h3 { font-size: 19px; font-weight: 600; }
.step p { margin-top: 8px; color: var(--muted); font-size: 16px; }
@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .steps::before { top: 8px; bottom: 8px; left: 7px; right: auto; width: 2px; height: auto; }
  .step { padding: 0 0 0 40px; }
}

/* FAQ */
.faq-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 64px; align-items: start; }
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 22px 0; cursor: pointer; list-style: none;
  font-size: 18px; font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 18px; height: 18px;
  background: var(--muted);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M9 3v12M3 9h12'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M9 3v12M3 9h12'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform 200ms var(--ease-out);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 32px 24px 0; color: var(--muted); }
@media (max-width: 860px) { .faq-grid { grid-template-columns: 1fr; gap: 8px; } }

/* Contacto */
.section-indigo { background: var(--indigo); color: #fff; }
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 64px; align-items: start; }
.contact-copy h2 { font-size: clamp(30px, 4vw, 44px); font-weight: 700; }
.contact-copy p { margin-top: 16px; font-size: 18px; color: rgb(255 255 255 / 0.78); max-width: 42ch; }

.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 8px; }
.field-full { grid-column: 1 / -1; }
.field label { font-size: 15px; font-weight: 500; }
.optional { font-weight: 400; color: rgb(255 255 255 / 0.6); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px;
  border-radius: var(--r-md);
  border: 1px solid rgb(255 255 255 / 0.18);
  background: rgb(255 255 255 / 0.08);
  color: #fff; font-size: 16px;
  transition: border-color 150ms var(--ease-out), background-color 150ms var(--ease-out);
}
.field select option { color: var(--ink); }
.field textarea { resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: none; border-color: var(--teal-soft); background: rgb(255 255 255 / 0.12);
}
.field [aria-invalid="true"] { border-color: var(--coral); }
.form-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 6px; }
.form-status { font-size: 15px; color: var(--teal-soft); }
.form-status.is-error { color: var(--coral); }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; gap: 40px; } }
@media (max-width: 520px) { .contact-form { grid-template-columns: 1fr; } }

/* Footer */
.site-footer { padding: 40px 0; border-top: 1px solid var(--line); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; color: var(--muted); font-size: 15px; }
.footer-inner img { height: 22px; width: auto; }
.footer-copy { margin-left: auto; }
@media (max-width: 600px) { .footer-copy { margin-left: 0; } }

/* ---------- Movimiento (solo si el usuario no pidió reducirlo) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(12px); filter: blur(4px); }
  .js .reveal.is-in {
    opacity: 1; transform: none; filter: none;
    transition: opacity 300ms var(--ease-out), transform 300ms var(--ease-out), filter 300ms var(--ease-out);
    transition-delay: var(--delay, 0ms);
  }
  .js .chat .msg { opacity: 0; transform: translateY(8px); }
  .js .chat .msg.is-in {
    opacity: 1; transform: none;
    transition: opacity 300ms var(--ease-out), transform 300ms var(--ease-out);
  }
}
@media (prefers-reduced-motion: reduce) {
  .js .chat .msg { opacity: 0; }
  .js .chat .msg.is-in { opacity: 1; transition: opacity 200ms linear; }
}
