/* =========================================================================
   home.css — Home cinematográfica + componentes (header, hero, stats,
   showroom, voz, copiloto). Depende de design-system.css.
   ========================================================================= */

/* --------------------------------------------------------------- header */
#site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--header-h);
  display: flex; align-items: center;
  transition: background var(--speed), border-color var(--speed), backdrop-filter var(--speed);
  border-bottom: 1px solid transparent;
}
#site-header.is-scrolled {
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--stroke);
  box-shadow: 0 2px 18px rgba(16,42,67,.08);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.brand { display: flex; align-items: center; gap: .6em; font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; color: var(--text); }
.brand__logo { width: 42px; height: 42px; object-fit: contain; display: block; flex-shrink: 0; }
.brand__mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--grad-neural);
  display: grid; place-items: center; color: #fff; font-size: 1rem;
  box-shadow: var(--glow-plan);
}
.brand small { display: block; font-size: .62rem; letter-spacing: .22em; color: var(--text-dim); font-weight: 600; }
.nav-links { display: flex; align-items: center; gap: 1.6rem; }
.nav-links a { font-size: .92rem; color: var(--text-soft); transition: color .3s; }
.nav-links a:hover { color: var(--brand); }
#nav-toggle { display: none; background: none; border: 0; color: var(--text); font-size: 1.5rem; cursor: pointer; }

@media (max-width: 900px){
  #nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; gap: 0; padding: 1rem 6vw;
    background: rgba(255,255,255,.98); border-bottom: 1px solid var(--stroke);
    max-height: 0; overflow: hidden; transition: max-height .4s var(--ease);
  }
  .nav-links.is-open { max-height: 420px; padding-block: 1rem; }
  .nav-links a { padding: .7rem 0; width: 100%; }
}

/* ----------------------------------------------------------------- hero */
.hero { position: relative; min-height: 100vh; display: grid; place-items: center; overflow: hidden; }
.hero__bg, #neural-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .28; filter: saturate(1.1) contrast(1.05); }
.hero__overlay {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(0,112,184,.12), transparent 55%),
    radial-gradient(80% 70% at 80% 90%, rgba(0,168,120,.10), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,.25), var(--bg-900) 92%);
}
.hero__content { position: relative; z-index: 3; text-align: center; width: min(960px, 92vw); }
.hero__kicker {
  display: inline-flex; align-items: center; gap: .6em;
  font-family: var(--font-mono); font-size: .78rem; letter-spacing: .26em;
  text-transform: uppercase; color: var(--text-soft);
  padding: .5em 1.1em; border: 1px solid var(--stroke-strong); border-radius: var(--radius-pill);
  background: var(--surface); margin-bottom: 1.6rem;
}
.hero h1 {
  font-size: clamp(2.8rem, 8vw, 6.5rem); line-height: .96;
  background: linear-gradient(180deg, #0F2A44 25%, #0070B8 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: .25em;
}
.hero__sub { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.1rem, 2.6vw, 1.8rem); color: var(--pdca-plan); margin-bottom: .8rem; }
.hero__lead { color: var(--text-soft); font-size: clamp(1rem, 1.6vw, 1.18rem); max-width: 64ch; margin: 0 auto 2.4rem; }
.hero__cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero__pdca { margin: 2.6rem auto 0; width: min(360px, 70vw); }
.scroll-hint { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 3; color: var(--text-dim); font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; }
.scroll-hint::after { content: ""; display: block; width: 1px; height: 34px; margin: .6rem auto 0; background: linear-gradient(var(--pdca-plan), transparent); animation: scrollpulse 2s infinite; }
@keyframes scrollpulse { 0%,100%{opacity:.3} 50%{opacity:1} }

/* ----------------------------------------------------------- stats band */
.stats-band { background: var(--bg-800); border-block: 1px solid var(--stroke); }
.stats-grid { display: grid; grid-template-columns: repeat(5,1fr); gap: 1rem; text-align: center; }
.stat__num { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.8rem,4vw,3rem); background: var(--grad-plan-act); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat__label { color: var(--text-dim); font-size: .82rem; letter-spacing: .04em; }
@media (max-width: 760px){ .stats-grid { grid-template-columns: repeat(2,1fr); gap: 1.6rem; } }

/* ------------------------------------------------------------- showroom */
.module-card { text-align: left; }
.module-card__icon { font-size: 2rem; margin-bottom: .5rem; }
.module-card h4 { font-size: 1.05rem; margin-bottom: .35rem; }
.module-card p { font-size: .9rem; margin-bottom: 1rem; }

/* feature row */
.feature { display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem; align-items: center; }
@media (max-width: 880px){ .feature { grid-template-columns: 1fr; gap: 1.6rem; } }
.feature__panel { position: relative; border-radius: var(--radius-lg); padding: 2rem; min-height: 280px; overflow: hidden; }
.feature__panel.plan { background: var(--plan-soft); border: 1px solid rgba(0,112,184,.3); }
.feature__panel.act  { background: var(--act-soft);  border: 1px solid rgba(0,168,120,.3); }
.feature__glow { position: absolute; width: 220px; height: 220px; border-radius: 50%; filter: blur(60px); opacity: .5; }

/* ------------------------------------------------------------- voice bar */
.voice-bar {
  position: fixed; left: 18px; bottom: 18px; z-index: 60;
  display: flex; align-items: center; gap: .5rem;
  padding: .5rem .7rem; border-radius: var(--radius-pill);
}
.voice-bar button { background: none; border: 1px solid var(--stroke-strong); color: var(--text-soft); width: 38px; height: 38px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; transition: all .3s; }
.voice-bar button.is-active { border-color: var(--pdca-act); color: var(--pdca-act); box-shadow: var(--glow-act); }
.voice-bar input[type=range] { width: 78px; accent-color: var(--pdca-plan); }
.voice-bar select { background: var(--bg-700); color: var(--text); border: 1px solid var(--stroke-strong); border-radius: var(--radius-pill); padding: .35rem .6rem; font-size: .78rem; }
@media (max-width: 620px){ .voice-bar { left: 10px; bottom: 10px; flex-wrap: wrap; max-width: 92vw; } }

/* --------------------------------------------------------------- copilot */
#copilot-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 65;
  width: 62px; height: 62px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--grad-neural); color: #fff; font-size: 1.6rem;
  box-shadow: var(--glow-plan); display: grid; place-items: center;
  transition: transform .3s var(--ease);
}
#copilot-fab:hover { transform: scale(1.08) rotate(6deg); }
#copilot-panel {
  position: fixed; right: 22px; bottom: 96px; z-index: 65;
  width: min(380px, 92vw); height: min(560px, 76vh);
  display: flex; flex-direction: column;
  border-radius: var(--radius-lg); overflow: hidden;
  background: var(--bg-800); border: 1px solid var(--stroke);
  box-shadow: var(--shadow-2);
  opacity: 0; pointer-events: none; transform: translateY(16px) scale(.98);
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}
#copilot-panel.is-open { opacity: 1; pointer-events: auto; transform: none; }
.copilot-head { display: flex; align-items: center; gap: .7rem; padding: 1rem; border-bottom: 1px solid var(--stroke); background: var(--grad-command); }
.copilot-head .avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--grad-neural); display: grid; place-items: center; box-shadow: var(--glow-plan); }
.copilot-head h5 { margin: 0; font-size: .98rem; }
.copilot-head small { color: var(--pdca-act); font-size: .7rem; }
#copilot-close { margin-left: auto; background: none; border: 0; color: var(--text-dim); font-size: 1.3rem; cursor: pointer; }
#copilot-log { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .7rem; }
.copilot-msg { display: flex; }
.copilot-msg--user { justify-content: flex-end; }
.copilot-msg__bubble { max-width: 84%; padding: .65rem .9rem; border-radius: 14px; font-size: .9rem; line-height: 1.45; }
.copilot-msg--ia .copilot-msg__bubble { background: var(--surface-2); border: 1px solid var(--stroke); border-top-left-radius: 4px; }
.copilot-msg--user .copilot-msg__bubble { background: var(--pdca-plan); color: #fff; border-top-right-radius: 4px; }
.copilot-typing { display: inline-flex; gap: 4px; }
.copilot-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--text-dim); animation: blink 1.2s infinite; }
.copilot-typing i:nth-child(2){ animation-delay: .2s; } .copilot-typing i:nth-child(3){ animation-delay: .4s; }
@keyframes blink { 0%,80%,100%{opacity:.25} 40%{opacity:1} }
.copilot-suggest { display: flex; flex-wrap: wrap; gap: .4rem; padding: 0 1rem .6rem; }
.copilot-chip { cursor: pointer; font-size: .72rem; background: var(--surface); transition: all .25s; }
.copilot-chip:hover { border-color: var(--pdca-plan); color: var(--brand); }
.copilot-input { display: flex; gap: .5rem; padding: .8rem; border-top: 1px solid var(--stroke); }
.copilot-input input { flex: 1; background: var(--bg-700); border: 1px solid var(--stroke-strong); border-radius: var(--radius-pill); padding: .6rem 1rem; color: var(--text); font-size: .9rem; }
.copilot-input input:focus { outline: none; border-color: var(--pdca-plan); }
.copilot-input button { background: var(--pdca-plan); border: 0; color: #fff; width: 42px; border-radius: 50%; cursor: pointer; font-size: 1.1rem; }

/* ----------------------------------------------- cérebro: contador + feed */
.brain-home { margin-top: 1rem; padding: 1rem 1.2rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--stroke); }
.brain-home__num { display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.brain-home__ic { font-size: 1.3rem; }
.brain-home__num b { font-family: var(--font-display); font-weight: 800; font-size: 1.8rem; color: var(--brand);
  background: var(--grad-plan-act); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.brain-home__num small { color: var(--text-dim); font-size: .82rem; }
.brain-home__feed { list-style: none; padding: 0; margin: .7rem 0 0; display: grid; gap: .35rem; }
.brain-home__feed li { font-size: .82rem; color: var(--text-soft); display: flex; align-items: center; gap: .5rem; }
.brain-home__feed em { color: var(--text-dim); font-style: normal; }
.bh-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--pdca-act); box-shadow: 0 0 8px var(--pdca-act); flex-shrink: 0; }

/* --------------------------------------------------------------- footer */
.site-footer { background: var(--bg-800); border-top: 1px solid var(--stroke); padding: 3rem 0 2rem; color: var(--text-dim); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
@media (max-width: 760px){ .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h6 { color: var(--text); font-family: var(--font-display); letter-spacing: .04em; margin-bottom: .8rem; }
.footer-grid a { display: block; padding: .25rem 0; color: var(--text-soft); font-size: .9rem; }
.footer-grid a:hover { color: var(--brand); }
