/* ============================================================
   SMARTSTAGE LLC — Design System
   Estética clara y sobria (Apple/Vercel), acento verde señal
   ============================================================ */

:root {
  --bg: #FAF8F3;
  --bg-alt: #F1EDE3;
  --card-bg: #ffffff;
  --ink-primary: #1d1d1f;
  --ink-body: #333336;
  --ink-secondary: #6e6e73;
  --line: rgba(0, 0, 0, 0.08);
  --line-strong: rgba(0, 0, 0, 0.14);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.04), 0 12px 28px -18px rgba(0, 0, 0, 0.16);

  --signal-green: #22C55E;
  --signal-green-dim: #0F7A3C;
  --signal-green-tint: #F0FBF4;
  --stage-amber: #E8A33D;
  --condition-gray: #8B93AB;
  --neutral-taupe: #D8D5C8;

  /* Compatibilidad: nombres usados en reglas más antiguas del archivo */
  --stage-black: var(--ink-primary);

  --font-display: 'Geist', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Geist', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --max-width: 1180px;
  --radius: 14px;
  --radius-sm: 8px;
  --radius-pill: 980px;
  --radius-xs: 2px;
  --radius-compact: 10px;
  --radius-badge: 20px;

  /* Alias — naming usado en los mockups de las verticales (nuevas-secciones/) */
  --void: var(--bg);
  --panel: var(--bg-alt);
  --signal: var(--signal-green);
  --signal-dim: var(--signal-green-dim);
  --copper: var(--stage-amber);
  --mist: var(--ink-secondary);
  --mist-dim: #aaaaad;
  --mono: var(--font-mono);
  --display: var(--font-display);
  --body: var(--font-body);

  /* Tokens del "panel app" (dashboard del manager) */
  --app-bg: var(--bg-alt);
  --app-card: #ffffff;
  --app-border: var(--line);
  --app-ink: var(--ink-primary);
  --app-mist: var(--ink-secondary);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* El logo comparte view-transition-name con su versión de header en las subpáginas —
   el navegador anima el morph centro-grande → esquina-pequeña al navegar entre páginas. */
@view-transition { navigation: auto; }

html { scroll-behavior: smooth; }

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

body {
  background: var(--bg);
  color: var(--ink-body);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

.skip-link {
  position: absolute;
  top: -100px;
  left: 12px;
  z-index: 200;
  background: var(--ink-primary);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  transition: top 0.15s ease;
}
.skip-link:focus {
  top: 12px;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--ink-primary);
}

h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.3rem; letter-spacing: -0.015em; }

p.lead {
  font-size: 1.15rem;
  color: var(--ink-secondary);
  line-height: 1.55;
  max-width: 56ch;
}

.eyebrow {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.01em;
  color: var(--signal-green-dim);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 14px 26px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, opacity .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 2px solid var(--signal-green); outline-offset: 3px; }

.btn-primary {
  background: var(--ink-primary);
  color: #fff;
}
.btn-primary:hover { opacity: 0.86; }

.btn-ghost {
  border-color: var(--line-strong);
  color: var(--ink-primary);
}
.btn-ghost:hover { background: var(--bg-alt); border-color: var(--ink-primary); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 20px;
  min-height: 76px;
  padding-top: 10px;
  padding-bottom: 10px;
}
.site-header .menu-toggle { justify-self: start; }
.site-header .btn-primary { justify-self: end; }
.logo {
  /* Tipografía del logo intencionalmente fija en Space Grotesk — no sigue el cambio a Geist del resto del sitio */
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  justify-self: center;
  view-transition-name: brand-logo;
}
.logo .dot { color: var(--signal-green); }

/* ---------- Animated logo mark (inline SVG, see content.py LOGO_SVG) ---------- */
.logo .ss-logo-mark {
  width: 160px;
  max-width: 180px;
  min-width: 140px;
  height: auto;
}
.ss-logo-mark { width: 100%; height: auto; display: block; overflow: visible; }

.ss-wave-path {
  stroke-dasharray: 22 14;
  animation: ssFlow 3.6s linear infinite;
}
@keyframes ssFlow {
  to { stroke-dashoffset: -180; }
}

.ss-dot-core {
  animation: ssPulseCore 2.4s ease-in-out infinite;
  transform-origin: 78px 34px;
}
.ss-dot-halo {
  animation: ssPulseHalo 2.4s ease-in-out infinite;
  transform-origin: 78px 34px;
}
@keyframes ssPulseCore {
  0%, 100% { transform: scale(1);   opacity: 1; }
  50%      { transform: scale(1.18); opacity: 0.9; }
}
@keyframes ssPulseHalo {
  0%, 100% { transform: scale(0.9); opacity: 0.55; }
  50%      { transform: scale(1.15); opacity: 0.9; }
}

/* ---------- Logo hero (home) — versión grande, centrada, más animada ---------- */
.logo--hero {
  gap: 22px;
  animation: ssLogoHeroIn 1.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.logo--hero .ss-logo-mark {
  width: min(58vw, 520px);
  max-width: 520px;
  min-width: 220px;
}
.logo--hero .logo-text {
  font-size: clamp(2rem, 6vw, 4rem);
  letter-spacing: -0.025em;
}
@keyframes ssLogoHeroIn {
  from { opacity: 0; filter: blur(18px); transform: scale(0.92); }
  to   { opacity: 1; filter: blur(0);    transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .logo--hero { animation: none; }
}

/* Onda "eco" — solo en la versión hero, refuerza la idea de señal en capas */
.ss-wave-path--echo {
  stroke-dasharray: 16 20;
  opacity: 0.35;
  animation: ssFlowEcho 5.2s linear infinite;
}
@keyframes ssFlowEcho {
  to { stroke-dashoffset: 220; }
}
@media (prefers-reduced-motion: reduce) {
  .ss-wave-path, .ss-wave-path--echo, .ss-dot-core, .ss-dot-halo { animation: none; }
}

/* ---------- Menú del sitio (logo centrado va a Inicio; el ☰ despliega Servicios/Proyectos/Nosotros) ---------- */
.menu-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: 1px solid var(--line-strong); color: var(--ink-primary);
  width: 42px; height: 42px; border-radius: var(--radius-sm); cursor: pointer; font-size: 1.1rem;
}
.menu-toggle:hover { border-color: var(--ink-primary); }

.site-menu {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 99;
  background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-card);
  transform: translateY(-8px); opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.site-menu.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
.site-menu-inner {
  max-width: 320px; margin: 0; padding: 28px 28px 32px;
  display: flex; flex-direction: column; gap: 24px;
}
.menu-col { display: flex; flex-direction: column; gap: 12px; }
.menu-heading, .menu-link {
  font-family: var(--font-display); font-weight: 600; font-size: 1rem; color: var(--ink-primary);
}
.menu-heading:hover, .menu-link:hover, .menu-link.active, .menu-heading.active { color: var(--signal-green-dim); }
.menu-sublink { font-size: 0.9rem; color: var(--ink-secondary); padding-left: 14px; }
.menu-sublink:hover, .menu-sublink.active { color: var(--ink-primary); }

.menu-lang {
  display: flex; align-items: center; gap: 8px; margin-top: 4px;
  padding-top: 20px; border-top: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.02em;
}
.lang-link { color: var(--ink-secondary); text-decoration: none; text-transform: uppercase; }
a.lang-link:hover { color: var(--ink-primary); }
.lang-link.active { color: var(--signal-green-dim); font-weight: 600; }
.lang-sep { color: var(--line-strong); }

@media (max-width: 480px) {
  .site-header .wrap { column-gap: 10px; }
  .logo .ss-logo-mark { width: 110px; min-width: 90px; }
  .site-header .btn-primary { padding: 10px 14px; font-size: 0.82rem; }
}

/* ---------- Blueprint texture ---------- */
.blueprint-bg {
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 42px 42px;
}

/* ---------- Hero ---------- */
/* ---------- Hero logo (home) — el logo animado es la portada ---------- */
.hero-logo-stage {
  min-height: 82vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: radial-gradient(ellipse at 50% 40%, rgba(34, 197, 94, 0.07), transparent 60%), var(--bg);
}
.hero-logo-stage .wrap {
  display: flex; align-items: center; justify-content: center;
}

.signal-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-card);
  padding: 22px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}
.signal-panel .row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
  color: var(--ink-secondary);
}
.signal-panel .row:last-child { border-bottom: none; }
.signal-panel .row span:last-child { color: var(--signal-green-dim); }
.signal-panel .meter {
  height: 3px;
  background: var(--line);
  margin-top: 6px;
  border-radius: var(--radius-xs);
  overflow: hidden;
}
.signal-panel .meter i {
  display: block;
  height: 100%;
  background: var(--signal-green);
}

/* ---------- Sections ---------- */
section { padding: 84px 0; }
.section-head { max-width: 640px; margin-bottom: 52px; }
.section-head h2 { margin-top: 14px; }

.section-alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-paper { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--ink-body); }
.section-paper .eyebrow { color: var(--signal-green-dim); }
.section-paper p.lead { color: var(--ink-secondary); }

/* ---------- Channel strip (process / verticals) ---------- */
.channel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}
.channel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 30px 26px;
  position: relative;
}
.channel .ch-num {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--signal-green-dim);
  letter-spacing: 0.06em;
}
.channel h3 { margin: 14px 0 10px; }
.channel p { color: var(--ink-secondary); font-size: 0.94rem; }
.channel .fader {
  margin-top: 20px;
  height: 2px;
  background: var(--line);
  position: relative;
}
.channel .fader::after {
  content: "";
  position: absolute;
  top: -4px; left: var(--fill, 30%);
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--signal-green);
}

/* ---------- Vertical / service cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}
.jack-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  background: #fff;
  box-shadow: var(--shadow-card);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.jack-card:hover { border-color: var(--signal-green); transform: translateY(-3px); }
.jack-card .tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--stage-amber);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.jack-card h3 { margin: 12px 0 10px; }
.jack-card p { color: var(--ink-secondary); font-size: 0.93rem; margin-bottom: 16px; }
.jack-card ul { margin-top: 14px; }
.jack-card ul li {
  font-size: 0.88rem;
  color: var(--ink-secondary);
  padding: 6px 0;
  border-top: 1px dashed var(--line);
}
.jack-card ul li:first-child { border-top: none; }
.jack-card ul li::before { content: "→ "; color: var(--signal-green); }

/* ---------- Stats strip ---------- */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 40px 0;
}
.stat b {
  font-family: var(--font-display);
  font-size: 2.1rem;
  letter-spacing: -0.02em;
  display: block;
  color: var(--ink-primary);
}
.stat span {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--ink-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--signal-green);
  color: var(--ink-primary);
  border-radius: var(--radius);
  padding: 54px 44px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}
.cta-band h2 { color: var(--ink-primary); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 60px 0 30px;
  background: var(--bg-alt);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
.footer-simple { margin-bottom: 30px; }
.footer-simple p { color: var(--ink-secondary); font-size: 0.9rem; max-width: 56ch; margin-top: 12px; }

.footer-grid h4, .footer-simple h4 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  color: var(--ink-primary);
  margin-bottom: 16px;
}
.footer-grid a, .footer-grid p { color: var(--ink-secondary); font-size: 0.9rem; }
.footer-grid li { margin-bottom: 10px; }
.footer-grid a:hover { color: var(--ink-primary); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--ink-secondary);
}

/* ---------- Breadcrumb / page header (interior pages) ---------- */
.page-header {
  padding: 150px 0 60px;
  border-bottom: 1px solid var(--line);
}
.page-header .eyebrow { margin-bottom: 16px; }
.page-header p.lead { margin-top: 18px; }

/* ---------- Utility ---------- */
.mt-lg { margin-top: 60px; }
.center { text-align: center; margin-left: auto; margin-right: auto; }
.badge-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  border: 1px solid var(--line-strong);
  padding: 6px 12px;
  border-radius: var(--radius-badge);
  color: var(--ink-secondary);
}

/* ---------- Contact form ---------- */
.form-field { margin-bottom: 20px; }
.form-field label {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--ink-secondary);
  margin-bottom: 8px;
}
.form-field input, .form-field select, .form-field textarea {
  width: 100%;
  background: #fff;
  border: 1px solid var(--line-strong);
  color: var(--ink-primary);
  padding: 13px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none;
  border-color: var(--signal-green);
}
.form-field textarea { min-height: 130px; resize: vertical; }

@media (max-width: 760px) {
  section > .wrap[style*="grid-template-columns:1.1fr"] {
    grid-template-columns: 1fr !important;
  }
}

/* ============================================================
   VERTICAL DETAIL — Comercial / Residencial / Iglesias
   Secciones: hero, categorías, dashboard del manager, compatibilidad, CTA final
   ============================================================ */

.page-hero-mock { padding: 100px 0 40px; text-align: center; border-bottom: 1px solid var(--line); }
.page-hero-mock .eyebrow { justify-content: center; }
.page-hero-mock h1 { margin-top: 14px; max-width: 16ch; margin-left: auto; margin-right: auto; }

/* ---------- Grilla de categorías ---------- */
.cat-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; margin-top: 44px;
}
@media (max-width: 900px) { .cat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .cat-grid { grid-template-columns: 1fr; } }
.cat-card {
  background: #fff; padding: 36px 24px; display: flex; flex-direction: column;
  align-items: flex-start; gap: 16px; transition: background .2s ease;
}
.cat-card:hover { background: var(--bg-alt); }
.cat-card svg { width: 40px; height: 40px; overflow: visible; }
.cat-card h3 { font-size: 16px; margin: 0; }
.cat-card p { font-family: var(--font-body); font-size: 12.5px; color: var(--ink-secondary); margin: 0; line-height: 1.55; }
.cat-card .idx { font-family: var(--mono); font-size: 10px; color: var(--copper); letter-spacing: 0.1em; }

.icon-pulse { animation: ssIconPulse 2.4s ease-in-out infinite; transform-origin: center; }
@keyframes ssIconPulse { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }
.icon-bulb-glow { fill: var(--signal-dim); animation: ssBulbGlow 3s ease-in-out infinite; transform-origin: center; }
@keyframes ssBulbGlow { 0%, 100% { fill: var(--signal-dim); } 50% { fill: var(--signal); } }
.icon-scan { animation: ssScanMove 2.6s ease-in-out infinite; }
@keyframes ssScanMove { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(6px); } }
.icon-node { animation: ssNodeBlink 1.8s steps(2) infinite; }
.icon-node:nth-child(2) { animation-delay: .3s; }
.icon-node:nth-child(3) { animation-delay: .6s; }
@keyframes ssNodeBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0.2; } }
.icon-ai-flow { stroke-dasharray: 4 3; animation: ssAiFlow 1.6s linear infinite; }
@keyframes ssAiFlow { to { stroke-dashoffset: -14; } }
@media (prefers-reduced-motion: reduce) {
  .icon-pulse, .icon-bulb-glow, .icon-scan, .icon-node, .icon-ai-flow { animation: none !important; }
}

/* ---------- Dashboard del manager (device-frame / app panel) ---------- */
.device-frame {
  margin-top: 48px; background: #111; border-radius: 24px; padding: 14px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.35);
}
.app-screen { background: var(--app-bg); border-radius: 14px; overflow: hidden; color: var(--app-ink); }
.app-topbar {
  display: flex; align-items: center; justify-content: space-between; padding: 18px 24px;
  background: var(--app-card); border-bottom: 1px solid var(--app-border);
}
.app-topbar .brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 600; font-size: 15px; }
.app-topbar .brand .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--signal); }
.app-topbar .status { font-family: var(--mono); font-size: 11.5px; color: var(--signal-dim); display: flex; align-items: center; gap: 6px; }
.app-topbar .status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--signal); animation: ssBlink 2s ease-in-out infinite; }
@keyframes ssBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
@media (prefers-reduced-motion: reduce) { .app-topbar .status::before { animation: none; } }

.app-body { padding: 24px; }

.savings-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 24px; }
@media (max-width: 700px) { .savings-row { grid-template-columns: 1fr; } }
.savings-card { background: var(--app-card); border: 1px solid var(--app-border); border-radius: var(--radius-compact); padding: 18px 20px; }
.savings-card .label { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--app-mist); }
.savings-card .value { font-family: var(--display); font-size: 26px; font-weight: 700; margin-top: 6px; color: var(--app-ink); }
.savings-card .value span { color: var(--signal-dim); }
.savings-card .sub { font-size: 12px; color: var(--app-mist); margin-top: 4px; }

.app-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 16px; }
@media (max-width: 800px) { .app-grid { grid-template-columns: 1fr; } }
.app-card { background: var(--app-card); border: 1px solid var(--app-border); border-radius: var(--radius-compact); padding: 20px; }
.app-card h4 { font-family: var(--display); font-size: 14px; margin: 0 0 16px; font-weight: 600; color: var(--app-ink); }

.toggle-row {
  display: flex; align-items: center; justify-content: space-between; padding: 10px 0;
  border-bottom: 1px solid var(--app-border); font-size: 13.5px;
}
.toggle-row:last-child { border-bottom: none; }
.toggle-row .name { display: flex; align-items: center; gap: 10px; color: var(--app-ink); }
.toggle-row .meta { font-family: var(--mono); font-size: 11px; color: var(--app-mist); }
.switch { width: 36px; height: 20px; border-radius: 12px; background: #E2E0D6; position: relative; flex-shrink: 0; }
.switch.on { background: var(--signal); }
.switch::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; transition: transform .2s ease; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.switch.on::after { transform: translateX(16px); }

.energy-block { display: flex; align-items: center; gap: 20px; }
.donut-wrap { position: relative; width: 110px; height: 110px; flex-shrink: 0; }
.donut-wrap svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut-center .kwh { font-family: var(--display); font-size: 18px; font-weight: 700; }
.donut-center .lbl { font-family: var(--mono); font-size: 9px; color: var(--app-mist); }
.legend { display: flex; flex-direction: column; gap: 8px; font-size: 12.5px; }
.legend .item { display: flex; align-items: center; gap: 8px; }
.legend .sw { width: 9px; height: 9px; border-radius: var(--radius-xs); }

.rule { background: var(--app-card); border: 1px solid var(--app-border); border-radius: var(--radius-compact); padding: 16px 18px; margin-top: 12px; font-size: 13px; }
.rule .flow-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rule .tag {
  font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 3px 8px; border-radius: 4px; color: #fff;
}
.rule .tag.when { background: var(--condition-gray); }
.rule .tag.then { background: var(--signal); }
.rule .cond { color: var(--app-ink); font-weight: 500; }
.rule .arrow { color: var(--app-mist); }

/* ---------- Compatibilidad ---------- */
.compat-list { display: flex; flex-direction: column; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-top: 8px; }
.compat-row { display: grid; grid-template-columns: 100px 1fr; gap: 24px; padding: 26px 20px; background: #fff; align-items: start; }
@media (max-width: 640px) { .compat-row { grid-template-columns: 60px 1fr; gap: 16px; padding: 20px 12px; } }
.compat-icon { width: 100px; height: 100px; background: var(--bg-alt); border-radius: var(--radius-compact); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.compat-icon svg { width: 56px; height: 56px; }
@media (max-width: 640px) { .compat-icon { width: 60px; height: 60px; } .compat-icon svg { width: 36px; height: 36px; } }
.compat-info h4 { font-family: var(--display); font-size: 17px; margin: 0 0 10px; color: var(--ink-primary); font-weight: 600; }
.brand-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.chip { font-family: var(--mono); font-size: 11px; padding: 4px 10px; border-radius: var(--radius-badge); border: 1px solid var(--line-strong); color: var(--ink-secondary); letter-spacing: 0.02em; }
.chip-own { border-color: var(--signal); color: var(--signal-dim); }
.fn-list { margin: 0; padding-left: 18px; color: var(--ink-secondary); font-size: 13.5px; line-height: 1.7; }
.fn-list li { margin-bottom: 4px; }

/* ---------- CTA final al configurador ---------- */
.final-cta { padding: 80px 0 96px; text-align: center; background: var(--bg-alt); border-top: 1px solid var(--line); }
.cta-title { font-size: clamp(28px, 4vw, 42px); margin-top: 14px; color: var(--ink-primary); max-width: 20ch; margin-left: auto; margin-right: auto; }
.cta-sub { color: var(--ink-secondary); font-size: 15.5px; max-width: 52ch; margin: 16px auto 0; }
.cta-button {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 32px;
  background: var(--ink-primary); color: #fff; text-decoration: none;
  font-family: var(--font-body); font-size: 15px; font-weight: 600;
  padding: 16px 32px; border-radius: var(--radius-pill); transition: transform .15s ease, opacity .15s ease;
}
.cta-button:hover { opacity: 0.86; transform: translateY(-2px); }

/* ---------- Configurador (plano interactivo) ---------- */
.configurador-hero { padding: 100px 0 20px; text-align: center; }
.configurador-hero .eyebrow { justify-content: center; }
.configurador-hero h1 { max-width: 22ch; margin: 14px auto 0; }

.back-link {
  display: inline-flex; align-items: center; gap: 8px; margin: 32px 0 -12px;
  font-family: var(--font-body); font-weight: 500; font-size: 13.5px;
  color: var(--ink-secondary); text-decoration: none;
}
.back-link:hover { color: var(--ink-primary); }

.scenario-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 28px; margin-top: 44px; align-items: start; }
@media (max-width: 860px) { .scenario-grid { grid-template-columns: 1fr; } }
.floorplan-box { background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.floorplan-box svg { width: 100%; height: auto; display: block; }

.grid-dot { fill: rgba(0, 0, 0, 0.06); }
.wall { fill: none; stroke: var(--mist-dim); stroke-width: 2; }
.fixture { fill: none; stroke: var(--mist-dim); stroke-width: 1.4; opacity: 0.7; }
.fixture-fill { fill: rgba(0, 0, 0, 0.03); stroke: var(--mist-dim); stroke-width: 1.2; }
.label-tag { font-family: var(--mono); font-size: 9px; fill: var(--mist-dim); letter-spacing: 0.06em; text-transform: uppercase; }

.hotspot { cursor: pointer; }
.hotspot:focus { outline: none; }
.hotspot:focus-visible .ring { stroke: var(--signal-dim); opacity: 1; stroke-width: 2.5; }
.hotspot:focus-visible .core { fill: var(--signal-dim); }
.hotspot .ring { fill: none; stroke: var(--signal); stroke-width: 1.5; opacity: 0.55; animation: ssRingPulse 2.6s ease-out infinite; transform-origin: center; }
.hotspot .core { fill: var(--signal); }
.hotspot.active .core { fill: var(--signal-dim); }
.hotspot .ch { font-family: var(--mono); font-size: 9px; fill: var(--ink-secondary); letter-spacing: 0.04em; }
@keyframes ssRingPulse { 0% { transform: scale(0.6); opacity: 0.7; } 100% { transform: scale(2.2); opacity: 0; } }

.tv-bar { animation: ssTvFlicker 3.4s ease-in-out infinite; transform-origin: left center; }
.tv-bar:nth-child(2) { animation-delay: .4s; }
.tv-bar:nth-child(3) { animation-delay: .8s; }
@keyframes ssTvFlicker { 0%, 100% { transform: scaleX(1); opacity: 0.9; } 50% { transform: scaleX(0.55); opacity: 0.5; } }

.sound-arc { animation: ssSoundWave 2.8s ease-out infinite; transform-origin: center; opacity: 0; }
.sound-arc:nth-child(2) { animation-delay: .5s; }
.sound-arc:nth-child(3) { animation-delay: 1s; }
@keyframes ssSoundWave { 0% { opacity: 0.65; transform: scale(0.5); } 100% { opacity: 0; transform: scale(1.6); } }

.cam-sweep { animation: ssCamSweep 4s ease-in-out infinite; transform-origin: 0px 0px; }
@keyframes ssCamSweep { 0%, 100% { transform: rotate(-22deg); } 50% { transform: rotate(22deg); } }

.net-led { animation: ssNetBlink 1.6s steps(2) infinite; }
.net-led:nth-child(2) { animation-delay: .3s; }
.net-led:nth-child(3) { animation-delay: .6s; }
@keyframes ssNetBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0.15; } }

@media (prefers-reduced-motion: reduce) {
  .hotspot .ring, .tv-bar, .sound-arc, .cam-sweep, .net-led { animation: none !important; }
}

.info-panel {
  background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px;
  min-height: 220px; display: flex; flex-direction: column; justify-content: center;
}
.info-panel .idx { font-family: var(--mono); font-size: 11px; color: var(--copper); letter-spacing: 0.08em; }
.info-panel h3 { font-size: 21px; margin: 12px 0 10px; }
.info-panel p { color: var(--ink-secondary); font-size: 14.5px; line-height: 1.6; margin: 0; }
.info-panel .hint { color: var(--mist-dim); font-family: var(--mono); font-size: 11.5px; margin-top: 18px; }

/* ---------- Residencial / Iglesias — variantes ---------- */
.cat-grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 820px) { .cat-grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .cat-grid-3 { grid-template-columns: 1fr; } }

.icon-orbit { animation: ssOrbitSpin 3.2s linear infinite; transform-origin: center; }
@keyframes ssOrbitSpin { to { transform: rotate(360deg); } }
.icon-wave { animation: ssWaveMove 2.2s ease-in-out infinite; }
@keyframes ssWaveMove { 0%, 100% { transform: scaleY(0.6); } 50% { transform: scaleY(1); } }
.icon-flicker { animation: ssFlicker 3.4s ease-in-out infinite; transform-origin: left center; }
@keyframes ssFlicker { 0%, 100% { opacity: 0.9; } 50% { opacity: 0.4; } }
@media (prefers-reduced-motion: reduce) {
  .icon-orbit, .icon-wave, .icon-flicker { animation: none !important; }
}

/* Configurador Residencial — robot de limpieza y glow de luces */
.vacuum-dot { animation: ssVacuumPath 9s ease-in-out infinite; }
@keyframes ssVacuumPath {
  0%   { transform: translate(120px, 300px); }
  20%  { transform: translate(220px, 300px); }
  35%  { transform: translate(220px, 180px); }
  50%  { transform: translate(380px, 180px); }
  65%  { transform: translate(380px, 320px); }
  85%  { transform: translate(550px, 320px); }
  100% { transform: translate(120px, 300px); }
}
.light-glow { animation: ssLightGlow 3.4s ease-in-out infinite; }
@keyframes ssLightGlow { 0%, 100% { opacity: 0.35; } 50% { opacity: 0.85; } }
@media (prefers-reduced-motion: reduce) {
  .vacuum-dot { animation: none; transform: translate(120px, 300px); }
  .light-glow { animation: none; opacity: 0.6; }
}

/* Configurador Iglesias — meter bridge y barrido DMX */
.meter-bar { animation: ssMeterMove 2.2s ease-in-out infinite; transform-origin: bottom; }
.meter-bar:nth-child(1) { animation-delay: 0s; }
.meter-bar:nth-child(2) { animation-delay: .2s; }
.meter-bar:nth-child(3) { animation-delay: .4s; }
.meter-bar:nth-child(4) { animation-delay: .1s; }
.meter-bar:nth-child(5) { animation-delay: .3s; }
@keyframes ssMeterMove { 0%, 100% { transform: scaleY(0.3); } 50% { transform: scaleY(1); } }
.dmx-wash { fill: var(--signal); opacity: 0.18; animation: ssDmxColor 6s ease-in-out infinite; }
@keyframes ssDmxColor {
  0%, 100% { fill: var(--signal); opacity: 0.18; }
  33% { fill: var(--copper); opacity: 0.22; }
  66% { fill: var(--condition-gray); opacity: 0.18; }
}
@media (prefers-reduced-motion: reduce) {
  .meter-bar, .dmx-wash { animation: none; }
}

/* ============================================================
   HOME — entrada con blur, marquee de marcas, vidrio esmerilado
   Adaptado de un template de referencia (power-ai), con paleta propia
   ============================================================ */

/* ---------- Entrada con blur (hero) ---------- */
@keyframes ssBlurFadeUp {
  from { opacity: 0; filter: blur(20px); transform: translateY(28px); }
  to { opacity: 1; filter: blur(0); transform: translateY(0); }
}
.animate-blur-fade-up {
  animation: ssBlurFadeUp 0.9s ease-out forwards;
  opacity: 0;
}
@media (prefers-reduced-motion: reduce) {
  .animate-blur-fade-up { animation: none; opacity: 1; filter: none; transform: none; }
}

/* ---------- Vidrio esmerilado (botón secundario del hero) ---------- */
.liquid-glass {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: none;
  color: var(--ink-primary);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.8), 0 1px 2px rgba(0, 0, 0, 0.04);
  position: relative;
  overflow: hidden;
}
.liquid-glass::before {
  content: "";
  position: absolute; inset: 0; border-radius: inherit; padding: 1.4px;
  background: linear-gradient(
    180deg,
    rgba(34, 197, 94, 0.35) 0%,
    rgba(34, 197, 94, 0.1) 20%,
    rgba(34, 197, 94, 0) 40%,
    rgba(34, 197, 94, 0) 60%,
    rgba(34, 197, 94, 0.1) 80%,
    rgba(34, 197, 94, 0.35) 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.liquid-glass:hover { background: rgba(255, 255, 255, 0.75); }

/* ---------- Marquee de marcas compatibles ---------- */
.marquee-section { padding: 8px 0 64px; }
.marquee-caption {
  text-align: center; font-size: 0.78rem; color: var(--ink-secondary);
  letter-spacing: 0.02em; margin: 0 0 20px;
}
.marquee-wrap { position: relative; overflow: hidden; }
.marquee-fade-l, .marquee-fade-r {
  position: absolute; top: 0; bottom: 0; width: 90px; z-index: 2; pointer-events: none;
}
.marquee-fade-l { left: 0; background: linear-gradient(90deg, var(--bg), transparent); }
.marquee-fade-r { right: 0; background: linear-gradient(270deg, var(--bg), transparent); }
@keyframes ssMarquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.marquee-track {
  display: flex; align-items: center; gap: 14px; width: max-content;
  animation: ssMarquee 28s linear infinite;
}
.marquee-track:hover { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }
.marquee-chip {
  display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0;
  padding: 10px 20px; border: 1px solid var(--line-strong); border-radius: var(--radius-pill);
  background: #fff; box-shadow: var(--shadow-card); white-space: nowrap;
}
.marquee-chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--signal-green); flex-shrink: 0; }
.marquee-chip span:last-child { font-family: var(--font-body); font-weight: 500; font-size: 0.86rem; color: var(--ink-primary); }
