/* =============================================================
   MBCloud — styles.css
   Estilo corporativo: fondo blanco, azul de marca, tarjetas, sans-serif
   ============================================================= */

/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  /* Paleta derivada del logo */
  --bg:        #ffffff;
  --bg-alt:    #f3f7fc;
  --bg-band:   #0b2540;
  --ink:       #0b2540;
  --text:      #334a63;
  --mute:      #5c7089;
  --line:      #e1e8f1;
  --brand:     #1870e8;
  --brand-dark:#1259c4;
  --brand-soft:#e8f1fd;
  --cyan:      #22c4f0;
  --green:     #16a34a;
  --green-soft:#e7f7ec;
  --danger:    #d9304c;

  --heading: "Manrope", "Inter", system-ui, sans-serif;
  --sans:    "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius: 14px;
  --shadow: 0 1px 2px rgba(11, 37, 64, .04), 0 8px 24px -12px rgba(11, 37, 64, .12);
  --shadow-lg: 0 2px 4px rgba(11, 37, 64, .05), 0 24px 48px -20px rgba(11, 37, 64, .22);
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --max: 1180px;

  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* =============================================================
   2. Reset y base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5.5rem; }
body {
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3, h4 { font-family: var(--heading); color: var(--ink); text-wrap: balance; line-height: 1.15; letter-spacing: -0.02em; font-weight: 800; }
h1 { font-size: clamp(2.3rem, 4.6vw, 3.6rem); line-height: 1.08; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
h3 { font-size: 1.2rem; font-weight: 700; }
h4 { font-size: .95rem; font-weight: 700; }
::selection { background: var(--brand); color: #fff; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 4px; }

.ico { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
#i-whatsapp { fill: currentColor; stroke: none; }

/* =============================================================
   3. Utilidades
   ============================================================= */
.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: 9999;
  padding: .6rem 1rem; background: var(--brand); color: #fff; border-radius: 8px; font-weight: 600;
}
.skip-link:focus { top: 1rem; }
.container { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 44rem; margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.section-head h2 { margin-bottom: .75rem; }
.section-lead { color: var(--mute); font-size: 1.08rem; }
.eyebrow {
  font-family: var(--heading); font-weight: 700; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--brand); margin-bottom: .9rem;
}
.lead { font-size: clamp(1.05rem, 1.4vw, 1.2rem); color: var(--mute); max-width: 36rem; }

.grid { display: grid; gap: 1.25rem; }
@media (min-width: 720px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }

/* =============================================================
   4. Componentes
   ============================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .8rem 1.35rem; border-radius: 10px;
  font-family: var(--heading); font-weight: 700; font-size: .95rem; line-height: 1;
  border: 1px solid transparent; white-space: nowrap;
  transition: transform .4s var(--ease-out), background-color .25s, border-color .25s, color .25s, box-shadow .4s var(--ease-out);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-lg { padding: 1rem 1.6rem; font-size: 1rem; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 20px -10px rgba(24, 112, 232, .7); }
.btn-primary:hover { background: var(--brand-dark); box-shadow: 0 14px 28px -12px rgba(24, 112, 232, .7); }
.btn-secondary { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--ink); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem; box-shadow: var(--shadow);
  transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out), border-color .3s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: #cfdcec; }
.card h3 { margin: 1rem 0 .5rem; }
.card p { color: var(--mute); font-size: .97rem; }
.card-icon {
  width: 3rem; height: 3rem; border-radius: 12px; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand); font-size: 1.15rem;
}
.card-service { padding: 1.9rem; }

.pill { display: inline-flex; align-items: center; padding: .35rem .7rem; border-radius: 999px; font-family: var(--heading); font-weight: 700; font-size: .8rem; }
.pill-green { background: var(--green-soft); color: var(--green); }

/* --- Navegación --- */
.nav {
  position: fixed; top: 0; inset-inline: 0; z-index: 120;
  background: rgba(255, 255, 255, .92);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
@supports (backdrop-filter: blur(12px)) {
  .nav { background: rgba(255, 255, 255, .8); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
}
.nav.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 20px -16px rgba(11, 37, 64, .25); }
.nav-inner { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; display: flex; align-items: center; gap: 2rem; height: 72px; }
.nav-brand { display: flex; align-items: center; gap: .6rem; margin-right: auto; }
.nav-brand img { display: block; height: 36px; width: auto; }
.nav-brand .brand-word { height: 16px; }
.nav-links { display: none; gap: 1.4rem; }
.nav-link { position: relative; font-weight: 500; font-size: .92rem; color: var(--text); padding: .3rem 0; transition: color .25s; }
.nav-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; border-radius: 2px;
  background: var(--brand); transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease-soft);
}
.nav-link:hover, .nav-link.is-active { color: var(--ink); }
.nav-link:hover::after, .nav-link.is-active::after { transform: scaleX(1); transform-origin: left; }
.nav-cta { display: none; }

.nav-burger { width: 44px; height: 44px; display: grid; place-items: center; position: relative; margin-right: -.5rem; }
.nav-burger span { position: absolute; width: 22px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .4s var(--ease-out), opacity .25s; }
.nav-burger span:nth-child(1) { transform: translateY(-7px); }
.nav-burger span:nth-child(3) { transform: translateY(7px); }
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: rotate(-45deg); }

.nav-mobile {
  position: fixed; inset: 0; z-index: 110; background: #fff;
  display: flex; flex-direction: column; justify-content: center; padding: 6rem var(--gutter) 3rem;
  clip-path: inset(0 0 100% 0); transition: clip-path .55s var(--ease-soft); visibility: hidden;
}
.nav-mobile[aria-hidden="false"] { clip-path: inset(0); visibility: visible; }
.nav-mobile nav { display: flex; flex-direction: column; gap: .25rem; }
.nav-mobile nav a:not(.btn) {
  font-family: var(--heading); font-weight: 700; font-size: 1.7rem; color: var(--ink); padding: .55rem 0;
  border-bottom: 1px solid var(--line);
}
.nav-mobile nav .btn { margin-top: 1.5rem; align-self: flex-start; }
.nav-mobile-meta { margin-top: 2.5rem; color: var(--mute); line-height: 1.9; }
body.nav-open { overflow: hidden; }

/* --- Filas expandibles (FAQ) --- */
.rows { border-top: 1px solid var(--line); }
.row { border-bottom: 1px solid var(--line); }
.row summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.15rem 0; font-family: var(--heading); font-weight: 700; font-size: 1.05rem; color: var(--ink);
  transition: color .25s;
}
.row summary::-webkit-details-marker { display: none; }
.row summary:hover { color: var(--brand); }
.row-icon {
  width: 2rem; height: 2rem; border-radius: 50%; border: 1px solid var(--line); position: relative; flex-shrink: 0;
  transition: background-color .3s, border-color .3s, transform .4s var(--ease-out), color .3s;
}
.row-icon::before, .row-icon::after { content: ""; position: absolute; left: 50%; top: 50%; background: currentColor; transform: translate(-50%, -50%); }
.row-icon::before { width: 11px; height: 2px; }
.row-icon::after { width: 2px; height: 11px; }
.row[open] .row-icon { background: var(--brand); border-color: var(--brand); color: #fff; transform: rotate(45deg); }
.row-body { overflow: hidden; }
.row-inner { padding: 0 3rem 1.25rem 0; color: var(--mute); }

/* --- Formulario --- */
.form { display: grid; gap: 1.1rem; padding: clamp(1.4rem, 3vw, 2.2rem); }
.form:hover { transform: none; box-shadow: var(--shadow); }
.form-grid { display: grid; gap: 1.1rem; }
.field { display: grid; gap: .4rem; }
.field label { font-weight: 600; font-size: .88rem; color: var(--ink); }
.field input, .field textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff;
  border: 1px solid var(--line); border-radius: 10px; padding: .75rem .9rem;
  transition: border-color .25s, box-shadow .25s;
}
.field input::placeholder, .field textarea::placeholder { color: #9aacc0; }
.field textarea { resize: vertical; min-height: 7.5rem; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(24, 112, 232, .15); }
.field input:user-invalid, .field textarea:user-invalid { border-color: var(--danger); }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: .9rem 1.25rem; }
.form-submit { position: relative; min-width: 12rem; }
.form-spinner { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; pointer-events: none; }
.form-spinner::after { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; animation: spin .9s linear infinite; }
.form.is-sending .form-label { opacity: 0; }
.form.is-sending .form-spinner { opacity: 1; }
.form.is-sending .form-submit { pointer-events: none; }
.form-status { font-size: .93rem; color: var(--mute); min-height: 1.5em; }
.form-status.is-ok { color: var(--green); font-weight: 600; }
.form-status.is-error { color: var(--danger); }
.form-status a { text-decoration: underline; }
.form.is-sent .field { opacity: .45; pointer-events: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* =============================================================
   5. Secciones
   ============================================================= */

/* --- Hero --- */
.hero {
  padding: calc(72px + clamp(2.5rem, 6vw, 5rem)) 0 clamp(2.5rem, 5vw, 4rem);
  background:
    radial-gradient(60% 50% at 85% 20%, rgba(34, 196, 240, .12), transparent 70%),
    radial-gradient(50% 45% at 10% 90%, rgba(24, 112, 232, .08), transparent 70%),
    linear-gradient(#fff, #fff);
  position: relative; overflow: clip;
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(11, 37, 64, .09) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.6), transparent 70%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.6), transparent 70%);
}
.hero-grid { position: relative; display: grid; gap: 3rem; align-items: center; }
.hero-copy h1 { margin-bottom: 1.2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.8rem; }
.hero-checks { display: grid; gap: .5rem; margin-top: 1.8rem; font-size: .93rem; color: var(--text); }
.hero-checks li { display: flex; align-items: center; gap: .5rem; }
.hero-checks .ico { color: var(--green); }

/* Panel visual */
.hero-visual { position: relative; max-width: 520px; margin-inline: auto; width: 100%; }
.panel {
  background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg); padding: 2.7rem 1.5rem 2.5rem;
}
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.25rem; }
.panel-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--mute); font-weight: 600; }
.panel-title { font-family: var(--heading); font-weight: 700; color: var(--ink); }
.bars { display: grid; grid-template-columns: repeat(6, 1fr); gap: .6rem; align-items: end; height: 170px; padding-bottom: 1.4rem; border-bottom: 1px solid var(--line); }
.bar { position: relative; height: var(--h); border-radius: 8px 8px 4px 4px; background: linear-gradient(180deg, #bcd4f7, #d9e7fb); transform-origin: bottom; }
.bar.is-now { background: linear-gradient(180deg, var(--brand), var(--cyan)); }
.bar span { position: absolute; left: 0; right: 0; bottom: -1.4rem; text-align: center; font-size: .72rem; color: var(--mute); }
html.is-ready .bar { animation: growBar 1s var(--ease-out) both; }
.bar:nth-child(2) { animation-delay: .08s; } .bar:nth-child(3) { animation-delay: .16s; }
.bar:nth-child(4) { animation-delay: .24s; } .bar:nth-child(5) { animation-delay: .32s; } .bar:nth-child(6) { animation-delay: .4s; }
@keyframes growBar { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.panel-list { display: grid; gap: .45rem; margin-top: 1.2rem; font-size: .9rem; color: var(--text); }
.panel-list li { display: flex; align-items: center; gap: .5rem; }
.panel-list .ico { color: var(--green); }
.chip {
  position: absolute; display: flex; align-items: center; gap: .7rem;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .7rem .9rem; box-shadow: var(--shadow-lg);
  font-size: .8rem; color: var(--mute); line-height: 1.25;
}
.chip strong { display: block; font-family: var(--heading); color: var(--ink); font-size: .98rem; }
.chip .ico { color: var(--brand); font-size: 1.3rem; }
.chip-a { top: -1.4rem; right: 1.25rem; animation: floatA 6s ease-in-out infinite; }
.chip-b { bottom: -1.4rem; left: 1.25rem; animation: floatA 7s ease-in-out infinite reverse; }
@keyframes floatA { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* Franja de confianza */
.trust { margin-top: clamp(2.5rem, 6vw, 4.5rem); padding-top: 1.75rem; border-top: 1px solid var(--line); position: relative; }
.trust-label { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--mute); font-weight: 600; margin-bottom: 1rem; }
.trust-badges { display: flex; flex-wrap: wrap; gap: 1rem 2rem; }
.trust-badges li { display: flex; align-items: center; gap: .6rem; font-size: .85rem; font-weight: 500; color: var(--text); }
.trust-badges img { width: 44px; height: 44px; }

/* --- IA aplicada --- */
.card-icon-ai { background: linear-gradient(135deg, var(--brand-soft), #e6f8fd); }
#ia .card { display: flex; flex-direction: column; }
#ia .card p:not(.card-meta) { margin-bottom: 1rem; }
.card-meta { margin-top: auto; padding-top: .9rem; border-top: 1px solid var(--line); font-size: .8rem; font-weight: 600; color: var(--brand); }
.ai-notes { display: grid; gap: 1rem; margin-top: 2rem; padding: 1.4rem 1.6rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-alt); }
.ai-notes li { display: flex; align-items: flex-start; gap: .7rem; font-size: .95rem; color: var(--text); }
.ai-notes .ico { color: var(--brand); margin-top: .2rem; }
.ai-notes strong { color: var(--ink); }
@media (min-width: 720px) { .ai-notes { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; } }

/* --- CTA dentro de sección --- */
.section-cta { margin-top: 2.5rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1rem 1.5rem; text-align: center; }
.section-cta p { font-family: var(--heading); font-weight: 700; color: var(--ink); font-size: 1.1rem; }

/* --- Banda de cifras --- */
.band { background: var(--bg-band); color: #fff; padding: clamp(2.5rem, 6vw, 4rem) 0; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem 1.5rem; }
.stat dd { font-family: var(--heading); font-weight: 800; font-size: clamp(2.4rem, 4.5vw, 3.4rem); line-height: 1; letter-spacing: -.03em; color: #fff; font-variant-numeric: tabular-nums; }
.stat dd span[data-count-to] { color: var(--cyan); }
.stat dt { margin-top: .5rem; color: #b7c7dc; font-size: .95rem; }

/* --- Proceso --- */
.steps { display: grid; gap: 1.5rem; position: relative; }
.step { position: relative; padding: 1.75rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.step-num {
  display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%;
  background: var(--brand); color: #fff; font-family: var(--heading); font-weight: 800; margin-bottom: 1rem;
}
.step h3 { margin-bottom: .5rem; }
.step p { color: var(--mute); font-size: .97rem; }

/* --- Equipo --- */
.person { text-align: center; padding: 2rem 1.5rem; }
.person h3 { margin: 1rem 0 .25rem; font-size: 1.1rem; }
.person p { font-size: .92rem; }
.avatar {
  width: 4.5rem; height: 4.5rem; border-radius: 50%; margin-inline: auto; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--cyan)); color: #fff; font-family: var(--heading); font-weight: 800; font-size: 1.3rem;
}
.person-link { display: inline-flex; align-items: center; gap: .35rem; margin-top: .8rem; font-size: .85rem; font-weight: 600; color: var(--brand); }
.person-link:hover { text-decoration: underline; }

/* --- FAQ --- */
.faq-grid { display: grid; gap: 2rem; }
.faq-grid .section-head { margin-bottom: 0; }
.faq-grid .section-head .btn { margin-top: 1.25rem; }

/* --- Contacto --- */
.contact-grid { display: grid; gap: 2.5rem; align-items: start; }
.contact-info h2 { margin-bottom: .75rem; }
.contact-list { display: grid; gap: .8rem; margin-top: 1.75rem; }
.contact-list li { display: flex; align-items: flex-start; gap: .7rem; color: var(--text); }
.contact-list .ico { color: var(--brand); margin-top: .15rem; }
.contact-list a:hover { color: var(--brand); text-decoration: underline; }

/* --- Footer --- */
.footer { background: #fff; border-top: 1px solid var(--line); padding: 3.5rem 0 2rem; font-size: .92rem; color: var(--mute); }
.footer-grid { display: grid; gap: 2rem; }
.footer-brand img { height: 64px; width: auto; margin-bottom: .9rem; }
.footer-brand p { max-width: 20rem; }
.footer h4 { margin-bottom: .9rem; }
.footer ul { display: grid; gap: .5rem; }
.footer a:hover { color: var(--brand); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: .85rem; }
.footer-top { color: var(--ink); font-weight: 600; }

/* --- WhatsApp flotante --- */
.whatsapp {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 90;
  width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  background: #25d366; color: #fff; box-shadow: 0 10px 24px -8px rgba(37, 211, 102, .6); font-size: 1.5rem;
  transition: transform .4s var(--ease-out), box-shadow .4s;
}
.whatsapp:hover { transform: translateY(-3px); box-shadow: 0 16px 30px -10px rgba(37, 211, 102, .7); }

/* =============================================================
   6. Efectos
   ============================================================= */
[data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease-soft) var(--d, 0s), transform .8s var(--ease-out) var(--d, 0s); }
[data-reveal].is-revealed { opacity: 1; transform: none; }
html.no-js [data-reveal] { opacity: 1; transform: none; }

/* =============================================================
   7. Responsive
   ============================================================= */
@media (min-width: 540px) {
  .form-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 720px) {
  .stats { grid-template-columns: repeat(4, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
  .footer-bottom { margin-top: 3rem; }
}
@media (min-width: 960px) {
  .nav-links { display: flex; }
  .nav-cta { display: inline-flex; }
  .nav-burger { display: none; }
  .hero-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 4rem; }
  .hero-visual { margin: 1rem 0 1rem auto; }
  .faq-grid { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 4rem; }
  .contact-grid { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 4rem; }
}

/* =============================================================
   8. Movimiento reducido — solo lo intrusivo
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .chip-a, .chip-b { animation: none; }
}
