/* QPS, Movilidad eléctrica. Tokens tomados de design/Main.dc.html */
:root {
  --ink-deep: #071419;
  --ink: #0B1D26;
  --surface-dark: #0E2530;
  --surface-dark-2: #163442;
  --border-dark: #1E3A47;
  --border-dark-2: #2A4552;
  --border-dark-3: #3B5866;
  --grid-line: #17323E;
  --bg: #F4F6F3;
  --bg-alt: #E8EDEA;
  --card: #FFFFFF;
  --line-light: #D5DDD9;
  --muted: #4A5A61;
  --muted-2: #3F4F56;
  --muted-dark: #B7C7CD;
  --muted-dark-2: #A9BAC1;
  --nav-text: #D5E0E4;
  --chip-text: #C9D6DB;
  --footer-text: #8FA3AB;
  --accent: #8CC63F;

  --font-display: 'Space Grotesk', Inter, system-ui, sans-serif;
  --font-body: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --container: 1200px;
  --gutter: 32px;
  --section-y: 96px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font-display); margin: 0; line-height: 1.15; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
a:hover { opacity: .85; }
input, select, textarea, button { font: inherit; }
svg { display: block; }
[id] { scroll-margin-top: 16px; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--accent); color: var(--ink-deep); font-weight: 600;
  padding: 12px 18px; border-radius: 999px;
}
.skip-link:focus { top: 16px; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.stack-48 { display: flex; flex-direction: column; gap: 48px; }
.stack-36 { display: flex; flex-direction: column; gap: 36px; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 16px; line-height: 1.2;
  padding: 16px 26px; border-radius: 999px; border: 1px solid transparent; cursor: pointer;
}
.btn-sm { padding: 12px 20px; font-size: 15px; }
.btn-primary { background: var(--accent); color: var(--ink-deep); }
.btn-secondary { border-color: var(--border-dark-3); color: #FFFFFF; font-weight: 500; }
.btn-dark { background: var(--ink); color: #FFFFFF; font-size: 15px; padding: 14px 22px; }

/* Header */
.site-header { background: var(--ink-deep); color: #FFFFFF; }
.header-inner {
  padding-top: 20px; padding-bottom: 20px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 10px; background: var(--accent); color: var(--ink-deep);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 15px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 18px; }
.brand-sub { font-size: 12px; color: var(--muted-dark-2); letter-spacing: .06em; text-transform: uppercase; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; font-size: 15px; color: var(--nav-text); }
.nav-toggle {
  display: none; background: transparent; color: #FFFFFF;
  border: 1px solid var(--border-dark-3); border-radius: 999px; padding: 10px; cursor: pointer;
}

/* Hero */
.hero { background: var(--ink-deep); color: #FFFFFF; padding: 56px 0 var(--section-y); }
.hero-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 56px; }
.hero-copy { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.chip {
  align-self: flex-start; border: 1px solid var(--border-dark-2); color: var(--chip-text);
  font-size: 13px; padding: 8px 14px; border-radius: 999px;
}
.hero h1 { font-size: clamp(40px, 6vw, 64px); line-height: 1.02; letter-spacing: -.02em; font-weight: 700; }
.lead { font-size: 19px; line-height: 1.6; color: var(--muted-dark); max-width: 560px; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; }
.checks { display: flex; flex-wrap: wrap; gap: 12px 24px; font-size: 14px; color: var(--muted-dark-2); padding-top: 8px; }
.checks li { display: flex; align-items: center; gap: 8px; }
.checks svg { color: var(--accent); }

.hero-art { flex: 1 1 420px; min-width: 0; display: flex; justify-content: center; }
.art-frame {
  position: relative; width: 100%; max-width: 460px; aspect-ratio: 1 / 1.05;
  border-radius: 28px; background: var(--surface-dark); border: 1px solid var(--border-dark); overflow: hidden;
}
.art-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.cable-flow { animation: flow 1.6s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -32; } }
.status-card {
  position: absolute; right: 20px; bottom: 24px; min-width: 200px;
  background: #FFFFFF; color: var(--ink); border-radius: 18px; padding: 18px 20px;
  display: flex; flex-direction: column; gap: 10px; box-shadow: 0 20px 40px rgba(0, 0, 0, .35);
}
.status-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.status-title { font-family: var(--font-display); font-weight: 700; font-size: 22px; }
.status-bar { display: block; height: 8px; border-radius: 99px; background: #E3E9E6; overflow: hidden; }
.status-bar span { display: block; width: 68%; height: 100%; background: var(--ink); }
.status-note { font-size: 13px; color: var(--muted); }

/* Secciones */
.section { padding: var(--section-y) 0; }
.section-ink { background: var(--ink); color: #FFFFFF; }
.section-alt { background: var(--bg-alt); }
.section-deep { background: var(--ink-deep); color: #FFFFFF; }

.head { display: flex; flex-direction: column; gap: 16px; }
.head-narrow { max-width: 720px; }
.head h2, .contact-copy h2 { font-size: clamp(32px, 4.4vw, 44px); line-height: 1.08; letter-spacing: -.015em; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.eyebrow-accent { color: var(--accent); }
.body-lg { font-size: 17px; line-height: 1.6; }
.muted { color: var(--muted); }
.muted-dark { color: var(--muted-dark); }

.split-head { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-end; justify-content: space-between; }
.split-head .head { flex: 1 1 520px; min-width: 0; }
.split-head > p { flex: 1 1 360px; min-width: 0; }

.grid { display: grid; gap: 20px; }
.grid-240 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-320 { grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }

/* Tarjetas "De la fibra a la carga" */
.card { background: var(--card); border-radius: 20px; padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.card-num { font-family: var(--font-display); font-size: 14px; font-weight: 600; color: var(--muted); }
.card h3 { font-size: 21px; }
.card p { font-size: 15px; line-height: 1.6; color: var(--muted); }

.clients { border-top: 1px solid var(--line-light); padding-top: 32px; display: flex; flex-direction: column; gap: 20px; }
.clients-title { font-family: var(--font-body); font-size: 14px; font-weight: 400; color: var(--muted); }
.clients-list {
  display: flex; flex-wrap: wrap; gap: 14px 40px; align-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 20px; color: #2E3E45;
}

/* Servicios */
.service {
  border: 1px solid var(--border-dark); background: var(--surface-dark); border-radius: 20px;
  padding: 30px; display: flex; flex-direction: column; gap: 14px;
}
.service-icon {
  width: 48px; height: 48px; border-radius: 12px; background: var(--surface-dark-2); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.service h3 { font-size: 22px; }
.service p { font-size: 15px; line-height: 1.6; color: var(--muted-dark); }

/* Soluciones */
.tabs { display: flex; flex-wrap: wrap; gap: 10px; }
.tabs [role="tab"] {
  cursor: pointer; font-size: 15px; font-weight: 600; padding: 12px 22px; border-radius: 999px;
  border: 1px solid var(--ink); background: transparent; color: var(--ink);
}
.tabs [role="tab"][aria-selected="true"] { background: var(--ink); color: #FFFFFF; }
.panel {
  background: var(--card); border-radius: 28px; padding: 48px;
  display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start;
}
.panel[hidden] { display: none; }
.panel-copy { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.panel-copy h3 { font-size: clamp(26px, 3vw, 32px); }
.panel-copy p { font-size: 17px; line-height: 1.65; color: var(--muted); }
.panel-copy .btn { align-self: flex-start; margin-top: 8px; }
.points { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.points li {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--bg); border-radius: 14px; padding: 18px 20px; font-size: 16px; line-height: 1.5;
}
.points li::before {
  content: ""; flex: none; width: 22px; height: 22px; margin-top: 1px;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230B1D26' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13 2 4 14h7l-1 8 9-12h-7z'/%3E%3C/svg%3E");
}

/* Cómo trabajamos */
.step { display: flex; flex-direction: column; gap: 14px; border-top: 3px solid var(--ink); padding-top: 24px; }
.step-num { font-family: var(--font-display); font-size: 40px; font-weight: 700; line-height: 1.1; }
.step h3 { font-size: 21px; }
.step p { font-size: 15px; line-height: 1.6; color: var(--muted-2); }
.band {
  background: var(--ink); color: #FFFFFF; border-radius: 20px; padding: 28px 32px;
  display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between;
}
.band p { flex: 1 1 480px; min-width: 0; font-size: 17px; line-height: 1.55; }
.pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pills li { border: 1px solid var(--border-dark-3); border-radius: 999px; padding: 8px 16px; font-size: 14px; }

/* Contacto */
.contact-inner { display: flex; flex-wrap: wrap; gap: 56px; }
.contact-copy { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.contact-data { display: flex; flex-direction: column; gap: 14px; font-size: 16px; color: var(--nav-text); padding-top: 12px; }
.accent-link { color: var(--accent); }
.form {
  flex: 1 1 520px; min-width: 0; background: var(--surface-dark); border: 1px solid var(--border-dark);
  border-radius: 24px; padding: 36px; display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 18px;
}
.form label { display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--chip-text); }
.form input, .form select, .form textarea {
  background: var(--ink-deep); border: 1px solid var(--border-dark-2); border-radius: 12px;
  padding: 14px; color: #FFFFFF; width: 100%;
}
.form textarea { resize: vertical; }
.form input:focus-visible, .form select:focus-visible, .form textarea:focus-visible { outline-offset: 0; border-color: var(--accent); }
.form [aria-invalid="true"] { border-color: #F08A7E; }
.form .full { grid-column: 1 / -1; }
.form .full-start { grid-column: 1 / -1; justify-self: start; border: 0; }
.form-status { font-size: 14px; color: var(--muted-dark); min-height: 1em; }
.form-status:empty { display: none; }

/* Footer */
.site-footer { background: var(--ink-deep); color: var(--footer-text); border-top: 1px solid var(--grid-line); }
.footer-inner {
  padding-top: 28px; padding-bottom: 28px;
  display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; font-size: 14px;
}

/* Mobile */
@media (max-width: 880px) {
  .nav-toggle { display: inline-flex; }
  .nav { display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 4px; padding-top: 8px; }
  .nav.is-open { display: flex; }
  .nav a:not(.btn) { padding: 12px 4px; border-bottom: 1px solid var(--border-dark); }
  .nav .btn { margin-top: 12px; }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; --section-y: 64px; }
  .hero { padding-top: 32px; }
  .hero-copy, .hero-art { flex-basis: 100%; }
  .lead { font-size: 17px; }
  .split-head .head, .split-head > p, .panel-copy, .points, .band p, .contact-copy, .form { flex-basis: 100%; }
  .grid-240 { grid-template-columns: 1fr; }
  .panel { padding: 28px 20px; gap: 28px; border-radius: 24px; }
  .service { padding: 24px; }
  .form { padding: 24px 18px; }
  .band { padding: 24px 20px; }
  .clients-list { gap: 10px 24px; font-size: 18px; }
  .status-card { right: 12px; bottom: 12px; min-width: 0; padding: 14px 16px; }
  .status-title { font-size: 19px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cable-flow { animation: none; }
}
