/* Restored brand video and technology motion, isolated from the former layout. */
.tool-featured {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: clamp(20px, 4vw, 44px);
  align-items: center;
  border: 1px solid rgba(56, 189, 248, 0.45);
  background: linear-gradient(
    120deg,
    rgba(15, 108, 189, 0.12),
    rgba(56, 189, 248, 0.05) 55%,
    transparent
  );
  box-shadow: 0 0 40px rgba(56, 189, 248, 0.08);
  padding: clamp(24px, 3.5vw, 40px);
  margin-bottom: 16px;
}
.tool-featured {
  position: relative;
  overflow: hidden;
  transition: transform 0.18s ease-out;
}
.tool-featured::after {
  content: "";
  position: absolute;
  top: 0;
  left: -35%;
  width: 30%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: scan-line 4.5s linear infinite;
}
@keyframes scan-line {
  to {
    left: 105%;
  }
}

.tf-icon svg {
  width: clamp(64px, 7vw, 92px);
  height: auto;
  filter: drop-shadow(0 0 18px rgba(56, 189, 248, 0.5));
  overflow: visible;
}
/* chevrones fluyendo: el dato recorre el logo */
.tf-ch {
  transform-box: fill-box;
  animation: chev-flow 2.6s ease-in-out infinite;
}
.tf-ch2 {
  animation-delay: 0.28s;
}
.tf-ch3 {
  animation-delay: 0.56s;
}
@keyframes chev-flow {
  0%,
  100% {
    opacity: 0.55;
    transform: translateX(0);
  }
  18% {
    opacity: 1;
    transform: translateX(2.5px);
  }
  40% {
    opacity: 0.75;
    transform: translateX(0);
  }
}
.tf-tag {
  display: block;
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 10px;
}
.tf-body h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(26px, 3.4vw, 40px);
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-bottom: 10px;
}
.tf-body p {
  font-size: 15px;
  max-width: 52ch;
  min-height: 3.2em;
}
.tf-cert {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--body);
  line-height: 1.7;
}
.tf-cert .cert-code {
  font-size: 15px;
}
@media (max-width: 800px) {
  .tool-featured {
    grid-template-columns: auto 1fr;
  }
  .tf-cert {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line);
    padding-top: 16px;
  }
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 10px;
}
.tool {
  border: 1px solid var(--line);
  background: #122632;
  padding: 18px 14px 15px;
  text-align: center;
  transition:
    border-color 0.2s,
    transform 0.2s,
    background 0.2s,
    box-shadow 0.2s;
}
.tool:hover {
  border-color: rgba(56, 189, 248, 0.55);
  background: #1b3543;
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(56, 189, 248, 0.1);
}
.tool-ic {
  display: grid;
  place-items: center;
  height: 42px;
  margin-bottom: 12px;
}
.tool-ic svg {
  width: 34px;
  height: 34px;
  transition:
    transform 0.25s ease-out,
    filter 0.25s;
}
.tool:hover .tool-ic svg {
  transform: scale(1.18) translateY(-2px);
  filter: drop-shadow(0 4px 10px rgba(56, 189, 248, 0.35));
}
.tool:hover .tool-t {
  color: var(--accent);
}

/* deriva continua de iconos, fases desincronizadas */
@keyframes tool-float {
  0%,
  100% {
    transform: translate(0, 0);
  }
  25% {
    transform: translate(2.5px, -5px);
  }
  50% {
    transform: translate(-1.5px, -8px);
  }
  75% {
    transform: translate(-3px, -3px);
  }
}
.rv.in .tool-ic {
  animation: tool-float 5.2s ease-in-out infinite;
}
.rv.in .tool:nth-child(4n + 1) .tool-ic {
  animation-delay: -0.6s;
  animation-duration: 4.6s;
}
.rv.in .tool:nth-child(4n + 2) .tool-ic {
  animation-delay: -1.9s;
  animation-duration: 5.8s;
}
.rv.in .tool:nth-child(4n + 3) .tool-ic {
  animation-delay: -3.1s;
  animation-duration: 5s;
}
.rv.in .tool:nth-child(4n) .tool-ic {
  animation-delay: -2.4s;
  animation-duration: 6.4s;
}
.rv.in .tool:nth-child(3n + 1) .tool-ic {
  animation-direction: alternate;
}

/* la deriva alcanza a todos los iconos del expediente
   (en el svg interno: el wrapper .tf-icon debe poder deslizarse en el swap) */
.rv.in .tf-icon svg {
  animation: tool-float 6.2s ease-in-out infinite;
}
.rv.in .pnode-box svg {
  animation: tool-float 6.8s ease-in-out infinite;
}
.rv.in .pnode:nth-child(2n) .pnode-box svg {
  animation-delay: -2.2s;
  animation-duration: 5.6s;
}
.rv.in .pnode:nth-child(3n) .pnode-box svg {
  animation-delay: -3.8s;
  animation-duration: 7.4s;
}

/* con la sección fuera de viewport, las animaciones infinitas se pausan (cv.js: animGate) */
html.js #trayectoria:not(.anim-live) .pnode-box,
html.js #trayectoria:not(.anim-live) .pnode-box svg,
html.js #trayectoria:not(.anim-live) .pnode::after,
html.js #arsenal:not(.anim-live) .tool-ic,
html.js #arsenal:not(.anim-live) .tf-icon svg,
html.js #arsenal:not(.anim-live) .tf-ch,
html.js #arsenal:not(.anim-live) .tool-featured::after {
  animation-play-state: paused;
}

/* ---- showcase rotatorio del destacado ---- */
.tf-icon,
.tf-body,
.tf-cert {
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}
.tool-featured.tf-swapping .tf-icon,
.tool-featured.tf-swapping .tf-body,
.tool-featured.tf-swapping .tf-cert {
  opacity: 0;
  transform: translateY(8px);
}
.tool-featured.is-pa {
  border-color: rgba(56, 189, 248, 0.65);
  box-shadow: 0 0 56px rgba(56, 189, 248, 0.14);
}
.tool-grid .tool.is-featured {
  border-color: rgba(56, 189, 248, 0.6);
  background: #1b3543;
  box-shadow: 0 0 22px rgba(56, 189, 248, 0.12);
}
.tool-grid .tool.is-featured:hover {
  border-color: rgba(56, 189, 248, 0.85);
  box-shadow: 0 8px 28px rgba(56, 189, 248, 0.18);
}
.tool-n {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 4px;
}
.tool-t {
  display: block;
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--body);
}

.founder-section {
  position: relative;
  padding: 20px 0 64px;
  scroll-margin-top: 96px;
}
.founder-card {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  align-items: center;
  gap: clamp(28px, 4vw, 60px);
  padding: clamp(24px, 4vw, 52px);
  border: 1px solid #31536b;
  border-radius: 16px;
  background: linear-gradient(
    125deg,
    rgba(11, 31, 45, 0.98),
    rgba(8, 20, 37, 0.97) 70%
  );
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.22),
    0 0 70px rgba(79, 206, 210, 0.045);
}
.founder-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.72rem;
  color: #a3d9d6;
  letter-spacing: 0.1em;
  margin: 0 0 18px;
}
.founder-kicker > span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #a7eee1;
}
.founder-brand {
  display: inline-flex;
  align-items: baseline;
  font: 700 clamp(28px, 3vw, 38px) / 1 var(--display);
  color: #f0f7ff;
  letter-spacing: -0.04em;
  margin-bottom: 25px;
}
.founder-brand > span:first-child {
  color: #a8ecdd;
}
.founder-brand .founder-brand-arrow {
  margin-left: 15px;
  color: #8cbbce;
  font-size: 20px;
}
.founder-copy h2 {
  font: 700 clamp(27px, 3vw, 36px) / 1.18 var(--display);
  letter-spacing: -0.035em;
  color: #f0f7ff;
  margin: 0 0 18px;
}
.founder-copy > p:not(.founder-kicker) {
  color: #becfe0;
  font-size: 1rem;
  line-height: 1.8;
  margin: 0;
}
.founder-specialties {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 22px 0 26px;
  list-style: none;
}
.founder-specialties li {
  font-size: 0.78rem;
  color: #c8e8e5;
  background: #142e3e;
  border: 1px solid #345465;
  border-radius: 5px;
  padding: 6px 9px;
}
.founder-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
}
.founder-actions .btn {
  font-size: 0.72rem;
  padding-inline: 16px;
}
.founder-demo {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: 10px;
  color: #b0e9df;
  font-size: 0.87rem;
  text-decoration: underline;
  text-underline-offset: 5px;
}
.founder-film {
  margin: 0;
  overflow: hidden;
  border: 1px solid #3a5b6d;
  border-radius: 13px;
  background: #0a1b2b;
  box-shadow: 0 18px 50px #0003;
}
.founder-film video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  object-fit: contain;
  background: #0a1b2b;
}
.founder-film figcaption {
  color: #c1d5e3;
  font-size: 0.72rem;
  padding: 10px 13px;
  background: #112c3b;
  line-height: 1.5;
}
.founder-film-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}
.founder-film-footer p {
  color: #b7cddb;
  font-size: 0.83rem;
  line-height: 1.8;
  margin: 0;
}
.founder-film-footer strong {
  color: #e4f1f8;
  font-weight: 600;
}
.founder-video-toggle {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid #537081;
  border-radius: 6px;
  background: #0c2131;
  color: #d5e7f2;
  font-size: 0.75rem;
  cursor: pointer;
}
.founder-video-toggle[hidden] {
  display: none;
}
.founder-video-toggle:hover {
  background: #173a49;
  border-color: #8fe5d8;
}
.founder-card :is(a, button):focus-visible {
  outline: 2px solid #a7eee1;
  outline-offset: 5px;
}
.pnode-t[href] {
  text-decoration: underline;
  text-underline-offset: 4px;
}
@media (max-width: 900px) {
  .founder-card {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .founder-copy h2 br {
    display: none;
  }
  .founder-visual {
    max-width: 680px;
    width: 100%;
    margin-inline: auto;
  }
}
@media (max-width: 420px) {
  .founder-card {
    padding: 22px 18px;
    border-radius: 12px;
  }
  .founder-film-footer {
    align-items: flex-start;
    flex-direction: column;
  }
  .founder-kicker {
    font-size: 0.65rem;
  }
}
@media print {
  .founder-section {
    padding: 12px 0;
  }
  .founder-card {
    display: block;
    background: white;
    box-shadow: none;
    border-color: #777;
  }
  .founder-visual {
    display: none;
  }
  .founder-copy :is(h2, p, a, span, li) {
    color: #111 !important;
  }
}

.technology-heading {
  align-items: center;
}
.motion-toggle {
  border: 1px solid var(--line);
  color: var(--accent);
  background: transparent;
  border-radius: 4px;
  padding: 12px 16px;
  font: inherit;
  font-size: 12px;
  min-height: 44px;
  cursor: pointer;
}
.motion-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
.technology-section .tool-featured {
  min-height: 280px;
  border-radius: 6px;
}
.technology-section .tool {
  border-radius: 4px;
}
.technology-section .tf-body {
  min-width: 0;
}
.technology-section .tf-body p {
  line-height: 1.65;
}
.technology-section .tf-cert {
  min-width: 130px;
}
.founder-section {
  padding-top: 48px;
}
.founder-card {
  border-radius: 6px;
  background: #122632;
  box-shadow: none;
}
.founder-actions .button {
  font-size: 12px;
  padding-inline: 18px;
}
.nova {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 76px;
  height: 76px;
  z-index: 100;
}
.nova-launch {
  display: block;
  width: 76px;
  height: 76px;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.nova-launch-core {
  display: block;
  width: 100%;
  height: 100%;
}
.nova-launch-core img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 6px 12px #0007);
}
.nova.is-open .nova-launch {
  visibility: hidden;
}
.nova.is-open {
  width: 0;
  height: 0;
}
@media (max-width: 600px) {
  .technology-heading {
    align-items: flex-start;
  }
  .technology-section .tool-featured {
    grid-template-columns: 1fr;
    min-height: 400px;
    gap: 20px;
  }
  .technology-section .tf-cert {
    grid-column: auto;
  }
  .technology-section .tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .nova {
    right: 16px;
    bottom: 16px;
    width: 64px;
    height: 64px;
  }
  .nova-launch {
    width: 64px;
    height: 64px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .technology-section *,
  .technology-section *::after {
    animation: none !important;
    transition: none !important;
  }
  .technology-section .tool:hover,
  .technology-section .tool:hover svg {
    transform: none;
  }
}
.motion-paused .technology-section *,
.motion-paused .technology-section *::after {
  animation-play-state: paused !important;
}
@media print {
  .motion-dock,
  .nova {
    display: none !important;
  }
}

.founder-brand {
  text-decoration: none;
}
.technology-section .tf-cert {
  max-width: 240px;
}

/* Keep chat controls visible when a phone is held horizontally. */
.nova-head,
.nova-form,
.nova-foot {
  flex-shrink: 0;
}
@media (max-height: 600px) {
  .nova-head {
    padding: 8px 12px;
  }
  .nova-feed {
    min-height: 0;
    padding: 10px 12px;
  }
  .nova-chips {
    flex-shrink: 0;
    max-height: 84px;
    overflow-y: auto;
    padding: 0 12px 8px;
  }
  .nova-form {
    padding: 8px 12px;
  }
  .nova-foot {
    padding: 0 12px 8px;
    line-height: 1.4;
  }
}
@media (max-height: 400px) {
  .nova-chips {
    max-height: 64px;
  }
}
