/* ===================== Tokens ===================== */
:root {
  --navy: #0B1F3D;
  --navy-deep: #060F1F;
  --steel: #1B4F9C;
  --steel-light: #2F6FED;
  --cyan: #22D3EE;
  --cyan-deep: #0891B2;

  --bg: #F7F9FC;
  --surface: #FFFFFF;
  --border: #E2E8F0;

  --text: #101828;
  --text-secondary: #4A5568;
  --text-on-dark: #E7ECF5;
  --text-on-dark-secondary: #9FB3D1;

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 8px;

  --container-w: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 24px;
}

a { color: inherit; text-decoration: none; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--navy);
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.2rem, 4.4vw, 3.4rem); line-height: 1.08; font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.35rem); line-height: 1.16; }
h3 { font-size: 1.15rem; margin-bottom: 8px; }

p { margin: 0 0 16px; color: var(--text-secondary); }

:focus-visible {
  outline: 2px solid var(--cyan-deep);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan-deep);
  margin-bottom: 14px;
  font-weight: 500;
}
.eyebrow-light { color: var(--cyan); }

.accent { color: var(--cyan-deep); }

/* ===================== Buttons ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: linear-gradient(120deg, var(--steel), var(--steel-light));
  color: #fff;
  box-shadow: 0 8px 20px -6px rgba(27, 79, 156, 0.55);
}
.btn-primary:hover { box-shadow: 0 10px 26px -6px rgba(27, 79, 156, 0.65); }

.btn-ghost {
  background: transparent;
  color: var(--navy);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--steel); }

.btn-small { padding: 9px 18px; font-size: 0.85rem; }
.btn-large { padding: 16px 32px; font-size: 1.05rem; }

/* ===================== Nav ===================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 249, 252, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 30px; height: 30px; object-fit: contain; }
.brand-word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.01em;
  color: var(--navy);
  white-space: nowrap;
}
.nav-links { display: flex; gap: 28px; font-size: 0.92rem; font-weight: 500; }
.nav-links a { color: var(--text-secondary); transition: color 0.15s ease; }
.nav-links a:hover { color: var(--navy); }

@media (max-width: 760px) {
  .nav-links { display: none; }
}

/* ===================== Hero ===================== */
.hero { padding: 72px 0 96px; overflow: hidden; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.hero-sub { font-size: 1.05rem; max-width: 46ch; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
}

/* ---- hero visual: fanned mini windows ---- */
.hero-visual { display: flex; justify-content: center; }
.window-stack {
  position: relative;
  width: 100%;
  max-width: 420px;
  height: 380px;
}
.window-stack .mini-window {
  position: absolute;
  width: 280px;
  box-shadow: 0 30px 50px -20px rgba(11, 31, 61, 0.35);
}
.window-stack .mw-recetario { top: 0; left: 0; z-index: 3; transform: rotate(-4deg); }
.window-stack .mw-homestudio { top: 60px; left: 90px; z-index: 2; transform: rotate(3deg); }
.window-stack .mw-finanzas { top: 130px; left: 30px; z-index: 1; transform: rotate(-2deg); }

@media (max-width: 480px) {
  .window-stack { max-width: 300px; height: 320px; }
  .window-stack .mini-window { width: 220px; }
  .window-stack .mw-homestudio { left: 60px; top: 55px; }
  .window-stack .mw-finanzas { left: 20px; top: 110px; }
}

/* ===================== Mini window chrome ===================== */
.mini-window {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(11, 31, 61, 0.08);
}
.mw-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  background: #EEF1F6;
  border-bottom: 1px solid rgba(11, 31, 61, 0.06);
}
.mw-dot { width: 7px; height: 7px; border-radius: 50%; background: #C9D2E0; }
.mw-url {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: #7C8BA3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mw-body { padding: 16px; min-height: 140px; }
.mw-large { width: 100%; }
.mw-large .mw-body { min-height: 220px; }

/* --- Cotizador Magistral mockup --- */
.mw-body-recetario { background: #F4F6FA; }
.mw-rm-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 10px;
}
.mw-rm-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  margin-bottom: 8px;
}
.mw-rm-num { font-family: var(--font-mono); font-size: 0.68rem; color: #8592A8; }
.mw-rm-name { font-size: 0.82rem; font-weight: 600; color: var(--navy); }
.mw-rm-badge {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--steel);
  color: var(--steel);
  white-space: nowrap;
}
.mw-rm-badge-alt { border-color: var(--cyan-deep); color: var(--cyan-deep); }
.mw-rm-badge-ok { border-color: #16A34A; color: #16A34A; }

/* --- Home Studio mockup --- */
.mw-body-homestudio {
  background: linear-gradient(160deg, #241f45 0%, #3c3170 55%, #4a3a86 100%);
  text-align: center;
  color: #fff;
}
.mw-hs-icon {
  width: 40px; height: 40px;
  margin: 0 auto 10px;
  border-radius: 12px;
  background: linear-gradient(135deg, #7c6fe0, #9d5ce0);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}
.mw-hs-brand { font-family: var(--font-display); font-weight: 700; font-size: 1rem; }
.mw-hs-tag { font-size: 0.72rem; color: #C7C2EA; margin-bottom: 14px; }
.mw-hs-chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-bottom: 14px; }
.mw-hs-chips span {
  font-size: 0.65rem;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  color: #E4E1FA;
}
.mw-hs-btn {
  background: linear-gradient(90deg, #6d5bd0, #9333ea);
  border-radius: 999px;
  padding: 9px;
  font-size: 0.78rem;
  font-weight: 600;
}

/* --- Finanzas App mockup --- */
.mw-body-finanzas { background: var(--surface); }
.mw-fa-icon {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #6a5acd, #7c6fe0);
  color: #ffd166;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  margin-bottom: 10px;
}
.mw-fa-brand { font-family: var(--font-display); font-weight: 700; font-size: 0.95rem; color: var(--navy); }
.mw-fa-tag { font-size: 0.72rem; color: var(--text-secondary); margin-bottom: 14px; }
.mw-fa-field {
  height: 28px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 8px;
  background: #FBFCFE;
}
.mw-fa-btn {
  margin-top: 8px;
  background: linear-gradient(90deg, #6a5acd, #4c3fae);
  color: #fff;
  border-radius: var(--radius-sm);
  text-align: center;
  padding: 9px;
  font-size: 0.78rem;
  font-weight: 600;
}

/* ===================== Section head ===================== */
.section-head { max-width: 620px; margin-bottom: 48px; }
.section-sub { font-size: 1.02rem; }

/* ===================== Productos ===================== */
.productos { padding: 96px 0; }
.product-rail {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.connector {
  position: absolute;
  top: -34px;
  left: 0;
  width: 100%;
  height: 60px;
  overflow: visible;
}
.connector path {
  fill: none;
  stroke: var(--cyan-deep);
  stroke-width: 2;
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  transition: stroke-dashoffset 1.4s ease;
}
.connector.in-view path { stroke-dashoffset: 0; }
.connector .node {
  fill: var(--surface);
  stroke: var(--cyan-deep);
  stroke-width: 2;
  opacity: 0;
  transition: opacity 0.4s ease 1s;
}
.connector.in-view .node { opacity: 1; }

@media (max-width: 900px) {
  .product-rail { grid-template-columns: 1fr; }
  .connector { display: none; }
}

.product-card { display: flex; flex-direction: column; gap: 20px; }
.product-info { padding: 0 4px; }
.product-kicker {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cyan-deep);
  margin-bottom: 6px;
}
.product-link {
  display: inline-block;
  font-weight: 600;
  color: var(--steel);
  margin-top: 4px;
}
.product-link:hover { color: var(--steel-light); }

/* ===================== Servicios ===================== */
.servicios { padding: 96px 0; background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.service-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.service-card {
  padding: 28px 22px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.service-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--steel), var(--cyan-deep));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  margin-bottom: 16px;
}
.service-card p { font-size: 0.92rem; margin-bottom: 0; }

@media (max-width: 980px) {
  .service-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .service-grid { grid-template-columns: 1fr; }
}

/* ===================== Confianza ===================== */
.confianza {
  padding: 96px 0;
  background: linear-gradient(160deg, var(--navy-deep), var(--navy));
  color: var(--text-on-dark);
}
.confianza-inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 56px;
  align-items: center;
}
.confianza h2 { color: #fff; }
.confianza p { color: var(--text-on-dark-secondary); max-width: 52ch; }
.confianza-stats { display: flex; flex-direction: column; gap: 24px; }
.stat { display: flex; align-items: baseline; gap: 14px; }
.stat-num {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--cyan);
  line-height: 1;
}
.stat-label { font-size: 0.92rem; color: var(--text-on-dark-secondary); }

@media (max-width: 800px) {
  .confianza-inner { grid-template-columns: 1fr; }
  .confianza-stats { flex-direction: row; flex-wrap: wrap; gap: 32px; }
}

/* ===================== Contacto ===================== */
.contacto { padding: 110px 0; text-align: center; }
.contacto-inner { max-width: 560px; margin: 0 auto; }
.contacto p { font-size: 1.05rem; }

/* ===================== Footer ===================== */
.footer { padding: 40px 0; border-top: 1px solid var(--border); }
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-links { display: flex; gap: 22px; font-size: 0.88rem; color: var(--text-secondary); }
.footer-links a:hover { color: var(--navy); }
.footer-copy { font-size: 0.82rem; color: var(--text-secondary); }
