/* ==========================================================================
   INREDESOFT · HOJA DE ESTILOS
   Orden: variables y base → componentes comunes → home → páginas internas
   (Servicios, Cómo trabajamos, Empresa, Contacto).
   ========================================================================== */

/* ==========================================================================
   VARIABLES Y BASE
   ========================================================================== */

:root {
  --bg: #050509; /* fondo de la página */
  --ink: #f2efe9; /* texto principal */
  --mute: #9a9aa8; /* texto secundario */
  --cy: #1cb5f2; /* cian de marca */
  --bl: #78c4ff; /* azul de acento (cursivas) */
  --amb: #ffb02e; /* ámbar (sistemas legacy) */
  --ln: rgba(255, 255, 255, 0.1); /* líneas y bordes */
  color-scheme: dark;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

html {
  scroll-padding-top: env(safe-area-inset-top, 0px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    300 1rem/1.65 Inter,
    system-ui,
    sans-serif;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--bl);
  outline-offset: 3px;
}

/* ==========================================================================
   LIENZO 3D Y CAPAS
   ========================================================================== */

#gl {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
}

main,
footer,
nav {
  position: relative;
  z-index: 2;
}

/* ==========================================================================
   TIPOGRAFÍA
   ========================================================================== */

.mono {
  font:
    400 0.68rem/1.4 "JetBrains Mono",
    monospace;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--mute);
}

.serif,
h1,
h2,
h3 {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  letter-spacing: -0.03em;
}

em {
  font-style: italic;
  color: var(--bl);
}

/* ==========================================================================
   NAVEGACIÓN
   ========================================================================== */

nav {
  position: fixed;
  z-index: 10;
  background: linear-gradient(rgba(5, 5, 9, 0.8), transparent);
  top: env(safe-area-inset-top, 0px);
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px clamp(20px, 5vw, 64px);
}

.logo {
  font:
    italic 1.7rem "Instrument Serif",
    serif;
  letter-spacing: -0.02em;
}

.logo b {
  font:
    400 0.55rem "JetBrains Mono",
    monospace;
  font-style: normal;
  letter-spacing: 0.2em;
  color: var(--mute);
  display: block;
  margin-top: -4px;
}

nav ul {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.85rem;
}

nav ul a {
  color: var(--mute);
  transition: color 0.2s;
}

nav ul a:hover {
  color: var(--ink);
}

/* ==========================================================================
   BOTONES
   ========================================================================== */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: 999px;
  background: var(--ink);
  color: #0a0a0f;
  font-weight: 500;
  font-size: 0.9rem;
  transition:
    transform 0.25s,
    box-shadow 0.25s;
}

.pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 40px rgba(120, 196, 255, 0.35);
}

.pill.ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  border: 1px solid var(--ln);
}

/* ==========================================================================
   BARRA DE PROGRESO DE SCROLL
   ========================================================================== */

.bar {
  position: fixed;
  right: 0;
  top: 0;
  width: 2px;
  height: 100%;
  z-index: 5;
  background: linear-gradient(
    var(--cy) calc(var(--p, 0) * 100%),
    transparent 0
  );
  opacity: 0.7;
}

/* ==========================================================================
   SECCIONES
   ========================================================================== */

section {
  min-height: 100svh;
  padding: clamp(100px, 16vh, 180px) clamp(20px, 5vw, 64px);
  max-width: 1360px;
  margin: 0 auto;
  position: relative;
}

/* ==========================================================================
   ANIMACIÓN DE LETRAS Y REVELADO
   ========================================================================== */
.w {
  display: inline-block;
  white-space: nowrap;
}

.c {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.8em) rotate(5deg);
  filter: blur(8px);
  transition:
    transform 1s cubic-bezier(0.2, 0.8, 0.2, 1) calc(var(--i) * 24ms),
    opacity 0.9s ease calc(var(--i) * 24ms),
    filter 0.9s ease calc(var(--i) * 24ms);
}

.in .c {
  opacity: 1;
  transform: none;
  filter: none;
}

.rv {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.9s 0.25s,
    transform 0.9s 0.25s;
}

.in.rv,
.in .rv {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   HOME · HERO
   ========================================================================== */
.hero {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-top: clamp(90px, 14vh, 130px);
}

.top {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.top i {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cy);
  margin-right: 10px;
  box-shadow: 0 0 12px var(--cy);
}

h1 {
  font-size: clamp(2.8rem, 8.4vw, 8rem);
  line-height: 0.92;
  margin: 6vh 0 18px;
  max-width: 14ch;
}

.sub {
  font:
    italic clamp(1.4rem, 3vw, 2.4rem) "Instrument Serif",
    serif;
  color: var(--mute);
  margin: 0;
}

.bot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  flex-wrap: wrap;
  margin-top: 7vh;
}

.bot p {
  max-width: 46ch;
  color: var(--mute);
  margin: 0 0 26px;
}

.bot p b {
  color: var(--ink);
  font-weight: 400;
}

.btns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.stats {
  display: flex;
  gap: clamp(24px, 4vw, 56px);
  border-top: 1px solid var(--ln);
  padding-top: 18px;
}

.stats strong {
  display: block;
  font:
    400 clamp(1.8rem, 3.4vw, 2.8rem)/1 "Instrument Serif",
    serif;
}

/* ==========================================================================
   HOME · SERVICIOS (TÍTULOS Y TARJETAS)
   ========================================================================== */
h2 {
  font-size: clamp(2.4rem, 6vw, 5.4rem);
  line-height: 0.98;
  margin: 18px 0 18px;
  max-width: 16ch;
}

.lead {
  color: var(--mute);
  max-width: 48ch;
  margin: 0 0 56px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}

.card {
  position: relative;
  min-height: 380px;
  padding: 22px;
  border-radius: 20px;
  border: 1px solid var(--ln);
  background: rgba(10, 10, 18, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  transform: perspective(1100px) rotateY(calc((var(--k) - 2) * -3.5deg));
  transition:
    transform 0.6s,
    border-color 0.4s;
}

.card:hover {
  transform: perspective(1100px) translateY(-8px);
  border-color: rgba(120, 196, 255, 0.5);
}

.card .n {
  position: absolute;
  top: 10px;
  right: 14px;
  font:
    400 5.6rem/1 "Instrument Serif",
    serif;
  color: rgba(255, 255, 255, 0.05);
}

.card h3 {
  font-size: clamp(1.6rem, 2.4vw, 2.1rem);
  line-height: 1;
  margin: 0 0 12px;
}

.card p {
  margin: 0 0 18px;
  color: var(--mute);
  font-size: 0.9rem;
}

.tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tags span {
  font:
    400 0.58rem "JetBrains Mono",
    monospace;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 5px 10px;
  border: 1px solid var(--ln);
  border-radius: 99px;
  color: var(--mute);
}

/* ==========================================================================
   HOME · CÓMO TRABAJAMOS (LISTA)
   ========================================================================== */
.pl {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  max-width: 880px;
}

.pl li {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: 26px 0;
  border-top: 1px solid var(--ln);
  transition: padding 0.4s;
}

.pl li:last-child {
  border-bottom: 1px solid var(--ln);
}

.pl li:hover {
  padding-left: 16px;
}

.pl h3 {
  font-size: clamp(1.5rem, 2.8vw, 2.3rem);
  line-height: 1.05;
  margin: 0;
}

.pl li:hover h3 {
  color: var(--amb);
}

.pl p {
  margin: 0;
  color: var(--mute);
}

/* ==========================================================================
   HOME · EMPRESA
   ========================================================================== */
.dif {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.dif h2 {
  max-width: 20ch;
}

.dif .t {
  max-width: 56ch;
  color: var(--mute);
  margin: 10px 0 28px;
}

.dif .big {
  font:
    italic clamp(1.4rem, 2.6vw, 2.2rem) "Instrument Serif",
    serif;
}

/* ==========================================================================
   LLAMADO A LA ACCIÓN Y FOOTER
   ========================================================================== */
.cta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.cta h2 {
  max-width: 14ch;
  font-size: clamp(3rem, 9vw, 8.4rem);
}

.cta p {
  color: var(--mute);
  max-width: 44ch;
  margin: 0 0 30px;
}

footer {
  background: rgba(5, 5, 9, 0.86);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--ln);
  padding: 56px clamp(20px, 5vw, 64px)
    calc(32px + env(safe-area-inset-bottom, 0px));
}

.fg {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  max-width: 1360px;
  margin: 0 auto;
  font-size: 0.9rem;
  color: var(--mute);
}

.fg h4 {
  margin: 0 0 12px;
}

.fg a {
  display: block;
  padding: 3px 0;
}

.fg a:hover {
  color: var(--ink);
}

.cp {
  max-width: 1360px;
  margin: 36px auto 0;
  border-top: 1px solid var(--ln);
  padding-top: 20px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--mute);
}

/* ==========================================================================
   RESPONSIVE (HOME) Y MOVIMIENTO REDUCIDO
   ========================================================================== */

@media (max-width: 820px) {
  nav ul {
    display: none;
  }
  .top {
    flex-direction: column;
    gap: 6px;
  }
  .pl li {
    grid-template-columns: 1fr;
  }
  .fg {
    grid-template-columns: 1fr;
  }
  .card {
    min-height: 260px;
    transform: none;
  }
  .bar {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .c,
  .rv {
    transition: none;
    opacity: 1;
    transform: none;
    filter: none;
  }
}

/* ==========================================================================
   PÁGINA · SERVICIOS
   ========================================================================== */
nav ul a.on {
  color: var(--ink);
}

body[data-page="servicios"] #gl {
  opacity: 0.8;
}

.sv-hero {
  min-height: 80svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 6vh;
}

.sv-hero h1 {
  font-size: clamp(3.6rem, 12vw, 10.5rem);
  margin: 3vh 0 20px;
  max-width: none;
}

.sv-hero .intro {
  max-width: 62ch;
  font-size: clamp(1.05rem, 1.7vw, 1.35rem);
  color: #cfd6e6;
  margin: 0;
}

.sv-hero .intro b {
  color: var(--ink);
  font:
    italic 400 1.22em "Instrument Serif",
    serif;
}

.stack {
  min-height: 0;
  padding-top: 0;
  padding-bottom: 12vh;
}

.svc {
  position: relative;
  margin: 0 0 6vh;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(
    160deg,
    rgba(14, 20, 38, 0.93),
    rgba(7, 10, 20, 0.95)
  );
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow:
    0 40px 120px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  padding: clamp(24px, 4vw, 56px);
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(24px, 5vw, 72px);
  overflow: hidden;
  transform: translateY(calc((0.5 - var(--t, 0.5)) * 30px))
    scale(calc(1 - var(--d, 0) * 0.06));
  transform-origin: 50% 0;
}

.svc::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: #04060d;
  opacity: calc(var(--d, 0) * 0.6);
  pointer-events: none;
}

@media (min-width: 900px) and (min-height: 720px) {
  .svc {
    position: sticky;
    top: calc(92px + var(--k) * 18px);
  }
}

.svc .gn {
  position: absolute;
  right: 3%;
  top: -3%;
  font:
    400 clamp(8rem, 20vw, 18rem)/1 "Instrument Serif",
    serif;
  color: rgba(255, 255, 255, 0.045);
  transform: translateY(calc((var(--t, 0.5) - 0.5) * -140px));
  pointer-events: none;
}

.svc .col {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
}

.svc h2 {
  font-size: clamp(2.2rem, 4.6vw, 4.2rem);
  margin: 8px 0 28px;
  max-width: none;
  line-height: 1;
}

.svc .lbl {
  font:
    400 0.68rem "JetBrains Mono",
    monospace;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cy);
  margin: 0 0 8px;
}

.svc p {
  margin: 0 0 26px;
  color: var(--mute);
  font-size: 1.02rem;
}

.svc .sol {
  color: var(--ink);
  font-size: clamp(1.05rem, 1.5vw, 1.28rem);
}

.ck {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
}

.ck li {
  display: flex;
  gap: 14px;
  padding: 15px 0;
  border-bottom: 1px solid var(--ln);
  font-size: 1.05rem;
}

.ck li::before {
  content: "✓";
  color: var(--cy);
}

.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chips span {
  padding: 9px 16px;
  border: 1px solid rgba(28, 181, 242, 0.5);
  border-radius: 99px;
  color: var(--bl);
  font-size: 0.85rem;
}

.sp {
  height: 2px;
  background: var(--ln);
  margin-top: 32px;
}

.sp i {
  display: block;
  height: 100%;
  width: calc(var(--t, 0) * 100%);
  background: var(--cy);
}

@media (max-width: 899px) {
  .svc {
    grid-template-columns: 1fr;
  }
  .sv-hero {
    min-height: 70svh;
  }
}

/* ==========================================================================
   PÁGINA · CÓMO TRABAJAMOS
   ========================================================================== */
.steps {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) 1.4fr;
  gap: clamp(24px, 6vw, 96px);
  min-height: 0;
  padding-top: 4vh;
  padding-bottom: 0;
}

.rail {
  position: sticky;
  top: 22vh;
  align-self: start;
  height: max-content;
}

.rail .big {
  display: block;
  font:
    400 clamp(7rem, 17vw, 15rem)/0.85 "Instrument Serif",
    serif;
  letter-spacing: -0.05em;
}

.rail .big small {
  font-size: 0.28em;
  color: var(--mute);
  letter-spacing: 0;
}

.rail .tt {
  font:
    italic clamp(1.4rem, 2.4vw, 2rem) "Instrument Serif",
    serif;
  color: var(--bl);
  margin: 14px 0 22px;
  min-height: 2.4em;
}

.rail .vb {
  width: 2px;
  height: 140px;
  background: var(--ln);
  position: relative;
}

.rail .vb i {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: calc(var(--sp, 0) * 100%);
  background: var(--cy);
  box-shadow: 0 0 14px var(--cy);
}

.list {
  display: flex;
  flex-direction: column;
  gap: 7vh;
  padding: 10vh 0 14vh;
}

.step {
  min-height: 46vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(24px, 3.4vw, 48px);
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(
    160deg,
    rgba(14, 20, 38, 0.92),
    rgba(7, 10, 20, 0.94)
  );
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
  opacity: calc(0.35 + var(--a, 0) * 0.65);
  transform: scale(calc(0.94 + var(--a, 0) * 0.06))
    translateX(calc((1 - var(--a, 0)) * 24px));
  transition: border-color 0.4s;
}

.step.on {
  border-color: rgba(28, 181, 242, 0.55);
}

.step .mono {
  color: var(--cy);
}

.step h3 {
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1;
  margin: 14px 0 16px;
}

.step p {
  margin: 0;
  color: #cfd6e6;
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  max-width: 40ch;
}

.pv {
  height: 260vh;
  min-height: 0;
  padding: 0;
  max-width: none;
}

.pv-in {
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(30px, 6vh, 70px);
  padding: clamp(80px, 12vh, 120px) clamp(20px, 5vw, 64px) 40px;
  max-width: 1360px;
  margin: 0 auto;
}

.pv-in h2 {
  margin: 10px 0 0;
  max-width: 18ch;
}

.flow {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.flow .ln {
  position: absolute;
  left: 6%;
  right: 6%;
  top: 50%;
  height: 2px;
  background: var(--ln);
}

.flow .ln i {
  display: block;
  height: 100%;
  width: min(100%, calc(var(--t, 0) / 0.9 * 100%));
  background: var(--cy);
  box-shadow: 0 0 16px var(--cy);
}

.nd2 {
  position: relative;
  z-index: 1;
  padding: 18px 26px;
  border-radius: 18px;
  background: #070b17;
  border: 1px solid var(--ln);
  opacity: 0.45;
  transition:
    border-color 0.5s,
    box-shadow 0.5s,
    transform 0.5s,
    opacity 0.5s;
}

.nd2 b {
  display: block;
  font:
    400 clamp(1.2rem, 2.2vw, 1.8rem)/1.1 "Instrument Serif",
    serif;
}

.nd2 span {
  font:
    400 0.62rem "JetBrains Mono",
    monospace;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mute);
}

.nd2.io {
  padding: 26px 30px;
}

.nd2.pl2 {
  border-radius: 99px;
  border-color: rgba(28, 181, 242, 0.5);
}

.nd2.pl2 b {
  color: var(--bl);
  font:
    500 1rem Inter,
    sans-serif;
}

.nd2.on {
  opacity: 1;
  border-color: var(--cy);
  box-shadow: 0 0 40px rgba(28, 181, 242, 0.3);
  transform: translateY(-4px);
}

@media (max-width: 899px) {
  .steps {
    grid-template-columns: 1fr;
  }
  .rail {
    top: 64px;
    z-index: 3;
    padding: 8px 0;
    background: linear-gradient(rgba(5, 5, 9, 0.9), transparent);
  }
  .rail .big {
    font-size: 4.2rem;
  }
  .rail .tt,
  .rail .vb {
    display: none;
  }
  .flow {
    flex-direction: column;
    align-items: stretch;
  }
  .flow .ln {
    left: 50%;
    right: auto;
    top: 4%;
    bottom: 4%;
    width: 2px;
    height: auto;
  }
  .flow .ln i {
    width: 100%;
    height: min(100%, calc(var(--t, 0) / 0.9 * 100%));
  }
  .nd2 {
    text-align: center;
  }
}

/* ==========================================================================
   PÁGINA · EMPRESA
   ========================================================================== */
.sv-hero h1.md {
  font-size: clamp(2.8rem, 8.4vw, 7.8rem);
}

.hd {
  min-height: 0;
  padding-bottom: 6vh;
}

.hd.tight {
  padding-top: 4vh;
}

.qs {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(24px, 6vw, 96px);
  align-items: center;
  min-height: 80svh;
}

.qs h2 {
  max-width: 10ch;
}

.qs .nm {
  font:
    italic clamp(1.4rem, 2.4vw, 2rem) "Instrument Serif",
    serif;
  color: var(--bl);
  margin-top: 6px;
}

.qs p {
  font-size: clamp(1.15rem, 2vw, 1.6rem);
  line-height: 1.5;
  color: #dfe5f2;
  margin: 0 0 22px;
}

.qs p:last-child {
  color: var(--mute);
}

.svc.em {
  padding: clamp(22px, 3vw, 40px);
}

.svc.em h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.8rem);
  margin: 8px 0 18px;
}

.svc.em .ck {
  margin-bottom: 22px;
}

.svc.em .ck li {
  padding: 10px 0;
  font-size: 1rem;
}

.svc .tg {
  font:
    400 0.68rem "JetBrains Mono",
    monospace;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cy);
}

.svc .cl {
  grid-column: 1/-1;
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--ln);
  padding-top: 18px;
  font:
    italic clamp(1.2rem, 2vw, 1.7rem) "Instrument Serif",
    serif;
  color: var(--bl);
}

.res {
  margin-top: 4vh;
  padding: clamp(24px, 4vw, 48px);
  border: 1px solid var(--cy);
  border-radius: 24px;
  text-align: center;
  font:
    400 clamp(1.6rem, 3.4vw, 2.8rem)/1.15 "Instrument Serif",
    serif;
  background: rgba(28, 181, 242, 0.07);
  box-shadow: 0 0 60px rgba(28, 181, 242, 0.2);
}

.mv {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(16px, 3vw, 40px);
}

.mvc {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 4vw, 56px);
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(
    160deg,
    rgba(14, 20, 38, 0.93),
    rgba(7, 10, 20, 0.95)
  );
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.5);
}

.mvc .gw {
  position: absolute;
  right: -2%;
  top: -6%;
  font:
    400 clamp(5rem, 12vw, 10rem)/1 "Instrument Serif",
    serif;
  color: rgba(255, 255, 255, 0.045);
  transform: translateY(calc((var(--t, 0.5) - 0.5) * -110px));
  pointer-events: none;
  white-space: nowrap;
}

.mvc h2 {
  position: relative;
  font-size: clamp(2rem, 4vw, 3.6rem);
  margin: 8px 0 20px;
  max-width: none;
}

.mvc p {
  position: relative;
  font-size: clamp(1.02rem, 1.5vw, 1.2rem);
  color: #cfd6e6;
  margin: 0 0 16px;
}

.mvc .mono {
  position: relative;
  color: var(--cy);
}

.mvc .hi {
  font:
    italic 400 1.35em "Instrument Serif",
    serif;
  color: var(--bl);
}

.df {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 6vw, 96px);
  min-height: 0;
}

.df .l {
  position: sticky;
  top: 18vh;
  align-self: start;
}

.df .l p {
  color: var(--mute);
  margin: 0 0 18px;
  max-width: 46ch;
}

.hl {
  list-style: none;
  margin: 0 0 6vh;
  padding: 0;
}

.hl li {
  display: flex;
  gap: 18px;
  align-items: baseline;
  padding: 5vh 0;
  border-bottom: 1px solid var(--ln);
  font:
    400 clamp(2rem, 4vw, 3.4rem)/1.05 "Instrument Serif",
    serif;
  letter-spacing: -0.03em;
  opacity: 0.25;
  transition:
    opacity 0.5s,
    color 0.5s,
    padding 0.5s;
}

.hl li::before {
  content: "→";
  color: var(--cy);
  font:
    400 0.6em Inter,
    sans-serif;
}

.hl li.on {
  opacity: 1;
  color: var(--bl);
  padding-left: 12px;
}

.df .end {
  color: #cfd6e6;
  font-size: 1.1rem;
  max-width: 40ch;
}

.vals {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.val {
  padding: clamp(24px, 3vw, 40px);
  border-radius: 22px;
  border: 1px solid var(--ln);
  background: rgba(8, 12, 24, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.val:hover {
  border-color: rgba(120, 196, 255, 0.5);
}

.val .n {
  font:
    400 4.2rem/1 "Instrument Serif",
    serif;
  color: var(--cy);
}

.val h3 {
  font-size: clamp(1.5rem, 2.6vw, 2.2rem);
  margin: 8px 0 10px;
  line-height: 1.05;
}

.val p {
  margin: 0;
  color: var(--mute);
}

@media (max-width: 899px) {
  .qs,
  .mv,
  .df,
  .vals {
    grid-template-columns: 1fr;
  }
  .df .l {
    position: static;
  }
}

/* ==========================================================================
   PÁGINA · CONTACTO
   ========================================================================== */
.ct-card {
  display: flex;
  flex-direction: column;
  min-height: 380px;
}

.ct-card h2 {
  margin: 0 0 14px;
}

.ct-card .addr {
  font:
    italic clamp(1.3rem, 2.2vw, 1.8rem) "Instrument Serif",
    serif;
  color: var(--bl);
  margin: 6px 0 28px;
  position: relative;
}

.ct-card .pill {
  align-self: flex-start;
  margin-top: auto;
  position: relative;
}

.ct-card.live {
  transition:
    border-color 0.4s,
    box-shadow 0.4s;
}

.ct-card.live:hover {
  border-color: rgba(28, 181, 242, 0.55);
  box-shadow:
    0 40px 120px rgba(0, 0, 0, 0.5),
    0 0 60px rgba(28, 181, 242, 0.18);
}

.ct-ico {
  position: relative;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 22px;
  border-radius: 16px;
  border: 1px solid rgba(28, 181, 242, 0.5);
  background: rgba(28, 181, 242, 0.08);
  color: var(--cy);
}

.ct-badge {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 2;
  padding: 6px 12px;
  border: 1px dashed var(--amb);
  border-radius: 99px;
  font:
    400 0.62rem "JetBrains Mono",
    monospace;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--amb);
}

.pill.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.info {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.info > div {
  padding: 24px 0;
  border-top: 1px solid var(--ln);
}

.info .v {
  display: block;
  margin-top: 8px;
  font:
    400 clamp(1.4rem, 2.4vw, 2rem)/1.2 "Instrument Serif",
    serif;
  letter-spacing: -0.02em;
  transition: color 0.3s;
}

.info a.v:hover {
  color: var(--bl);
}

.ct-end {
  padding-bottom: 16vh;
}

@media (max-width: 899px) {
  .info {
    grid-template-columns: 1fr;
  }
  .ct-card {
    min-height: 300px;
  }
}

/* ==========================================================================
   HOME · VARIANTE "TECH CLARO"
   Se carga después de style.css y solo afecta a index-tech.html.
   Fondo azul medio (menos oscuro) con circuitos dibujados en canvas.
   ========================================================================== */

body[data-page="home-tech"] {
  --bg: #0e2f63;
  --ink: #f4f8ff;
  --mute: #b4c6e2;
  --ln: rgba(160, 205, 255, 0.22);
  --cy: #3ccbff;
  --bl: #9fd6ff;
}

/* Capas de fondo (de atrás hacia adelante) */
.tbg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(70% 60% at 78% 12%, var(--gl1, rgba(70, 150, 255, 0.45)), transparent 60%),
    radial-gradient(60% 50% at 8% 90%, var(--gl2, rgba(40, 120, 220, 0.35)), transparent 60%),
    linear-gradient(165deg, var(--g1, #14407f), var(--g2, #0e2f63) 55%, var(--g3, #0b2650));
}

/* Cuadrícula tipo plano técnico; se desplaza con el scroll (--gy) */
.tbg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(150, 200, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(150, 200, 255, 0.07) 1px, transparent 1px);
  background-size: 56px 56px;
  background-position: 0 var(--gy, 0px);
  mask-image: radial-gradient(90% 80% at 50% 40%, #000, transparent);
  -webkit-mask-image: radial-gradient(90% 80% at 50% 40%, #000, transparent);
}

/* Resplandor ámbar que aparece en "Cómo trabajamos" (lo legacy) */
.warm {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(60% 50% at 20% 50%, rgba(255, 176, 46, 0.28), transparent 65%);
  opacity: var(--w, 0);
}

#tech {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* Ajustes de componentes al fondo más claro */
body[data-page="home-tech"] nav {
  background: linear-gradient(rgba(var(--nav, 14, 47, 99), 0.85), transparent);
}

body[data-page="home-tech"] .card {
  background: rgba(var(--nav, 14, 47, 99), 0.5);
}

body[data-page="home-tech"] footer {
  background: rgba(var(--nav, 14, 47, 99), 0.92);
}

/* Etiqueta que indica la escena activa (esquina inferior izquierda) */
.hud {
  position: fixed;
  left: clamp(20px, 5vw, 64px);
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  z-index: 3;
  color: var(--cy);
  pointer-events: none;
}

.hud::before {
  content: "● ";
}

.hud.blink {
  animation: hud-blink 0.5s steps(2, end);
}

@keyframes hud-blink {
  0% { opacity: 0; }
  50% { opacity: 1; }
  100% { opacity: 0.4; }
}

@media (prefers-reduced-motion: reduce) {
  .hud.blink { animation: none; }
}

/* ==========================================================================
   LANDING · COMPONENTES NUEVOS
   ========================================================================== */

/* Soluciones: títulos largos, chips y frase de cierre */
.step h3 {
  font-size: clamp(1.8rem, 3.2vw, 2.9rem);
}

.step p {
  max-width: 52ch;
}

.step .chips {
  margin: 20px 0 4px;
}

.step .cl {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--ln);
  font: italic clamp(1.15rem, 1.8vw, 1.5rem) "Instrument Serif", serif;
  color: var(--bl);
}

/* Identidad corporativa: tres tarjetas y lista de valores */
.mv.three {
  grid-template-columns: repeat(3, 1fr);
}

.vl {
  position: relative;
  list-style: none;
  counter-reset: v;
  margin: 0;
  padding: 0;
}

.vl li {
  counter-increment: v;
  display: flex;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--ln);
  color: #cfd6e6;
}

.vl li::before {
  content: "0" counter(v);
  padding-top: 0.3em;
  font: 400 0.7rem "JetBrains Mono", monospace;
  letter-spacing: 0.2em;
  color: var(--cy);
}

/* ¿Por qué elegirnos?: lista que se enciende al pasar por el centro */
.why {
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.why li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 20px 40px;
  align-items: baseline;
  padding: 4.5vh 0;
  border-top: 1px solid var(--ln);
  opacity: 0.3;
  transition: opacity 0.5s, padding 0.5s;
}

.why li:last-child {
  border-bottom: 1px solid var(--ln);
}

.why li.on {
  opacity: 1;
  padding-left: 12px;
}

.why b {
  font: 400 clamp(1.8rem, 3.4vw, 3rem) / 1.05 "Instrument Serif", serif;
  letter-spacing: -0.03em;
  transition: color 0.5s;
}

.why li.on b {
  color: var(--bl);
}

.why span {
  color: var(--mute);
  font-size: 1.05rem;
}

/* Contacto: cuatro datos */
.info.four {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 899px) {
  .mv.three { grid-template-columns: 1fr; }
  .why li { grid-template-columns: 1fr; }
  .info.four { grid-template-columns: 1fr 1fr; }
}


/* ==========================================================================
   LEGIBILIDAD DEL TEXTO DE LA PÁGINA
   Más grosor, más contraste y una sombra suave para separar el texto de las
   líneas del fondo. No afecta a los títulos (serif) ni a las tarjetas.
   ========================================================================== */

body[data-page="home-tech"] {
  --mute: #d6e3f7;
  font-weight: 400;
}

.lead,
.bot p,
.qs p,
.hd > p,
.why span,
.sub,
.mono {
  font-weight: 400;
  text-shadow: 0 1px 14px rgba(6, 22, 52, 0.75);
}

.lead,
.bot p {
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  line-height: 1.7;
}

.qs p {
  color: #eef4ff;
}

.bot p b {
  color: #fff;
}

.why span {
  font-size: 1.1rem;
  color: #d6e3f7;
}

.step p,
.mvc p {
  color: #e3ecfa;
}

.mono {
  letter-spacing: 0.18em;
}

/* ==========================================================================
   REDES SOCIALES
   ========================================================================== */

.social {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.social a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border: 1px solid var(--ln);
  border-radius: 99px;
  background: rgba(var(--nav, 14, 47, 99), 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--ink);
  font-size: 0.95rem;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}

.social a:hover {
  border-color: rgba(120, 196, 255, 0.6);
  box-shadow: 0 0 30px rgba(60, 203, 255, 0.25);
  transform: translateY(-2px);
}

.social svg,
.fsocial svg {
  width: 20px;
  height: 20px;
}

.fsocial {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.fsocial a {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--ln);
  border-radius: 50%;
  color: var(--ink);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.fsocial a:hover {
  border-color: rgba(120, 196, 255, 0.6);
  box-shadow: 0 0 20px rgba(60, 203, 255, 0.25);
}

/* ==========================================================================
   BOTÓN FLOTANTE DE WHATSAPP
   ========================================================================== */

.wa-fab {
  position: fixed;
  right: clamp(14px, 3vw, 36px);
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 20;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  transition: transform 0.3s, box-shadow 0.3s;
}

.wa-fab::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid #25d366;
  animation: wa-pulse 2.4s ease-out infinite;
}

.wa-fab svg {
  width: 28px;
  height: 28px;
}

.wa-fab:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 14px 36px rgba(37, 211, 102, 0.45);
}

@keyframes wa-pulse {
  0% { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(1.6); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .wa-fab::after { animation: none; }
}

/* ==========================================================================
   VISTAS Y LEGIBILIDAD EN LAS PÁGINAS INTERNAS
   ========================================================================== */

.view[hidden] {
  display: none;
}

.sv-hero .intro,
.svc p,
.df .l p,
.df .end,
.cta p,
.val p,
.step p {
  font-weight: 400;
  color: #e3ecfa;
}

.sv-hero .intro,
.df .l p,
.cta p {
  text-shadow: 0 1px 14px rgba(6, 22, 52, 0.75);
}

/* Los enlaces internos (#soluciones, #quienes...) quedan debajo del menú fijo */
html {
  scroll-padding-top: calc(90px + env(safe-area-inset-top, 0px));
}

/* ==========================================================================
   LOGO (menú y footer)
   El brillo y el halo ayudan a que el logo metálico se lea sobre el azul.
   ========================================================================== */

.logo img {
  display: block;
  width: auto;
  height: 52px;
  filter: brightness(1.25) drop-shadow(0 0 10px rgba(160, 215, 255, 0.35));
}

footer .logo img {
  height: 72px;
}

@media (max-width: 899px) {
  .logo img { height: 42px; }
  footer .logo img { height: 60px; }
}

/* ==========================================================================
   SERVICIOS · DIAGNÓSTICO, DEMOS Y ATENCIÓN RÁPIDA
   Solo se usa en servicios.html. Reutiliza los tokens de la hoja.
   ========================================================================== */

button.pill {
  border: 0;
  cursor: pointer;
  font-family: inherit;
  line-height: inherit;
}

.svc-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
  padding-top: 8px;
}

.svc-cta .pill {
  padding: 11px 18px;
  font-size: 0.84rem;
}

.pill.wa {
  border-color: rgba(37, 211, 102, 0.5);
  background: rgba(37, 211, 102, 0.14);
}

.pill.wa:hover {
  border-color: #25d366;
  box-shadow: 0 10px 30px rgba(37, 211, 102, 0.25);
}

.dx[hidden],
.dx [hidden],
.demo [hidden],
.wa-panel [hidden] {
  display: none !important;
}

.demo {
  position: relative;
  margin-top: 28px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(159, 214, 255, 0.22);
  background: rgba(6, 18, 41, 0.9);
  overflow: hidden;
}

.demo-hd,
.demo-ft,
.dx-row,
.dx-sumline,
.dx-actions,
.dx-pair,
.wa-card-hd,
.wa-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.demo-hd {
  flex-wrap: wrap;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--ln);
}

.demo-hd .mono,
.demo-note {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bl);
}

.demo-note { letter-spacing: 0.08em; color: #d6e3f7; }

.demo-tog,
.demo-tabs button,
.demo-switch button,
.dx-next,
.dx-x,
.wa-opt,
.dx-choice,
.dx-bn,
.dx-link {
  font-family: inherit;
  cursor: pointer;
}

.demo-tog,
.demo-tabs button,
.demo-switch button {
  border-radius: 8px;
  border: 1px solid rgba(28, 181, 242, 0.4);
  background: rgba(28, 181, 242, 0.1);
  color: var(--bl);
  font-size: 0.75rem;
  padding: 6px 10px;
}

.demo.is-threat .demo-tog {
  border-color: rgba(255, 176, 46, 0.6);
  background: rgba(255, 176, 46, 0.15);
  color: var(--amb);
}

.demo-tabs,
.demo-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.demo-tabs button,
.demo-switch button {
  border-color: var(--ln);
  background: rgba(255, 255, 255, 0.04);
  color: #b4c6e2;
}

.demo-tabs button.is-on,
.demo-switch button.is-on {
  border-color: var(--cy);
  background: rgba(28, 181, 242, 0.18);
  color: var(--ink);
}

.demo-switch button.is-legacy {
  border-color: rgba(255, 176, 46, 0.55);
  background: rgba(255, 176, 46, 0.18);
  color: var(--amb);
}

.demo-grid,
.lens,
.ai-row {
  display: grid;
  gap: 10px;
}

.demo-grid { grid-template-columns: 1fr 1fr; }

.demo-grid article,
.demo-card,
.kpi,
.dx-ready,
.dx-choice,
.dx-bn {
  border: 1px solid var(--ln);
  border-radius: 14px;
  background: rgba(11, 31, 68, 0.65);
}

.demo-grid article,
.demo-card,
.kpi { padding: 12px 14px; }

.demo-grid b,
.demo-card p,
.kpi strong,
.dx-choice b {
  display: block;
}

.demo-grid b { font-size: 0.78rem; font-weight: 500; }

.svc .demo p,
.svc .demo-ft span,
.dx-choice small,
.dx-foot,
.wa-card p {
  margin: 4px 0 0;
  font-size: 0.78rem;
  color: #b4c6e2;
  font-weight: 400;
}

.demo.is-threat [data-node="firewall"] {
  border-color: rgba(255, 176, 46, 0.45);
}

.demo-ft {
  margin-top: 12px;
  align-items: flex-start;
}

.demo-ft button,
.impact button,
.dx-link {
  border: 0;
  background: none;
  padding: 0;
  color: var(--cy);
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
}

.demo-ft button:hover,
.impact button:hover,
.dx-link:hover { color: var(--ink); }

.ai-row { grid-template-columns: 1fr auto; align-items: stretch; }
.ai-row > div:first-child { display: grid; gap: 10px; }

.demo-card.accent {
  border-color: rgba(28, 181, 242, 0.35);
  background: rgba(11, 41, 82, 0.85);
}

.demo-card .mono em {
  font-style: normal;
  color: var(--amb);
  margin-left: 8px;
}

.bars {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 112px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--ln);
  background: rgba(5, 14, 32, 0.85);
}

.bars i {
  display: block;
  width: 7px;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(to top, rgba(28, 181, 242, 0.2), var(--cy));
}

.bars i.amb {
  background: linear-gradient(to top, rgba(255, 176, 46, 0.2), var(--amb));
}

.bars.flat {
  height: 52px;
  padding: 0;
  border: 0;
  background: none;
  width: 100%;
  margin-top: 10px;
}

.bars.flat i { flex: 1; width: auto; }

.code-row {
  display: grid;
  grid-template-columns: 1.35fr 0.95fr;
  gap: 10px;
}

.demo pre.code {
  margin: 0;
  overflow-x: auto;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(28, 181, 242, 0.3);
  background: rgba(5, 21, 46, 0.9);
  color: #bce8ff;
  font: 400 0.72rem/1.55 "JetBrains Mono", monospace;
  white-space: pre;
}

.demo pre.code.legacy {
  border-color: rgba(255, 176, 46, 0.3);
  background: rgba(20, 16, 10, 0.8);
  color: #ffd58a;
}

.impact { display: flex; flex-direction: column; justify-content: space-between; }
.impact strong {
  display: block;
  margin-top: 6px;
  font: italic 400 1.7rem "Instrument Serif", serif;
  color: var(--cy);
}
.demo[data-code="legacy"] .impact strong { color: var(--amb); }

.lens {
  position: relative;
  z-index: 1;
  grid-template-columns: repeat(3, 1fr);
}

.kpi strong {
  margin-top: 4px;
  font: italic 400 1.8rem "Instrument Serif", serif;
  color: var(--cy);
}

.kpi strong.ink { color: var(--ink); font-size: 1.45rem; }

.bin {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: space-around;
  opacity: 0.28;
  pointer-events: none;
  overflow: hidden;
}

.bin span {
  font: 400 0.72rem/1.15 "JetBrains Mono", monospace;
  color: var(--cy);
  animation: bin-fall 5s linear infinite;
}

.bin span:nth-child(2) { animation-delay: 0.9s; }
.bin span:nth-child(3) { animation-delay: 0.3s; }
.bin span:nth-child(4) { animation-delay: 1.4s; }
.bin span:nth-child(5) { animation-delay: 0.6s; }
.bin span:nth-child(6) { animation-delay: 1.1s; }
.bin span:nth-child(7) { animation-delay: 0.2s; }

@keyframes bin-fall {
  from { transform: translateY(-40%); }
  to { transform: translateY(40%); }
}

.wa-panel {
  position: fixed;
  right: clamp(14px, 3vw, 36px);
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.wa-panel .wa-fab {
  position: static;
  width: auto;
  height: auto;
  padding: 0 18px 0 14px;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #041d0e;
  font: 500 0.9rem/1 Inter, system-ui, sans-serif;
  cursor: pointer;
}

.wa-panel .wa-fab span { white-space: nowrap; }
.wa-panel .wa-fab::after { display: none; }
.wa-panel .wa-fab svg { width: 22px; height: 22px; }

.wa-card {
  width: min(calc(100vw - 2rem), 350px);
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(159, 214, 255, 0.25);
  background: rgba(8, 23, 52, 0.96);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
}

.wa-card-hd { align-items: flex-start; padding-bottom: 10px; border-bottom: 1px solid var(--ln); }
.wa-card-hd .mono { display: block; color: var(--cy); font-size: 0.68rem; }
.wa-card-hd b { display: block; margin-top: 2px; font-weight: 500; font-size: 0.88rem; }
.wa-card p { margin: 12px 0; }

.wa-opt {
  width: 100%;
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--ln);
  background: rgba(255, 255, 255, 0.05);
  color: #e3ecfa;
  font-size: 0.78rem;
  font-weight: 500;
  text-align: left;
}

.wa-opt.go {
  border-color: rgba(37, 211, 102, 0.4);
  background: rgba(37, 211, 102, 0.15);
}

.wa-opt i { font-style: normal; color: var(--bl); }
.wa-opt.go i { color: #25d366; }

.dx {
  position: fixed;
  inset: 0;
  z-index: 40;
}

.dx:not([hidden]) { display: flex; justify-content: flex-end; }

.dx-scrim {
  position: absolute;
  inset: 0;
  background: rgba(4, 10, 24, 0.75);
  backdrop-filter: blur(4px);
}

.dx-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(100%, 36rem);
  height: 100%;
  overflow: auto;
  padding: 28px 24px 32px;
  border-left: 1px solid rgba(159, 214, 255, 0.2);
  background: #081734;
  box-shadow: -24px 0 60px rgba(0, 0, 0, 0.45);
}

.dx-hd { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid var(--ln); }
.dx-hd .mono { color: var(--cy); font-size: 0.72rem; }
.dx-hd h2 {
  margin: 8px 0 0;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  max-width: 16ch;
}
.dx-hd em { font-style: italic; color: var(--bl); }

.dx-x {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: #d6e3f7;
  font-size: 1.4rem;
  line-height: 1;
}

.dx-prog { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px; }
.dx-prog i { display: block; height: 4px; border-radius: 99px; background: rgba(255, 255, 255, 0.12); }
.dx-prog i.on { background: var(--cy); }

.dx [data-dx-view] { margin-top: 22px; }
.dx [data-dx-view] > p,
.dx-foot { color: #d6e3f7; font-size: 0.9rem; }

.dx-choice,
.dx-bn {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 14px 16px;
  text-align: left;
  color: var(--ink);
}

.dx-choice .mono { color: var(--cy); font-size: 0.72rem; }
.dx-choice .mono.amb { color: var(--amb); }
.dx-choice b {
  margin-top: 4px;
  font: italic 400 1.45rem "Instrument Serif", serif;
}
.dx-choice.is-on,
.dx-bn.is-on {
  border-color: var(--cy);
  background: rgba(28, 181, 242, 0.14);
}

.dx-bn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

.dx-row { margin-bottom: 12px; }
.dx-row .mono { color: var(--bl); font-size: 0.72rem; letter-spacing: 0.12em; }

.dx-lab {
  display: block;
  margin: 16px 0 6px;
  font: 400 0.68rem "JetBrains Mono", monospace;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #b4c6e2;
}

.dx input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: #050f24;
  color: var(--ink);
  font: inherit;
  font-size: 0.92rem;
}

.dx input:focus { outline: 2px solid var(--cy); outline-offset: 1px; }

.dx-inline { display: flex; gap: 8px; }
.dx-inline input { flex: 1; }
.dx-next {
  border: 0;
  border-radius: 12px;
  padding: 0 16px;
  background: var(--ink);
  color: #0a1326;
  font-weight: 500;
  white-space: nowrap;
}

.dx-sumline {
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--ln);
  background: rgba(11, 31, 68, 0.7);
  font-size: 0.8rem;
  color: #d6e3f7;
}
.dx-sumline span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.dx-err {
  margin: 12px 0 0;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 176, 46, 0.4);
  background: rgba(255, 176, 46, 0.1);
  color: var(--amb);
  font-size: 0.78rem;
}

.dx-actions { margin-top: 18px; }
.dx-actions .pill { padding: 12px 18px; font-size: 0.84rem; }

.dx-ready { padding: 18px; border-color: rgba(28, 181, 242, 0.35); background: rgba(11, 35, 78, 0.85); }
.dx-ready .mono { color: var(--cy); font-size: 0.78rem; letter-spacing: 0.04em; text-transform: none; }
.dx-ready pre {
  margin: 12px 0 0;
  white-space: pre-wrap;
  font: 400 0.88rem/1.55 Inter, system-ui, sans-serif;
  color: #e3ecfa;
}

.dx-wa {
  display: flex;
  justify-content: center;
  margin-top: 14px;
  padding: 13px 18px;
  border-radius: 999px;
  background: #25d366;
  color: #051b0e;
  font-weight: 500;
  font-size: 0.9rem;
}

.dx-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.dx-pair .pill { justify-content: center; padding: 12px 10px; font-size: 0.82rem; }
#dx-edit { display: inline-block; margin-top: 14px; }
.dx-foot { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--ln); }

@media (max-width: 720px) {
  .demo-grid,
  .lens,
  .code-row,
  .ai-row,
  .dx-pair { grid-template-columns: 1fr; }
  .bars:not(.flat) { display: none; }
  .wa-panel .wa-fab span { display: none; }
  .wa-panel .wa-fab { width: 58px; height: 58px; padding: 0; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .bin span { animation: none; }
}
