/* =========================================================
   Wapi Technology — Sistema de diseño minimalista elegante
   ========================================================= */

/* ---- Tipografías ---- */
@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600&family=Inter:wght@400;500;600;700&display=swap');

/* ---- Tokens ---- */
:root {
  --ink:        #15212E;   /* texto principal */
  --brand:      #0F3D63;   /* azul institucional */
  --brand-700:  #0B2E4B;
  --accent:     #2F6BFF;   /* azul de acento */
  --accent-soft:#EAF1FF;
  --whatsapp:   #1FA855;   /* verde WhatsApp (sobrio) */
  --whatsapp-700:#178A45;

  --bg:         #FFFFFF;
  --bg-soft:    #F6F8FC;
  --bg-ink:     #0F3D63;   /* secciones oscuras */
  --line:       #E7ECF3;
  --muted:      #5C6B80;
  --muted-soft: #8A97A8;

  --radius:     18px;
  --radius-sm:  12px;
  --shadow-sm:  0 1px 2px rgba(16,32,56,.04);
  --shadow:     0 24px 60px -28px rgba(16,32,56,.28);
  --shadow-soft:0 18px 48px -30px rgba(16,32,56,.35);

  --container:  1140px;
  --space:      clamp(72px, 11vw, 140px);
  --ease:       cubic-bezier(.22,.61,.36,1);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--accent); color: #fff; }

/* ---- Layout ---- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

section { padding-block: var(--space); }

/* ---- Tipografía ---- */
h1, h2, h3 {
  font-family: 'Lora', Georgia, serif;
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--ink);
}

h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); }
h2 { font-size: clamp(2rem, 4.2vw, 3.1rem); }
h3 { font-size: clamp(1.25rem, 2.4vw, 1.6rem); }

h1 em, h2 em { font-style: italic; color: var(--accent); }

p { color: var(--muted); }

.lead {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  color: var(--muted);
  line-height: 1.6;
  max-width: 54ch;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Inter', sans-serif;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before {
  content: "";
  width: 26px; height: 1px;
  background: currentColor;
  opacity: .6;
}

.section-head { max-width: 640px; margin-bottom: 56px; }
.section-head .eyebrow { margin-bottom: 18px; }
.section-head p { margin-top: 16px; font-size: 1.08rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow::before { display: none; }

/* ---- Botones ---- */
.btn {
  --btn-bg: var(--brand);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .98rem;
  letter-spacing: .01em;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease),
              background .25s var(--ease), color .25s var(--ease);
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.btn:active { transform: translateY(0); }

.btn-primary { --btn-bg: var(--brand); }
.btn-primary:hover { background: var(--brand-700); }

.btn-accent { --btn-bg: var(--accent); }

.btn-whatsapp { --btn-bg: var(--whatsapp); }
.btn-whatsapp:hover { background: var(--whatsapp-700); }

.btn-light { --btn-bg: #fff; --btn-fg: var(--brand); }
.btn-light:hover { background: #e9f1f8; }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { background: var(--bg-soft); box-shadow: none; transform: translateY(-2px); }

.btn-sm { padding: 11px 20px; font-size: .9rem; }

.btn svg { width: 18px; height: 18px; }

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--brand);
  border-bottom: 1px solid rgba(255,255,255,.08);
  transition: box-shadow .3s var(--ease);
}
.site-header.scrolled {
  box-shadow: 0 8px 24px rgba(15,61,99,.22);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
}

.brand-logo {
  width: 92px;
  max-width: 92px;
  height: auto;
  max-height: 40px;
  object-fit: contain;
}

.nav { display: flex; align-items: center; gap: 6px; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  position: relative;
  padding: 8px 16px;
  font-size: .95rem;
  font-weight: 500;
  color: rgba(255,255,255,.8);
  border-radius: 999px;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.nav-links a:hover { color: #fff; background: rgba(255,255,255,.12); }
.nav-links a.active { color: #fff; }
.nav-cta { margin-left: 10px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  background: none;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 12px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 18px; height: 2px;
  margin-inline: auto;
  background: #fff;
  border-radius: 2px;
  transition: transform .3s var(--ease), opacity .2s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- Hero ---- */
.hero { position: relative; padding-block: clamp(43px, 5.4vw, 72px) var(--space); overflow: hidden; }
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 50% at 85% 0%, rgba(47,107,255,.10), transparent 60%),
    radial-gradient(50% 40% at 0% 30%, rgba(31,168,85,.07), transparent 55%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(40px, 6vw, 84px);
  align-items: center;
}
.hero h1 { margin: 22px 0 24px; max-width: 14ch; }
.hero .lead { margin-bottom: 36px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-trust {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  align-items: center;
}
.hero-trust span { font-size: .85rem; color: var(--muted-soft); }
.hero-trust strong {
  display: block;
  font-family: 'Lora', serif;
  font-size: 1.7rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 4px;
}

/* ---- Mockup de chat (CSS puro) ---- */
.phone {
  position: relative;
  justify-self: center;
  width: min(320px, 88%);
  background: #0B141A;
  border-radius: 42px;
  padding: 12px;
  box-shadow: var(--shadow);
}
.phone::after {
  content: "";
  position: absolute;
  top: 18px; left: 50%;
  transform: translateX(-50%);
  width: 110px; height: 26px;
  background: #0B141A;
  border-radius: 0 0 16px 16px;
  z-index: 3;
}
.phone-screen {
  position: relative;
  border-radius: 32px;
  overflow: hidden;
  background: #ECE5DD;
  height: 560px;
  display: flex;
  flex-direction: column;
}
.chat-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 42px 16px 14px;
  background: var(--brand);
  color: #fff;
}
.chat-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: #fff;
  display: grid; place-items: center;
  overflow: hidden;
}
.chat-avatar img { width: 32px; height: 32px; display: block; }
.chat-top .name { font-weight: 600; font-size: .95rem; line-height: 1.2; }
.chat-top .status { font-size: .72rem; opacity: .8; }
.chat-body {
  flex: 1;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}
.bubble {
  max-width: 80%;
  padding: 9px 13px;
  border-radius: 14px;
  font-size: .85rem;
  line-height: 1.45;
  color: #11261b;
  box-shadow: 0 1px 1px rgba(0,0,0,.06);
  opacity: 0;
  transform: translateY(8px);
  animation: bubble-in .5s var(--ease) forwards;
}
.bubble.in  { align-self: flex-start; background: #fff; border-top-left-radius: 4px; }
.bubble.out { align-self: flex-end; background: #D9FDD3; border-top-right-radius: 4px; }
.bubble .redacted {
  color: transparent;
  background: #11261b;
  border-radius: 4px;
  padding: 0 4px;
  letter-spacing: .04em;
  user-select: none;
}
.bubble .time {
  display: block;
  text-align: right;
  font-size: .62rem;
  color: #607a6b;
  margin-top: 2px;
}
.bubble:nth-child(1) { animation-delay: .3s; }
.bubble:nth-child(2) { animation-delay: .9s; }
.bubble:nth-child(3) { animation-delay: 1.5s; }
.bubble:nth-child(4) { animation-delay: 2.1s; }

@keyframes bubble-in {
  to { opacity: 1; transform: translateY(0); }
}

/* ---- Grid de beneficios ---- */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
  border-color: #d7e0ec;
}
.card .ic {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 13px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 20px;
}
.card .ic svg { width: 22px; height: 22px; }
.card h3 { font-size: 1.22rem; margin-bottom: 10px; }
.card p { font-size: .96rem; }

/* ---- Sección suave ---- */
.soft { background: var(--bg-soft); }

/* ---- Pasos / cómo funciona ---- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  counter-reset: step;
}
.step {
  position: relative;
  padding: 32px 28px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.step::before {
  counter-increment: step;
  content: "0" counter(step);
  font-family: 'Lora', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--accent);
  display: block;
  margin-bottom: 14px;
}
.step h3 { font-size: 1.15rem; margin-bottom: 8px; }
.step p { font-size: .95rem; }

/* ---- CTA oscura ---- */
.cta-band {
  position: relative;
  background: var(--bg-ink);
  border-radius: 28px;
  padding: clamp(48px, 7vw, 84px);
  overflow: hidden;
  text-align: center;
}
.cta-band::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(50% 60% at 50% 0%, rgba(47,107,255,.25), transparent 60%),
    radial-gradient(40% 50% at 80% 100%, rgba(31,168,85,.18), transparent 60%);
}
.cta-band > * { position: relative; }
.cta-band h2 { color: #fff; max-width: 18ch; margin-inline: auto; }
.cta-band p { color: #aeb9cb; margin: 18px auto 34px; max-width: 48ch; }
.cta-band .btn-ghost { color: #fff; border-color: rgba(255,255,255,.25); }
.cta-band .btn-ghost:hover { background: rgba(255,255,255,.08); }

/* ---- Página interior: encabezado ---- */
.page-head {
  padding-block: clamp(43px, 5.4vw, 72px) clamp(40px, 6vw, 70px);
  position: relative;
  overflow: hidden;
}
.page-head::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(55% 60% at 100% 0%, rgba(47,107,255,.08), transparent 60%);
}
.page-head .container { position: relative; }
.page-head h1 { margin: 20px 0 18px; max-width: 16ch; }
.page-head .lead { max-width: 60ch; }

/* ---- Quiénes somos ---- */
.prose-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}
.value {
  padding: 34px 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}
.value h3 { margin-bottom: 12px; }
.value p { font-size: 1rem; }

.list-clean { list-style: none; padding: 0; display: grid; gap: 14px; }
.list-clean li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  font-size: 1.02rem;
  color: var(--ink);
}
.list-clean li::before {
  content: "";
  flex: none;
  width: 22px; height: 22px;
  margin-top: 3px;
  border-radius: 50%;
  background: var(--accent-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%232F6BFF' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}

/* ---- Contacto ---- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.contact-card {
  display: flex;
  flex-direction: column;
  padding: 34px 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s var(--ease);
}
.contact-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
  border-color: #d7e0ec;
}
.contact-card .ic {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 22px;
}
.contact-card.is-whatsapp .ic { background: rgba(31,168,85,.12); color: var(--whatsapp); }
.contact-card .ic svg { width: 24px; height: 24px; }
.contact-card .label {
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted-soft);
  margin-bottom: 6px;
}
.contact-card .value-text {
  font-family: 'Lora', serif;
  font-size: 1.3rem;
  color: var(--ink);
  margin-bottom: 6px;
}
.contact-card p { font-size: .95rem; margin-bottom: 22px; }
.contact-card .link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: .95rem;
  color: var(--accent);
}
.contact-card.is-whatsapp .link { color: var(--whatsapp); }
.contact-card .link svg { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.contact-card:hover .link svg { transform: translateX(4px); }

.contact-meta {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 40px;
  padding: 28px 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-soft);
}
.contact-meta div .k {
  font-size: .76rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted-soft);
}
.contact-meta div .v { font-weight: 600; color: var(--ink); }

/* ---- Footer ---- */
.site-footer {
  background: var(--bg-ink);
  color: #c3ccda;
  padding-block: 72px 36px;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.footer-brand img { width: 104px; max-width: 104px; height: auto; margin-bottom: 20px; }
.footer-brand p { color: #93a0b4; max-width: 34ch; font-size: .95rem; }
.footer-col h4 {
  font-family: 'Inter', sans-serif;
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #6f7e93;
  margin-bottom: 18px;
  font-weight: 600;
}
.footer-col a, .footer-col p { display: block; color: #c3ccda; font-size: .95rem; padding: 5px 0; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: 26px;
  font-size: .85rem;
  color: #7c8aa0;
}

/* ---- Animaciones al hacer scroll ---- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }

/* ---- Responsive ---- */
@media (max-width: 920px) {
  .hero-inner { grid-template-columns: 1fr; }
  .phone { grid-row: 1; margin-bottom: 8px; }
  .hero h1 { max-width: 18ch; }
  .grid, .steps, .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav-toggle { display: flex; }
  .nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 14px 20px 22px;
    background: var(--brand);
    border-bottom: 1px solid rgba(255,255,255,.1);
    box-shadow: var(--shadow-soft);
    clip-path: inset(0 0 100% 0);
    opacity: 0;
    pointer-events: none;
    transition: clip-path .35s var(--ease), opacity .25s var(--ease);
  }
  .nav.open { clip-path: inset(0 0 0 0); opacity: 1; pointer-events: auto; }
  .nav-links { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav-links a { padding: 12px 14px; font-size: 1rem; }
  .nav-cta { margin: 8px 0 0; justify-content: center; }
  .grid, .steps, .contact-grid, .prose-grid, .footer-top { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; }
  .hero-trust { gap: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  .bubble { opacity: 1; transform: none; }
}

.footer-brand img { transition: opacity .3s ease, visibility .3s ease; }
.site-footer.met .footer-brand img { opacity: 0; visibility: hidden; pointer-events: none; }
