@font-face { font-family: "Inter"; src: url("../fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/jetbrains-mono.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }
@font-face { font-family: "Orbitron"; src: url("../fonts/orbitron.woff2") format("woff2"); font-weight: 400 900; font-display: swap; }

:root {
  --navy: #0b1f33;
  --navy-2: #12304d;
  --blue: #1679a7;
  --blue-d: #0f5f86;
  --accent: #ffb300;
  --accent-d: #e09e00;
  --ink: #1b2733;
  --muted: #5b6b7b;
  --line: #dfe6ec;
  --bg: #ffffff;
  --bg-alt: #f3f6f9;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(11, 31, 51, .06), 0 6px 20px rgba(11, 31, 51, .06);
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
.ico { width: 1em; height: 1em; fill: currentColor; vertical-align: -.125em; flex: none; }
a { color: var(--blue); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; color: var(--navy); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; letter-spacing: -.01em; }
h3 { font-size: 1.1rem; font-weight: 700; }

.container { width: min(1160px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(820px, 100% - 32px); }
.center { text-align: center; }
.muted { color: var(--muted); }

/* Botones */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  padding: .7em 1.3em; border-radius: 8px; border: 2px solid transparent;
  font: 600 .95rem/1 "Inter", sans-serif; text-decoration: none; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s, transform .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-sm { padding: .5em 1em; font-size: .88rem; }
.btn-lg { padding: .9em 1.6em; font-size: 1rem; }
.btn-accent { background: var(--accent); color: var(--navy); }
.btn-accent:hover { background: var(--accent-d); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-d); }
.btn-ghost { border-color: currentColor; color: inherit; background: transparent; }

/* Topbar */
.topbar { background: var(--blue); color: #fff; font-size: .88rem; }
.topbar-inner { display: flex; justify-content: center; gap: 1em; padding: .55em 0; flex-wrap: wrap; text-align: center; }
.topbar a { color: #fff; font-weight: 600; }

/* Header */
.header { position: sticky; top: 0; z-index: 50; background: var(--navy); box-shadow: 0 2px 12px rgba(0,0,0,.2); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: .6em; color: #fff; text-decoration: none; font-size: 1.2rem; }
.brand-text { display: flex; flex-direction: column; font: 700 1.2rem/1.1 "Orbitron", sans-serif; letter-spacing: 1px; }
.brand-text small { font: 400 .72rem "JetBrains Mono", monospace; letter-spacing: .08em; color: #9fb4c7; margin-top: 3px; }
.nav-menu { display: flex; align-items: center; gap: 1.6em; }
.nav-menu a:not(.btn) { color: #c9d6e2; text-decoration: none; font-weight: 500; font-size: .95rem; }
.nav-menu a:not(.btn):hover { color: #fff; }
.nav-toggle { display: none; background: none; border: 0; color: #fff; font-size: 1.4rem; cursor: pointer; }

/* Hero */
.hero {
  background:
    radial-gradient(circle at 80% 20%, rgba(22,121,167,.35), transparent 50%),
    linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #fff; padding: 72px 0 88px;
}
.hero-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 48px; align-items: center; }
.hero h1 { color: #fff; font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 800; letter-spacing: -.02em; }
.eyebrow { font-family: var(--mono); color: var(--accent); font-size: .9rem; margin: 0 0 1em; }
.cursor { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.lead { font-size: 1.12rem; color: #c9d6e2; max-width: 40em; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 1.8em; }

.hero-art { position: relative; display: grid; place-items: center; min-height: 300px; }
.rack {
  width: 260px; padding: 14px; border-radius: 12px;
  background: #081626; border: 1px solid #23415f; box-shadow: 0 20px 50px rgba(0,0,0,.35);
  display: grid; gap: 10px;
}
.rack-unit {
  display: flex; align-items: center; gap: 6px; padding: 12px; border-radius: 6px;
  background: linear-gradient(90deg, #12304d, #0e2740); border: 1px solid #23415f;
}
.rack-unit span { width: 8px; height: 8px; border-radius: 50%; background: #2ecc71; box-shadow: 0 0 6px #2ecc71; animation: led 2.4s infinite; }
.rack-unit span:nth-child(2) { animation-delay: .4s; background: var(--accent); box-shadow: 0 0 6px var(--accent); }
.rack-unit span:nth-child(3) { animation-delay: .9s; }
.rack-unit i { margin-left: auto; font: normal .78rem var(--mono); color: #7fa3c4; }
@keyframes led { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.hero-mascot {
  position: absolute; right: 4%; bottom: -10px; width: 128px; height: 128px;
  image-rendering: pixelated; filter: drop-shadow(0 10px 18px rgba(0,0,0,.45));
  animation: bob 3s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translateY(-8px); } }

/* Stats */
.stats { background: var(--bg-alt); border-bottom: 1px solid var(--line); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; padding: 28px 0; }
.stat strong { display: block; font-size: 2rem; font-weight: 800; color: var(--blue); }
.stat span { color: var(--muted); font-size: .92rem; }

/* Secciones */
.section { padding: 80px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 44px; }
.section-head p { color: var(--muted); }
.kicker { font: 600 .8rem var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--blue); margin: 0 0 .6em; }

/* Lineas */
.lines-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.line-card {
  position: relative; display: block; padding: 30px 26px; border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; color: var(--ink); text-decoration: none; box-shadow: var(--shadow);
  border-top: 4px solid var(--blue); transition: transform .15s, box-shadow .15s;
}
.line-card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(11,31,51,.12); }
.line-card > .ico { width: 1.8rem; height: 1.8rem; color: var(--blue); margin: 14px 0 12px; display: block; }
.line-card p { color: var(--muted); }
.line-card .more { color: var(--blue); font-weight: 600; }
.line-card-new { border-top-color: var(--accent); }
.line-card-new > .ico { color: #2e8b57; }
.tag { font: 600 .72rem var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.tag-new { color: var(--navy); background: var(--accent); padding: .25em .6em; border-radius: 4px; }

/* Servicios */
.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.service { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 22px; }
.service .ico { color: var(--blue); background: #e7f2f8; width: 44px; height: 44px; padding: 11px; display: block; border-radius: 8px; margin-bottom: 14px; }
.service p { color: var(--muted); font-size: .93rem; margin: 0; }

/* Why */
.why { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.checks { list-style: none; padding: 0; margin: 1.5em 0 0; display: grid; gap: 14px; font-size: 1.05rem; }
.checks .ico { color: var(--accent-d); margin-right: .6em; }
.why-box { background: var(--navy); color: #c9d6e2; padding: 34px; border-radius: var(--radius); }
.why-box h3 { color: #fff; font-size: 1.4rem; }
.why-box strong { color: #fff; }

/* Gaming */
.section-dark { background: var(--navy); color: #c9d6e2; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark .section-head p { color: #9fb4c7; }
.section-dark .kicker { color: var(--accent); }
.games { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 40px; }
.games span { font: 500 .85rem var(--mono); padding: .45em .9em; border: 1px solid #2a4a69; border-radius: 999px; color: #dbe6f0; }
.plans-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.plan { position: relative; background: var(--navy-2); border: 1px solid #23415f; border-radius: var(--radius); padding: 26px 22px; display: flex; flex-direction: column; color: #fff; }
.plan-sub { color: #9fb4c7; font-size: .9rem; margin: 0 0 1em; }
.plan ul { list-style: none; padding: 0; margin: 0 0 1.5em; display: grid; gap: 8px; font-family: var(--mono); font-size: .88rem; color: #dbe6f0; }
.plan ul li::before { content: "› "; color: var(--accent); }
.plan .btn { margin-top: auto; justify-content: center; }
.plan-featured { border: 2px solid var(--accent); }
.plan-badge { position: absolute; top: -12px; left: 22px; background: var(--accent); color: var(--navy); font: 700 .72rem var(--mono); padding: .3em .7em; border-radius: 4px; text-transform: uppercase; }
.gaming-perks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin: 48px 0 24px; }
.gaming-perks div { display: grid; grid-template-columns: 36px 1fr; column-gap: 10px; }
.gaming-perks i { grid-row: span 2; font-size: 1.3rem; color: var(--accent); padding-top: 3px; }
.gaming-perks strong { color: #fff; }
.gaming-perks span { font-size: .9rem; color: #9fb4c7; }
.note { font-size: .88rem; color: #9fb4c7; text-align: center; max-width: 760px; margin: 0 auto 28px; }

/* IoT */
.iot { display: grid; grid-template-columns: 1.3fr .7fr; gap: 48px; align-items: center; }
.iot-items { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 1.8em 0; }
.iot-items div { border: 1px dashed #b8c7d4; border-radius: var(--radius); padding: 18px; display: grid; gap: 4px; }
.iot-items .ico { color: #2e8b57; width: 1.3rem; height: 1.3rem; }
.iot-items span { color: var(--muted); font-size: .9rem; }
.iot-art { position: relative; display: grid; place-items: center; min-height: 240px; }
.iot-art img { width: 112px; image-rendering: pixelated; position: relative; z-index: 1; }
.signal span { position: absolute; inset: 50% auto auto 50%; width: 120px; height: 120px; margin: -60px 0 0 -60px; border: 2px solid #2e8b57; border-radius: 50%; opacity: 0; animation: ping 3s infinite; }
.signal span:nth-child(2) { animation-delay: 1s; }
.signal span:nth-child(3) { animation-delay: 2s; }
@keyframes ping { 0% { transform: scale(.6); opacity: .7; } 100% { transform: scale(2); opacity: 0; } }

/* Nosotros */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.terminal { background: #081626; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.terminal-bar { display: flex; gap: 6px; align-items: center; padding: 10px 14px; background: #12304d; }
.terminal-bar span { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.terminal-bar span:nth-child(2) { background: #febc2e; }
.terminal-bar span:nth-child(3) { background: #28c840; }
.terminal-bar em { margin-left: 8px; font: normal .8rem var(--mono); color: #7fa3c4; }
.terminal pre { margin: 0; padding: 20px; font: .85rem/1.7 var(--mono); color: #dbe6f0; white-space: pre-wrap; }
.terminal .c { color: var(--accent); }

/* FAQ */
details { border-bottom: 1px solid var(--line); padding: 18px 4px; }
summary { cursor: pointer; font-weight: 600; color: var(--navy); list-style: none; display: flex; justify-content: space-between; gap: 1em; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font: 600 1.2rem var(--mono); color: var(--blue); }
details[open] summary::after { content: "–"; }
details p { color: var(--muted); margin: .8em 0 0; }

/* Contacto */
.contact { display: grid; grid-template-columns: .9fr 1.1fr; gap: 48px; }
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.contact-list li { display: flex; gap: 14px; }
.contact-list .ico { color: var(--blue); width: 20px; height: 20px; margin-top: 3px; }
.form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: grid; gap: 14px; box-shadow: var(--shadow); }
.form label { display: grid; gap: 6px; font-size: .88rem; font-weight: 600; color: var(--navy); }
.form input, .form select, .form textarea {
  font: inherit; font-weight: 400; padding: .7em .8em; border: 1px solid #c5d1dc; border-radius: 8px; background: #fff; color: var(--ink);
}
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
.form .btn { justify-content: center; }

/* Footer */
.footer { background: var(--navy); color: #9fb4c7; padding: 56px 0 24px; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer h4 { color: #fff; margin: 0 0 1em; font-size: .95rem; }
.footer-grid a:not(.brand) { display: block; color: #9fb4c7; text-decoration: none; margin-bottom: .5em; }
.footer-grid a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1em; border-top: 1px solid #23415f; margin-top: 40px; padding-top: 20px; }
.social a { color: #9fb4c7; font-size: 1.2rem; margin-left: 14px; display: inline-flex; }
.social a:hover { color: var(--accent); }

/* Nav activo */
.nav-menu a.active { color: #fff; box-shadow: inset 0 -2px 0 var(--accent); }

/* Páginas internas */
.page-hero { background: linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%); color: #fff; padding: 64px 0 56px; }
.page-hero h1 { color: #fff; font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800; letter-spacing: -.02em; }
.page-hero-dark { background: radial-gradient(circle at 85% 10%, rgba(255,179,0,.18), transparent 45%), linear-gradient(180deg, #081626 0%, var(--navy) 100%); }
.page-hero-green { background: radial-gradient(circle at 85% 10%, rgba(46,139,87,.35), transparent 50%), linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%); }
.pill { display: inline-block; margin-left: .6em; padding: .15em .6em; border-radius: 4px; background: var(--accent); color: var(--navy); font-size: .75rem; font-weight: 600; text-transform: uppercase; }
.stats-grid-3 { grid-template-columns: repeat(3, 1fr); }
.services-grid-3 { grid-template-columns: repeat(3, 1fr); }
.services-grid-2 { grid-template-columns: repeat(2, 1fr); }
.section-cta { margin: 36px 0 0; }
.cat-head { margin-bottom: 28px; }
.cat-head h2 { margin: 0; }

.band { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.band h2 { margin-bottom: .3em; }
.band p { margin: 0; color: #9fb4c7; max-width: 46em; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: s; }
.steps li { border-top: 3px solid var(--blue); padding: 18px 4px 0; }
.steps span { font: 600 .85rem var(--mono); color: var(--accent-d); }
.steps h3 { margin: .3em 0 .4em; }
.steps p { margin: 0; color: var(--muted); font-size: .93rem; }

.games-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.game { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; box-shadow: var(--shadow); border-top: 4px solid var(--accent); }
.game p { color: var(--muted); font-size: .92rem; flex: 1; }
.game-meta { display: flex; justify-content: space-between; gap: 8px; font: 500 .8rem var(--mono); color: var(--blue); }
.note-light { font-size: .9rem; color: var(--muted); text-align: center; max-width: 760px; margin: 32px auto 0; }

.iot-items-col { grid-template-columns: 1fr; margin: 0; }
.iot-icon { width: 4rem; height: 4rem; color: #2e8b57; position: relative; z-index: 1; }

.prose h2 { font-size: 1.25rem; margin: 2em 0 .6em; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: #3b4a59; }
.prose ul { padding-left: 1.2em; display: grid; gap: 6px; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-legal { margin: 0; font-size: .82rem; color: var(--muted); text-align: center; }

.wa-float { position: fixed; right: 18px; bottom: 18px; z-index: 55; width: 56px; height: 56px; border-radius: 50%; background: #25d366; color: #fff; display: grid; place-items: center; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.wa-float .ico { width: 30px; height: 30px; }

/* Mascota que sigue el cursor */
#pixel-penguin { position: fixed; left: 0; top: 0; width: 40px; height: 40px; z-index: 60; image-rendering: pixelated; cursor: pointer; filter: drop-shadow(0 2px 6px rgba(0,0,0,.25)); }

/* Responsive */
@media (max-width: 960px) {
  .services-grid, .services-grid-3, .plans-grid, .games-grid, .steps { grid-template-columns: repeat(2, 1fr); }
  .gaming-perks { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .hide-sm { display: none; }
  .topbar { font-size: .82rem; }
  .nav-menu {
    display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    gap: 0; background: var(--navy); padding: 8px 16px 18px; border-top: 1px solid #23415f;
  }
  .nav-menu.open { display: flex; }
  .nav-menu a:not(.btn) { padding: 12px 0; border-bottom: 1px solid #1b3a58; }
  .nav-menu .btn { margin-top: 12px; justify-content: center; }
  .hero { padding: 48px 0 64px; }
  .hero-grid, .why, .iot, .about, .contact { grid-template-columns: 1fr; }
  .hero-art { min-height: 260px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); row-gap: 20px; }
  .lines-grid, .services-grid, .services-grid-2, .services-grid-3, .plans-grid, .gaming-perks, .iot-items, .games-grid, .steps, .stats-grid-3 { grid-template-columns: 1fr; }
  .nav-menu a.active { box-shadow: none; color: var(--accent); }
  .iot-art { display: none; }
  .section { padding: 56px 0; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
