@import url('tokens.css');

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  font-family: var(--sg-font);
  color: var(--sg-ink);
  background: var(--sg-white);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
img { max-width: 100%; display: block; }
a { color: var(--sg-blue); text-decoration: none; }
a:hover { color: var(--sg-blue-deep); }
:focus-visible { outline: 2px solid var(--sg-blue); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
.mono { font-family: var(--sg-mono); }
.label { font-family: var(--sg-mono); font-size: 12px; color: var(--sg-blue-soft); margin-bottom: 6px; letter-spacing: .06em; }
.container { max-width: var(--sg-container); margin: 0 auto; padding: 0 var(--sg-gutter); }

/* Botones */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 26px; border-radius: var(--sg-radius-btn);
  font-weight: 600; font-size: 16px; transition: background .15s, border-color .15s, color .15s;
}
.btn--sm { padding: 10px 18px; font-size: 14px; border-radius: 6px; }
.btn--primary { background: var(--sg-blue); color: #fff; }
.btn--primary:hover { background: var(--sg-blue-hover); color: #fff; }
.btn--ghost { border: 1px solid rgba(246,246,246,.3); color: #F6F6F6; }
.btn--ghost:hover { border-color: #F6F6F6; color: #fff; }
.btn--light { background: #fff; color: var(--sg-blue-deep); font-weight: 700; font-size: 17px; padding: 18px 30px; }
.btn--light:hover { background: #DCE8F7; color: var(--sg-blue-deep); }
.link { align-self: flex-start; color: var(--sg-blue-deep); font-weight: 600; border-bottom: 2px solid var(--sg-blue); padding-bottom: 4px; }
.link:hover { color: var(--sg-blue); }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(10,26,47,.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 16px; padding-bottom: 16px; }
.nav__logo img { height: 34px; width: auto; }
.nav__menu { display: flex; align-items: center; gap: 28px; font-size: 14px; font-weight: 500; }
.nav__menu a:not(.btn) { color: #DCE8F7; }
.nav__menu a:not(.btn):hover { color: #fff; }
.nav__toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; flex-direction: column; gap: 6px; }
.nav__toggle span { display: block; width: 22px; height: 2px; background: #F6F6F6; transition: transform .2s; }
.nav__toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

@media (max-width: 760px) {
  .nav__toggle { display: flex; }
  .nav__menu {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--sg-ink); border-bottom: 1px solid rgba(255,255,255,.08);
    padding: 8px var(--sg-gutter) 20px; display: none;
  }
  .nav__menu.is-open { display: flex; }
  .nav__menu a:not(.btn) { padding: 14px 0; font-size: 16px; border-bottom: 1px solid rgba(255,255,255,.06); }
  .nav__menu .btn { margin-top: 16px; justify-content: center; padding: 14px; font-size: 16px; }
}

/* Hero */
.hero { position: relative; overflow: hidden; background: var(--sg-ink); color: #F6F6F6; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: var(--sg-grid-bg); background-size: var(--sg-grid-size);
}
.hero__iso { position: absolute; right: -120px; top: 40px; height: 640px; width: auto; max-width: none; opacity: .14; pointer-events: none; }
.hero__content { position: relative; padding-top: 120px; padding-bottom: 96px; display: flex; flex-direction: column; gap: 28px; }
.hero h1 { font-size: var(--sg-h1); line-height: 1.02; font-weight: 700; letter-spacing: -.025em; max-width: 880px; }
.hero__lead { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.6; color: var(--sg-gray-on-dark); max-width: 620px; }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.hero--full { min-height: 100vh; min-height: 100dvh; }

.stats { position: relative; border-top: 1px solid rgba(255,255,255,.1); }
.stats__grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); }
.stat { padding: 32px 24px 36px; display: flex; flex-direction: column; gap: 6px; border-right: 1px solid rgba(255,255,255,.1); }
.stat:first-child { padding-left: 0; }
.stat:last-child { border-right: 0; }
.stat__n { font-size: 48px; font-weight: 700; color: #fff; letter-spacing: -.02em; line-height: 1.2; }
.stat p { font-size: 15px; color: var(--sg-gray-on-dark); }

@media (max-width: 760px) {
  .hero__iso { height: 380px; right: -140px; top: 20px; }
  .hero__content { padding-top: 72px; padding-bottom: 64px; }
  .stats__grid { grid-template-columns: 1fr; }
  .stat, .stat:first-child { padding: 24px 0; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.1); }
  .stat:last-child { border-bottom: 0; }
}

/* Secciones */
.section { padding: var(--sg-section-y) 0; }
.section--mist { background: var(--sg-mist); border-top: 1px solid var(--sg-line); }
.section h2, .section__title { font-size: var(--sg-h2); line-height: 1.15; font-weight: 700; letter-spacing: -.015em; }
.section__title { color: var(--sg-blue-deep); margin-bottom: 48px; max-width: 640px; }

.feature { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 64px; align-items: center; }
.feature__text { display: flex; flex-direction: column; gap: 22px; }
.feature__text p { font-size: var(--sg-body); line-height: 1.65; color: var(--sg-gray); }
.lockup { display: flex; align-items: center; gap: 14px; }
.lockup img { height: 40px; width: auto; }
.lockup__bar { width: 2px; height: 46px; background: var(--sg-blue-deep); }
.lockup__name { font-size: 34px; font-weight: 700; letter-spacing: .08em; color: var(--sg-blue-deep); }

.window { margin: 0; aspect-ratio: 4 / 3; border-radius: var(--sg-radius); background: var(--sg-mist); border: 1px solid var(--sg-line); display: flex; flex-direction: column; overflow: hidden; }
.window__bar { display: flex; gap: 6px; padding: 12px 14px; border-bottom: 1px solid var(--sg-line); background: #fff; }
.window__bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--sg-line); }
.window > img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }

/* Ilustración de la interfaz de SG COOP (escala con el ancho de la ventana) */
.window { container-type: inline-size; box-shadow: 0 24px 60px -24px rgba(0,60,129,.28); }
.app { flex: 1; min-height: 0; display: flex; }
.app__side {
  width: 15cqw; background: var(--sg-ink); padding: 3.2cqw 2.6cqw;
  display: flex; flex-direction: column; gap: 2.4cqw;
}
.app__side img { width: 5cqw; min-width: 16px; height: auto; margin-bottom: 2cqw; }
.app__side i { display: block; height: 1.3cqw; border-radius: 99px; background: rgba(255,255,255,.14); }
.app__side i:nth-of-type(2n) { width: 70%; }
.app__side i.is-active { background: var(--sg-blue); }
.app__main { flex: 1; min-width: 0; padding: 3cqw; display: flex; flex-direction: column; gap: 2.4cqw; }
.app__top { display: flex; align-items: center; gap: 2cqw; }
.app__title { font-size: max(9px, 2.2cqw); font-weight: 700; letter-spacing: .08em; color: var(--sg-blue-deep); }
.app__search { flex: 1; max-width: 38cqw; height: 3.6cqw; margin-left: auto; border-radius: 99px; background: #fff; border: 1px solid var(--sg-line); }
.app__avatar { width: 3.6cqw; height: 3.6cqw; border-radius: 50%; background: var(--sg-blue-deep); }
.app__kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2cqw; }
.kpi, .panel { background: #fff; border: 1px solid var(--sg-line); border-radius: 1.4cqw; padding: 2cqw; display: flex; flex-direction: column; gap: 1.4cqw; min-width: 0; }
.kpi__label { font-size: max(7px, 1.35cqw); letter-spacing: .12em; color: var(--sg-gray); }
.kpi__value { height: 2.6cqw; width: 62%; border-radius: 3px; background: var(--sg-blue-deep); }
.kpi:nth-child(2) .kpi__value { width: 48%; }
.kpi:nth-child(3) .kpi__value { width: 70%; }
.kpi__spark { height: 1cqw; width: 34%; border-radius: 99px; background: var(--sg-blue); opacity: .35; }
.app__grid { flex: 1; min-height: 0; display: grid; grid-template-columns: 1.5fr 1fr; gap: 2cqw; }
.chart { flex: 1; width: 100%; min-height: 0; }
.chart__grid { stroke: var(--sg-line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart__line { fill: none; stroke: var(--sg-blue); stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.panel--list { justify-content: flex-start; gap: 1.8cqw; }
.row { display: flex; align-items: center; gap: 1.4cqw; padding-bottom: 1.6cqw; border-bottom: 1px solid var(--sg-mist); }
.row:last-child { border-bottom: 0; padding-bottom: 0; }
.row__dot { width: 2.4cqw; height: 2.4cqw; flex: none; border-radius: 50%; background: var(--sg-mist); border: 1px solid var(--sg-line); }
.row__text { flex: 1; height: 1.2cqw; border-radius: 99px; background: var(--sg-line); }
.row__text--short { flex: .6; margin-right: auto; }
.pill { width: 6cqw; height: 2.2cqw; flex: none; border-radius: 99px; background: var(--sg-mist); border: 1px solid var(--sg-line); }
.pill--ok { background: var(--sg-blue); border-color: var(--sg-blue); opacity: .85; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px; }
.card { background: #fff; border: 1px solid var(--sg-line); border-radius: var(--sg-radius); padding: 28px; display: flex; flex-direction: column; gap: 14px; min-height: 240px; transition: border-color .15s; }
.card:hover { border-color: var(--sg-blue); }
.card__n { font-size: 12px; color: var(--sg-gray); }

/* Ilustraciones lineales de producto */
.card__art { width: 120px; height: 72px; margin-top: 8px; overflow: visible; }
.card__art .art-line { fill: none; stroke: var(--sg-blue-deep); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.card__art .art-paper { fill: #fff; }
.card__art .art-soft { fill: none; stroke: var(--sg-line); stroke-width: 3; stroke-linecap: round; }
.card__art .art-route { fill: none; stroke: var(--sg-blue); stroke-width: 2; stroke-dasharray: 2 5; stroke-linecap: round; }
.card__art .art-fill { fill: var(--sg-blue); }
.card__art .art-ink { fill: var(--sg-blue-deep); }
.card__art .art-paper-fill { fill: #fff; }
.card__art .art-check { fill: none; stroke: #fff; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: 21px; font-weight: 700; color: var(--sg-blue-deep); margin-top: auto; }
.card h3.caps { letter-spacing: .08em; }
.card p { font-size: 15px; line-height: 1.6; color: var(--sg-gray); }

/* CTA */
.cta { position: relative; overflow: hidden; background: var(--sg-blue-deep); color: #F6F6F6; }
.cta__iso { position: absolute; left: -80px; bottom: -140px; height: 420px; width: auto; max-width: none; opacity: .07; pointer-events: none; }
.cta__inner { position: relative; padding-top: 104px; padding-bottom: 104px; display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-end; justify-content: space-between; }
.cta__inner > div { display: flex; flex-direction: column; gap: 16px; max-width: 640px; }
.cta h2 { font-size: clamp(30px, 4vw, 52px); line-height: 1.08; font-weight: 700; letter-spacing: -.02em; }
.cta p { font-size: 17px; color: #DCE8F7; }

/* Footer */
.footer { background: var(--sg-ink); color: var(--sg-gray-on-dark); }
.footer .container { padding-top: 56px; padding-bottom: 32px; display: flex; flex-direction: column; gap: 40px; }
.footer__top { display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between; align-items: flex-start; }
.footer__top > img { height: 40px; width: auto; }
.footer__cols { display: flex; flex-wrap: wrap; gap: 32px 56px; font-size: 14px; line-height: 1.7; }
.footer__cols a, .footer__cols span { color: #F6F6F6; }
.footer__cols a:hover { color: var(--sg-blue-soft); }
.footer__address { font-style: normal; color: #F6F6F6; }
.footer__cols a.footer__map { display: inline-block; margin-top: 4px; font-size: 13px; color: var(--sg-blue-soft); }
.footer__cols a.footer__map:hover { color: #fff; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 20px; font-size: 13px; color: #7D8CA0; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }

/* WhatsApp flotante */
.wa-float {
  position: fixed; right: 24px; bottom: 24px; z-index: 30;
  background: var(--sg-blue); color: #fff; border-radius: 999px; padding: 14px 20px;
  font-weight: 600; font-size: 15px; box-shadow: 0 8px 24px rgba(10,26,47,.3);
}
.wa-float:hover { background: var(--sg-blue-hover); color: #fff; }

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