/* =====================================================================
   Token system
   Base: grafito profundo (no negro puro) + ámbar cálido de "dispositivo
   encendido" + cian frío de "estado en línea". Space Grotesk para
   titulares (geométrica, técnica) + Inter para cuerpo de texto.
   ===================================================================== */
:root {
  --bg: #12161c;
  --surface: #1b212b;
  --surface-raised: #222937;
  --border: #2a313d;
  --text: #eceef2;
  --text-muted: #8a93a3;
  --amber: #ffb24d;
  --amber-dim: #4a3520;
  --cyan: #5ec8d8;
  --cyan-dim: #1c3236;
  --danger: #e2685c;

  --font-display: "Space Grotesk", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;

  --radius-s: 6px;
  --radius-m: 10px;
  --container: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

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

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

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

/* ---------------------------------------------------------------------
   Header
   --------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(18, 22, 28, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  text-decoration: none;
  color: var(--text);
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(145deg, var(--amber), #d98a2b);
  position: relative;
  flex-shrink: 0;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 3px;
  background: var(--bg);
}

.main-nav {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.95rem;
  transition: color 0.15s ease;
}

.main-nav a:hover { color: var(--text); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-s);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:active { transform: translateY(1px); }

.btn-amber {
  background: var(--amber);
  color: #1a1204;
}
.btn-amber:hover { background: #ffc16b; }

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-outline:hover { border-color: var(--cyan); color: var(--cyan); }

.nav-cta { display: none; }
@media (min-width: 720px) { .nav-cta { display: inline-flex; } }

/* ---------------------------------------------------------------------
   Hero — panel de dispositivos "en línea"
   --------------------------------------------------------------------- */
.hero {
  padding: 72px 0 56px;
  border-bottom: 1px solid var(--border);
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
}

.eyebrow-line {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--cyan);
  font-size: 0.85rem;
  margin-bottom: 18px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 0 rgba(94, 200, 216, 0.6);
  animation: pulse 2.4s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(94, 200, 216, 0.5); }
  70% { box-shadow: 0 0 0 10px rgba(94, 200, 216, 0); }
  100% { box-shadow: 0 0 0 0 rgba(94, 200, 216, 0); }
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4vw, 3.2rem);
  line-height: 1.12;
  margin: 0 0 20px;
  max-width: 15ch;
}

.hero p.lead {
  color: var(--text-muted);
  font-size: 1.08rem;
  max-width: 46ch;
  margin: 0 0 32px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* Panel de estado de dispositivos, a la derecha del hero */
.device-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.device-tile {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  padding: 16px;
}

.device-tile .status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--cyan);
  margin-bottom: 10px;
}

.device-tile .status .pulse-dot { width: 6px; height: 6px; }

.device-tile .icon { font-size: 1.5rem; margin-bottom: 8px; }

.device-tile .name {
  font-size: 0.88rem;
  color: var(--text);
  font-weight: 600;
}

.device-tile .meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ---------------------------------------------------------------------
   Franja de confianza / stats
   --------------------------------------------------------------------- */
.trust-strip {
  border-bottom: 1px solid var(--border);
  padding: 26px 0;
}

.trust-strip .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.trust-strip strong { color: var(--text); font-family: var(--font-display); }

/* ---------------------------------------------------------------------
   Catálogo
   --------------------------------------------------------------------- */
.catalog-section { padding: 64px 0 88px; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  margin: 0 0 8px;
}

.section-head p { color: var(--text-muted); margin: 0; max-width: 50ch; }

.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.filter-chip {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.86rem;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.filter-chip:hover { color: var(--text); border-color: var(--cyan); }

.filter-chip.active {
  background: var(--cyan-dim);
  border-color: var(--cyan);
  color: var(--cyan);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  padding: 8px 14px;
  max-width: 280px;
  margin-left: auto;
}

.search-box input {
  background: transparent;
  border: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  width: 100%;
}
.search-box input:focus { outline: none; }
.search-box input::placeholder { color: var(--text-muted); }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 22px;
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.product-media {
  aspect-ratio: 4 / 3;
  background: var(--surface-raised);
  position: relative;
  overflow: hidden;
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--amber-dim);
  color: var(--amber);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
}

.product-sku {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(18, 22, 28, 0.75);
  color: var(--text-muted);
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: var(--radius-s);
  font-family: var(--font-display);
  letter-spacing: 0.02em;
}

.product-body {
  padding: 18px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.product-category {
  font-size: 0.74rem;
  color: var(--cyan);
}

.product-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: 0;
}

.product-desc {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin: 0;
  flex: 1;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}

.product-price {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--text);
}

.product-footer .btn { padding: 8px 16px; font-size: 0.85rem; }

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius-m);
}

/* ---------------------------------------------------------------------
   Contacto / footer
   --------------------------------------------------------------------- */
.contact-band {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 56px 0;
}

.contact-band .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.contact-band h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  margin: 0 0 6px;
}

.contact-band p { color: var(--text-muted); margin: 0; }

.site-footer {
  padding: 32px 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------------------------------------------------------------------
   Modal de producto (detalle rápido)
   --------------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 16, 0.72);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 50;
}

.modal-overlay.open { display: flex; }

.modal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  max-width: 640px;
  width: 100%;
  max-height: 86vh;
  overflow: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 620px) {
  .modal-card { grid-template-columns: 1fr; }
}

.modal-media { background: var(--surface-raised); aspect-ratio: 1; }
.modal-media img { width: 100%; height: 100%; object-fit: cover; }

.modal-body { padding: 26px; position: relative; }

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.modal-body h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin: 4px 0 10px;
}

.modal-body .product-price { display: block; margin: 14px 0 20px; }
