:root {
  --bg: #070b14;
  --panel: #0d1424;
  --panel-2: #0a111e;
  --line: #1c2740;
  --text: #e6ecf5;
  --muted: #8a97ad;
  --accent: #3fa9f5;
  --accent-2: #1e5fb4;
  --ok: #22c55e;
  --warn: #f59e0b;
  --down: #f43f5e;
  --wine: #7a1c2d;
  --wine-2: #5c1424;
  --rose: #e3b9a5;
  --radius: 14px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
p { margin: 0 0 1em; color: var(--muted); }
.mono { font-family: var(--mono); }
.container { width: min(1180px, 100% - 32px); margin-inline: auto; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .8em 1.4em; border-radius: 10px; border: 1px solid transparent; cursor: pointer;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; font-weight: 700; font-size: 1rem; font-family: inherit;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 30px -8px var(--accent); }
.btn-sm { padding: .55em 1em; font-size: .9rem; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); box-shadow: none; }
.btn-wine { background: linear-gradient(180deg, #8f2337, var(--wine) 55%, #64152a); }
.btn-wine:hover { box-shadow: 0 10px 28px -8px rgba(122, 28, 45, .6); }
.btn-outline-wine { background: transparent; color: var(--wine); border-color: rgba(122, 28, 45, .35); }
.btn-outline-wine:hover { border-color: var(--wine); box-shadow: none; }

/* Fondo de puntos de toda la página: capa fija que se ilumina alrededor del cursor */
.page-dots, .page-glow { position: fixed; inset: 0; z-index: 40; pointer-events: none; background-size: 24px 24px; }
.page-dots { background-image: radial-gradient(circle, rgba(148, 163, 184, .13) 1.1px, transparent 1.5px); }
.page-glow {
  --mx: -999px; --my: -999px;
  background-image: radial-gradient(circle, #7cc7ff 1.6px, transparent 2.2px);
  -webkit-mask-image: radial-gradient(circle 180px at var(--mx) var(--my), #000 0%, rgba(0, 0, 0, .45) 45%, transparent 100%);
  mask-image: radial-gradient(circle 180px at var(--mx) var(--my), #000 0%, rgba(0, 0, 0, .45) 45%, transparent 100%);
  filter: drop-shadow(0 0 3px rgba(63, 169, 245, .9));
  opacity: 0; transition: opacity .3s;
}
.page-glow.on { opacity: 1; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7, 11, 20, .8); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.3rem; letter-spacing: -.02em; }
.brand img { width: 26px; height: auto; }
.brand b { color: var(--accent); }
.brand.small { font-size: 1rem; gap: 8px; }
.brand.small img { width: 18px; }
.nav-links { display: flex; align-items: center; gap: 26px; font-size: .95rem; }
.nav-links a:not(.btn) { color: var(--muted); transition: color .15s; }
.nav-links a:not(.btn):hover { color: var(--text); }
.nav-tools { display: flex; align-items: center; gap: 10px; margin-left: 20px; }
.lang-btn { min-width: 44px; height: 36px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font-size: .8rem; font-weight: 600; letter-spacing: .06em; cursor: pointer; transition: border-color .15s, color .15s; }
.lang-btn:hover { border-color: var(--accent); color: var(--accent); }
.menu-btn { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.menu-btn span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; border-radius: 2px; }

/* Hero */
.hero { position: relative; padding: 80px 0 90px; overflow: hidden; }
.grid-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 20%, #000 10%, transparent 65%);
  opacity: .5;
}
.hero-copy { position: relative; text-align: center; max-width: 860px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px;
  font-size: .85rem; color: var(--muted); background: var(--panel);
}
h1 { font-size: clamp(2.3rem, 5.5vw, 4rem); font-weight: 800; margin: 20px 0; }
.grad { background: linear-gradient(90deg, #7cc7ff, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 1.15rem; max-width: 660px; margin-inline: auto; }
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 28px; }

.hero-shot { position: relative; margin-top: 56px; }
.frame {
  margin: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: var(--panel); box-shadow: 0 40px 100px -30px rgba(63, 169, 245, .3);
}
.frame-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: .75rem; color: var(--muted); }
.frame-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.frame-bar span { margin-left: 8px; }
.frame figcaption { padding: 12px 16px; font-size: .88rem; color: var(--muted); border-top: 1px solid var(--line); }

.live-card {
  position: absolute; right: -8px; bottom: -28px; width: 300px;
  background: rgba(13, 20, 36, .92); backdrop-filter: blur(10px);
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, .6);
}
.live-head { display: flex; align-items: center; gap: 8px; font-size: .72rem; color: var(--ok); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 10px; }
.live-head em { margin-left: auto; font-style: normal; color: var(--muted); text-transform: none; letter-spacing: 0; }
.live-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.live-grid div { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
.live-grid span { display: block; font-size: .68rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.live-grid strong { font-family: var(--mono); font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.live-grid em { font-style: normal; font-size: .68rem; color: var(--muted); margin-left: 4px; }

.geo { position: relative; height: 500px; background: #030712; }
.geo canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.geo-legend { position: absolute; top: 14px; left: 14px; padding: 10px 12px; border-radius: 8px; background: rgba(15, 23, 42, .8); border: 1px solid rgba(148, 163, 184, .2); backdrop-filter: blur(6px); pointer-events: none; }
.geo-title { margin: 0 0 6px; font-size: .78rem; font-weight: 800; color: #fff; }
.geo-legend ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.geo-legend li { display: flex; align-items: center; gap: 7px; font-size: .72rem; color: #cbd5e1; }
.geo-legend i { width: 10px; height: 10px; border-radius: 2px; background: var(--c); opacity: .85; }
.geo-legend i.geo-well { width: 14px; height: 4px; background: linear-gradient(90deg, #3b82f6, #22c55e, #eab308, #ef4444); opacity: 1; }
.geo-gr { display: grid; grid-template-columns: auto auto; justify-content: space-between; gap: 2px 0; margin-top: 7px; padding-top: 6px; border-top: 1px solid rgba(148, 163, 184, .2); }
.geo-gr span { grid-column: 1 / -1; font: 700 .58rem var(--mono); letter-spacing: .1em; color: #94a3b8; text-transform: uppercase; }
.geo-gr b { grid-column: 1 / -1; height: 5px; border-radius: 3px; background: linear-gradient(90deg, #3b82f6 0 25%, #22c55e 25% 50%, #eab308 50% 75%, #ef4444 75%); }
.geo-gr em { font-style: normal; font-size: .6rem; color: #64748b; }
.geo-status { position: absolute; right: 14px; top: 14px; padding: 5px 10px; border-radius: 999px; font-size: .66rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #fda4af; background: rgba(190, 18, 60, .18); border: 1px solid rgba(244, 63, 94, .4); }
.geo-status::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: #f43f5e; vertical-align: 1px; animation: blinkDot 1s infinite; }
.geo-status.is-done { color: #86efac; background: rgba(34, 197, 94, .15); border-color: rgba(74, 222, 128, .45); }
.geo-status.is-done::before { background: #22c55e; }
@keyframes blinkDot { 50% { opacity: .4; } }
.svy { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; padding: 7px 10px; border-radius: 8px; background: rgba(63, 169, 245, .1); border: 1px solid rgba(63, 169, 245, .25); font-size: .68rem; color: #cbd5e1; }
.svy b { color: #fff; font-variant-numeric: tabular-nums; }
.svy-tag { color: var(--accent); text-transform: uppercase; letter-spacing: .1em; }
.svy.is-new { animation: svyFlash 1s ease-out; }
@keyframes svyFlash { from { background: rgba(63, 169, 245, .45); } }

.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.dot.live { background: var(--ok); animation: pulse 2s infinite; }
.dot.standby { background: var(--warn); }
.dot.down { background: var(--down); }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .6); }
  70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* Strip */
.strip { border-block: 1px solid var(--line); background: var(--panel-2); }
.strip-inner { display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding: 20px 0; color: var(--muted); font-size: .85rem; }

/* Sections */
.section { padding: 100px 0; }
.section.alt { background: var(--panel-2); border-block: 1px solid var(--line); }
.section-head { text-align: center; max-width: 760px; margin: 0 auto 56px; }
.eyebrow { display: inline-block; color: var(--accent); font-family: var(--mono); font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 14px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.note { text-align: center; font-size: .8rem; margin-top: 18px; }
.sub-title { text-align: center; font-size: 1.3rem; margin: 64px 0 24px; }

/* Qué es */
.callout { padding: 32px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(160deg, var(--panel), var(--panel-2)); }
.callout .big { font-size: 1.25rem; color: var(--text); font-weight: 600; }
.shift { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: .8rem; margin-top: 8px; }
.shift span { padding: 6px 10px; border-radius: 6px; border: 1px solid rgba(244, 63, 94, .35); color: #fda4af; }
.shift span.ok { border-color: rgba(34, 197, 94, .4); color: #86efac; }
.shift b { color: var(--muted); }

/* Cómo funciona */
.arch-diagram { display: grid; grid-template-columns: 1fr auto 1fr; gap: 20px; align-items: center; max-width: 900px; margin: 0 auto; }
.site { margin: 0; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; background: radial-gradient(120% 80% at 50% 0%, #15213a, var(--panel)); text-align: center; }
.site h4 { font-size: 1.1rem; margin-top: 16px; }
.rack { width: 150px; height: auto; margin: 0 auto; display: block; filter: drop-shadow(0 18px 26px rgba(0, 0, 0, .6)); }
.rk-led { fill: #22c55e; }
.rk-on { opacity: .85; filter: drop-shadow(0 0 1.5px rgba(34, 197, 94, .9)); }
.rk-pwr { fill: #38bdf8; filter: drop-shadow(0 0 2px rgba(56, 189, 248, .9)); }
.rk-act { opacity: .3; transition: opacity .08s; }
.rk-act.is-busy { opacity: 1; filter: drop-shadow(0 0 1.5px rgba(34, 197, 94, .9)); }
.rk-lcd { font: 700 5.6px var(--mono); fill: #4ade80; letter-spacing: .06em; }
.rk-txt { font: 700 5px var(--font); fill: #64748b; letter-spacing: .12em; }
.site p { margin: 0; font-size: .92rem; }
.link { display: flex; flex-direction: column; align-items: center; gap: 12px; font-size: .72rem; color: var(--rose); text-align: center; width: 170px; }
.packets { position: relative; width: 100%; height: 26px; border-block: 1px dashed rgba(63, 169, 245, .4); overflow: hidden; }
.packets i { position: absolute; top: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); animation: travel 2.4s linear infinite; }
.packets i:nth-child(2) { animation-delay: .8s; animation-direction: reverse; background: var(--rose); box-shadow: 0 0 10px var(--rose); }
.packets i:nth-child(3) { animation-delay: 1.6s; }
@keyframes travel { from { left: -8px; } to { left: 100%; } }
.states { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.state { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.state .dot { margin-bottom: 14px; width: 10px; height: 10px; }
.state h4 { font-size: 1.05rem; }
.state p { margin: 0; font-size: .92rem; }

/* Módulos */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.card { position: relative; overflow: hidden; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); transition: border-color .25s, transform .25s, box-shadow .25s; }
.card::before { content: ""; position: absolute; inset: -40% -40% auto auto; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--g1) 28%, transparent), transparent 70%); opacity: .55; transition: opacity .25s, transform .4s; pointer-events: none; }
.card:hover { border-color: color-mix(in srgb, var(--g1) 60%, transparent); transform: translateY(-4px); box-shadow: 0 20px 40px -20px color-mix(in srgb, var(--g2) 70%, transparent); }
.card:hover::before { opacity: 1; transform: scale(1.2); }
.card h3 { font-size: 1.1rem; }
.card p { margin: 0; font-size: .92rem; }
.ico { position: relative; width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 18px;
  background: linear-gradient(135deg, var(--g1), var(--g2));
  box-shadow: 0 10px 24px -8px var(--g2), inset 0 1px 0 rgba(255, 255, 255, .35);
  transition: transform .3s cubic-bezier(.2, .8, .2, 1.3); }
.ico::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(180deg, rgba(255, 255, 255, .25), transparent 55%); pointer-events: none; }
.card:hover .ico { transform: translateY(-2px) rotate(-6deg) scale(1.08); }
.ico svg { width: 26px; height: 26px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .25)); }


/* Ventajas */
.checks { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 12px; }
.checks li { padding-left: 32px; position: relative; color: var(--muted); }
.checks li b { color: var(--text); font-weight: 600; }
.checks li::before { content: "✓"; position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 6px; background: rgba(63, 169, 245, .14); color: var(--accent); font-size: .75rem; display: grid; place-items: center; font-weight: 700; }
.flex-arch { padding: 32px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.modes div { border: 1px solid var(--line); border-radius: 10px; padding: 14px; background: var(--bg); text-align: center; }
.modes h4 { margin: 0 0 4px; }
.modes p { margin: 0; font-size: .85rem; }

/* Soluciones */
.photo { margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }

/* Distribuidor */
.dist { position: relative; overflow: hidden; isolation: isolate; padding: 52px 0; background: linear-gradient(180deg, #f8fafc, #eef2f6); color: #0f172a; }
.dist h2 { font-size: clamp(1.6rem, 2.8vw, 2.1rem); }
.dist p { margin-bottom: .6em; }
.dist p { color: #475569; }
.dist h2 { color: #0f172a; }
.dist-inner { display: grid; grid-template-columns: 220px 1fr; gap: 56px; align-items: center; }
.dist-logo { display: grid; place-items: center; padding: 26px; border-radius: 20px; background: #fff; border: 1px solid #e2e8f0; box-shadow: 0 30px 60px -30px rgba(122, 28, 45, .35); }
.dist-logo img { width: 150px; }
.badge { display: inline-block; padding: 6px 14px; margin-bottom: 16px; border-radius: 999px; background: linear-gradient(90deg, var(--wine), #991b1b); color: #fff; font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.dist-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 16px 0; }
.dist-sites { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 12px 32px; font-size: .9rem; color: #475569; }
.dist-sites b { display: block; color: var(--wine); font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; }

/* Contacto */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.mails { display: flex; flex-wrap: wrap; gap: 10px; }
.mails a { padding: 9px 14px; border-radius: 8px; border: 1px solid var(--line); font-size: .9rem; font-weight: 600; color: #bfe3ff; transition: border-color .15s; }
.mails a:hover { border-color: var(--accent); }
.form { display: grid; gap: 16px; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.form label { display: grid; gap: 6px; font-size: .88rem; color: var(--muted); }
.form input, .form textarea {
  font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: 8px; padding: 11px 12px; resize: vertical;
}
.form input:focus, .form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(63, 169, 245, .18); }
.form-msg { margin: 0; font-size: .9rem; min-height: 1.4em; }
.form-msg.ok { color: var(--ok); }
.form-msg.err { color: #f87171; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 28px 0; font-size: .85rem; color: var(--muted); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-contact a { color: #bfe3ff; }
.footer-contact a:hover { color: var(--accent); }
.footer-legal { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); font-size: .78rem; text-align: center; }

/* Responsive */
@media (max-width: 1020px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .split, .contact { grid-template-columns: 1fr; }
  .dist-inner { grid-template-columns: 180px 1fr; gap: 40px; }
}
@media (max-width: 860px) {
  .menu-btn { display: block; }
  .nav-links {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--panel-2); border-bottom: 1px solid var(--line);
    padding: 8px 16px 16px; display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; }
  .nav-links .btn { margin-top: 8px; }
  .live-card { position: static; width: auto; margin-top: 16px; }
  .geo { height: 380px; }
}
@media (max-width: 720px) {
  .hero { padding: 48px 0 64px; }
  .section { padding: 72px 0; }
  .cards, .states { grid-template-columns: 1fr; }
  .arch-diagram { grid-template-columns: 1fr; }
  .link { width: 100%; }
  .dist-inner { grid-template-columns: 1fr; }
  .dist-logo { max-width: 200px; }
  .geo { height: 300px; }
  .geo-legend ul { display: none; }
  .modes { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
