/* Maintenify — identidad gráfica (dirección visual corregida) */
:root {
  --blue: #1769D2;
  --blue-hover: #1458B0;
  --blue-light: #5B9BEA;
  --ink: #222B36;
  --ink-deep: #1A212A;
  --text: #4A5565;
  --label: #6B7684;
  --caption: #5F6B7A;
  --muted-dark: #C9D1DB;
  --muted-footer: #A9B3C1;
  --paper: #F3F5F8;
  --rule: #DCE1E8;
  --rule-strong: #C9D1DB;
  --white: #FFFFFF;
  --display: Montserrat, Arial, sans-serif;
  --body: Inter, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; font-family: var(--body); color: var(--text); background: var(--white); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
a { color: var(--blue); }
a:hover { color: var(--blue-hover); }
h1, h2, h3 { font-family: var(--display); color: var(--ink); }
.container { position: relative; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }
.section.top-0 { padding-top: 0; }
.bg-paper { background: var(--paper); }
.bg-ink { background: var(--ink); overflow: hidden; }

/* Tipografía */
.eyebrow { font-weight: 600; text-transform: uppercase; margin: 0; font-size: 13px; letter-spacing: 3px; color: var(--blue); }
.bg-ink .eyebrow { color: var(--blue-light); }
.label { font-weight: 600; text-transform: uppercase; letter-spacing: 2px; font-size: 12px; color: var(--label); }
h2 { margin: 12px 0 0; font-size: clamp(2rem, 3.6vw, 3rem); line-height: 1.1; letter-spacing: -0.02em; max-width: 760px; text-wrap: balance; }
.bg-ink h2 { color: var(--white); }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 48px; }
.section-head > p { margin: 0; max-width: 440px; }
.bg-ink .section-head > p { color: var(--muted-dark); max-width: 400px; }

/* Botones */
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 24px; border-radius: 6px; font-weight: 600; font-size: 16px; text-decoration: none; background: var(--blue); color: var(--white); transition: background .2s; }
.btn:hover { background: var(--blue-hover); color: var(--white); }
.btn-outline { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--white); }
.btn-white { background: var(--white); color: var(--blue); }
.btn-white:hover { background: var(--paper); color: var(--blue-hover); }
.btns { display: flex; flex-wrap: wrap; gap: 12px; }

/* Header / nav */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--paper); }
.nav { display: flex; align-items: center; gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--rule); }
.nav .logo { height: 40px; width: auto; margin-right: auto; display: block; }
.nav-links { display: flex; gap: 24px; font-size: 15px; font-weight: 500; }
.nav-links a { color: var(--ink); text-decoration: none; }
.nav-links a:hover { color: var(--blue); }
.nav-toggle { display: none; width: 48px; height: 48px; border: 1.5px solid var(--ink); border-radius: 6px; background: transparent; cursor: pointer; padding: 0; }
.nav-toggle span { display: block; width: 20px; height: 2px; margin: 4px auto; background: var(--ink); transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Hero */
.hero { background: var(--paper); overflow: hidden; }
.hero-grid { display: flex; flex-wrap: wrap; align-items: center; gap: 56px; padding-block: 72px 88px; }
.hero-copy { flex: 1 1 460px; min-width: 0; }
.hero h1 { margin: 20px 0 0; font-size: clamp(2.5rem, 5vw, 4.25rem); line-height: 1.04; letter-spacing: -0.03em; font-weight: 300; text-wrap: balance; }
.hero h1 b { font-weight: 800; }
.hero-lead { margin: 28px 0 32px; font-size: clamp(1.05rem, 1.5vw, 1.2rem); max-width: 560px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 24px; margin-top: 56px; }
.stats div { display: flex; flex-direction: column; gap: 2px; padding-top: 14px; border-top: 1px solid var(--rule-strong); }
.stats b { font-family: var(--display); font-size: 28px; font-weight: 700; color: var(--ink); }
.stats span { font-size: 14px; }

.hero-figure { flex: 1 1 420px; min-width: 0; margin: 0; }
.frame { position: relative; }
.frame > img { display: block; width: 100%; aspect-ratio: 0.86; object-fit: cover; }
.corner { position: absolute; width: 18px; height: 18px; border: 0 solid rgba(34,43,54,.5); }
.corner.tl { top: -10px; left: -10px; border-top-width: 1.5px; border-left-width: 1.5px; }
.corner.tr { top: -10px; right: -10px; border-top-width: 1.5px; border-right-width: 1.5px; }
.corner.bl { bottom: -10px; left: -10px; border-bottom-width: 1.5px; border-left-width: 1.5px; }
.corner.br { bottom: -10px; right: -10px; border-bottom-width: 1.5px; border-right-width: 1.5px; }
.callout { position: absolute; display: flex; align-items: center; transform: translateY(-50%); }
.callout .dot { flex: none; width: 14px; height: 14px; border-radius: 50%; background: var(--blue); border: 2px solid var(--white); }
.callout .line { width: 40px; height: 1px; background: var(--white); }
.callout .tag { font-weight: 600; text-transform: uppercase; font-size: 15px; letter-spacing: 1.5px; padding: 8px 12px; background: rgba(26,33,42,.88); color: var(--white); white-space: nowrap; }
.callout.c1 { left: calc(22% - 9px); top: 26%; }
.callout.c2 { right: calc(38% - 9px); top: 70%; }
.callout.c2 .line { width: 48px; }
.callout.c3 { right: calc(22% - 9px); top: 16%; }
.callout.c3 .line { width: 36px; }
.fig-caption { display: flex; justify-content: space-between; gap: 16px; margin-top: 18px; font-weight: 600; text-transform: uppercase; letter-spacing: 2px; font-size: 12px; color: var(--caption); }

/* Principios */
.principles { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); column-gap: 24px; }
.principle { display: flex; flex-direction: column; gap: 14px; padding: 28px 24px 32px; border-top: 1px solid rgba(255,255,255,.2); }
.principle .label { color: var(--blue-light); }
.principle h3 { margin: 0; font-size: 22px; color: var(--white); }
.principle p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--muted-dark); }
.diagram { position: relative; height: 104px; width: 250px; max-width: 100%; margin-top: 12px; }
.diagram > * { position: absolute; }
.diagram .d { border-radius: 50%; }
.diagram .d-sm { width: 8px; height: 8px; background: var(--muted-dark); }
.diagram .d-md { width: 12px; height: 12px; background: var(--blue-light); }
.diagram .d-lg { width: 16px; height: 16px; background: var(--blue); box-shadow: 0 0 0 5px rgba(23,105,210,.25); }
.diagram .h { height: 1px; background: rgba(255,255,255,.4); }
.diagram .v { width: 1px; background: rgba(255,255,255,.4); }
.diagram .accent { background: var(--blue-light); }
.diagram .t { font-size: 12px; font-weight: 600; color: var(--muted-dark); white-space: nowrap; }
.diagram .t.w { color: var(--white); }
.diagram .box { font-size: 12px; font-weight: 600; color: var(--white); padding: 5px 10px; border: 1px solid var(--blue-light); white-space: nowrap; }
.diagram .chip { font-size: 12px; font-weight: 700; padding: 5px 10px; }
.diagram .chip.light { color: var(--ink); background: var(--white); }
.diagram .chip.blue { color: var(--white); background: var(--blue); }

/* Problema / solución */
.compare { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 48px; }
.compare > div { flex: 1 1 360px; padding: 36px; background: var(--paper); }
.compare h3 { margin: 0 0 8px; font-size: 20px; }
.compare ul { list-style: none; margin: 0; padding: 0; }
.compare li { display: flex; gap: 14px; align-items: baseline; padding: 12px 0; border-top: 1px solid var(--rule); color: var(--ink); }
.compare .solution { background: var(--blue); color: var(--white); }
.compare .solution h3, .compare .solution li { color: var(--white); }
.compare .solution li { align-items: flex-start; gap: 12px; border-top-color: rgba(255,255,255,.22); }
.check { flex: none; margin-top: 3px; }

/* Áreas */
.areas { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; margin-top: 48px; }
.area { flex: 1 1 300px; margin: 0; display: flex; flex-direction: column; gap: 16px; }
.area .pic { position: relative; }
.area .pic img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.fig-tag { position: absolute; left: 0; top: 0; font-weight: 600; text-transform: uppercase; letter-spacing: 2px; font-size: 12px; padding: 8px 12px; background: var(--ink); color: var(--white); }
.area figcaption { display: flex; flex-direction: column; gap: 6px; }
.area figcaption b { font-family: var(--display); font-size: 21px; font-weight: 700; color: var(--ink); }
.area figcaption span { font-size: 15px; line-height: 1.5; }
.area figcaption .label { color: var(--blue); letter-spacing: 1.5px; }

/* Módulos */
.modules { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); column-gap: 32px; row-gap: 16px; }
.module { display: flex; flex-direction: column; gap: 10px; padding: 24px 0 28px; border-top: 2px solid var(--ink); }
.module:nth-child(even) { border-top-color: var(--blue); }
.module .row { display: flex; justify-content: space-between; align-items: center; }
.module h3 { margin: 0; font-size: 22px; }
.module p { margin: 0; font-size: 15px; line-height: 1.55; }

/* Control operativo */
.control { display: flex; flex-wrap: wrap; align-items: center; gap: 48px; }
.control-copy { flex: 1 1 340px; }
.control h2 { margin: 12px 0 20px; font-size: clamp(2rem, 3.4vw, 2.75rem); letter-spacing: normal; }
.control-copy > p { margin: 0 0 28px; color: var(--muted-dark); }
.control-copy .note { margin: 20px 0 0; font-size: 13px; color: var(--muted-footer); }
.control > img { flex: 1 1 520px; min-width: 0; width: 100%; max-width: 680px; height: auto; }

/* Modelos */
.models { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 48px; }
.model { flex: 1 1 360px; padding: 40px; background: var(--paper); display: flex; flex-direction: column; gap: 8px; }
.model h3 { margin: 8px 0 0; font-size: 36px; }
.model > p { margin: 0 0 8px; }
.model ul { list-style: none; margin: 0 0 24px; padding: 0; }
.model li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--rule); color: var(--ink); }
.model .cta { margin-top: auto; }
.model.dark { background: var(--ink); }
.model.dark h3, .model.dark li { color: var(--white); }
.model.dark > p { color: var(--muted-dark); }
.model.dark li { border-top-color: rgba(255,255,255,.15); }

/* Industrias */
.industries { display: flex; flex-wrap: wrap; gap: 56px; align-items: center; }
.industries-copy { flex: 1 1 420px; min-width: 0; }
.industries h2 { max-width: 620px; }
.industries ul { list-style: none; margin: 36px 0 0; padding: 0; }
.industries li { display: flex; gap: 20px; align-items: baseline; padding: 18px 0; border-top: 1px solid var(--rule); }
.industries li .label { color: var(--blue); }
.industries li b { font-family: var(--display); font-weight: 600; font-size: 19px; color: var(--ink); }
.industries-pic { flex: 1 1 360px; min-width: 0; position: relative; background: var(--ink); }
.industries-pic img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 30% 50%; }
.industries-pic .fig-tag { top: auto; bottom: 0; padding: 10px 14px; }

/* CTA */
.cta-band { background: var(--blue); overflow: hidden; }
.cta-grid { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 40px; padding-top: 88px; padding-bottom: 88px; }
.cta-copy { flex: 1 1 520px; }
.cta-band h2 { margin: 0; font-size: clamp(2.25rem, 4.5vw, 3.75rem); line-height: 1.05; color: var(--white); }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 32px; }
.cta-row span { font-size: 15px; color: var(--white); }
.cta-band img { flex: 0 1 380px; min-width: 0; width: 100%; aspect-ratio: 1; object-fit: cover; border: 1px solid rgba(255,255,255,.5); }

/* Footer */
.site-footer { background: var(--ink-deep); color: var(--muted-footer); padding: 48px 0; }
.site-footer .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.site-footer img { height: 36px; width: auto; display: block; }
.site-footer p { margin: 0; font-size: 14px; }
.site-footer a { color: var(--muted-footer); }

/* Accesibilidad */
a:focus-visible, button:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 30; background: var(--white); padding: 8px 12px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Tableta */
@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .nav { flex-wrap: wrap; padding: 16px 0; }
  .nav .btn-nav { display: none; }
  .nav-links { display: none; order: 3; width: 100%; flex-direction: column; gap: 0; padding: 8px 0 16px; }
  .nav-links a { padding: 14px 0; border-top: 1px solid var(--rule); font-size: 17px; }
  .nav.open .nav-links { display: flex; }
  .nav.open .btn-nav { display: inline-flex; order: 4; width: 100%; justify-content: center; margin-bottom: 8px; }
  .hero-grid { padding-block: 48px 72px; }
  .section { padding: 72px 0; }
}

/* Móvil */
@media (max-width: 560px) {
  body { font-size: 16px; }
  .nav .logo { height: 32px; }
  .hero-grid { gap: 40px; }
  .btns .btn { flex: 1 1 100%; justify-content: center; }
  .callout .tag { font-size: 10px; letter-spacing: 1px; padding: 6px 8px; }
  .callout .line { width: 20px !important; }
  .callout .dot { width: 12px; height: 12px; }
  .callout.c1 { left: calc(10% - 7px); }
  .callout.c2 { right: calc(30% - 7px); }
  .callout.c3 { right: calc(12% - 7px); }
  .fig-caption { font-size: 10px; letter-spacing: 1.5px; }
  .compare > div, .model { padding: 28px 22px; }
  .compare > div, .model, .area, .industries-copy, .industries-pic, .hero-copy, .hero-figure, .control-copy, .cta-copy { flex-basis: 100%; }
  .model h3 { font-size: 30px; }
  .cta-row .btn { flex: 1 1 100%; justify-content: center; }
  .site-footer .container { flex-direction: column; align-items: flex-start; }
}

/* Diagramas de principios: en varias columnas el ancho útil es < 250px → escalar */
@media (min-width: 561px) {
  .principle { padding-left: 0; padding-right: 0; }
  .diagram { zoom: .8; }
}

/* Iniciar sesión junto a los CTA */
.nav-login { font-size: 15px; font-weight: 600; color: var(--ink); text-decoration: none; }
.nav-login:hover { color: var(--blue); }
.login-hint { margin: 16px 0 0; font-size: 15px; }
.login-hint a { font-weight: 600; }
.cta-login { font-weight: 600; font-size: 16px; color: var(--white); text-decoration: underline; text-underline-offset: 4px; }
.cta-login:hover { color: var(--white); opacity: .85; }
@media (max-width: 960px) {
  .nav .nav-login { display: none; }
  .nav.open .nav-login { display: block; order: 4; width: 100%; text-align: center; padding: 12px 0; }
  .nav.open .btn-nav { order: 5; }
}
@media (max-width: 560px) {
  .cta-login { flex: 1 1 100%; text-align: center; }
}

/* Páginas legales */
.legal { padding: 72px 0 96px; }
.legal .container { max-width: 860px; }
.legal h1 { margin: 16px 0 12px; font-size: clamp(2rem, 5vw, 2.875rem); line-height: 1.1; letter-spacing: -0.02em; }
.legal .updated { margin: 0 0 40px; font-size: 14px; color: var(--label); }
.legal article { padding: 24px 0; border-top: 1px solid var(--rule); }
.legal h2 { margin: 0 0 8px; font-size: 22px; max-width: none; letter-spacing: -0.01em; }
.legal article p { margin: 0; }
.legal .back { display: inline-block; margin-top: 32px; font-weight: 600; }
