/* ==========================================================================
   ComService — Sistema de diseño
   Paleta: navy/slate profundo (infraestructura, servidores) + teal (red,
   conectividad) + ámbar (soporte, alerta amistosa)
   Tipografía: Space Grotesk (display, geométrica/técnica) + IBM Plex Sans
   (texto) + IBM Plex Mono (etiquetas, datos, "estado del sistema")
   ========================================================================== */

:root {
  --navy-950: #0c1526;
  --navy-900: #101c30;
  --navy-800: #16243c;
  --navy-700: #223655;
  --line: #2a3c5c;
  --teal: #2fb8a6;
  --teal-soft: #bfe9e2;
  --amber: #f2a65a;
  --paper: #f4f6f8;
  --paper-dim: #e7ebee;
  --ink: #0f1720;
  --ink-soft: #4a5568;
  --white: #ffffff;

  --font-display: "Space Grotesk", "IBM Plex Sans", sans-serif;
  --font-body: "IBM Plex Sans", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;

  --radius: 4px;
  --container: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

img { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1em; color: var(--ink-soft); }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 3px rgba(47,184,166,0.18);
}

/* Focus visibility */
a:focus-visible, button:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(12, 21, 38, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.logo-badge {
  background: var(--white);
  border-radius: 10px;
  padding: 6px 12px;
  display: inline-flex;
  align-items: center;
}
.logo-badge img {
  display: block;
  height: 32px;
  width: auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav a.nav-link {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.92rem;
  padding: 10px 14px;
  border-radius: var(--radius);
  transition: color 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.nav a.nav-link:hover,
.nav a.nav-link:focus-visible,
.nav a.nav-link.active {
  color: var(--white);
  background: var(--navy-800);
}

.nav-item.has-dropdown { position: relative; }
.nav-item.has-dropdown > .nav-link::after {
  content: "▾";
  font-size: 0.65em;
  margin-left: 6px;
  opacity: 0.7;
}
.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 240px;
  background: var(--navy-800);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);
}
.nav-item.has-dropdown:hover .dropdown,
.nav-item.has-dropdown:focus-within .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown a {
  display: block;
  padding: 9px 12px;
  font-size: 0.87rem;
  color: #cbd5e1;
  text-decoration: none;
  border-radius: 3px;
}
.dropdown a:hover, .dropdown a:focus-visible { background: var(--navy-700); color: var(--white); }

.nav-cta {
  background: var(--teal);
  color: var(--navy-950) !important;
  font-weight: 600;
  padding: 10px 18px !important;
}
.nav-cta:hover { background: var(--teal-soft) !important; }

.whatsapp-btn {
  background: #25D366 !important;
  color: var(--navy-950) !important;
  display: inline-flex !important;
  align-items: center;
}
.whatsapp-btn:hover { background: #1ebe5a !important; }

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  color: var(--white);
  border-radius: var(--radius);
  padding: 8px 10px;
  font-size: 1rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 13px 24px;
  border-radius: var(--radius);
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn-primary { background: var(--teal); color: var(--navy-950); }
.btn-primary:hover { background: var(--teal-soft); transform: translateY(-1px); }
.btn-outline { border-color: var(--line); color: var(--white); }
.btn-outline:hover { border-color: var(--teal); color: var(--teal); }
.btn-ghost { color: var(--navy-900); border-color: var(--navy-700); }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--navy-950);
  color: var(--white);
  overflow: hidden;
  padding: 96px 0 110px;
}
.hero .container { position: relative; z-index: 2; max-width: 760px; }
.hero h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); color: var(--white); }
.hero .lead { color: #a9b7c9; font-size: 1.1rem; max-width: 58ch; }
.hero-actions { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }

.hero-net {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.55;
}

.page-hero {
  background: var(--navy-950);
  color: var(--white);
  padding: 64px 0 56px;
  position: relative;
  overflow: hidden;
}
.page-hero .container { position: relative; z-index: 2; max-width: 720px; }
.page-hero h1 { color: var(--white); font-size: clamp(1.9rem, 3.6vw, 2.6rem); }
.page-hero p { color: #a9b7c9; font-size: 1.02rem; margin-bottom: 0; }

/* ---------- Stats strip ---------- */
.stats {
  background: var(--navy-900);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stats .container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 30px 24px;
}
.stat b {
  display: block;
  font-family: var(--font-mono);
  color: var(--teal);
  font-size: 1.5rem;
}
.stat span { color: #93a2b7; font-size: 0.82rem; }

/* ---------- Sections ---------- */
.section { padding: 84px 0; }
.section-tight { padding: 56px 0; }
.section-alt { background: var(--white); }
.section-head { max-width: 620px; margin-bottom: 46px; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); color: var(--navy-950); }

/* ---------- Cards / grid ---------- */
.grid {
  display: grid;
  gap: 22px;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--white);
  border: 1px solid var(--paper-dim);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.card:hover { border-color: var(--teal); transform: translateY(-2px); }
.card .icon {
  width: 40px; height: 40px;
  color: var(--teal);
  margin-bottom: 16px;
}
.card h3 { font-size: 1.08rem; color: var(--navy-950); }
.card p { margin-bottom: 0; font-size: 0.95rem; }
.card a.card-link {
  display: inline-block;
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--teal);
  text-decoration: none;
  letter-spacing: 0.04em;
}
.card a.card-link:hover { text-decoration: underline; }

/* Service anchor sections on Servicios page */
.service-block {
  padding: 64px 0;
  border-top: 1px solid var(--paper-dim);
  scroll-margin-top: 90px;
}
.service-block .kicker {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--teal);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.service-block h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); color: var(--navy-950); margin-top: 6px; }
.service-block .cols {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  margin-top: 24px;
  align-items: start;
}
.subitem { margin-bottom: 20px; }
.subitem h4 {
  font-size: 0.98rem;
  color: var(--navy-950);
  display: flex;
  align-items: center;
  gap: 8px;
}
.subitem h4::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--teal);
  display: inline-block;
}
.tier-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.tier-list li {
  background: var(--paper);
  border: 1px solid var(--paper-dim);
  border-left: 3px solid var(--teal);
  padding: 14px 16px;
  border-radius: var(--radius);
  font-size: 0.92rem;
  color: var(--ink);
}
.tier-list b { font-family: var(--font-mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--navy-700); display: block; margin-bottom: 4px; }

.pending-note {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--amber);
  background: #fbf1e4;
  border: 1px dashed #e7c393;
  padding: 10px 14px;
  border-radius: var(--radius);
  margin-top: 16px;
}

/* ---------- Timeline (Nosotros) ---------- */
.timeline {
  border-left: 2px solid var(--line);
  margin-left: 8px;
  padding-left: 30px;
  display: grid;
  gap: 34px;
}
.timeline .t-item { position: relative; }
.timeline .t-item::before {
  content: "";
  position: absolute;
  left: -37px;
  top: 4px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--teal);
  border: 3px solid var(--paper);
  box-shadow: 0 0 0 2px var(--teal);
}
.timeline .t-year { font-family: var(--font-mono); color: var(--teal); font-size: 0.85rem; }
.timeline h3 { font-size: 1.1rem; margin-top: 4px; }

/* ---------- Quote ---------- */
.quote-block {
  background: var(--navy-950);
  color: var(--white);
  padding: 70px 0;
  text-align: center;
}
.quote-block blockquote {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  max-width: 780px;
  margin: 0 auto;
  font-weight: 500;
  line-height: 1.35;
}
.quote-block cite {
  display: block;
  margin-top: 20px;
  font-family: var(--font-mono);
  font-style: normal;
  color: var(--teal);
  font-size: 0.85rem;
}

/* ---------- Plan / pricing cards ---------- */
.plan-card {
  background: var(--white);
  border: 1px solid var(--paper-dim);
  border-radius: var(--radius);
  padding: 32px;
}
.plan-card h3 { color: var(--navy-950); }
.plan-card ul { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.plan-card li { font-size: 0.94rem; color: var(--ink-soft); padding-left: 22px; position: relative; }
.plan-card li::before { content: "✓"; position: absolute; left: 0; color: var(--teal); font-family: var(--font-mono); }

/* ---------- Blog ---------- */
.post-card {
  border: 1px solid var(--paper-dim);
  border-radius: var(--radius);
  background: var(--white);
  overflow: hidden;
}
.post-card .post-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--teal);
  padding: 22px 24px 0;
  display: block;
}
.post-card h3 { padding: 8px 24px 0; font-size: 1.05rem; color: var(--navy-950); }
.post-card p { padding: 0 24px; }
.post-card .post-meta {
  padding: 0 24px 22px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--ink-soft);
}
.empty-state {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--navy-900);
  color: #a9b7c9;
  padding: 56px 32px;
  text-align: center;
}
.empty-state h3 { color: var(--white); }

/* ---------- Contact / CTA band ---------- */
.cta-band {
  background: var(--teal);
  color: var(--navy-950);
}
.cta-band .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding: 48px 24px;
}
.cta-band h2 { color: var(--navy-950); margin-bottom: 6px; font-size: 1.6rem; }
.cta-band p { color: rgba(15,23,32,0.75); margin-bottom: 0; }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--navy-700);
  margin-bottom: 6px;
}
.field input, .field textarea, .field select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--paper-dim);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--white);
  color: var(--ink);
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(47,184,166,0.15);
}

.contact-info-item { display: flex; gap: 14px; margin-bottom: 22px; }
.contact-info-item .ic {
  width: 38px; height: 38px;
  border-radius: var(--radius);
  background: var(--navy-950);
  color: var(--teal);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.contact-info-item h4 { font-size: 0.95rem; margin-bottom: 2px; color: var(--navy-950); }
.contact-info-item p { margin-bottom: 0; font-size: 0.9rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-950);
  color: #93a2b7;
  padding: 56px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--line);
}
.footer-grid h4 {
  color: var(--white);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: var(--font-mono);
  margin-bottom: 14px;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer-grid a { color: #93a2b7; text-decoration: none; font-size: 0.9rem; }
.footer-grid a:hover { color: var(--teal); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 22px;
  font-size: 0.82rem;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Utility ---------- */
.mt-0 { margin-top: 0; }
.text-center { text-align: center; }
.tag-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  border: 1px solid var(--line);
  color: #cbd5e1;
  padding: 5px 10px;
  border-radius: 3px;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .service-block .cols { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats .container { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .nav { display: none; }
  .menu-toggle { display: inline-flex; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero { padding: 64px 0 72px; }
  .section { padding: 56px 0; }
}

/* Mobile nav (simple toggle) */
.nav.open {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 72px;
  left: 0; right: 0;
  background: var(--navy-900);
  border-bottom: 1px solid var(--line);
  padding: 10px;
}
.nav.open .dropdown { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; margin-top: 4px; display: none; }
.nav.open .nav-item.has-dropdown.expanded .dropdown { display: block; }
