/* ===== Tokens ===== */
:root {
  --bg: #ffffff;
  --bg-2: #f6f7f9;
  --ink: #14181f;
  --muted: #5b6472;
  --line: #e6e8ee;
  --red: #e02d25;
  --red-2: #ff5a3c;
  --grad: linear-gradient(120deg, #ff5a3c, #e02d25);
  --ok: #15a05a;
  --dark: #14181f;
  --maxw: 1160px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --shadow: 0 18px 44px -22px rgba(20, 24, 31, 0.4);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { font-family: "Inter", system-ui, sans-serif; background: var(--bg); color: var(--ink); line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3, h4 { font-family: "Space Grotesk", system-ui, sans-serif; font-weight: 600; line-height: 1.12; letter-spacing: -0.02em; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
ul { list-style: none; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 26px; }
.kicker { display: inline-block; font-size: 0.74rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--red); margin-bottom: 14px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 24px; font-weight: 600; font-size: 0.93rem; border-radius: 10px; border: 1.5px solid transparent; cursor: pointer; transition: transform 0.2s var(--ease), box-shadow 0.2s, background 0.2s, color 0.2s; }
.btn-solid { background: var(--grad); color: #fff; box-shadow: 0 10px 24px -10px rgba(224,45,37,0.6); }
.btn-solid:hover { transform: translateY(-2px); box-shadow: 0 16px 34px -12px rgba(224,45,37,0.7); }
.btn-line { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-line:hover { border-color: var(--ink); transform: translateY(-2px); }

/* Header */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 100; background: rgba(255,255,255,0.82); backdrop-filter: blur(12px); border-bottom: 1px solid transparent; transition: border-color 0.3s, background 0.3s; }
.site-header.scrolled { border-bottom-color: var(--line); }
.nav-wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: baseline; gap: 8px; }
.brand-logo { height: 26px; width: auto; }
.brand-sub { font-family: "Space Grotesk", sans-serif; font-weight: 600; font-size: 1.15rem; color: var(--ink); }
.nav ul { display: flex; align-items: center; gap: 4px; }
.nav a { padding: 8px 13px; font-size: 0.9rem; font-weight: 500; color: var(--muted); border-radius: 8px; transition: 0.2s; }
.nav a:hover { color: var(--ink); background: var(--bg-2); }
.nav-cta { background: var(--grad); color: #fff !important; }
.nav-cta:hover { background: var(--grad) !important; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); transition: 0.3s var(--ease); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Hero */
.hero { position: relative; padding: 130px 0 80px; overflow: hidden; background: radial-gradient(60% 90% at 85% 0%, rgba(255,90,60,0.10), transparent 60%), var(--bg); }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 50px; align-items: center; }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px; font-size: 0.8rem; font-weight: 600; color: var(--muted); margin-bottom: 20px; }
.badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(21,160,90,0.5); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(21,160,90,0.5); } 70% { box-shadow: 0 0 0 9px rgba(21,160,90,0); } 100% { box-shadow: 0 0 0 0 rgba(21,160,90,0); } }
.hero-copy h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
.hero-copy h1 .hl { color: var(--red); }
.lead { color: var(--muted); font-size: 1.12rem; margin: 20px 0 28px; max-width: 500px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.trust { display: flex; gap: 34px; margin-top: 42px; flex-wrap: wrap; }
.trust strong { display: block; font-family: "Space Grotesk", sans-serif; font-size: 1.7rem; color: var(--ink); }
.trust span { color: var(--muted); font-size: 0.84rem; }

/* Hero card: device diagnostic */
.hero-card { display: grid; place-items: center; }
.device { width: 100%; max-width: 360px; background: var(--dark); border-radius: 18px; padding: 16px; box-shadow: var(--shadow); }
.screen { position: relative; background: #0c0f15; border: 1px solid rgba(255,255,255,0.08); border-radius: 10px; padding: 22px; overflow: hidden; }
.scan { position: absolute; left: 0; right: 0; top: 0; height: 50px; background: linear-gradient(180deg, rgba(255,90,60,0.22), transparent); animation: scan 3.2s linear infinite; }
@keyframes scan { 0% { transform: translateY(-50px); } 100% { transform: translateY(240px); } }
.diag-line { display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 10px; margin-bottom: 14px; }
.diag-line span { color: #9aa3b2; font-size: 0.8rem; }
.diag-line i { display: block; height: 8px; border-radius: 5px; background: rgba(255,255,255,0.1); position: relative; }
.diag-line i::after { content: ""; position: absolute; inset: 0; width: var(--w); border-radius: 5px; background: var(--grad); animation: fill 2.4s var(--ease) forwards; transform-origin: left; }
@keyframes fill { from { transform: scaleX(0); } }
.diag-status { color: var(--red-2); font-size: 0.82rem; margin-top: 6px; font-family: "Space Grotesk", sans-serif; }

/* Sections */
.section { padding: 90px 0; position: relative; }
.sec-head { max-width: 640px; margin: 0 auto 48px; text-align: center; }
.sec-head h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); }
.sec-head p { color: var(--muted); margin-top: 12px; font-size: 1.05rem; }
.sec-head.light .kicker { color: #ffd1c7; }
.sec-head.light h2, .sec-head.light p { color: #fff; }

/* Servicios */
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.svc { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 28px; transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s; }
.svc:hover { transform: translateY(-5px); border-color: rgba(224,45,37,0.4); box-shadow: var(--shadow); }
.svc-ico { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 12px; background: linear-gradient(160deg, rgba(255,90,60,0.16), rgba(224,45,37,0.10)); color: var(--red); margin-bottom: 16px; }
.svc-ico svg { width: 26px; height: 26px; }
.svc h3 { font-size: 1.18rem; margin-bottom: 8px; }
.svc p { color: var(--muted); font-size: 0.92rem; }

/* Presupuesto (wizard) */
.presu { background: var(--dark); color: #fff; }
.wizard { max-width: 820px; margin: 0 auto; background: #1b212b; border: 1px solid rgba(255,255,255,0.1); border-radius: 16px; padding: 28px; }
.wiz-steps { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.ws { font-family: "Space Grotesk", sans-serif; font-size: 0.82rem; color: #8a93a3; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,0.05); }
.ws.is-on { color: #fff; background: var(--grad); }
.wiz-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.wiz-opt { display: flex; align-items: center; gap: 12px; text-align: left; background: #232a35; border: 1px solid rgba(255,255,255,0.1); color: #fff; border-radius: 12px; padding: 16px; font: inherit; cursor: pointer; transition: 0.2s; }
.wiz-opt:hover { border-color: var(--red-2); transform: translateY(-3px); }
.wiz-opt .wo-ico { width: 34px; height: 34px; flex: none; display: grid; place-items: center; color: var(--red-2); }
.wiz-opt .wo-ico svg { width: 24px; height: 24px; }
.wiz-opt b { font-family: "Space Grotesk", sans-serif; font-weight: 600; font-size: 0.96rem; }
.wiz-back { background: none; border: 0; color: #8a93a3; font: inherit; cursor: pointer; margin-bottom: 16px; padding: 4px 0; }
.wiz-back:hover { color: #fff; }
.wiz-result { text-align: center; padding: 10px 0; }
.wiz-result .wr-label { color: #8a93a3; font-size: 0.85rem; }
.wiz-result .wr-item { font-family: "Space Grotesk", sans-serif; font-size: 1.2rem; margin: 4px 0 18px; }
.wiz-result .wr-price { font-family: "Space Grotesk", sans-serif; font-size: 2.6rem; color: #fff; }
.wiz-result .wr-price span { color: var(--red-2); }
.wiz-result .wr-note { color: #8a93a3; font-size: 0.82rem; margin: 8px 0 22px; }
.wiz-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* Seguimiento */
.track-form { display: flex; gap: 10px; max-width: 480px; margin: 0 auto 10px; }
.track-form input { flex: 1; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 13px 15px; font: inherit; }
.track-form input:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(224,45,37,0.12); }
.track-hint { text-align: center; color: var(--muted); font-size: 0.86rem; }
.linklike { background: none; border: 0; color: var(--red); font: inherit; cursor: pointer; text-decoration: underline; padding: 0; }
.tracker { max-width: 620px; margin: 28px auto 0; background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: 24px 26px; }
.tracker-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; flex-wrap: wrap; gap: 6px; }
.tracker-head strong { font-family: "Space Grotesk", sans-serif; }
.t-eta { color: var(--ok); font-size: 0.86rem; font-weight: 600; }
.tl { position: relative; }
.tl li { display: grid; grid-template-columns: 28px 1fr; gap: 14px; padding-bottom: 22px; position: relative; }
.tl li:last-child { padding-bottom: 0; }
.tl li::before { content: ""; position: absolute; left: 13px; top: 24px; bottom: 0; width: 2px; background: var(--line); }
.tl li:last-child::before { display: none; }
.tl-dot { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); background: #fff; display: grid; place-items: center; z-index: 1; }
.tl li.done .tl-dot { background: var(--ok); border-color: var(--ok); }
.tl li.done .tl-dot::after { content: "✓"; color: #fff; font-size: 0.8rem; }
.tl li.current .tl-dot { border-color: var(--red); background: var(--red); }
.tl li.current .tl-dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.tl h4 { font-size: 1rem; }
.tl li:not(.done):not(.current) h4, .tl li:not(.done):not(.current) p { opacity: 0.45; }
.tl p { color: var(--muted); font-size: 0.88rem; }

/* Empresas */
.empresas { background: var(--bg-2); }
.emp-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.empresas h2 { font-size: clamp(1.7rem, 3.2vw, 2.3rem); }
.empresas > .emp-grid > div p { color: var(--muted); margin: 12px 0 18px; }
.light-k { color: var(--red); }
.checks { display: grid; gap: 10px; margin-bottom: 24px; }
.checks li { padding-left: 28px; position: relative; color: var(--ink); }
.checks li::before { content: "✓"; position: absolute; left: 0; color: #fff; background: var(--ok); width: 18px; height: 18px; border-radius: 50%; font-size: 0.7rem; display: grid; place-items: center; top: 4px; }
.emp-card { background: var(--dark); color: #fff; border-radius: 16px; padding: 26px; box-shadow: var(--shadow); }
.emp-row { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; border-bottom: 1px solid rgba(255,255,255,0.1); }
.emp-row:last-child { border-bottom: 0; }
.emp-row span { color: #9aa3b2; font-size: 0.9rem; }
.emp-row strong { font-family: "Space Grotesk", sans-serif; color: var(--red-2); }

/* Contacto */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: start; }
.contact-grid h2 { font-size: clamp(1.7rem, 3.2vw, 2.3rem); }
.contact-grid > div p { color: var(--muted); margin: 12px 0 20px; }
.cdata { display: grid; gap: 8px; font-size: 1.05rem; }
.cdata a:hover { color: var(--red); }
.contact-form { display: grid; gap: 14px; }
.contact-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.contact-form label { display: grid; gap: 6px; font-size: 0.82rem; font-weight: 500; color: var(--muted); }
.contact-form input, .contact-form textarea { background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font: inherit; color: var(--ink); transition: 0.2s; }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(224,45,37,0.12); background: #fff; }
.contact-form textarea { resize: vertical; }
.contact-form .btn { justify-self: start; }
.form-note { font-size: 0.88rem; min-height: 1.2em; }
.form-note.ok { color: var(--ok); }
.form-note.err { color: var(--red); }

/* Footer */
.site-footer { background: var(--dark); color: #fff; padding: 50px 0 26px; }
.foot-grid { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.foot-brand { display: flex; align-items: baseline; gap: 8px; }
.foot-brand img { height: 26px; }
.foot-brand span { font-family: "Space Grotesk", sans-serif; font-weight: 600; font-size: 1.1rem; }
.foot-grid p { color: rgba(255,255,255,0.6); font-size: 0.92rem; }
.foot-bottom { display: flex; justify-content: space-between; margin-top: 34px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.12); flex-wrap: wrap; gap: 6px; }
.foot-bottom p { color: rgba(255,255,255,0.5); font-size: 0.82rem; }

/* To top */
.to-top { position: fixed; right: 22px; bottom: 22px; z-index: 90; width: 44px; height: 44px; display: grid; place-items: center; background: var(--grad); color: #fff; border-radius: 50%; font-size: 1.2rem; opacity: 0; transform: translateY(10px); pointer-events: none; transition: 0.3s var(--ease); }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top[hidden] { display: grid; }

/* Reveal */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 900px) {
  .hero-grid, .emp-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero-card { order: -1; }
  .svc-grid, .wiz-grid { grid-template-columns: repeat(2, 1fr); }
  .nav-toggle { display: flex; }
  .nav { position: fixed; inset: 68px 0 auto 0; background: #fff; border-bottom: 1px solid var(--line); max-height: 0; overflow: hidden; transition: max-height 0.35s var(--ease); }
  .nav.open { max-height: 360px; }
  .nav ul { flex-direction: column; align-items: stretch; padding: 14px 26px; gap: 2px; }
  .nav a { padding: 12px 0; }
}
@media (max-width: 560px) {
  .svc-grid, .wiz-grid, .contact-form .row { grid-template-columns: 1fr; }
  .trust { gap: 22px; }
  .section { padding: 60px 0; }
  .track-form { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; scroll-behavior: auto; } .reveal { opacity: 1; transform: none; } }
