/* ============ NOSOTROS · CÓMO TRABAJAMOS · #nosotros-forma (.nf-) ============ */
.nf { padding-block: var(--space-l) var(--space-xl); }
.nf-head { display: grid; gap: clamp(14px, 2vw, 24px); margin-bottom: clamp(1.4rem, 3vw, 2.6rem); max-width: 60rem; }
.nf-title { font-size: var(--step-4); line-height: .92; letter-spacing: -.045em; font-weight: 760; text-wrap: balance; }
.nf-title--s { font-size: var(--step-4); }

/* --- principios --- */
.nf-principles { --g: clamp(12px, 2vw, 28px); --stage-h: min(40svh, 380px); position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--g); align-items: start; }
.nf-list { grid-column: 1 / span 7; grid-row: 1; list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-strong); }
.nf-item { border-bottom: 1px solid var(--line); }
.nf-btn { width: 100%; display: grid; grid-template-columns: 3.2rem 1fr 1.4rem; align-items: center; gap: .6rem 1rem; padding: clamp(.9rem, 1.8vw, 1.5rem) 0; text-align: left; position: relative; color: var(--muted); transition: color .5s var(--ease-out), padding .6s var(--ease-out); }
.nf-btn::before { content: ''; position: absolute; left: 0; top: 0; bottom: -1px; width: 2px; background: var(--accent); transform: scaleY(0); transform-origin: top; transition: transform .6s var(--ease-out); }
.nf-n { font-size: .8rem; color: var(--muted); transition: color .4s; }
.nf-t { font-size: clamp(1.4rem, 1rem + 1.5vw, 2.45rem); line-height: 1; letter-spacing: -.035em; font-weight: 720; text-wrap: balance; }
.nf-plus { position: relative; width: 14px; height: 14px; justify-self: end; }
.nf-plus::before, .nf-plus::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; background: currentColor; transition: transform .5s var(--ease-out); }
.nf-plus::after { transform: rotate(90deg); }
.nf-btn:hover { color: var(--paper); }
.nf-item.is-on .nf-btn { color: var(--paper); padding-left: 1rem; }
.nf-item.is-on .nf-btn::before { transform: scaleY(1); }
.nf-item.is-on .nf-n { color: var(--accent); }
.nf-item.is-on .nf-plus::after { transform: rotate(0); }

/* panel de texto: en desktop se lee en .nf-read (sticky, pegado al visor); el panel queda solo para lectores de pantalla */
.nf-panel { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.nf-panel-in p { color: var(--paper-2); font-size: var(--step-0); line-height: 1.55; text-wrap: pretty; }
.nf-fig { display: none; }
.nf-aside { grid-column: 9 / -1; grid-row: 1; position: sticky; top: clamp(84px, 12vh, 120px); display: grid; gap: 1.1rem; align-self: start; }
.nf-read { margin: 0; color: var(--paper-2); font-size: var(--step-0); line-height: 1.55; text-wrap: pretty; min-height: 7.5em; }

.nf-stage { position: relative; height: var(--stage-h); border: 1px solid var(--line); cursor: crosshair; transition: border-color .4s var(--ease-out); }
.nf-stage:hover { border-color: rgba(59, 91, 255, .5); }
.nf-c { position: absolute; width: 16px; height: 16px; border: 0 solid var(--line-strong); pointer-events: none; transition: border-color .4s var(--ease-out); }
.nf-c--tl { top: 0; left: 0; border-width: 1px 0 0 1px; } .nf-c--tr { top: 0; right: 0; border-width: 1px 1px 0 0; }
.nf-c--bl { bottom: 0; left: 0; border-width: 0 0 1px 1px; } .nf-c--br { bottom: 0; right: 0; border-width: 0 1px 1px 0; }
.nf-stage:hover .nf-c { border-color: var(--cobalt); }
.nf-cap { position: absolute; left: 14px; bottom: 12px; display: grid; gap: .25em; font-family: var(--font-mono); font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); pointer-events: none; }
.nf-cap b { font-family: var(--font-pixel); font-weight: 400; color: var(--paper); font-size: .78rem; }

/* --- herramientas --- */
.nf-tools { margin-top: clamp(4rem, 9vw, 9rem); }
.nf-head--tools { margin-bottom: clamp(1.5rem, 4vw, 3rem); }
.nf-tools-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(12px, 2vw, 28px); align-items: start; }
.nf-cubes { grid-column: 1 / span 7; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.nf-cubes li { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.nf-cube { --s: clamp(54px, 5.2vw, 78px); --fg: var(--ink); width: 100%; display: grid; justify-items: center; gap: 1.5rem; padding: clamp(1.4rem, 3vw, 2.4rem) .5rem clamp(1rem, 2vw, 1.5rem); perspective: 700px; position: relative; transition: background .4s var(--ease-out); }
.nf-cube:hover { background: rgba(241, 238, 230, .035); }
.nf-cube[aria-pressed="true"] { background: rgba(241, 238, 230, .06); }
.nf-cube[aria-pressed="true"]::after { content: ''; position: absolute; left: 12px; top: 12px; width: 7px; height: 7px; background: var(--c); }
.nf-cube-3d { position: relative; display: block; width: var(--s); height: var(--s); transform-style: preserve-3d; transform: rotateX(-24deg) rotateY(-34deg); transition: transform .9s var(--ease-out); animation: nf-bob 6s ease-in-out infinite; }
.nf-cubes li:nth-child(2n) .nf-cube-3d { animation-delay: -2s; } .nf-cubes li:nth-child(3n) .nf-cube-3d { animation-delay: -4s; }
@keyframes nf-bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }
.nf-cube:hover .nf-cube-3d, .nf-cube:focus-visible .nf-cube-3d { transform: rotateX(-14deg) rotateY(-18deg) scale(1.08); }
.nf-cube.is-spin .nf-cube-3d { animation: nf-spin 1s var(--ease-inout); }
@keyframes nf-spin { from { transform: rotateX(-24deg) rotateY(-34deg); } to { transform: rotateX(-24deg) rotateY(326deg); } }
.nf-cube-3d .f { position: absolute; inset: 0; display: grid; place-items: center; background-image: linear-gradient(rgba(0, 0, 0, .16) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 0, 0, .16) 1px, transparent 1px); background-size: 25% 25%; }
.nf-cube-3d .f-f { background-color: var(--c); transform: translateZ(calc(var(--s) / 2)); }
.nf-cube-3d .f-r { background-color: color-mix(in srgb, var(--c) 58%, #000); transform: rotateY(90deg) translateZ(calc(var(--s) / 2)); }
.nf-cube-3d .f-t { background-color: color-mix(in srgb, var(--c) 78%, #fff); transform: rotateX(90deg) translateZ(calc(var(--s) / 2)); }
.nf-cube-3d b { font-family: var(--font-pixel); font-weight: 400; font-size: calc(var(--s) * .34); color: var(--fg); letter-spacing: 0; }
.nf-cube-l { display: grid; gap: .2em; justify-items: center; text-align: center; font-size: var(--step-0); font-weight: 560; color: var(--paper); }
.nf-cube-k { font-size: .75rem; letter-spacing: .08em; color: var(--muted); }

.nf-detail { grid-column: 9 / -1; position: sticky; top: clamp(90px, 14vh, 140px); display: grid; gap: .9rem; padding: 1.4rem 0 0; border-top: 1px solid var(--line-strong); justify-items: start; }
.nf-detail-k { color: var(--accent); }
.nf-detail-t { font-size: var(--step-4); line-height: .95; letter-spacing: -.04em; font-weight: 760; }
.nf-detail-p { color: var(--paper-2); max-width: 30em; min-height: 4.6em; text-wrap: pretty; }
.nf-detail-cta { margin-top: .6rem; }

@media (max-width: 1100px) {
  .nf-list { grid-column: 1 / span 12; }
  .nf-aside { display: none; }
  .nf-principles { min-height: 0; }
  .nf-panel { position: static; width: auto; height: auto; overflow: visible; clip-path: none; white-space: normal; display: grid; grid-template-rows: 0fr; transition: grid-template-rows .6s var(--ease-out); }
  .nf-panel-in { overflow: hidden; min-height: 0; padding-left: 4.2rem; }
  .nf-item.is-on .nf-panel { grid-template-rows: 1fr; }
  .nf-panel-in p { padding-bottom: .4rem; }
  .nf-fig { display: block; height: 24svh; margin-block: 1rem 1.4rem; }
  .nf-cubes { grid-column: 1 / span 12; }
  .nf-detail { grid-column: 1 / -1; position: static; margin-top: 2rem; }
}
@media (max-width: 760px) {
  .nf-btn { grid-template-columns: 2.2rem 1fr 1rem; }
  .nf-panel-in { padding-left: 3.2rem; }
  .nf-t { font-size: clamp(1.25rem, 1rem + 1.2vw, 1.6rem); }
  .nf-cubes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .nf-cube { --s: 44px; gap: 1.1rem; padding: 1.1rem .2rem .9rem; }
  .nf-cube-l { font-size: .8rem; }
  .nf-cube-k { font-size: .7rem; }
  .nf-detail-t { font-size: var(--step-3); }
}
@media (prefers-reduced-motion: reduce) { .nf-cube-3d { animation: none; } }
