/* ==========================================================
   YR Solutions · Landing corporativa
   Mobile first · breakpoints: 640px, 900px, 1100px
   ========================================================== */

:root {
  --navy: #0f2d57;
  --navy-700: #16396b;
  --navy-600: #1d4682;
  --blue: #3e6aa8;
  --blue-300: #7fa0cc;
  --blue-100: #c9d9ee;
  --blue-50: #e9eff7;
  --surface: #f6f9fd;
  --white: #ffffff;
  --ink: #1f2937;
  --muted: #5b6675;
  --line: #d6dfeb;
  --ok: #1f7a5a;
  --ok-bg: #e3f3ec;
  --warn: #9a6200;
  --warn-bg: #fff1d6;
  --crit: #a33a3a;
  --crit-bg: #fbe4e4;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(15, 45, 87, .06), 0 12px 32px rgba(15, 45, 87, .10);
  --container: 1200px;
  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--white); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

.ic { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.section { padding: 64px 0; }
.section--tint { background: var(--surface); }
.section__head { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.section__head h2, .h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.25rem); line-height: 1.2; letter-spacing: -.02em; color: var(--navy); font-weight: 700; }
.section__head p { margin-top: 12px; color: var(--muted); font-size: 1.05rem; }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 12px 22px; border-radius: 8px; font-weight: 600; font-size: .95rem; border: 1.5px solid transparent; transition: background .2s, color .2s, border-color .2s, box-shadow .2s; text-align: center; }
.btn--primary { background: var(--navy); color: #fff; }
.btn--primary:hover { background: var(--navy-600); box-shadow: 0 6px 18px rgba(15, 45, 87, .25); }
.btn--outline { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn--outline:hover { background: var(--navy); color: #fff; }
.btn--light { background: #fff; color: var(--navy); }
.btn--light:hover { background: var(--blue-50); }
.btn--sm { min-height: 40px; padding: 8px 16px; font-size: .88rem; }

/* ---------- Header ---------- */
.header { position: sticky; top: 0; z-index: 50; background: var(--navy); border-bottom: 1px solid rgba(255, 255, 255, .08); transition: border-color .2s, box-shadow .2s; }
.header.is-scrolled { box-shadow: 0 6px 20px rgba(6, 20, 40, .35); }
.header__inner { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand img { height: 42px; width: auto; }
.nav { display: none; }
.nav a { font-size: .92rem; font-weight: 500; color: #dbe5f2; padding: 8px 2px; border-bottom: 2px solid transparent; transition: color .2s, border-color .2s; }
.nav a:hover { color: #fff; border-color: var(--blue); }
.header__actions { display: flex; align-items: center; gap: 10px; }
.header__cta-long { display: none; }
.header__actions .btn { gap: 0; }
.menu-btn { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, .25); background: transparent; border-radius: 10px; color: #fff; }
.menu-btn .ic { width: 22px; height: 22px; }
.mobile-nav { display: none; border-top: 1px solid rgba(255, 255, 255, .12); background: var(--navy); }
.mobile-nav.is-open { display: block; }
.mobile-nav a { display: block; padding: 14px 20px; font-weight: 500; color: #fff; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.mobile-nav a:last-child { border-bottom: 0; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 40px 0 72px; background: linear-gradient(180deg, var(--surface) 0%, #fff 100%); }
.hero::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(var(--blue-100) 1px, transparent 1px); background-size: 28px 28px; opacity: .45; mask-image: linear-gradient(180deg, #000, transparent 70%); -webkit-mask-image: linear-gradient(180deg, #000, transparent 70%); pointer-events: none; }
.hero__grid { position: relative; display: grid; gap: 48px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 600; color: var(--navy); background: var(--blue-50); border: 1px solid var(--blue-100); padding: 6px 12px; border-radius: 999px; margin-bottom: 18px; }
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); }
.hero h1 { font-size: clamp(2rem, 1.4rem + 2.2vw, 3rem); max-width: 620px; line-height: 1.08; letter-spacing: -.03em; color: var(--navy); font-weight: 800; }
.hero__lead { margin-top: 18px; font-size: clamp(1rem, .95rem + .3vw, 1.2rem); color: var(--muted); max-width: 540px; }
.hero__cta { display: flex; flex-direction: column; gap: 12px; margin-top: 28px; }
.trust { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 28px; color: var(--muted); font-size: .88rem; font-weight: 500; }
.trust li { display: flex; align-items: center; gap: 8px; }
.trust .ic { width: 18px; height: 18px; color: var(--blue); stroke-width: 2.2; }

/* ---------- Mockup de panel (hero) ---------- */
.dash-wrap { position: relative; padding: 0 0 28px; }
.win { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.win__bar { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; background: var(--blue-50); border-bottom: 1px solid var(--line); }
.win__bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--blue-100); display: block; }
.win__bar span { margin-left: 10px; font-size: .72rem; color: var(--muted); font-weight: 500; }
.app { display: grid; grid-template-columns: 56px 1fr; min-height: 340px; background: var(--surface); }
.app__side { background: var(--navy); padding: 14px 0; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.app__side .logo-dot { width: 28px; height: 28px; border-radius: 7px; background: #fff; color: var(--navy); font-weight: 800; font-size: .66rem; display: grid; place-items: center; letter-spacing: -.02em; }
.app__side .ic { width: 18px; height: 18px; color: var(--blue-100); }
.app__side .is-active { color: #fff; }
.app__main { padding: 14px; min-width: 0; }
.app__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.app__top strong { font-size: .86rem; color: var(--navy); }
.chip { font-size: .66rem; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: var(--blue-50); color: var(--navy); border: 1px solid var(--blue-100); white-space: nowrap; }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 10px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; min-width: 0; }
.kpi small { display: block; font-size: .62rem; color: var(--muted); font-weight: 500; }
.kpi b { display: block; font-size: 1rem; color: var(--navy); letter-spacing: -.02em; line-height: 1.3; }
.kpi em { font-style: normal; font-size: .62rem; font-weight: 600; color: var(--ok); }
.kpi em.down { color: var(--crit); }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 10px; min-width: 0; }
.panel h4 { margin: 0 0 8px; font-size: .68rem; color: var(--navy); font-weight: 700; }
.grid-2 { display: grid; gap: 8px; }
.chart { width: 100%; height: 110px; }
.legend { display: flex; gap: 10px; flex-wrap: wrap; font-size: .6rem; color: var(--muted); margin-top: 6px; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 4px; }
.mini-table { width: 100%; border-collapse: collapse; font-size: .64rem; }
.mini-table th { text-align: left; color: var(--muted); font-weight: 500; padding: 3px 4px; border-bottom: 1px solid var(--line); }
.mini-table td { padding: 5px 4px; border-bottom: 1px solid var(--blue-50); color: var(--ink); }
.mini-table td:last-child, .mini-table th:last-child { text-align: right; }
.float { position: absolute; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 10px 12px; display: flex; align-items: center; gap: 10px; font-size: .74rem; }
.float b { display: block; color: var(--navy); font-size: .78rem; }
.float span { color: var(--muted); }
.float .ic { width: 20px; height: 20px; }
.float--a { left: -6px; bottom: 0; }
.float--b { right: -6px; top: -14px; display: none; }
.float__ico { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.float__ico--warn { background: var(--warn-bg); color: var(--warn); }
.float__ico--ok { background: var(--ok-bg); color: var(--ok); }

/* ---------- Servicios ---------- */
.cards { display: grid; gap: 16px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; transition: transform .25s, box-shadow .25s, border-color .25s; display: flex; gap: 16px; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--blue-100); }
.icon-box { width: 48px; height: 48px; border-radius: 12px; background: var(--blue-50); color: var(--navy); display: grid; place-items: center; flex: none; transition: background .25s, color .25s; }
.card:hover .icon-box { background: var(--navy); color: #fff; }
.card h3 { font-size: 1.05rem; color: var(--navy); line-height: 1.3; }
.card p { margin-top: 6px; color: var(--muted); font-size: .94rem; }
.card__link { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; font-size: .88rem; font-weight: 600; color: var(--blue); }
.card__link .ic { width: 16px; height: 16px; transition: transform .2s; }
.card:hover .card__link .ic { transform: translateX(3px); }

/* ---------- OptiERP ---------- */
.product { background: var(--navy); color: #fff; position: relative; overflow: hidden; }
.product::before { content: ""; position: absolute; right: -160px; top: -160px; width: 480px; height: 480px; border-radius: 50%; background: radial-gradient(circle, rgba(62, 106, 168, .45), transparent 70%); pointer-events: none; }
.product__grid { position: relative; display: grid; gap: 40px; align-items: center; }
.product .eyebrow { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .18); color: #fff; }
.product .eyebrow::before { background: var(--blue-100); }
.product h2 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem); letter-spacing: -.03em; font-weight: 800; line-height: 1.1; }
.product__lead { margin-top: 14px; color: #c4cfdd; font-size: 1.05rem; max-width: 480px; }
.tabs { display: flex; gap: 8px; margin: 24px 0; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; flex-wrap: nowrap; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; min-height: 40px; padding: 8px 16px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .25); background: transparent; color: #fff; font-size: .88rem; font-weight: 500; transition: background .2s, color .2s, border-color .2s; }
.tab:hover { border-color: #fff; }
.tab[aria-selected="true"] { background: #fff; color: var(--navy); border-color: #fff; font-weight: 600; }
.erp { color: var(--ink); }
.erp .app { grid-template-columns: 1fr; min-height: 0; }
.erp .app__side { display: none; }
.erp .app__main { padding: 16px; min-height: 320px; }
.erp-panel[hidden] { display: none; }
.erp-panel { animation: fade .3s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.erp .mini-table { font-size: .72rem; }
.erp .mini-table td { padding: 7px 5px; }
.erp .kpi b { font-size: 1.1rem; }
.erp .kpis { grid-template-columns: repeat(3, 1fr); }
.badge { display: inline-block; font-size: .64rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.badge--ok { background: var(--ok-bg); color: var(--ok); }
.badge--warn { background: var(--warn-bg); color: var(--warn); }
.badge--crit { background: var(--crit-bg); color: var(--crit); }
.badge--info { background: var(--blue-50); color: var(--navy-600); }
.bars { display: grid; gap: 10px; }
.bars div { display: grid; grid-template-columns: 74px 1fr 36px; gap: 8px; align-items: center; font-size: .72rem; color: var(--muted); }
.bars span.track { height: 8px; border-radius: 4px; background: var(--blue-50); overflow: hidden; display: block; }
.bars span.track i { display: block; height: 100%; background: var(--navy); border-radius: 4px; }
.bars b { color: var(--navy); text-align: right; }
.col-chart { display: flex; align-items: flex-end; gap: 8px; height: 120px; padding-top: 6px; }
.col-chart span { flex: 1; background: var(--blue-100); border-radius: 4px 4px 0 0; position: relative; }
.col-chart span.hi { background: var(--navy); }
.col-chart span::after { content: attr(data-d); position: absolute; bottom: -18px; left: 0; right: 0; text-align: center; font-size: .6rem; color: var(--muted); }
.note { margin-top: 10px; font-size: .68rem; color: var(--muted); }
.demo-note { margin-top: 14px; font-size: .78rem; color: #9fb0c6; }
.split { display: grid; gap: 10px; }

/* ---------- Beneficios ---------- */
.benefits { display: grid; gap: 22px; }
.benefit { display: flex; gap: 16px; align-items: flex-start; }
.benefit .icon-box { border-radius: 50%; }
.benefit h3 { font-size: 1rem; color: var(--navy); }
.benefit p { margin-top: 4px; color: var(--muted); font-size: .92rem; }

/* ---------- Proceso ---------- */
.steps { display: grid; gap: 0; position: relative; list-style: none; margin: 0; padding: 0; }
.step { position: relative; padding: 0 0 28px 64px; }
.step::before { content: ""; position: absolute; left: 21px; top: 44px; bottom: 0; width: 2px; background: var(--blue-100); }
.step:last-child { padding-bottom: 0; }
.step:last-child::before { display: none; }
.step__n { position: absolute; left: 0; top: 0; width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--navy); background: var(--surface); color: var(--navy); font-weight: 700; display: grid; place-items: center; }
.step h3 { font-size: 1.05rem; color: var(--navy); padding-top: 8px; }
.step p { margin-top: 4px; color: var(--muted); font-size: .92rem; }

/* ---------- Sectores ---------- */
.sectors { display: grid; gap: 18px; }
.sector { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; transition: transform .25s, box-shadow .25s; }
.sector:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.sector img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; background: var(--blue-50); }
.sector div { padding: 18px 20px 22px; }
.sector h3 { font-size: 1.05rem; color: var(--navy); }
.sector p { margin-top: 6px; color: var(--muted); font-size: .92rem; }

/* ---------- CTA final ---------- */
.cta { background: var(--navy); color: #fff; text-align: center; padding: 72px 0; position: relative; overflow: hidden; }
.cta::before { content: ""; position: absolute; left: 50%; top: -220px; width: 620px; height: 620px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(circle, rgba(62, 106, 168, .4), transparent 70%); pointer-events: none; }
.cta .container { position: relative; }
.cta h2 { font-size: clamp(1.7rem, 1.2rem + 2vw, 2.6rem); letter-spacing: -.02em; line-height: 1.15; font-weight: 800; max-width: 680px; margin: 0 auto; }
.cta p { margin: 14px auto 28px; color: #c4cfdd; max-width: 520px; }
.cta__actions { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.cta .btn--ghost { color: #fff; border-color: rgba(255, 255, 255, .35); }
.cta .btn--ghost:hover { background: rgba(255, 255, 255, .1); border-color: #fff; }

/* ---------- Footer ---------- */
.footer { background: var(--navy); color: #c4cfdd; padding: 56px 0 0; border-top: 1px solid rgba(255, 255, 255, .08); }
.footer__grid { display: grid; gap: 32px; }
.footer__logo { height: 44px; width: auto; filter: brightness(0) invert(1); }
.footer__about { margin-top: 14px; max-width: 320px; font-size: .92rem; }
.footer h3 { color: #fff; font-size: .95rem; margin-bottom: 14px; }
.footer li { margin-bottom: 10px; }
.footer a { transition: color .2s; }
.footer a:hover { color: #fff; }
.footer__contact li { display: flex; align-items: center; gap: 10px; }
.footer__contact .ic { width: 18px; height: 18px; color: var(--blue-100); }
.social { display: flex; gap: 10px; }
.social a { width: 42px; height: 42px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .22); display: grid; place-items: center; color: #fff; transition: background .2s, border-color .2s; }
.social a:hover { background: rgba(255, 255, 255, .1); border-color: #fff; }
.footer__bottom { margin-top: 40px; padding: 20px 0; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .84rem; color: #9fb0c6; }

/* ---------- WhatsApp flotante ---------- */
.wa { position: fixed; right: 16px; bottom: 16px; z-index: 60; display: flex; align-items: center; gap: 10px; background: #1f7a5a; color: #fff; min-height: 52px; padding: 0 18px; border-radius: 999px; font-weight: 600; font-size: .92rem; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); transition: transform .2s, background .2s; }
.wa:hover { transform: translateY(-2px); background: #17664a; }
.wa .ic { width: 22px; height: 22px; }
.wa span { display: none; }

/* ==========================================================
   Tablet · 640px
   ========================================================== */
@media (min-width: 640px) {
  .container { padding: 0 28px; }
  .section { padding: 80px 0; }
  .hero__cta { flex-direction: row; flex-wrap: wrap; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .card { flex-direction: column; }
  .sectors { grid-template-columns: repeat(2, 1fr); }
  .benefits { grid-template-columns: repeat(2, 1fr); gap: 28px; }
  .cta__actions { flex-direction: row; justify-content: center; }
  .footer__grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer__grid > :last-child { grid-column: span 3; }
  .kpis { grid-template-columns: repeat(4, 1fr); }
  .float--b { display: flex; }
  .wa span { display: inline; }
  .header__cta-long { display: inline; }
}

/* ==========================================================
   Tablet grande · 900px
   ========================================================== */
@media (min-width: 900px) {
  .hero__grid { grid-template-columns: 1.02fr 1fr; gap: 40px; }
  .product__grid { grid-template-columns: .9fr 1.25fr; gap: 56px; }
  .tabs { flex-wrap: wrap; overflow: visible; }
  .grid-2 { grid-template-columns: 1.7fr 1fr; }
  .steps { grid-template-columns: repeat(5, 1fr); gap: 16px; }
  .step { padding: 64px 0 0; text-align: center; }
  .step::before { left: 50%; top: 22px; width: calc(100% + 16px); height: 2px; bottom: auto; }
  .step__n { left: 50%; transform: translateX(-50%); }
  .step h3 { padding-top: 0; }
  .footer__grid { grid-template-columns: 1.5fr 1fr 1.2fr 1fr; }
  .footer__grid > :last-child { grid-column: auto; }
}

/* ==========================================================
   Desktop · 1100px
   ========================================================== */
@media (min-width: 1100px) {
  .nav { display: flex; gap: 30px; }
  .menu-btn, .mobile-nav { display: none !important; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .sectors { grid-template-columns: repeat(4, 1fr); }
  .benefits { grid-template-columns: repeat(5, 1fr); gap: 24px; }
  .benefit { flex-direction: column; align-items: center; text-align: center; }
  .app { grid-template-columns: 64px 1fr; min-height: 380px; }
  .app__main { padding: 18px; }
  .erp .app__main { padding: 20px; }
}
@media (max-width: 1099px) { .header__actions .btn--sm { padding: 8px 14px; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.header .btn--primary { background: #fff; color: var(--navy); }
.header .btn--primary:hover { background: var(--blue-50); box-shadow: none; }
.header .brand img { filter: brightness(0) invert(1); }
