/* Nosotros: escenas propias. Prefijo ns-. Hover con translate/scale (transform lo usa GSAP). */

/* ── Portada: la ficha de la agencia ── */
html:not(.ph-oscura) .ns-stage { flex-direction: column; }
.ns-3d { width: clamp(88px, 8.4vw, 132px); right: clamp(10px, 1.6vw, 24px); top: clamp(8px, 1.2vw, 18px); }
.ns-ficha { position: relative; z-index: 2; width: min(100%, 470px); padding: 16px 18px 20px; border-radius: 22px; box-shadow: 0 26px 64px rgba(29, 42, 61, .22); font-size: 1rem; }
.ns-ficha-head { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--ui-line); font-size: .875rem; font-weight: 600; color: var(--ui-soft); }
.ns-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: #eef1ec; }
.ns-tab { flex: 1; min-height: 40px; padding: 0 10px; border: 0; border-radius: 999px; background: none; color: #4f5c70; font: inherit; font-size: .875rem; font-weight: 600; cursor: pointer; transition: background-color .2s ease, color .2s ease; }
.ns-tab:hover { color: #1d2a3d; }
.ns-tab.is-on { background: var(--navy); color: var(--lime); }
.ns-tab:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.ns-panel { margin-top: 14px; min-height: 216px; }
.js .ns-panel:not(.is-on) { display: none; }
.ns-nums { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ns-num { display: grid; align-content: start; gap: 4px; padding: 14px; border-radius: 14px; background: #f0f3f1; }
.ns-num:first-child { background: #eef3b3; box-shadow: inset 0 0 0 2px var(--lime); }
.ns-num b { font-size: clamp(1.5rem, 2.2vw, 1.875rem); font-weight: 600; letter-spacing: -0.035em; line-height: 1; color: #1d2a3d; font-variant-numeric: tabular-nums; }
.ns-num b small { font-size: .55em; letter-spacing: -0.01em; color: #4f5c70; }
.ns-num span { font-size: .8125rem; line-height: 1.25; color: #4f5c70; }
.ns-panel-p { font-size: .875rem; line-height: 1.35; color: #4f5c70; margin-bottom: 12px; }
.ns-stack { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ns-stack li { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 12px; border-radius: 12px; background: #f0f3f1; font-size: .875rem; font-weight: 500; line-height: 1.15; }
.ns-stack svg { flex: none; width: 18px; height: 18px; color: var(--brand); }
.ns-quote { position: relative; padding: 16px 16px 16px 18px; border-radius: 14px; background: #eef3b3; box-shadow: inset 4px 0 0 var(--lime); }
.ns-quote svg { width: 22px; height: 22px; color: #5f6800; margin-bottom: 6px; }
.ns-quote p { font-size: 1rem; line-height: 1.4; color: #1d2a3d; }
.ns-motto { margin-top: 12px; font-size: .8125rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #5f6800; }
.ns-chip { position: absolute; z-index: 4; left: clamp(10px, 2vw, 30px); bottom: clamp(16px, 2vw, 30px); display: flex; align-items: center; gap: 12px; margin: 0; padding: 10px 18px 10px 10px; border-radius: 16px; box-shadow: 0 18px 44px rgba(29, 42, 61, .24); }
.ns-chip b { display: block; font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.015em; line-height: 1.15; }
.ns-chip span:last-child { font-size: .875rem; line-height: 1.25; color: var(--ui-soft); }
.ns-chip-ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--navy); color: var(--lime); }
.ns-chip-ico svg { width: 20px; height: 20px; }

/* Etiqueta «Ejemplo» de las mini interfaces */
.ns-eg { flex: none; padding: 2px 9px; border-radius: 999px; background: var(--ui-line); color: var(--ui-soft); font-size: .75rem; font-weight: 600; }

/* ── Historia: bonito, pero… → bonito y que vende ── */
.ns-story .tile-copy .tile-p + .tile-p { margin-top: 12px; }
.ns-story .tile-p { color: var(--soft); }
.ns-story-art { margin-top: 0; }
.ns-site { position: relative; width: min(100%, 520px); padding: 16px 16px 18px; border-radius: 20px; }
.ns-site-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.ns-site-tabs { display: grid; font-size: .875rem; font-weight: 600; }
.ns-site-tabs > span { grid-area: 1 / 1; padding: 4px 12px; border-radius: 999px; transition: opacity .3s ease; }
.ns-t-old { background: #fde4e1; color: #a1271b; opacity: 0; }
.ns-t-new { background: #eef3b3; color: #3f4600; }
.ns-site.is-old .ns-t-old { opacity: 1; }
.ns-site.is-old .ns-t-new { opacity: 0; }
.ns-win { padding: 0 6px 6px; border-radius: 12px; background: #101722; }
.ns-win .dv-bar { height: 26px; }
.ns-win .dv-dots b { width: 7px; }
.ns-win .dv-url { width: 60%; font-size: .6875rem; }
.ns-wire { position: relative; display: grid; gap: 8px; padding: 18px 16px 16px; border-radius: 6px; background: #f6f7f4; overflow: hidden; }
.ns-load { position: absolute; left: 0; right: 0; top: 0; height: 4px; background: rgba(29, 42, 61, .08); }
.ns-load span { display: block; width: 100%; height: 100%; background: var(--lime); transform-origin: 0 50%; }
.ns-w-h { width: 70%; height: 16px; border-radius: 6px; background: #283850; }
.ns-w-l { width: 88%; height: 8px; border-radius: 4px; background: #cfd6dd; }
.ns-w-l.short { width: 56%; }
.ns-w-btn { width: 96px; height: 22px; margin-top: 2px; border-radius: 999px; background: var(--lime); }
.ns-w-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 4px; }
.ns-w-grid span { height: 34px; border-radius: 6px; background: #e3e8ec; }
.ns-site.is-old .ns-wire { filter: grayscale(.9); opacity: .55; }
.ns-wire { transition: filter .4s ease, opacity .4s ease; }
.ns-checks { display: grid; gap: 6px; margin-top: 12px; }
.ns-checks li { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 12px; border-radius: 12px; background: #eef3b3; color: #1d2a3d; font-size: .9375rem; }
.ns-st { display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--lime); color: #1d2a3d; }
.ns-st svg { grid-area: 1 / 1; width: 15px; height: 15px; stroke-width: 3; }
.ns-st svg:first-child, .ns-checks .ns-old { display: none; }
.ns-checks .ns-new { font-weight: 600; }
.ns-checks li.is-old { background: #fbeceb; color: #7a2018; }
.ns-checks li.is-old .ns-st { background: #f6c6c0; color: #a1271b; }
.ns-checks li.is-old .ns-st svg:first-child, .ns-checks li.is-old .ns-old { display: block; }
.ns-checks li.is-old .ns-st svg:last-child, .ns-checks li.is-old .ns-new { display: none; }
.ns-site-toast { position: absolute; z-index: 3; right: -14px; bottom: -22px; min-height: 0; background: #ffffff; box-shadow: 0 18px 44px rgba(29, 42, 61, .22); }

/* ── Equipo ── */
.ns-team { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.ns-person { gap: 0; }
.ns-av { position: relative; display: grid; place-items: center; width: 104px; height: 104px; margin-bottom: 20px; }
.ns-ring { position: absolute; inset: 0; width: 100%; height: 100%; rotate: -90deg; }
.ns-ring circle { fill: none; stroke: var(--lime); stroke-width: 5; stroke-linecap: round; }
.ns-ini { display: grid; place-items: center; width: 82px; height: 82px; border-radius: 50%; background: var(--navy); color: var(--lime); font-size: 1.75rem; font-weight: 600; letter-spacing: -0.02em; }
.ns-av-ico { position: absolute; right: -2px; bottom: 2px; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--lime); color: var(--on-lime); box-shadow: 0 0 0 4px var(--tile); }
.ns-av-ico svg { width: 18px; height: 18px; }
.ns-name { font-size: clamp(1.5rem, 1.2rem + 1vw, 2.125rem); font-weight: 600; letter-spacing: -0.03em; line-height: 1.08; }
.ns-role { margin-top: 6px; font-size: var(--t-small); font-weight: 600; line-height: 1.3; color: var(--brand); }
.ns-bio { margin-top: 12px; font-size: var(--t-body); line-height: 1.45; color: var(--soft); }
.ns-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.ns-tags li { padding: 5px 12px; border-radius: 999px; background: var(--surface); font-size: .8125rem; font-weight: 600; line-height: 1.2; }
.ns-in { margin-top: auto; padding-top: 14px; align-self: flex-start; gap: .3em; }
.ns-in svg { width: 18px; height: 18px; }

/* ── Pilares ── */
.ns-pillars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.ns-pillar { gap: 0; }
.ns-pillar .tile-p { margin-top: 8px; color: var(--soft); }
.ns-p-ico { width: 48px; height: 48px; background: var(--navy); color: var(--lime); }
.ns-p-ico svg { width: 24px; height: 24px; }
.ns-p-n { margin-top: 18px; font-size: var(--t-small); font-weight: 600; color: var(--brand); }
.ns-pillar .h-step { margin-top: 4px; }
.ns-pui { margin-top: auto; padding: 16px; border-radius: 16px; }
.ns-pillar .tile-p { margin-bottom: 22px; }
.ns-pui-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; font-weight: 600; color: var(--ui-ink); }

/* 1 · Datos */
.ns-q { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 40px; padding: 6px 12px; border-radius: 10px; color: var(--ui-soft); }
.ns-q + .ns-q { margin-top: 4px; }
.ns-q > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ns-q-bar { height: 10px; border-radius: 999px; background: var(--ui-line); overflow: hidden; }
.ns-q-bar span { display: block; width: var(--w); height: 100%; border-radius: inherit; background: #8fa0bb; transform-origin: 0 50%; }
.ns-q.is-top { background: #eef3b3; color: #1d2a3d; font-weight: 600; }
.ns-q.is-top .ns-q-bar { background: rgba(29, 42, 61, .1); }
.ns-q.is-top .ns-q-bar span { background: var(--navy); }
.ns-q b { padding: 2px 8px; border-radius: 999px; background: var(--navy); color: var(--lime); font-size: .75rem; font-weight: 600; }

/* 2 · Velocidad */
.ns-track { position: relative; height: 6px; margin: 6px 13px 0; border-radius: 999px; background: var(--ui-line); }
.ns-track-fill { position: absolute; inset: 0; border-radius: inherit; background: var(--lime); transform-origin: 0 50%; }
.ns-milestones { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: -16px; }
.ns-milestones li { display: grid; justify-items: center; gap: 6px; font-size: .8125rem; font-weight: 500; text-align: center; color: var(--ui-ink); }
.ns-milestones li:first-child { justify-items: start; text-align: left; }
.ns-milestones li:last-child { justify-items: end; text-align: right; }
.ns-dot { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--lime); color: #1d2a3d; box-shadow: 0 0 0 3px var(--ui-bg); }
.ns-dot svg { width: 14px; height: 14px; stroke-width: 3; }
.ns-badge { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; padding: 8px 14px; border-radius: 999px; background: var(--navy); color: #f2f5f8; font-size: .875rem; font-weight: 600; }
.ns-badge svg { width: 18px; height: 18px; color: var(--lime); }

/* 3 · Conversión */
.ns-funnel { display: grid; gap: 6px; }
.ns-funnel li { display: flex; align-items: center; gap: 10px; width: var(--w); min-height: 40px; padding: 8px 12px; border-radius: 10px; background: #f0f3f1; color: #3f4a5c; font-size: .9375rem; font-weight: 500; }
.ns-funnel li:last-child { background: #eef3b3; color: #1d2a3d; font-weight: 600; box-shadow: inset 0 0 0 2px var(--lime); }
.ns-funnel svg { flex: none; width: 18px; height: 18px; }
.ns-conv { position: relative; }
.ns-conv-toast { width: fit-content; max-width: 100%; margin: 10px 0 0 auto; min-height: 0; padding: 8px 12px 8px 8px; background: #ffffff; box-shadow: 0 14px 34px rgba(29, 42, 61, .2); }
.ns-conv-toast .jr-app { width: 34px; height: 34px; border-radius: 10px; }
.ns-conv-toast .jr-app svg { width: 17px; height: 17px; }
.ns-conv-toast .jr-note-t { font-size: .8125rem; }
.ns-conv-toast .jr-note-t b { font-size: .875rem; }

/* 4 · Transparencia */
.ns-prop { display: grid; gap: 6px; }
.ns-prop li { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 8px 12px; border-radius: 10px; background: #f0f3f1; color: #1d2a3d; font-size: .9375rem; font-weight: 500; }
.ns-prop li > svg { flex: none; width: 18px; height: 18px; color: #4f5c70; }
.ns-ok { display: grid; place-items: center; margin-left: auto; width: 24px; height: 24px; border-radius: 50%; background: var(--lime); color: #1d2a3d; }
.ns-ok svg { width: 14px; height: 14px; stroke-width: 3; }
.ns-stamp { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; padding: 7px 14px; border: 2px solid var(--navy); border-radius: 999px; font-size: .875rem; font-weight: 600; color: var(--ui-ink); rotate: -3deg; }
.ns-stamp svg { width: 18px; height: 18px; }

/* Enlaces a servicios y portafolio */
.ns-go { margin-top: clamp(28px, 3vw, 44px); padding-inline: clamp(8px, 2vw, 28px); }
.ns-go-k { font-size: var(--t-kicker); font-weight: 600; letter-spacing: -0.012em; margin-bottom: 14px; }
.ns-go-list { display: flex; flex-wrap: wrap; gap: 8px; }
.ns-go-list a { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 18px 10px 12px; border-radius: 999px; background: var(--tile); color: var(--ink); font-weight: 500; transition: translate .18s var(--ease-out), background-color .18s ease, color .18s ease; }
.ns-go-list a svg { width: 20px; height: 20px; color: var(--brand); }
.ns-go-list a:hover { translate: 0 -3px; background: var(--navy); color: #f2f5f8; }
.ns-go-list a:hover svg { color: var(--lime); }
.ns-go-list a.is-work { background: var(--lime); color: var(--on-lime); }
.ns-go-list a.is-work svg { color: var(--on-lime); }
.ns-go-list a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* ── Misión ── */
.ns-mission { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: var(--gap); align-items: stretch; }
.ns-mv { display: grid; margin-top: clamp(20px, 2.4vw, 32px); }
.ns-mv-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 8px 20px; padding: 18px 0; border-top: 1px solid rgba(255, 255, 255, .16); }
.ns-mv-row:last-child { padding-bottom: 0; }
.ns-mv dt { display: flex; align-items: center; gap: 10px; font-size: var(--t-kicker); font-weight: 600; color: #ffffff; }
.ns-mv dd { font-size: var(--t-body); line-height: 1.5; color: #c8d1dc; }
.ns-mv-ico { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: rgba(200, 212, 0, .14); color: var(--lime); }
.ns-mv-ico svg { width: 19px; height: 19px; }
.ns-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ns-values { display: flex; flex-wrap: wrap; gap: 8px; }
.ns-values li { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, .08); color: #f2f5f8; font-size: .9375rem; font-weight: 500; transition: background-color .3s ease, color .3s ease; }
.ns-values li svg { width: 17px; height: 17px; color: var(--lime); transition: color .3s ease; }
.ns-values li.is-on { background: var(--lime); color: var(--on-lime); }
.ns-values li.is-on svg { color: var(--on-lime); }
.ns-where { position: relative; }
.ns-where-3d { width: clamp(76px, 7vw, 108px); right: 16px; top: 16px; }
.ns-where-h { margin-top: 8px; padding-right: 96px; font-size: clamp(1.5rem, 1.2rem + 1vw, 2.125rem); font-weight: 600; letter-spacing: -0.03em; line-height: 1.08; }
.ns-radar { position: relative; flex: 1; display: grid; place-items: center; min-height: 190px; margin-top: 18px; }
.ns-radar-ring { position: absolute; width: 140px; aspect-ratio: 1; border-radius: 50%; border: 2px solid var(--lime); opacity: 0; animation: ns-radar 3.6s ease-out infinite; }
.ns-radar-ring:nth-child(2) { animation-delay: 1.2s; }
.ns-radar-ring:nth-child(3) { animation-delay: 2.4s; }
.ns-radar-pin { position: relative; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--navy); color: var(--lime); box-shadow: 0 0 0 10px rgba(200, 212, 0, .18); }
.ns-radar-pin svg { width: 28px; height: 28px; }
@keyframes ns-radar { 0% { scale: .35; opacity: .9; } 100% { scale: 1.3; opacity: 0; } }
.ns-contact { display: grid; gap: 8px; margin-top: 18px; }
.ns-contact li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px 14px; padding: 14px; border-radius: 16px; background: var(--bg); }
.ns-contact small { display: block; font-size: .8125rem; font-weight: 600; color: var(--soft); }
.ns-contact li > span:nth-child(2) { font-weight: 500; line-height: 1.3; }
.ns-contact a { text-decoration: underline; text-decoration-color: var(--lime); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.ns-contact a:hover { color: var(--brand); }
.ns-live { display: inline-flex; align-items: center; justify-self: end; gap: 7px; padding: 4px 10px; border-radius: 999px; background: rgba(23, 138, 69, .1); color: #12723a; font-size: .75rem; font-weight: 600; }
.ns-live-dot { width: 8px; height: 8px; border-radius: 50%; background: #25d366; box-shadow: 0 0 0 0 rgba(37, 211, 102, .5); animation: ns-pulse 2s ease-out infinite; }
@keyframes ns-pulse { 0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, .55); } 70%, 100% { box-shadow: 0 0 0 9px rgba(37, 211, 102, 0); } }

/* ── Modo oscuro: las tarjetas blancas pasan a oscuras; los toques de color se ajustan ── */
html.dark .t-white .ns-q.is-top, html.dark .t-white .ns-funnel li:last-child { background: rgba(200, 212, 0, .16); color: var(--ink); }
html.dark .t-white .ns-q.is-top .ns-q-bar span { background: var(--lime); }
html.dark .t-white .ns-q.is-top .ns-q-bar { background: rgba(255, 255, 255, .1); }
html.dark .t-white .ns-q-bar span { background: #8fa0bb; }
html.dark .t-white .ns-funnel li, html.dark .t-white .ns-prop li { background: var(--surface); color: var(--ink); }
html.dark .t-white .ns-prop li > svg { color: var(--soft); }
html.dark .t-white .ns-badge, html.dark .ns-p-ico, html.dark .ns-ini, html.dark .ns-radar-pin { background: #0b111b; }
html.dark .t-white .ns-stamp { border-color: var(--lime); }
html.dark .t-white .ns-conv-toast, html.dark .ns-site-toast { background: #2a3a52; }
html.dark .t-white .ns-site .ns-checks li { background: rgba(200, 212, 0, .16); color: var(--ink); }
html.dark .t-white .ns-site .ns-checks li.is-old { background: rgba(255, 138, 128, .14); color: #ffb4ab; }
html.dark .t-white .ns-site .ns-checks li.is-old .ns-st { background: rgba(255, 138, 128, .25); color: #ffb4ab; }
html.dark .ns-t-old { background: rgba(255, 138, 128, .18); color: #ffb4ab; }
html.dark .ns-t-new { background: rgba(200, 212, 0, .18); color: #dfe65a; }
html.dark .ns-wire { background: #e9ece7; }
html.dark .ns-go-list a:hover { background: var(--lime); color: var(--on-lime); }
html.dark .ns-go-list a:hover svg { color: var(--on-lime); }
html.dark .ns-live { background: rgba(127, 227, 174, .14); color: #7fe3ae; }
html.dark .ns-contact a:hover { color: var(--lime); }

/* ── Responsive ── */
@media (max-width: 1023px) {
  .ns-where { min-height: 0; }
  .ns-team { grid-template-columns: minmax(0, 1fr); max-width: 640px; }
  .ns-mission { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .ns-pillars { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .ns-3d { width: 66px; right: 10px; top: 8px; }
  .ns-ficha { padding: 14px 14px 16px; }
  .ns-panel { min-height: 0; }
  .ns-tab { padding: 0 6px; font-size: .8125rem; }
  .ns-num { padding: 12px; }
  .ns-stack { grid-template-columns: minmax(0, 1fr); }
  .ns-chip { position: relative; left: auto; bottom: auto; align-self: flex-start; margin-top: 12px; padding: 6px 14px 6px 6px; }
  .ns-chip-ico { width: 32px; height: 32px; }
  html:not(.ph-oscura) .ns-stage { padding-bottom: 20px; }
  .ns-site-toast { right: -4px; bottom: -26px; }
  .ns-story-art { padding-bottom: 18px; }
  .ns-mv-row { grid-template-columns: minmax(0, 1fr); }
  .ns-where-h { padding-right: 70px; }
  .ns-where-3d { width: 64px; }
  .ns-live { grid-column: 2; justify-self: start; }
  .ns-q { grid-template-columns: minmax(0, 1fr) auto; row-gap: 6px; padding-block: 8px; }
  .ns-q-bar { grid-column: 1 / -1; grid-row: 2; }
  .ns-story .h-tile { font-size: 1.75rem; }
  #metodologia .h-section { font-size: 2.125rem; }
  .ns-milestones li { font-size: .75rem; }
  .ns-funnel li { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .ns-live-dot { animation: none; }
  .ns-radar-ring { animation: none; opacity: .35; scale: 1; }
  .ns-radar-ring:nth-child(2) { scale: 1.3; opacity: .2; }
  .ns-radar-ring:nth-child(3) { display: none; }
}
